From 9d17a531ee1f0d31d3dfe2b815e6c216279b533a Mon Sep 17 00:00:00 2001 From: "John W. Bruce" Date: Fri, 9 Oct 2020 16:08:56 -0700 Subject: [PATCH] Source release 16.4.0 --- CHANGELOG.md | 128 + README.md | 8 +- Widevine_CE_CDM_IntegrationGuide_16.3.0.pdf | Bin 461696 -> 0 bytes Widevine_CE_CDM_IntegrationGuide_16.4.0.pdf | Bin 0 -> 459884 bytes build.py | 166 +- cdm/cdm.gyp | 2 +- cdm/core_unittests.gypi | 2 + cdm/include/cdm.h | 52 +- cdm/include/cdm_version.h | 2 +- cdm/src/cdm.cpp | 145 +- cdm/test/cdm_test.cpp | 52 +- cdm/test/test_host.cpp | 30 +- core/include/cdm_engine.h | 5 - core/include/cdm_session.h | 21 + core/include/license.h | 13 +- core/include/policy_engine.h | 27 +- core/include/policy_timers_v16.h | 2 + core/include/wv_cdm_types.h | 47 +- core/src/cdm_engine.cpp | 25 +- core/src/cdm_session.cpp | 100 +- core/src/crypto_session.cpp | 57 +- core/src/license.cpp | 66 +- core/src/policy_engine.cpp | 34 +- core/src/policy_timers_v16.cpp | 6 + core/src/privacy_crypto_boringssl.cpp | 5 +- core/src/usage_table_header.cpp | 19 +- core/test/Android.bp | 22 + .../cdm_engine_metrics_decorator_unittest.cpp | 4 +- core/test/cdm_engine_test.cpp | 47 +- core/test/cdm_session_unittest.cpp | 2 +- core/test/crypto_session_unittest.cpp | 17 +- core/test/duration_use_case_test.cpp | 1632 +++ core/test/generic_crypto_unittest.cpp | 10 +- core/test/parallel_operations_test.cpp | 37 +- .../policy_engine_constraints_unittest.cpp | 12 +- core/test/policy_engine_unittest.cpp | 296 +- core/test/policy_integration_test.cpp | 195 + core/test/test_base.cpp | 12 +- core/test/test_base.h | 21 + core/test/test_printers.cpp | 6 + core/test/url_request.cpp | 59 +- core/test/url_request.h | 6 + core/test/url_request_unittest.cpp | 104 + core/test/usage_table_header_unittest.cpp | 28 +- metrics/include/attribute_handler.h | 2 +- metrics/include/event_metric.h | 2 +- metrics/include/metrics_collections.h | 2 +- metrics/include/value_metric.h | 2 +- metrics/src/Android.bp | 2 +- metrics/src/counter_metric.cpp | 2 +- metrics/src/metrics_collections.cpp | 6 +- .../src/{metrics.proto => wv_metrics.proto} | 17 +- metrics/test/metrics_collections_test.cpp | 2 +- metrics/test/metrics_collections_unittest.cpp | 2 +- metrics/test/value_metric_unittest.cpp | 2 +- oemcrypto/include/OEMCryptoCENC.h | 6141 ++++++----- oemcrypto/include/OEMCryptoCENCCommon.h | 38 +- oemcrypto/test/fuzz_tests/README.md | 120 +- .../fuzz_tests/oemcrypto_decrypt_cenc_fuzz.cc | 182 + .../test/fuzz_tests/oemcrypto_fuzz_helper.cc | 17 + .../test/fuzz_tests/oemcrypto_fuzz_helper.h | 14 +- .../test/fuzz_tests/oemcrypto_fuzz_structs.h | 11 + .../test/fuzz_tests/oemcrypto_fuzztests.gyp | 12 + .../test/fuzz_tests/oemcrypto_fuzztests.gypi | 14 +- ...mcrypto_load_entitled_content_keys_fuzz.cc | 66 + .../fuzz_tests/oemcrypto_load_renewal_fuzz.cc | 14 +- oemcrypto/test/oec_decrypt_fallback_chain.cpp | 73 +- oemcrypto/test/oec_decrypt_fallback_chain.h | 11 +- oemcrypto/test/oec_device_features.cpp | 8 +- oemcrypto/test/oec_session_util.cpp | 62 +- oemcrypto/test/oec_session_util.h | 7 +- .../oemcrypto_corpus_generator_helper.cpp | 10 + .../test/oemcrypto_corpus_generator_helper.h | 5 + oemcrypto/test/oemcrypto_test.cpp | 651 +- platforms/x86-64/environment.py | 3 +- platforms/x86-64/settings.gypi | 130 +- third_party/boringssl/boringssl.gyp | 73 +- third_party/disable_warnings.gypi | 37 + third_party/gmock.gyp | 31 +- third_party/protobuf.gypi | 60 +- third_party/protobuf/BUILD | 491 +- third_party/protobuf/CHANGES.txt | 351 +- third_party/protobuf/Makefile.am | 189 +- third_party/protobuf/Makefile.in | 218 +- third_party/protobuf/README.md | 4 +- third_party/protobuf/WORKSPACE | 75 +- third_party/protobuf/aclocal.m4 | 195 +- third_party/protobuf/ar-lib | 19 +- third_party/protobuf/benchmarks/Makefile.am | 6 + third_party/protobuf/benchmarks/Makefile.in | 1029 +- .../protobuf/benchmarks/benchmarks.proto | 63 + .../proto2/benchmark_message1_proto2.proto | 108 + .../proto3/benchmark_message1_proto3.proto | 108 + .../google_message2/benchmark_message2.proto | 108 + .../google_message3/benchmark_message3.proto | 566 ++ .../benchmark_message3_1.proto | 1298 +++ .../benchmark_message3_2.proto | 528 + .../benchmark_message3_3.proto | 496 + .../benchmark_message3_4.proto | 514 + .../benchmark_message3_5.proto | 496 + .../benchmark_message3_6.proto | 483 + .../benchmark_message3_7.proto | 81 + .../benchmark_message3_8.proto | 1925 ++++ .../google_message4/benchmark_message4.proto | 484 + .../benchmark_message4_1.proto | 500 + .../benchmark_message4_2.proto | 316 + .../benchmark_message4_3.proto | 779 ++ .../protobuf/benchmarks/google_size.proto | 138 + .../protobuf/build_files_updated_unittest.sh | 62 + .../protobuf/cc_proto_blacklist_test.bzl | 38 + third_party/protobuf/cmake/CMakeLists.txt | 29 +- third_party/protobuf/cmake/README.md | 12 +- .../protobuf/cmake/extract_includes.bat.in | 3 +- third_party/protobuf/cmake/install.cmake | 2 +- .../protobuf/cmake/libprotobuf-lite.cmake | 6 + third_party/protobuf/cmake/libprotobuf.cmake | 9 +- .../protobuf/cmake/protobuf-config.cmake.in | 33 +- third_party/protobuf/cmake/tests.cmake | 18 +- third_party/protobuf/compile | 17 +- .../protobuf/compiler_config_setting.bzl | 4 +- third_party/protobuf/configure | 287 +- third_party/protobuf/configure.ac | 7 +- .../protobuf/conformance/ConformanceJava.java | 30 + .../conformance/ConformanceJavaLite.java | 29 + third_party/protobuf/conformance/Makefile.am | 13 +- third_party/protobuf/conformance/Makefile.in | 128 +- .../binary_json_conformance_suite.cc | 1334 ++- .../binary_json_conformance_suite.h | 81 +- .../protobuf/conformance/conformance.proto | 4 +- .../protobuf/conformance/conformance_cpp.cc | 60 +- .../protobuf/conformance/conformance_objc.m | 11 +- .../protobuf/conformance/conformance_php.php | 0 .../conformance/conformance_python.py | 3 - .../protobuf/conformance/conformance_test.cc | 101 +- .../protobuf/conformance/conformance_test.h | 70 +- .../conformance/conformance_test_runner.cc | 64 +- .../protobuf/conformance/failure_list_js.txt | 128 +- .../protobuf/conformance/failure_list_php.txt | 74 +- .../conformance/failure_list_php_c.txt | 78 +- .../conformance/failure_list_python.txt | 26 +- .../conformance/failure_list_ruby.txt | 106 +- .../text_format_conformance_suite.cc | 102 +- .../text_format_conformance_suite.h | 18 +- .../conformance/third_party/jsoncpp/json.h | 6 +- .../third_party/jsoncpp/jsoncpp.cpp | 2 +- third_party/protobuf/depcomp | 8 +- third_party/protobuf/examples/BUILD | 4 + third_party/protobuf/examples/README.md | 4 +- third_party/protobuf/examples/WORKSPACE | 53 +- third_party/protobuf/examples/add_person.dart | 27 +- .../protobuf/examples/list_people.dart | 16 +- .../protobuf/examples/third_party/zlib.BUILD | 60 - .../protobuf/generate_descriptor_proto.sh | 2 +- third_party/protobuf/install-sh | 49 +- third_party/protobuf/ltmain.sh | 217 +- third_party/protobuf/m4/libtool.m4 | 27 +- third_party/protobuf/missing | 16 +- .../protobuf/objectivec/GPBProtocolBuffers.m | 20 +- third_party/protobuf/protobuf.bzl | 137 +- third_party/protobuf/protobuf.pc.in | 1 + third_party/protobuf/protobuf_deps.bzl | 65 + third_party/protobuf/six.BUILD | 13 - third_party/protobuf/src/Makefile.am | 23 +- third_party/protobuf/src/Makefile.in | 2475 +++-- third_party/protobuf/src/README.md | 26 +- .../protobuf/src/google/protobuf/any.h | 4 +- .../protobuf/src/google/protobuf/any.pb.cc | 220 +- .../protobuf/src/google/protobuf/any.pb.h | 236 +- .../protobuf/src/google/protobuf/any_lite.cc | 1 - .../protobuf/src/google/protobuf/any_test.cc | 1 - .../protobuf/src/google/protobuf/api.pb.cc | 1044 +- .../protobuf/src/google/protobuf/api.pb.h | 925 +- .../protobuf/src/google/protobuf/arena.cc | 37 +- .../protobuf/src/google/protobuf/arena.h | 82 +- .../protobuf/src/google/protobuf/arena_impl.h | 69 +- .../src/google/protobuf/arena_unittest.cc | 3 + .../src/google/protobuf/arenastring.h | 66 +- .../google/protobuf/arenastring_unittest.cc | 2 +- .../protobuf/compiler/annotation_test_util.h | 2 +- .../protobuf/compiler/code_generator.cc | 2 +- .../google/protobuf/compiler/code_generator.h | 10 + .../compiler/command_line_interface.cc | 421 +- .../compiler/command_line_interface.h | 41 +- .../command_line_interface_unittest.cc | 310 +- .../compiler/cpp/cpp_bootstrap_unittest.cc | 52 +- .../google/protobuf/compiler/cpp/cpp_enum.cc | 189 +- .../protobuf/compiler/cpp/cpp_enum_field.cc | 187 +- .../protobuf/compiler/cpp/cpp_enum_field.h | 3 - .../protobuf/compiler/cpp/cpp_extension.cc | 9 +- .../google/protobuf/compiler/cpp/cpp_field.cc | 25 +- .../google/protobuf/compiler/cpp/cpp_field.h | 20 +- .../google/protobuf/compiler/cpp/cpp_file.cc | 166 +- .../google/protobuf/compiler/cpp/cpp_file.h | 5 +- .../protobuf/compiler/cpp/cpp_generator.cc | 4 +- .../protobuf/compiler/cpp/cpp_generator.h | 11 +- .../protobuf/compiler/cpp/cpp_helpers.cc | 476 +- .../protobuf/compiler/cpp/cpp_helpers.h | 129 +- .../protobuf/compiler/cpp/cpp_map_field.cc | 159 +- .../protobuf/compiler/cpp/cpp_map_field.h | 6 - .../protobuf/compiler/cpp/cpp_message.cc | 2034 ++-- .../protobuf/compiler/cpp/cpp_message.h | 16 +- .../compiler/cpp/cpp_message_field.cc | 464 +- .../protobuf/compiler/cpp/cpp_message_field.h | 4 - .../protobuf/compiler/cpp/cpp_options.h | 5 +- .../compiler/cpp/cpp_primitive_field.cc | 224 +- .../compiler/cpp/cpp_primitive_field.h | 6 - .../protobuf/compiler/cpp/cpp_string_field.cc | 448 +- .../protobuf/compiler/cpp/cpp_string_field.h | 5 - .../protobuf/compiler/cpp/cpp_unittest.inc | 7 +- .../protobuf/compiler/cpp/metadata_test.cc | 2 +- .../csharp/csharp_bootstrap_unittest.cc | 22 +- .../compiler/csharp/csharp_doc_comment.cc | 2 +- .../protobuf/compiler/csharp/csharp_enum.cc | 4 +- .../compiler/csharp/csharp_enum_field.cc | 18 +- .../compiler/csharp/csharp_enum_field.h | 1 + .../compiler/csharp/csharp_field_base.cc | 85 +- .../compiler/csharp/csharp_field_base.h | 1 + .../compiler/csharp/csharp_generator.cc | 13 +- .../compiler/csharp/csharp_generator.h | 13 +- .../compiler/csharp/csharp_helpers.cc | 64 +- .../protobuf/compiler/csharp/csharp_helpers.h | 34 +- .../compiler/csharp/csharp_message.cc | 257 +- .../protobuf/compiler/csharp/csharp_message.h | 1 + .../compiler/csharp/csharp_message_field.cc | 33 +- .../compiler/csharp/csharp_message_field.h | 1 + .../protobuf/compiler/csharp/csharp_names.h | 3 +- .../compiler/csharp/csharp_primitive_field.cc | 84 +- .../compiler/csharp/csharp_primitive_field.h | 1 + .../csharp/csharp_reflection_class.cc | 59 +- .../compiler/csharp/csharp_reflection_class.h | 1 + .../csharp/csharp_repeated_enum_field.cc | 10 + .../csharp/csharp_repeated_enum_field.h | 1 + .../csharp/csharp_repeated_message_field.cc | 19 + .../csharp/csharp_repeated_message_field.h | 1 + .../csharp/csharp_repeated_primitive_field.cc | 9 + .../csharp/csharp_repeated_primitive_field.h | 1 + .../csharp/csharp_source_generator_base.cc | 2 +- .../compiler/csharp/csharp_wrapper_field.cc | 15 +- .../compiler/csharp/csharp_wrapper_field.h | 1 + .../src/google/protobuf/compiler/importer.cc | 12 +- .../src/google/protobuf/compiler/importer.h | 5 +- .../protobuf/compiler/importer_unittest.cc | 10 +- .../protobuf/compiler/java/java_context.cc | 1 - .../compiler/java/java_doc_comment.cc | 193 +- .../protobuf/compiler/java/java_doc_comment.h | 26 + .../protobuf/compiler/java/java_enum.cc | 46 +- .../protobuf/compiler/java/java_enum_field.cc | 177 +- .../compiler/java/java_enum_field_lite.cc | 185 +- .../protobuf/compiler/java/java_enum_lite.cc | 9 +- .../protobuf/compiler/java/java_extension.cc | 1 - .../protobuf/compiler/java/java_field.cc | 6 +- .../protobuf/compiler/java/java_file.cc | 16 +- .../protobuf/compiler/java/java_generator.cc | 4 + .../protobuf/compiler/java/java_generator.h | 4 +- .../protobuf/compiler/java/java_helpers.cc | 15 +- .../protobuf/compiler/java/java_helpers.h | 43 +- .../protobuf/compiler/java/java_map_field.cc | 13 + .../compiler/java/java_map_field_lite.cc | 12 +- .../protobuf/compiler/java/java_message.cc | 105 +- .../protobuf/compiler/java/java_message.h | 1 + .../compiler/java/java_message_builder.cc | 61 +- .../compiler/java/java_message_builder.h | 1 + .../java/java_message_builder_lite.cc | 16 +- .../compiler/java/java_message_builder_lite.h | 1 + .../compiler/java/java_message_field.cc | 70 +- .../compiler/java/java_message_field_lite.cc | 116 +- .../compiler/java/java_message_lite.cc | 63 +- .../compiler/java/java_name_resolver.cc | 8 +- .../compiler/java/java_name_resolver.h | 2 +- .../protobuf/compiler/java/java_names.h | 2 +- .../compiler/java/java_primitive_field.cc | 91 +- .../java/java_primitive_field_lite.cc | 115 +- .../protobuf/compiler/java/java_service.cc | 1 - .../compiler/java/java_string_field.cc | 117 +- .../compiler/java/java_string_field_lite.cc | 160 +- .../protobuf/compiler/js/js_generator.cc | 226 +- .../protobuf/compiler/js/js_generator.h | 2 +- .../src/google/protobuf/compiler/main.cc | 11 +- .../protobuf/compiler/mock_code_generator.cc | 19 +- .../protobuf/compiler/mock_code_generator.h | 9 +- .../objectivec/objectivec_enum_field.cc | 4 +- .../objectivec/objectivec_extension.cc | 30 +- .../objectivec/objectivec_extension.h | 1 + .../compiler/objectivec/objectivec_field.cc | 47 +- .../compiler/objectivec/objectivec_field.h | 5 +- .../compiler/objectivec/objectivec_file.cc | 113 +- .../compiler/objectivec/objectivec_file.h | 6 +- .../objectivec/objectivec_generator.h | 10 +- .../compiler/objectivec/objectivec_helpers.cc | 52 +- .../compiler/objectivec/objectivec_helpers.h | 10 +- .../objectivec/objectivec_map_field.cc | 16 +- .../objectivec/objectivec_map_field.h | 1 + .../compiler/objectivec/objectivec_message.cc | 195 +- .../compiler/objectivec/objectivec_message.h | 9 +- .../objectivec/objectivec_message_field.cc | 21 +- .../objectivec/objectivec_message_field.h | 3 +- .../compiler/objectivec/objectivec_oneof.cc | 4 +- .../src/google/protobuf/compiler/parser.cc | 109 +- .../src/google/protobuf/compiler/parser.h | 11 +- .../protobuf/compiler/parser_unittest.cc | 147 +- .../protobuf/compiler/php/php_generator.cc | 481 +- .../protobuf/compiler/php/php_generator.h | 14 + .../src/google/protobuf/compiler/plugin.cc | 4 +- .../src/google/protobuf/compiler/plugin.h | 2 +- .../src/google/protobuf/compiler/plugin.pb.cc | 1131 +-- .../src/google/protobuf/compiler/plugin.pb.h | 1068 +- .../src/google/protobuf/compiler/plugin.proto | 10 + .../compiler/python/python_generator.cc | 222 +- .../compiler/python/python_generator.h | 10 +- .../compiler/ruby/ruby_generated_code_pb.rb | 6 +- .../ruby/ruby_generated_code_proto2_pb.rb | 6 +- .../ruby_generated_pkg_explicit_legacy_pb.rb | 2 +- .../ruby/ruby_generated_pkg_explicit_pb.rb | 2 +- .../ruby/ruby_generated_pkg_implicit_pb.rb | 2 +- .../protobuf/compiler/ruby/ruby_generator.cc | 19 +- .../protobuf/compiler/ruby/ruby_generator.h | 11 +- .../google/protobuf/compiler/subprocess.cc | 10 +- .../src/google/protobuf/compiler/subprocess.h | 2 + .../google/protobuf/compiler/zip_writer.cc | 30 - .../src/google/protobuf/compiler/zip_writer.h | 30 - .../src/google/protobuf/descriptor.cc | 1100 +- .../protobuf/src/google/protobuf/descriptor.h | 292 +- .../src/google/protobuf/descriptor.pb.cc | 8970 ++++------------- .../src/google/protobuf/descriptor.pb.h | 6228 ++++++++---- .../src/google/protobuf/descriptor.proto | 33 +- .../google/protobuf/descriptor_database.cc | 42 +- .../src/google/protobuf/descriptor_database.h | 13 +- .../google/protobuf/descriptor_unittest.cc | 772 +- .../src/google/protobuf/duration.pb.cc | 190 +- .../src/google/protobuf/duration.pb.h | 92 +- .../src/google/protobuf/duration.proto | 2 +- .../src/google/protobuf/dynamic_message.cc | 185 +- .../src/google/protobuf/dynamic_message.h | 16 +- .../protobuf/dynamic_message_unittest.cc | 2 +- .../protobuf/src/google/protobuf/empty.pb.cc | 125 +- .../protobuf/src/google/protobuf/empty.pb.h | 54 +- .../src/google/protobuf/extension_set.cc | 355 +- .../src/google/protobuf/extension_set.h | 125 +- .../google/protobuf/extension_set_heavy.cc | 222 +- .../src/google/protobuf/extension_set_inl.h | 44 +- .../google/protobuf/extension_set_unittest.cc | 14 +- .../src/google/protobuf/field_mask.pb.cc | 173 +- .../src/google/protobuf/field_mask.pb.h | 82 +- .../src/google/protobuf/field_mask.proto | 2 +- ...ed_stream_inl.h => generated_enum_util.cc} | 93 +- .../src/google/protobuf/generated_enum_util.h | 32 + .../protobuf/generated_message_reflection.cc | 836 +- .../protobuf/generated_message_reflection.h | 428 +- .../generated_message_reflection_unittest.cc | 6 +- .../generated_message_table_driven.cc | 10 +- .../generated_message_table_driven_lite.cc | 9 +- .../generated_message_table_driven_lite.h | 100 +- .../google/protobuf/generated_message_util.cc | 59 +- .../google/protobuf/generated_message_util.h | 31 +- .../protobuf/src/google/protobuf/has_bits.h | 2 +- .../google/protobuf/implicit_weak_message.cc | 9 - .../google/protobuf/implicit_weak_message.h | 93 +- .../google/protobuf/inlined_string_field.h | 3 +- .../src/google/protobuf/io/coded_stream.cc | 460 +- .../src/google/protobuf/io/coded_stream.h | 789 +- .../protobuf/io/coded_stream_unittest.cc | 59 +- .../src/google/protobuf/io/gzip_stream.cc | 4 +- .../src/google/protobuf/io/gzip_stream.h | 5 +- .../src/google/protobuf/io/io_win32.cc | 62 +- .../src/google/protobuf/io/io_win32.h | 21 +- .../google/protobuf/io/io_win32_unittest.cc | 189 +- .../src/google/protobuf/io/printer.cc | 3 +- .../protobuf/src/google/protobuf/io/printer.h | 11 +- .../google/protobuf/io/printer_unittest.cc | 8 +- .../protobuf/src/google/protobuf/io/strtod.cc | 73 +- .../src/google/protobuf/io/tokenizer.cc | 3 +- .../src/google/protobuf/io/tokenizer.h | 3 +- .../google/protobuf/io/tokenizer_unittest.cc | 16 +- .../src/google/protobuf/io/zero_copy_stream.h | 9 +- .../protobuf/io/zero_copy_stream_impl.cc | 12 +- .../protobuf/io/zero_copy_stream_impl.h | 12 +- .../protobuf/io/zero_copy_stream_impl_lite.cc | 12 +- .../protobuf/io/zero_copy_stream_impl_lite.h | 18 +- .../protobuf/io/zero_copy_stream_unittest.cc | 3 +- .../src/google/protobuf/lite_unittest.cc | 98 +- .../protobuf/src/google/protobuf/map.h | 501 +- .../protobuf/src/google/protobuf/map_entry.h | 14 +- .../src/google/protobuf/map_entry_lite.h | 215 +- .../protobuf/src/google/protobuf/map_field.cc | 81 +- .../protobuf/src/google/protobuf/map_field.h | 447 +- .../src/google/protobuf/map_field_lite.h | 55 +- .../src/google/protobuf/map_field_test.cc | 12 +- .../protobuf/src/google/protobuf/map_test.cc | 120 +- .../src/google/protobuf/map_test_util.cc | 1804 ---- .../src/google/protobuf/map_test_util.h | 1493 ++- .../src/google/protobuf/map_test_util.inc | 271 + .../src/google/protobuf/map_type_handler.h | 102 +- .../protobuf/src/google/protobuf/message.cc | 545 +- .../protobuf/src/google/protobuf/message.h | 756 +- .../src/google/protobuf/message_lite.cc | 332 +- .../src/google/protobuf/message_lite.h | 194 +- .../src/google/protobuf/message_unittest.inc | 22 +- .../protobuf/src/google/protobuf/metadata.h | 44 +- .../src/google/protobuf/metadata_lite.h | 149 +- .../google/protobuf/no_field_presence_test.cc | 17 +- .../src/google/protobuf/parse_context.cc | 166 +- .../src/google/protobuf/parse_context.h | 362 +- .../protobuf/src/google/protobuf/port.h | 43 +- .../protobuf/src/google/protobuf/port_def.inc | 192 +- .../src/google/protobuf/port_undef.inc | 20 + .../protobuf/proto3_arena_lite_unittest.cc | 11 +- .../google/protobuf/proto3_arena_unittest.cc | 297 +- .../google/protobuf/proto3_lite_unittest.inc | 12 +- .../protobuf/src/google/protobuf/reflection.h | 11 +- .../src/google/protobuf/reflection_internal.h | 2 +- .../src/google/protobuf/reflection_ops.cc | 120 +- .../protobuf/reflection_ops_unittest.cc | 30 + .../src/google/protobuf/repeated_field.cc | 24 +- .../src/google/protobuf/repeated_field.h | 510 +- .../repeated_field_reflection_unittest.cc | 8 +- .../protobuf/repeated_field_unittest.cc | 143 +- .../protobuf/src/google/protobuf/service.h | 2 +- .../src/google/protobuf/source_context.pb.cc | 168 +- .../src/google/protobuf/source_context.pb.h | 133 +- .../protobuf/src/google/protobuf/struct.pb.cc | 721 +- .../protobuf/src/google/protobuf/struct.pb.h | 458 +- .../src/google/protobuf/stubs/bytestream.h | 4 +- .../src/google/protobuf/stubs/callback.h | 2 +- .../src/google/protobuf/stubs/casts.h | 13 +- .../src/google/protobuf/stubs/common.cc | 49 +- .../src/google/protobuf/stubs/common.h | 43 +- .../src/google/protobuf/stubs/map_util.h | 8 +- .../src/google/protobuf/stubs/mathlimits.cc | 89 - .../src/google/protobuf/stubs/mathlimits.h | 307 - .../src/google/protobuf/stubs/mathutil.h | 47 +- .../src/google/protobuf/stubs/mutex.h | 2 +- .../protobuf/src/google/protobuf/stubs/port.h | 46 +- .../src/google/protobuf/stubs/status.h | 2 - .../src/google/protobuf/stubs/statusor.h | 11 +- .../src/google/protobuf/stubs/stl_util.h | 50 - .../protobuf/stubs/structurally_valid.cc | 7 +- .../src/google/protobuf/stubs/strutil.cc | 172 +- .../src/google/protobuf/stubs/strutil.h | 20 +- .../google/protobuf/stubs/strutil_unittest.cc | 54 + .../src/google/protobuf/stubs/time.cc | 2 +- .../protobuf/src/google/protobuf/stubs/time.h | 2 +- .../src/google/protobuf/stubs/time_test.cc | 2 +- .../protobuf/test_messages_proto2.proto | 155 +- .../protobuf/test_messages_proto3.proto | 151 +- .../protobuf/src/google/protobuf/test_util.h | 41 - .../src/google/protobuf/test_util.inc | 193 - .../protobuf/src/google/protobuf/test_util2.h | 1 - .../src/google/protobuf/test_util_lite.cc | 3 +- .../src/google/protobuf/testing/zcgunzip.cc | 3 +- .../src/google/protobuf/testing/zcgzip.cc | 3 +- .../src/google/protobuf/text_format.cc | 270 +- .../src/google/protobuf/text_format.h | 66 +- .../google/protobuf/text_format_unittest.cc | 107 +- .../src/google/protobuf/timestamp.pb.cc | 190 +- .../src/google/protobuf/timestamp.pb.h | 92 +- .../protobuf/src/google/protobuf/type.pb.cc | 1734 +--- .../protobuf/src/google/protobuf/type.pb.h | 1133 ++- .../src/google/protobuf/unittest.proto | 12 +- .../protobuf/unittest_custom_options.proto | 192 +- .../src/google/protobuf/unittest_lite.proto | 358 +- .../protobuf/unittest_no_arena_import.proto | 4 +- .../protobuf/unittest_no_arena_lite.proto | 2 + .../src/google/protobuf/unittest_proto3.proto | 156 +- .../protobuf/unittest_proto3_arena.proto | 12 +- .../protobuf/unittest_proto3_arena_lite.proto | 154 +- .../protobuf/unittest_proto3_lite.proto | 152 +- .../protobuf/unittest_proto3_optional.proto | 79 + .../src/google/protobuf/unknown_field_set.cc | 60 +- .../src/google/protobuf/unknown_field_set.h | 74 +- .../protobuf/unknown_field_set_unittest.cc | 48 +- .../protobuf/util/delimited_message_util.h | 1 + .../google/protobuf/util/field_comparator.cc | 8 +- .../protobuf/util/field_comparator_test.cc | 33 +- .../google/protobuf/util/field_mask_util.cc | 2 +- .../google/protobuf/util/field_mask_util.h | 29 +- .../protobuf/util/field_mask_util_test.cc | 19 +- .../protobuf/util/internal/datapiece.cc | 27 +- .../google/protobuf/util/internal/datapiece.h | 4 +- .../internal/default_value_objectwriter.cc | 87 +- .../internal/default_value_objectwriter.h | 35 +- .../default_value_objectwriter_test.cc | 2 +- .../protobuf/util/internal/error_listener.h | 3 +- .../util/internal/expecting_objectwriter.h | 36 +- .../util/internal/field_mask_utility.cc | 3 +- .../util/internal/field_mask_utility.h | 2 +- .../protobuf/util/internal/json_escaping.cc | 22 + .../protobuf/util/internal/json_escaping.h | 19 +- .../util/internal/json_objectwriter.cc | 23 +- .../util/internal/json_objectwriter.h | 85 +- .../util/internal/json_objectwriter_test.cc | 54 +- .../util/internal/json_stream_parser.cc | 114 +- .../util/internal/json_stream_parser.h | 13 +- .../util/internal/json_stream_parser_test.cc | 56 +- .../util/internal/mock_error_listener.h | 20 +- .../protobuf/util/internal/object_source.h | 3 +- .../protobuf/util/internal/object_writer.cc | 17 +- .../protobuf/util/internal/object_writer.h | 7 +- .../protobuf/util/internal/proto_writer.cc | 112 +- .../protobuf/util/internal/proto_writer.h | 11 +- .../util/internal/protostream_objectsource.cc | 121 +- .../util/internal/protostream_objectsource.h | 10 +- .../internal/protostream_objectsource_test.cc | 3 +- .../util/internal/protostream_objectwriter.cc | 83 +- .../util/internal/protostream_objectwriter.h | 23 +- .../internal/protostream_objectwriter_test.cc | 59 +- .../util/internal/testdata/books.proto | 37 + .../protobuf/util/internal/type_info.cc | 10 +- .../google/protobuf/util/internal/type_info.h | 3 +- .../google/protobuf/util/internal/utility.cc | 38 +- .../google/protobuf/util/internal/utility.h | 15 +- .../google/protobuf/util/json_format.proto | 11 + .../protobuf/util/json_format_proto3.proto | 4 + .../src/google/protobuf/util/json_util.cc | 1 - .../google/protobuf/util/json_util_test.cc | 8 +- .../protobuf/util/message_differencer.cc | 278 +- .../protobuf/util/message_differencer.h | 22 +- .../util/message_differencer_unittest.cc | 78 +- .../util/message_differencer_unittest.proto | 4 + .../src/google/protobuf/util/time_util.cc | 7 +- .../src/google/protobuf/util/time_util.h | 9 +- .../google/protobuf/util/time_util_test.cc | 24 +- .../src/google/protobuf/util/type_resolver.h | 2 +- .../protobuf/util/type_resolver_util.cc | 1 - .../src/google/protobuf/wire_format.cc | 712 +- .../src/google/protobuf/wire_format.h | 90 +- .../src/google/protobuf/wire_format_lite.cc | 38 +- .../src/google/protobuf/wire_format_lite.h | 122 +- .../google/protobuf/wire_format_unittest.cc | 15 +- .../src/google/protobuf/wrappers.pb.cc | 1349 +-- .../src/google/protobuf/wrappers.pb.h | 680 +- third_party/protobuf/test-driver | 10 +- .../third_party/googletest/Makefile.in | 23 +- .../third_party/googletest/aclocal.m4 | 40 +- .../googletest/build-aux/install-sh | 49 +- .../third_party/googletest/build-aux/missing | 16 +- .../protobuf/third_party/googletest/configure | 8 +- .../googletest/googlemock/Makefile.in | 124 +- .../googletest/googlemock/aclocal.m4 | 228 +- .../googletest/googlemock/build-aux/compile | 17 +- .../googletest/googlemock/build-aux/depcomp | 8 +- .../googlemock/build-aux/install-sh | 49 +- .../googletest/googlemock/build-aux/ltmain.sh | 217 +- .../googletest/googlemock/build-aux/missing | 16 +- .../googlemock/build-aux/test-driver | 10 +- .../googletest/googlemock/configure | 224 +- .../googletest/googletest/Makefile.in | 175 +- .../googletest/googletest/aclocal.m4 | 201 +- .../googletest/googletest/build-aux/compile | 17 +- .../googletest/googletest/build-aux/depcomp | 8 +- .../googletest/build-aux/install-sh | 49 +- .../googletest/googletest/build-aux/ltmain.sh | 217 +- .../googletest/googletest/build-aux/missing | 16 +- .../googletest/build-aux/test-driver | 10 +- .../googletest/googletest/configure | 224 +- .../googletest/googletest/m4/libtool.m4 | 27 +- third_party/protobuf/third_party/six.BUILD | 19 + third_party/protobuf/third_party/zlib.BUILD | 15 +- third_party/protobuf/update_file_lists.sh | 3 + third_party/protobuf/util/python/BUILD | 4 +- util/include/log.h | 10 + util/test/test_sleep.cpp | 17 +- util/test/test_sleep.h | 6 +- 562 files changed, 52913 insertions(+), 37426 deletions(-) delete mode 100644 Widevine_CE_CDM_IntegrationGuide_16.3.0.pdf create mode 100644 Widevine_CE_CDM_IntegrationGuide_16.4.0.pdf create mode 100644 core/test/Android.bp create mode 100644 core/test/duration_use_case_test.cpp create mode 100644 core/test/policy_integration_test.cpp create mode 100644 core/test/url_request_unittest.cpp rename metrics/src/{metrics.proto => wv_metrics.proto} (97%) create mode 100644 oemcrypto/test/fuzz_tests/oemcrypto_decrypt_cenc_fuzz.cc create mode 100644 oemcrypto/test/fuzz_tests/oemcrypto_load_entitled_content_keys_fuzz.cc create mode 100644 third_party/disable_warnings.gypi create mode 100644 third_party/protobuf/benchmarks/benchmarks.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message1/proto2/benchmark_message1_proto2.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message1/proto3/benchmark_message1_proto3.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message2/benchmark_message2.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_1.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_2.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_3.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_4.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_5.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_6.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_7.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_8.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4_1.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4_2.proto create mode 100644 third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4_3.proto create mode 100644 third_party/protobuf/benchmarks/google_size.proto create mode 100755 third_party/protobuf/build_files_updated_unittest.sh create mode 100644 third_party/protobuf/cc_proto_blacklist_test.bzl mode change 100755 => 100644 third_party/protobuf/conformance/conformance_php.php delete mode 100644 third_party/protobuf/examples/third_party/zlib.BUILD create mode 100644 third_party/protobuf/protobuf_deps.bzl delete mode 100644 third_party/protobuf/six.BUILD rename third_party/protobuf/src/google/protobuf/{io/coded_stream_inl.h => generated_enum_util.cc} (50%) mode change 100755 => 100644 third_party/protobuf/src/google/protobuf/io/io_win32.cc mode change 100755 => 100644 third_party/protobuf/src/google/protobuf/io/io_win32.h mode change 100755 => 100644 third_party/protobuf/src/google/protobuf/io/io_win32_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/map_test_util.cc create mode 100644 third_party/protobuf/src/google/protobuf/map_test_util.inc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/mathlimits.cc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/mathlimits.h create mode 100644 third_party/protobuf/src/google/protobuf/unittest_proto3_optional.proto create mode 100644 third_party/protobuf/third_party/six.BUILD diff --git a/CHANGELOG.md b/CHANGELOG.md index 849f8114..322ee51e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,134 @@ [TOC] +## 16.4.0 (2020-10-09) + +Features: + - The included version of the ODK has been updated to v16.4. CE CDM 16.4.0 is + required to take advantage of the changes in ODK v16.4. + - New OEMCrypto tests have been added to test whether OEMCrypto correctly + handles huge buffer size edge cases. + - The warning and error flags used by the example `x86-64` platform have been + significantly revamped with the goal of greater strictness and better GCC + compatibility. As always, these flags are strict to help Widevine detect and + debug problems and may not be the best for your platform, particularly on + debug builds. You should always use the flags that are best for your + platform. + - As part of this, the sample `x86-64` platform now enables [ASan][asan] and + [UBSan][ubsan] on debug builds. These have a significant memory and + performance impact. Feel free to not enable ASan and UBSan if your + platform does not support them or if their memory and performance impact + are unacceptable to you. The sample `x86-64` platform does not enable ASan + or UBSan for release builds. + - To maximize the benefit of UBSan, the sample `x86-64` platform now turns + on RTTI for debug builds. The Widvine CE CDM does not use RTTI and will + still build correctly without it. Feel free to turn it off if your + platform does not support RTTI. The sample `x86-64` platform turns off + RTTI for release builds. + - Several changes have been made to how `build.py` handles build + configurations. (e.g. "debug" builds vs. "release" builds) + - Previous CE CDM releases assumed that the platform's `settings.gypi` file + would define, at a minimum, build configurations called `Debug` and + `Release`. This requirement was undocumented, but failing to define them — + even if your platform did not need them — would result in build failures. + `build.py` has been reworked to not make any assumptions about what build + configurations the platform defines. You are now free to define any build + configuration names you like. + - The example debug build configuration is now named `debug`. (all + lowercase) + - The example release build configuration is now named `release`. (all + lowercase) + - The `build.py` script now requires that callers explicitly indicate which + build flavor they would like to build. There are three ways to do this: + - The `--config` flag allows you to specify any build configuration that + you have defined in your platform's `settings.gypi` file. + - `--debug` is a shorthand for `--config debug`. + - `--release` is a shorthand for `--config release`. + - License renewals are now tested against both the original licensing service + and the service specified in the license. + +[asan]: https://github.com/google/sanitizers/wiki/AddressSanitizer +[ubsan]: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html + +Dependency Updates: + - The bundled version of Protobuf has been updated to [v3.12.4][proto-3.12.4]. + Note that, as before, Widevine CE CDM will work with any version of Protobuf + back to 2.6. However, we provide the version of Protobuf that we test with + internally as a default. + - This copy of Protobuf has been patched with Protobuf + [pull request #7428][proto-pr-7428], which is necessary to let Protobuf + 3.12.4 build when RTTI is disabled. + +[proto-3.12.4]: https://github.com/protocolbuffers/protobuf/releases/tag/v3.12.4 +[proto-pr-7428]: https://github.com/protocolbuffers/protobuf/pull/7428 + +Bugfixes: + - Fixed issues preventing several offline license use cases from working on + devices that do not support usage tables. + - If your device does not support usage tables, you *must* use CE CDM 16.4 + and ODK v16.4 to properly support offline licenses and license expiry. + Older 16.x releases will not work. + - We consider usage tables a standard feature, and not supporting them is an + exception. Usage tables are used to save playback times for offline + licenses and are needed to support several use cases that restrict + playback duration. They are also used to support secure stops, which are + used by several major content providers. If your device does not support + usage tables but expects to support offline license, please talk to your + Widevine TAM so that we may understand what is blocking this support. + OEMCrypto is planning to make usage table support mandatory in a + future release. + - Fixed issues that could occur if the device reports it has unlimited usage + table capacity. + - Fixed an issue where nonce-free licenses with nonzero durations would not + expire/renew correctly. + - Fixed an issue where offline licenses with offline renewals would either + fail to load or load correctly but send multiple state change messages to + the app. + - The enums exported by the CE CDM API in `cdm/include/cdm.h` now have defined + backing types. This helps avoid some benign undefined behavior. + - Fixed a crash that could occur when using OpenSSL with the CE CDM. + - Fixed some missing header errors when compiling the CE CDM with OpenSSL + instead of BoringSSL. + - Fixed several issues in the OEMCrypto unit tests that were erroneously + requiring OEMCrypto to hold onto the session key longer than required by the + OEMCrypto specification. + - An issue where tests would sometimes derive keys from the session key + twice. + - An issue where tests were deriving keys from the session key too early. + - Fixed an issue where the OEMCrypto unit tests were asking OEMCrypto to read + past the end of a buffer. + - Fixed an issue where the CDM would not allow a license to be loaded and + restored in the same session. + - The OEMCrypto Reference Implementation now has more stringent + bounds-checking in some places. + - Fixed an issue where the `TimeRollbackPrevention` tests would fail on some + devices. + - Fixed an issue where the metrics unit tests could fail if the device uses + Provisioning 3.0. + - Fixed an issue where the OEMCrypto unit tests would not respond correctly if + if the RSA key failed to load. + - Fixed many places where the wrong format string was being used to format + log messages. Format strings are now checked at compile-time on the sample + `x86-64` platform. + - The `build.py` script will no longer write `.pyc` files to the filesystem. + - Fixed an error that would occur on devices that return + `OEMCrypto_ERROR_NOT_IMPLEMENTED` from `OEMCrypto_SupportsDecryptHash()`. + - Fixed an issue where expiry of the renewal delay was not accurately + detected when using some OEMCrypto v16 implementations. + - Fixed an issue where debug symbols were sometimes turned on for third-party + code even when they were turned off otherwise. + - Fixed several issues in the OEMCrypto Reference Implementation where it + would crash or behave incorrectly when given huge enough buffers. + - Fixed an error when trying to do key rotation with a `kTemporary` session + with licenses from an upcoming license server release. + - Fixed a rare bug where certain usage table entries could not be reloaded if + other entries were created and loaded in a certain order. + - The CDM will now correctly treat devices with only local displays as having + no SRM version. + - Fixed some typos in `OEMCryptoCENC.h` and the OEMCrypto tests. + - The help text for the flags in `build.py` has been improved and clarified. + - The header comments in `OEMCryptoCENC.h` have had some minor revision. + ## 16.3.0 (2020-07-24) Features: diff --git a/README.md b/README.md index 3311bd59..0bd35992 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ -# Widevine CE CDM 16.3.0 +# Widevine CE CDM 16.4.0 -Released 2020-07-24 +Released 2020-10-09 ## Getting started This project contains the sources for building a Widevine CDM module. Read the following to learn more about the contents of this project and how to use them: -[Widevine_CE_CDM_IntegrationGuide_16.3.0.pdf][integration-guide]\ +[Widevine_CE_CDM_IntegrationGuide_16.4.0.pdf][integration-guide]\ Documents the CDM API and describes how to integrate the CDM into a system. [CHANGELOG.md][changelog]\ Lists the major changes for each release. -[integration-guide]: ./Widevine_CE_CDM_IntegrationGuide_16.3.0.pdf +[integration-guide]: ./Widevine_CE_CDM_IntegrationGuide_16.4.0.pdf [changelog]: ./CHANGELOG.md ## Reference OEMCrypto Implementation diff --git a/Widevine_CE_CDM_IntegrationGuide_16.3.0.pdf b/Widevine_CE_CDM_IntegrationGuide_16.3.0.pdf deleted file mode 100644 index e37306279a5eded9ded9cccc83daedac82104f02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 461696 zcmZ^pV~nOzv}Vh;U0>O@ZQHhO+qPZRg)Vp5w#_cv_Vm4Xn3?(UX5~$Gve%!JoM-Pt zrYI^-$3)KxL$-e~y9mPsU<5cATf^}3GRQfYiW<3^QHpXiGcq$WvNN+Yu`x2Su+lMd zP%tu5P%(%&n;E%UIoSWds#yMKm7=qQshf$JGo^}+l@Y_gZU8$@HXeYTgQ=Cdm6<8P z&Be;z0$`;IAz zx3YCLb7l~?{bwp_X5wIK#vp5EZ{cbQU}0ip<>z;C{U>P$kvBU)Z z7pI$05UI~T;ROQ#3!3H9*c1a@k3DsH_!Hr+Xk1z9-r8B!)pT`jE=7D%BAJxh(X+jM z7uDbUackb4`Tg~=-P$S0q$@h`GVAg4Ir(T%IHNw=@`@n$hW7pSxtPlD`*U?YsNnp5 zmB1N%V7@P#!#GrDL79v@igHGHo6vaDG}kIq=z+DB!`Z>%kj{(v^y>VwrzJNa$Iz>6 zR)2Q%!b9^n=dZQ*o7p>!31UUB9K%oh$7}LBG=g+WQ+}!A?W)!QQ_{YpAR=A6kzi%6 zfbYWM;;J6msx#niDk~#?XY9JoO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7X7Mt+%_+(u+U#8BH0y^+L=Ct6@Wj zDM`AUT%t2aSE2=o4AjT21HqcAkhGFQmx&vk%lR4wTFlg$fB|k2ZW3IyD-2N)Y!b

bpgi%A=l%iRBb2)M0Dyy`^F%sfT zUlSs24N?5+PK+>b9a`Mg93wXR(Tb8rS{J@d4USR5&7Y;@M6WAPr(V{bXm=YN5nq$ZF=ox7 z9)B-IP%$qRxwIb%BJ0{_J)gGu|7bjNrHPbiV<8e6S@t8b)Rrs`d(nX?o-|@;{`|@v zW`hr<_9~27EO+@?t*pPOc=H)0B<;RqI4n(-X3)PqJEjr*sAt<8 diff --git a/Widevine_CE_CDM_IntegrationGuide_16.4.0.pdf b/Widevine_CE_CDM_IntegrationGuide_16.4.0.pdf new file mode 100644 index 0000000000000000000000000000000000000000..159f574d5a3a35e16c6f2d19cf8377e10d2947b2 GIT binary patch literal 459884 zcmaI6Q*bU!6lNXUwr$(CZQHhO+fGhwJ14enJ9%TA|C{-zYUXCUgPS3 zC6Tq7xtCi#5jz7j11nKA3lkF){ePLvM9gZeT53ch8Y05f0s=7R4rc!Yj_rR#N?6;u znY%Db*!@Q;W^U?eX3i*Q?qKO=Ma0U?#3mr%>h>R`J&af0n4YX7Sr>f&m*xsH^Z`yE zp%BubL*g3-5iDr7YjaC1bR+i6&B?z=A0?COGLMd)n%r$!YwC?`h-N)#m zfv*RPzO3J$uicIwA!a?X;kS9uf8Wyp!=gEj@%DEF`46<;pYP=~0l$B@cO!}}pSOuz zA;%U+a=A>S4VF|YTG`V7f&$a{3&Z>MLHb4x_C^=`j2-d$5MSP1-VU|phvgXuRLmPM zPv3ZH4{{G|d_K%SX-yF;2jm(5b$z|3Y(gW*q_#jn;eWelILVc9;Vp>DI$$Z$oFf(j z004K*$u>Nxes*4PtXeE-$NLKg-B6f zhv%N1Hw?NrR!ajOAJU%VvmZA`^7$LFzfzVvXa`m7y?^9j*Trp6onhDU$9w|gvRLMn zi#vv){K9kMUmy0pWMu7Gbv;J>vR2c6A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8R3 z`FeNtT>7WeSD-Gd)N6nIl2K%&05aDq#DcuaNY`1OF$YTKa!GpVI)plu}p!t@Vn*Of_D*o15LXeV;a`|E)PE{t>cl z9{|PyzEtwoS{#VnhyJZ@ZN|6rhG~88i$Rn){(rCYpL+j44N0l*08~A96*x0{Q)ic- zW=3}Z#2k#R;aIqth?$80iSh9Z0G2>%bh440I^Fp{R{*<9u!Y?G*e9aex0Ew&#gB=7K^ zFF?Ae1-9q2^z30OokscX*n)%{+iiNU3mU-N&0MhQ%MDD@SVu0$V&Y<~fNpFJ^gBnQ zlkEo)08187HzFaJtk?X0m11S8_VQ{Qa>vDsbau4+VQg7nESEC)^b^X~EUtYpno#A@ z)Q|nelN}(yc;}*a;0@rvv($5bwR*Vs<(N%$|2(LyJnf84?b0HTMwTEBEqmWn0Ot

301 Moved

\r\n" + "The document has moved\r\n" + "here.\r\n" + "\r\n\r\n"; + +// A map containing all the Google debug header fields found in +// |kSampleResponse|. +const std::map kSampleFields = { + {"X-Google-GFE-Backend-Request-Info", "eid=7js14zjC48OpziR0VCF02a0"}, + {"x-google-signals", "FRAMEWORK=TEST"}, + {"X-Google-Binary-Version", "322287520"}, + {"X-Google-Request-Cost", "2.50"}, + {"x-google-data-version", "322866295"}, + {"X-Google-Debug-Label", "/srv/alt/job/service.number/1380"}, + {"X-Google-Service", "web"}, + {"X-Google-DOS-Service-Trace", "main:home"}}; + +// A sample HTTP response which does not contain any special header fields. +const std::string kFieldlessResponse = + "HTTP/2 301\r\n" + "Location: https://www.google.com/\r\b" + "Content-Type: text/html; charset=UTF-8\r\n" + "Date: Thu, 23 Jul 2020 22:52:55 GMT\r\n" + "Content-Length: 220\r\n" + "\r\n" + "\r\n" + "301 Moved\r\n" + "

301 Moved

\r\n" + "The document has moved\r\n" + "here.\r\n" + "\r\n\r\n"; + +} // namespace + +class UrlRequestTest : public WvCdmTestBase { + protected: + void SetUp() override { WvCdmTestBase::SetUp(); } + void TearDown() override {} +}; + +TEST_F(UrlRequestTest, ParseDebugHeader) { + // Output map cannot be null. + EXPECT_FALSE(UrlRequest::GetDebugHeaderFields(kSampleResponse, nullptr)); + std::map fields; + // Expect false if no debug information can be determined. + EXPECT_FALSE(UrlRequest::GetDebugHeaderFields(kFieldlessResponse, &fields)); + // Expect success. + EXPECT_TRUE(UrlRequest::GetDebugHeaderFields(kSampleResponse, &fields)); + EXPECT_EQ(kSampleFields.size(), fields.size()); + for (auto it = kSampleFields.cbegin(); it != kSampleFields.cend(); ++it) { + auto field = fields.find(it->first); + EXPECT_NE(fields.end(), field); + EXPECT_EQ(it->second, field->second) << "Key: \"" << it->first << "\""; + } +} + +} // namespace wvcdm diff --git a/core/test/usage_table_header_unittest.cpp b/core/test/usage_table_header_unittest.cpp index a0ac01ee..87d87ecf 100644 --- a/core/test/usage_table_header_unittest.cpp +++ b/core/test/usage_table_header_unittest.cpp @@ -688,6 +688,27 @@ TEST_P(UsageTableHeaderInitializationTest, UsageEntriesAtCapacity) { EXPECT_TRUE(usage_table_header_->Init(GetParam(), crypto_session_)); } +TEST_P(UsageTableHeaderInitializationTest, + UsageEntries_NoCapacity_UnderMinimum) { + crypto_session_->SetMaximumUsageTableEntries(0); // Unlimited. + std::vector usage_entries = kOverFullUsageEntryInfoVector; + constexpr size_t kHalfMinCapacity = kDefaultTableCapacity / 2; + usage_entries.resize(kHalfMinCapacity); + const SecurityLevel security_level = + (GetParam() == kSecurityLevelL3) ? kLevel3 : kLevelDefault; + EXPECT_CALL(*device_files_, + RetrieveUsageTableInfo(NotNull(), NotNull(), NotNull())) + .WillOnce(DoAll(SetArgPointee<0>(kUsageTableHeader), + SetArgPointee<1>(usage_entries), SetArgPointee<2>(false), + Return(true))); + EXPECT_CALL(*crypto_session_, + LoadUsageTableHeader(security_level, kUsageTableHeader)) + .WillOnce(Return(NO_ERROR)); + // No expectations of creating or deleting entries if the number of entries + // is less than minimally required capacity. + EXPECT_TRUE(usage_table_header_->Init(GetParam(), crypto_session_)); +} + TEST_P(UsageTableHeaderInitializationTest, UsageEntries_NoCapacity) { crypto_session_->SetMaximumUsageTableEntries(0); // Unlimited. std::vector usage_entries = kOverFullUsageEntryInfoVector; @@ -3999,13 +4020,6 @@ TEST_F(UsageTableHeaderTest, PotentialTableCapacity_Unlimited) { MockUsageTableHeader* mock_usage_table_header = SetUpMock(); // Zero indicates that the table size is unlimited. crypto_session_->SetMaximumUsageTableEntries(0u); - // Expect calls to make a delete entry. - EXPECT_CALL(*crypto_session_, Open(_)).WillOnce(Return(NO_ERROR)); - const size_t test_index = kUsageEntryInfoVector.size(); - EXPECT_CALL(*mock_usage_table_header, AddEntry(_, _, _, _, _, NotNull())) - .WillOnce(DoAll(SetArgPointee<5>(test_index), Return(NO_ERROR))); - EXPECT_CALL(*mock_usage_table_header, InvalidateEntry(test_index, _, _, _)) - .WillOnce(Return(NO_ERROR)); Init(kSecurityLevelL1, kUsageTableHeader, kUsageEntryInfoVector); constexpr size_t kZero = 0u; diff --git a/metrics/include/attribute_handler.h b/metrics/include/attribute_handler.h index f11bb1d9..52468076 100644 --- a/metrics/include/attribute_handler.h +++ b/metrics/include/attribute_handler.h @@ -8,10 +8,10 @@ #include "OEMCryptoCENC.h" #include "field_tuples.h" #include "log.h" -#include "metrics.pb.h" #include "pow2bucket.h" #include "value_metric.h" #include "wv_cdm_types.h" +#include "wv_metrics.pb.h" namespace wvcdm { namespace metrics { diff --git a/metrics/include/event_metric.h b/metrics/include/event_metric.h index 131a3965..dfa717d8 100644 --- a/metrics/include/event_metric.h +++ b/metrics/include/event_metric.h @@ -15,8 +15,8 @@ #include "attribute_handler.h" #include "distribution.h" #include "log.h" -#include "metrics.pb.h" #include "pow2bucket.h" +#include "wv_metrics.pb.h" namespace wvcdm { namespace metrics { diff --git a/metrics/include/metrics_collections.h b/metrics/include/metrics_collections.h index 66389233..593be501 100644 --- a/metrics/include/metrics_collections.h +++ b/metrics/include/metrics_collections.h @@ -14,10 +14,10 @@ #include "OEMCryptoCENC.h" #include "counter_metric.h" #include "event_metric.h" -#include "metrics.pb.h" #include "timer_metric.h" #include "value_metric.h" #include "wv_cdm_types.h" +#include "wv_metrics.pb.h" // This definition indicates that a given metric does not need timing // stats. Example: diff --git a/metrics/include/value_metric.h b/metrics/include/value_metric.h index 6fb4a3ff..cd0f7048 100644 --- a/metrics/include/value_metric.h +++ b/metrics/include/value_metric.h @@ -9,7 +9,7 @@ #include #include -#include "metrics.pb.h" +#include "wv_metrics.pb.h" namespace wvcdm { namespace metrics { diff --git a/metrics/src/Android.bp b/metrics/src/Android.bp index 041d737b..313f9b02 100644 --- a/metrics/src/Android.bp +++ b/metrics/src/Android.bp @@ -4,7 +4,7 @@ cc_library { vendor: true, srcs: [ - "metrics.proto", + "wv_metrics.proto", ], cflags: [ diff --git a/metrics/src/counter_metric.cpp b/metrics/src/counter_metric.cpp index cb957bbf..79390961 100644 --- a/metrics/src/counter_metric.cpp +++ b/metrics/src/counter_metric.cpp @@ -5,7 +5,7 @@ #include "counter_metric.h" -#include "metrics.pb.h" +#include "wv_metrics.pb.h" namespace wvcdm { namespace metrics { diff --git a/metrics/src/metrics_collections.cpp b/metrics/src/metrics_collections.cpp index 956266fa..5abc5d37 100644 --- a/metrics/src/metrics_collections.cpp +++ b/metrics/src/metrics_collections.cpp @@ -5,7 +5,7 @@ #include #include "log.h" -#include "metrics.pb.h" +#include "wv_metrics.pb.h" using ::drm_metrics::Attributes; using ::drm_metrics::WvCdmMetrics; @@ -327,8 +327,8 @@ EngineMetrics::~EngineMetrics() { std::unique_lock lock(session_metrics_lock_); if (!active_session_metrics_list_.empty() || !completed_session_metrics_list_.empty()) { - LOGV("EngineMetrics::~EngineMetrics. Session counts: " - "active %d. completed %d.", active_session_metrics_list_.size(), + LOGV("Session counts: active = %zu, completed = %zu.", + active_session_metrics_list_.size(), completed_session_metrics_list_.size()); } } diff --git a/metrics/src/metrics.proto b/metrics/src/wv_metrics.proto similarity index 97% rename from metrics/src/metrics.proto rename to metrics/src/wv_metrics.proto index c220746c..b579b87c 100644 --- a/metrics/src/metrics.proto +++ b/metrics/src/wv_metrics.proto @@ -106,10 +106,12 @@ message WvCdmMetrics { repeated CounterMetric crypto_session_get_device_unique_id = 8; repeated CounterMetric crypto_session_get_token = 9; optional ValueMetric crypto_session_life_span = 10; - repeated DistributionMetric crypto_session_load_certificate_private_key_time_us = 11; + repeated DistributionMetric + crypto_session_load_certificate_private_key_time_us = 11; repeated DistributionMetric crypto_session_open_time_us = 12; optional ValueMetric crypto_session_system_id = 13; - repeated DistributionMetric crypto_session_update_usage_information_time_us = 14; + repeated DistributionMetric + crypto_session_update_usage_information_time_us = 14; optional ValueMetric crypto_session_usage_information_support = 15; // Usage Table Metrics @@ -135,7 +137,8 @@ message WvCdmMetrics { repeated DistributionMetric oemcrypto_decrypt_cenc_time_us = 21; repeated CounterMetric oemcrypto_delete_usage_entry = 22; repeated CounterMetric oemcrypto_delete_usage_table = 23; - repeated DistributionMetric oemcrypto_derive_keys_from_session_key_time_us = 24; + repeated DistributionMetric oemcrypto_derive_keys_from_session_key_time_us = + 24; repeated CounterMetric oemcrypto_force_delete_usage_entry = 25; repeated DistributionMetric oemcrypto_generate_derived_keys_time_us = 26; repeated CounterMetric oemcrypto_generate_nonce = 27; @@ -229,10 +232,12 @@ message WvCdmMetrics { repeated DistributionMetric cdm_engine_decrypt_time_us = 11; repeated CounterMetric cdm_engine_find_session_for_key = 12; repeated DistributionMetric cdm_engine_generate_key_request_time_us = 13; - repeated DistributionMetric cdm_engine_get_provisioning_request_time_us = 14; + repeated DistributionMetric cdm_engine_get_provisioning_request_time_us = + 14; repeated CounterMetric cdm_engine_get_secure_stop_ids = 15; repeated DistributionMetric cdm_engine_get_usage_info_time_us = 16; - repeated DistributionMetric cdm_engine_handle_provisioning_response_time_us = 17; + repeated DistributionMetric + cdm_engine_handle_provisioning_response_time_us = 17; optional ValueMetric cdm_engine_life_span_ms = 18; repeated CounterMetric cdm_engine_open_key_set_session = 19; repeated CounterMetric cdm_engine_open_session = 20; @@ -259,7 +264,7 @@ message WvCdmMetricsGroup { } // Test message to support unit testing. -message TestMetrics{ +message TestMetrics { optional ValueMetric test_value_metric = 1; repeated CounterMetric test_counters = 3; repeated DistributionMetric test_distributions = 2; diff --git a/metrics/test/metrics_collections_test.cpp b/metrics/test/metrics_collections_test.cpp index 56672149..b0e00521 100644 --- a/metrics/test/metrics_collections_test.cpp +++ b/metrics/test/metrics_collections_test.cpp @@ -11,8 +11,8 @@ #include "google/protobuf/text_format.h" #include "gtest/gtest.h" #include "log.h" -#include "metrics.pb.h" #include "wv_cdm_types.h" +#include "wv_metrics.pb.h" using drm_metrics::MetricsGroup; using google::protobuf::TextFormat; diff --git a/metrics/test/metrics_collections_unittest.cpp b/metrics/test/metrics_collections_unittest.cpp index 527bff45..156af527 100644 --- a/metrics/test/metrics_collections_unittest.cpp +++ b/metrics/test/metrics_collections_unittest.cpp @@ -12,9 +12,9 @@ #include "google/protobuf/text_format.h" #include "gtest/gtest.h" #include "log.h" -#include "metrics.pb.h" #include "string_conversions.h" #include "wv_cdm_types.h" +#include "wv_metrics.pb.h" using drm_metrics::WvCdmMetrics; diff --git a/metrics/test/value_metric_unittest.cpp b/metrics/test/value_metric_unittest.cpp index a6ec6c75..b593f2b4 100644 --- a/metrics/test/value_metric_unittest.cpp +++ b/metrics/test/value_metric_unittest.cpp @@ -9,7 +9,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "metrics.pb.h" +#include "wv_metrics.pb.h" namespace wvcdm { namespace metrics { diff --git a/oemcrypto/include/OEMCryptoCENC.h b/oemcrypto/include/OEMCryptoCENC.h index 6e71a894..e63c92ec 100644 --- a/oemcrypto/include/OEMCryptoCENC.h +++ b/oemcrypto/include/OEMCryptoCENC.h @@ -2,19 +2,133 @@ // source code may only be used and distributed under the Widevine Master // License Agreement. -/********************************************************************* - * OEMCryptoCENC.h +/** + * @mainpage OEMCrypto API * - * Reference APIs needed to support Widevine's crypto algorithms. + * OEMCrypto is the low level library implemented by the OEM to provide key and + * content protection, usually in a separate secure memory or process space. The + * term *OEMCrypto* refers to both the API described here and the library + * implementing the API. * - * See the document "WV Modular DRM Security Integration Guide for Common - * Encryption (CENC) -- version 16.3" for a description of this API. You - * can find this document in the widevine repository as - * docs/WidevineModularDRMSecurityIntegrationGuideforCENC_v16.pdf - * Changes between different versions of this API are documented in the files - * docs/Widevine_Modular_DRM_Version_*_Delta.pdf + * For an overview of OEMCrypto functionality, please see + * [Widevine Modular DRM Security Integration Guide for Common + * Encryption](../oemcrypto) * - *********************************************************************/ + * The OEMCrypto API is divided into several sections. + * + * @defgroup initcontrol Initialization and Control API + * Initialization and set up OEMCrypto. + * + * @defgroup keyladder Crypto Key Ladder API + * The crypto key ladder is a mechanism for staging crypto keys for use by the + * hardware crypto engine. + * + * Keys are always encrypted for transmission. Before + * a key can be used, it must be decrypted (typically using the top key in the + * key ladder) and then added to the key ladder for upcoming decryption + * operations. The Crypto Key Ladder API requires the device to provide + * hardware support for AES-128 CTR and CBC modes and prevent clear keys from + * being exposed to the insecure OS. + * + * @defgroup decryption Decryption API + * Devices that implement the Key Ladder API must also support a secure decode + * or secure decode and rendering implementation. + * + * This can be done by either + * decrypting into buffers secured by hardware protections and providing these + * secured buffers to the decoder/renderer or by implementing decrypt operations + * in the decoder/renderer. + * + * In a Security Level 2 implementation where the video path is not protected, + * the audio and video streams are decrypted using OEMCrypto_DecryptCENC() and + * buffers are returned to the media player in the clear. + * + * Generic Modular DRM allows an application to encrypt, decrypt, sign and + * verify arbitrary user data using a content key. This content key is + * securely delivered from the server to the client device using the same + * factory installed root of trust as a media content keys. + * + * @defgroup factory_provision Factory Provisioning API + * Functions that are used to install the root of trust. This could be either a + * keybox or an OEM Certificate. + * + * Widevine keyboxes are used to establish a root of trust to secure content on + * a device that uses Provisioning 2.0. OEM Certificates are used to establish + * a root of trust to secure content on a device that uses Provisioning + * 3.0. Factory Provisioning a device is related to manufacturing methods. This + * section describes the API that installs the Widevine Keybox and the + * recommended methods for the OEM’s factory provisioning procedure. + * + * Starting with API version 10, devices should have two keyboxes. One is the + * production keybox which may be installed in the factory, or using + * OEMCrypto_WrapKeyboxOrOEMCert and OEMCrypto_InstallKeyboxOrOEMCert as + * described below. The second keybox is a test keybox. The test keybox is the + * same for all devices and is used for a suite of unit tests. The test keybox + * will only be used temporarily while the unit tests are running, and will not + * be used by the general public. After the unit tests have been run, and + * OEMCrypto_Terminate has been called, the production keybox should be active + * again. + * + * API functions marked as optional may be used by the OEM’s factory + * provisioning procedure and implemented in the library, but are not called + * from the Widevine DRM Plugin during normal operation. + * + * @defgroup keybox Keybox and Provisioning 2.0 API + * Functions that are needed to for a device with a keybox. + * + * The OEMCrypto API allows for a device to be initially provisioned with a + * keybox or with an OEM certificate. See the section Provisioning above. In a + * Level 1 or Level 2 implementation, only the security processor may access the + * keys in the keybox. The following functions are for devices that are + * provisioned with a keybox, i.e. Provisioning 2.0. + * + * @defgroup oem_cert OEM Certificate and Provisioning 3.0 API + * Functions that are needed to for a device with an OEM Certificate. + * + * The OEMCrypto API allows for a device to be initially provisioned with a + * keybox or with an OEM certificate. See the Provisioning above. The + * functions in this section are for devices that are provisioned with an OEM + * Certificate, i.e. Provisioning 3.0. + * + * API functions marked as optional may be used by the OEM’s factory + * provisioning procedure and implemented in the library, but are not called + * from the Widevine DRM Plugin during normal operation. + * + * @defgroup validation Validation and Feature Support API + * The OEMCrypto API is flexible enough to allow different devices to support + * different features. This section has functions that specify the level of + * support for various features. These values are reported to either the + * application or the license server. + * + * @defgroup drm_cert DRM Certificate Provisioning API + * This section of functions are used to provision the device with an DRM + * certificate. This certificate is obtained by a device in the field from a + * Google/Widevine provisioning server, or from a third party server running the + * Google/Widevine provisioning server SDK. Since the DRM certificate may be + * origin or application specific, a device may have several DRM certificates + * installed at a time. The DRM certificate is used to authenticate the device + * to a license server. In order to obtain a DRM certificate from a + * provisioning server, the device may authenticate itself using a keybox or + * using an OEM certificate. + * + * @defgroup usage_table Usage Table API + * The usage table is used to store license usage and allows a persistent + * license to be reloaded. + * + * @defgroup test_verify Test and Verification API + * Functions that are designed to help test OEMCrypto and the device. They are + * not used during normal operation. Some functions, like OEMCrypto_RemoveSRM + * should only be implemented on test devices. Other functions, like those that + * test the full decrypt data path may be supported on a production device with + * no added risk of security loss. + * + * The following functions are used just for testing and verification of + * OEMCrypto and the CDM code. + * + * @defgroup common_types Common Types + * Enumerations and structures that are used by several OEMCrypto and ODK + * functions. + */ #ifndef OEMCRYPTO_CENC_H_ #define OEMCRYPTO_CENC_H_ @@ -29,9 +143,17 @@ extern "C" { #endif +/// @addtogroup keyladder +/// @{ + +/// This is the internal session identifier. typedef uint32_t OEMCrypto_SESSION; -/* +/// @} + +/// @addtogroup decryption +/// @{ +/** * The memory referenced by OEMCrypto_SharedMemory* is safe to be placed in * shared memory. The only data that should be placed into shared * memory is the contents of input/output buffers, i.e. data that will @@ -40,70 +162,67 @@ typedef uint32_t OEMCrypto_SESSION; */ typedef uint8_t OEMCrypto_SharedMemory; -/* - * OEMCrypto_DestBufferDesc Structure - * - * Description: - * This structure is used as parameters in the OEMCrypto_DecryptCENC and - * OEMCrypto_CopyBuffer functions. This describes the type and access - * information for the memory to receive decrypted data. - * - * The OEMCrypto API supports a range of client device architectures. - * Different architectures have different methods for acquiring and securing - * buffers that will hold portions of the audio or video stream after - * decryption. Three basic strategies are recognized for handling decrypted - * stream data: - * - * 1. Return the decrypted data in the clear into normal user memory - * (ClearBuffer). The caller uses normal memory allocation methods to - * acquire a buffer, and supplies the memory address of the buffer in - * the descriptor. - * 2. Place the decrypted data into protected memory (SecureBuffer). The - * caller uses a platform-specific method to acquire the protected - * buffer and a user-memory handle that references it. The handle is - * supplied to the decrypt call in the descriptor. If the buffer is - * filled with several OEMCrypto calls, the same handle will be used, - * and the offset will be incremented to indicate where the next write - * should take place. - * 3. Place the decrypted data directly into the audio or video decoder - * fifo (Direct). The caller will use platform-specific methods to - * initialize the fifo and the decoders. The decrypted stream data is - * not accessible to the caller. This is used on some platforms only. - * - * Fields: - * [in] type: A tag that indicates which variant of the union is valid for - * this instance of the structure. - * [variant] clear: This variant is valid when the type is - * OEMCrypto_BufferType_Clear. This OEMCrypto_DestBufferDesc indicates output - * should be written to a clear buffer. - * [in] address: A pointer to the address in memory to begin writing output. - * [in] address_length: The length of the buffer that is available to contain - * output. - * [variant] secure: This variant is valid when the type is - * OEMCrypto_BufferType_Secure. This OEMCrypto_DestBufferDesc indicates - * output should be written to a secure buffer. The decrypted output must - * never leave the secure area until it is output from the device. - * [in] handle: An opaque handle to a secure buffer. The meaning of this - * handle is platform-specific. - * [in] handle_length: The length of the data contained in the secure buffer. - * [in] offset: An offset indicating where in the secure buffer to start - * writing data. - * [variant] direct: This variant is valid when the type is - * OEMCrypto_BufferType_Direct. This OEMCrypto_DestBufferDesc indicates - * output should be written directly to the decoder. - * [in] is_video: A flag indicating if the data is video and should be sent - * to the video decoder. If this is false, the data can be assumed to be - * audio and sent to the audio decoder. - * - * Version: - * This struct changed in API version 16. +/** Specifies destination buffer type. */ typedef enum OEMCryptoBufferType { OEMCrypto_BufferType_Clear, OEMCrypto_BufferType_Secure, - OEMCrypto_BufferType_Direct + OEMCrypto_BufferType_Direct, + OEMCrypto_BufferType_MaxValue = OEMCrypto_BufferType_Direct, } OEMCryptoBufferType; +/** + * This structure is used as parameters in the OEMCrypto_DecryptCENC and + * OEMCrypto_CopyBuffer functions. This describes the type and access + * information for the memory to receive decrypted data. + * + * The OEMCrypto API supports a range of client device architectures. Different + * architectures have different methods for acquiring and securing buffers that + * will hold portions of the audio or video stream after decryption. Three basic + * strategies are recognized for handling decrypted stream data: + * + * 1. Return the decrypted data in the clear into normal user memory + * (ClearBuffer). The caller uses normal memory allocation methods to + * acquire a buffer, and supplies the memory address of the buffer in + * the descriptor. + * 2. Place the decrypted data into protected memory (SecureBuffer). The + * caller uses a platform-specific method to acquire the protected + * buffer and a user-memory handle that references it. The handle is + * supplied to the decrypt call in the descriptor. If the buffer is + * filled with several OEMCrypto calls, the same handle will be used, + * and the offset will be incremented to indicate where the next write + * should take place. + * 3. Place the decrypted data directly into the audio or video decoder + * fifo (Direct). The caller will use platform-specific methods to + * initialize the fifo and the decoders. The decrypted stream data is + * not accessible to the caller. This is used on some platforms only. + * + * @param[in] type: A tag that indicates which variant of the union is valid for + * this instance of the structure. [variant] clear: This variant is valid + * when the type is OEMCrypto_BufferType_Clear. This OEMCrypto_DestBufferDesc + * indicates output should be written to a clear buffer. + * @param[in] address: A pointer to the address in memory to begin writing + * output. + * @param[in] address_length: The length of the buffer that is available to + * contain output. [variant] secure: This variant is valid when the type is + * OEMCrypto_BufferType_Secure. This OEMCrypto_DestBufferDesc indicates + * output should be written to a secure buffer. The decrypted output must + * never leave the secure area until it is output from the device. + * @param[in] handle: An opaque handle to a secure buffer. The meaning of this + * handle is platform-specific. + * @param[in] handle_length: The length of the data contained in the secure + * buffer. + * @param[in] offset: An offset indicating where in the secure buffer to start + * writing data. [variant] direct: This variant is valid when the type is + * OEMCrypto_BufferType_Direct. This OEMCrypto_DestBufferDesc indicates + * output should be written directly to the decoder. + * @param[in] is_video: A flag indicating if the data is video and should be + * sent to the video decoder. If this is false, the data can be assumed to be + * audio and sent to the audio decoder. + * + * @version + * This struct changed in API version 16. + */ typedef struct { OEMCryptoBufferType type; union { @@ -122,20 +241,17 @@ typedef struct { } buffer; } OEMCrypto_DestBufferDesc; -/* - * OEMCrypto_InputOutputPair Structure +/** + * This structure is used as parameters in the OEMCrypto_DecryptCENC function. * - * Description: - * This structure is used as parameters in the OEMCrypto_DecryptCENC function. + * @param[in] input_data: An unaligned pointer to this sample from the stream. + * @param[in] input_data_length: The length of this sample in the stream, in + * bytes. + * @param[in] output_descriptor: A caller-owned descriptor that specifies the + * handling of the decrypted byte stream. See OEMCrypto_DestbufferDesc for + * details. * - * Fields: - * [in] input_data: An unaligned pointer to this sample from the stream. - * [in] input_data_length: The length of this sample in the stream, in bytes. - * [in] output_descriptor: A caller-owned descriptor that specifies the - * handling of the decrypted byte stream. See OEMCrypto_DestbufferDesc for - * details. - * - * Version: + * @version * This struct changed in API version 16. */ typedef struct { @@ -144,39 +260,35 @@ typedef struct { OEMCrypto_DestBufferDesc output_descriptor; // destination for clear data. } OEMCrypto_InputOutputPair; -/* - * OEMCrypto_SubSampleDescription Structure +/** + * This structure is used as parameters in the OEMCrypto_DecryptCENC + * function. In the DASH specification, a sample is composed of multiple + * samples, and each subsample is composed of two regions. The first region is + * clear unprotected data. We also call this clear data or unencrypted + * data. Immediately following the clear region is the protected region. The + * protected region is encrypted or encrypted with a pattern. The pattern and + * number of bytes that are encrypted in the protected region is discussed in + * this document when we talk about the function OEMCryptoDecryptCENC. For + * historic reasons, this document also calls the protected region the encrypted + * region. * - * Description: - * This structure is used as parameters in the OEMCrypto_DecryptCENC - * function. In the DASH specification, a sample is composed of multiple - * samples, and each subsample is composed of two regions. The first region - * is clear unprotected data. We also call this clear data or unencrypted - * data. Immediately following the clear region is the protected region. The - * protected region is encrypted or encrypted with a pattern. The pattern and - * number of bytes that are encrypted in the protected region is discussed in - * this document when we talk about the function OEMCryptoDecryptCENC. For - * historic reasons, this document also calls the protected region the - * encrypted region. + * @param[in] num_bytes_clear: The number of unprotected bytes in this + * subsample. The clear bytes come before the encrypted bytes. + * @param[in] num_bytes_encrypted: The number of protected bytes in this + * subsample. The protected bytes come after the clear bytes. + * @param[in] subsample_flags: bitwise flags indicating if this is the first, + * middle, or last subsample in a sample. 1 = first subsample, 2 = last + * subsample, 3 = both first and last subsample, 0 = neither first nor last + * subsample. + * @param[in] block_offset: This will only be non-zero for the 'cenc' scheme. + * If it is non-zero, the decryption block boundary is different from the + * start of the data. block_offset should be subtracted from data to compute + * the starting address of the first decrypted block. The bytes between the + * decryption block start address and data are discarded after decryption. It + * does not adjust the beginning of the source or destination data. This + * parameter satisfies 0 <= block_offset < 16. * - * Fields: - * [in] num_bytes_clear: The number of unprotected bytes in this subsample. - * The clear bytes come before the encrypted bytes. - * [in] num_bytes_encrypted: The number of protected bytes in this subsample. - * The protected bytes come after the clear bytes. - * [in] subsample_flags: bitwise flags indicating if this is the first, - * middle, or last subsample in a sample. 1 = first subsample, 2 = last - * subsample, 3 = both first and last subsample, 0 = neither first nor last - * subsample. - * [in] block_offset: This will only be non-zero for the 'cenc' scheme. If it - * is non-zero, the decryption block boundary is different from the start of - * the data. block_offset should be subtracted from data to compute the - * starting address of the first decrypted block. The bytes between the - * decryption block start address and data are discarded after decryption. It - * does not adjust the beginning of the source or destination data. This - * parameter satisfies 0 <= block_offset < 16. - * - * Version: + * @version * This struct changed in API version 16. */ typedef struct { @@ -189,23 +301,20 @@ typedef struct { #define OEMCrypto_FirstSubsample 1 #define OEMCrypto_LastSubsample 2 -/* - * OEMCrypto_SampleDescription Structure +/** + * This structure is used as parameters in the OEMCrypto_DecryptCENC function. * - * Description: - * This structure is used as parameters in the OEMCrypto_DecryptCENC function. + * @param[in] buffers: A structure containing information about the input and + * output buffers. + * @param[in] iv: A 16-byte array containing the IV for the initial subsample of + * the sample. + * @param[in] subsamples: A caller-owned array of OEMCrypto_SubSampleDescription + * structures. Each entry in this array describes one subsample in the + * sample. + * @param[in] subsamples_length: The length of the array pointed to by the + * subsamples parameter. * - * Fields: - * [in] buffers: A structure containing information about the input and - * output buffers. - * [in] iv: A 16-byte array containing the IV for the initial subsample of - * the sample. - * [in] subsamples: A caller-owned array of OEMCrypto_SubSampleDescription - * structures. Each entry in this array describes one subsample in the sample. - * [in] subsamples_length: The length of the array pointed to by the - * subsamples parameter. - * - * Version: + * @version * This struct changed in API version 16. */ typedef struct { @@ -215,17 +324,14 @@ typedef struct { size_t subsamples_length; // the number of subsamples in the sample. } OEMCrypto_SampleDescription; -/* - * OEMCrypto_CENCEncryptPatternDesc Structure - * - * Description: - * This structure is used as parameters in the OEMCrypto_DecryptCENC function. +/** + * This structure is used as parameters in the OEMCrypto_DecryptCENC function. * * Fields: - * [in] encrypt: The number of 16-byte crypto blocks to encrypt. - * [in] skip: The number of 16-byte crypto blocks to leave in the clear. + * @param[in] encrypt: The number of 16-byte crypto blocks to encrypt. + * @param[in] skip: The number of 16-byte crypto blocks to leave in the clear. * - * Version: + * @version * This struct changed in API version 16. */ typedef struct { @@ -233,26 +339,31 @@ typedef struct { size_t skip; // number of 16 byte blocks to leave in clear. } OEMCrypto_CENCEncryptPatternDesc; -/** OEMCryptoCipherMode is used in SelectKey to prepare a key for either CTR +/** + * OEMCryptoCipherMode is used in SelectKey to prepare a key for either CTR * decryption or CBC decryption. */ typedef enum OEMCryptoCipherMode { OEMCrypto_CipherMode_CTR, OEMCrypto_CipherMode_CBC, + OEMCrypto_CipherMode_MaxValue = OEMCrypto_CipherMode_CBC, } OEMCryptoCipherMode; -/* - * OEMCrypto_EntitledContentKeyObject +/** * Contains encrypted content key data for loading into the sessions keytable. * The content key data is encrypted using AES-256-CBC encryption, with PKCS#7 * padding. - * entitlement_key_id - entitlement key id to be matched to key table. - * entitlement_key_id_length - length of entitlment_key_id in bytes (1 to 16). - * content_key_id - content key id to be loaded into key table. - * content_key_id_length - length of content key id in bytes (1 to 16). - * key_data_iv - the IV for performing AES-256-CBC decryption of the key data. - * key_data - encrypted content key data. - * key_data_length - length of key_data - 16 or 32 depending on intended use. + + * @param entitlement_key_id: entitlement key id to be matched to key table. + * @param entitlement_key_id_length: length of entitlment_key_id in bytes (1 to + * 16). + * @param content_key_id: content key id to be loaded into key table. + * @param content_key_id_length: length of content key id in bytes (1 to 16). + * @param key_data_iv: the IV for performing AES-256-CBC decryption of the key + * data. + * @param key_data: encrypted content key data. + * @param key_data_length: length of key_data: 16 or 32 depending on intended us + e. */ typedef struct { OEMCrypto_Substring entitlement_key_id; @@ -261,18 +372,31 @@ typedef struct { OEMCrypto_Substring content_key_data; } OEMCrypto_EntitledContentKeyObject; -/* - * OEMCrypto_KeyRefreshObject - * This structure is being deprecated. It is only used for legacy licenses. - * Points to the relevant fields for renewing a content key. The fields are - * extracted from the License Renewal Response message offered to - * OEMCrypto_RefreshKeys(). Each field points to one of the components of - * the key. - * key_id - the unique id of this key. - * key_control_iv - the IV for performing AES-128-CBC decryption of the - * key_control field. 16 bytes. - * key_control - the key control block. It is encrypted (AES-128-CBC) with - * the content key from the key_data field. 16 bytes. +/** + * This is a list of valid algorithms for OEMCrypto_Generic_* functions. + * Some are valid for encryption/decryption, and some for signing/verifying. + */ +typedef enum OEMCrypto_Algorithm { + OEMCrypto_AES_CBC_128_NO_PADDING = 0, + OEMCrypto_HMAC_SHA256 = 1, +} OEMCrypto_Algorithm; + +/// @} + +/// @addtogroup keyladder +/// @{ +/** + * This structure is being deprecated. It is only used for legacy licenses. + * Points to the relevant fields for renewing a content key. The fields are + * extracted from the License Renewal Response message offered to + * OEMCrypto_RefreshKeys(). Each field points to one of the components of + * the key. + + * @param key_id: the unique id of this key. + * @param key_control_iv: the IV for performing AES-128-CBC decryption of the + * key_control field. 16 bytes. + * @param key_control: the key control block. It is encrypted (AES-128-CBC) with + * the content key from the key_data field. 16 bytes. * * The key_data is unchanged from the original OEMCrypto_LoadKeys() call. Some * Key Control Block fields, especially those related to key lifetime, may @@ -287,17 +411,13 @@ typedef struct { OEMCrypto_Substring key_control; } OEMCrypto_KeyRefreshObject; -/* - * OEMCrypto_Algorithm - * This is a list of valid algorithms for OEMCrypto_Generic_* functions. - * Some are valid for encryption/decryption, and some for signing/verifying. - */ -typedef enum OEMCrypto_Algorithm { - OEMCrypto_AES_CBC_128_NO_PADDING = 0, - OEMCrypto_HMAC_SHA256 = 1, -} OEMCrypto_Algorithm; +/// @} -/* +/// @addtogroup usage_table +/// @{ + +#if 0 // If your compiler supports __attribute__((packed)). +/** * OEMCrypto_PST_Report is used to report an entry from the Usage Table. * * Platforms that have compilers that support packed structures, may use the @@ -306,7 +426,6 @@ typedef enum OEMCrypto_Algorithm { * * All fields are in network byte order. */ -#if 0 // If your compiler supports __attribute__((packed)). typedef struct { uint8_t signature[20]; // -- HMAC SHA1 of the rest of the report. uint8_t status; // current status of entry. (OEMCrypto_Usage_Entry_Status) @@ -320,9 +439,8 @@ typedef struct { } __attribute__((packed)) OEMCrypto_PST_Report; #endif -/* - * OEMCrypto_Clock_Security_Level. - * Valid values for clock_security_level in OEMCrypto_PST_Report. +/** + * Valid values for clock_security_level in OEMCrypto_PST_Report. */ typedef enum OEMCrypto_Clock_Security_Level { kInsecureClock = 0, @@ -337,21 +455,27 @@ typedef uint8_t RSA_Padding_Scheme; // PKCS1 with block type 1 padding (only). #define kSign_PKCS1_Block1 ((RSA_Padding_Scheme)0x2) -/* +/// @} + +/// @addtogroup validation +/// @{ +/** * OEMCrypto_HDCP_Capability is used in the key control block to enforce HDCP * level, and in GetHDCPCapability for reporting. */ typedef enum OEMCrypto_HDCP_Capability { - HDCP_NONE = 0, // No HDCP supported, no secure data path. - HDCP_V1 = 1, // HDCP version 1.0 - HDCP_V2 = 2, // HDCP version 2.0 Type 1. - HDCP_V2_1 = 3, // HDCP version 2.1 Type 1. - HDCP_V2_2 = 4, // HDCP version 2.2 Type 1. - HDCP_V2_3 = 5, // HDCP version 2.3 Type 1. - HDCP_NO_DIGITAL_OUTPUT = 0xff // No digital output. + HDCP_NONE = 0, // No HDCP supported, no secure data path. + HDCP_V1 = 1, // HDCP version 1.x + HDCP_V2 = 2, // HDCP version 2.0 Type 1. + HDCP_V2_1 = 3, // HDCP version 2.1 Type 1. + HDCP_V2_2 = 4, // HDCP version 2.2 Type 1. + HDCP_V2_3 = 5, // HDCP version 2.3 Type 1. + HDCP_NO_DIGITAL_OUTPUT = 0xff // No digital output. } OEMCrypto_HDCP_Capability; -/* Return value for OEMCrypto_GetProvisioningMethod(). */ +/** + Return value for OEMCrypto_GetProvisioningMethod(). + */ typedef enum OEMCrypto_ProvisioningMethod { OEMCrypto_ProvisioningError = 0, // Device cannot be provisioned. OEMCrypto_DrmCertificate = 1, // Device has baked in DRM certificate @@ -360,7 +484,7 @@ typedef enum OEMCrypto_ProvisioningMethod { OEMCrypto_OEMCertificate = 3 // Device has factory installed OEM certificate. } OEMCrypto_ProvisioningMethod; -/* +/** * Flags indicating public/private key types supported. */ #define OEMCrypto_Supports_RSA_2048bit 0x1 @@ -370,14 +494,14 @@ typedef enum OEMCrypto_ProvisioningMethod { #define OEMCrypto_Supports_ECC_secp384r1 0x200 #define OEMCrypto_Supports_ECC_secp521r1 0x400 -/* +/** * Flags indicating full decrypt path hash supported. */ #define OEMCrypto_Hash_Not_Supported 0 #define OEMCrypto_CRC_Clear_Buffer 1 #define OEMCrypto_Partner_Defined_Hash 2 -/* +/** * Return values from OEMCrypto_GetAnalogOutputFlags. */ #define OEMCrypto_No_Analog_Output 0x0 @@ -387,7 +511,9 @@ typedef enum OEMCrypto_ProvisioningMethod { // Unknown_Analog_Output is used only for backwards compatibility. #define OEMCrypto_Unknown_Analog_Output (1<<31) -/* +/// @} + +/** * Obfuscation Renames. */ // clang-format off @@ -498,187 +624,164 @@ typedef enum OEMCrypto_ProvisioningMethod { #define OEMCrypto_MinorAPIVersion _oecc108 // clang-format on -/* - * OEMCrypto_SetSandbox +/// @addtogroup initcontrol +/// @{ + +/** + * This tells OEMCrypto which sandbox the current process belongs to. Any + * persistent memory used to store the generation number should be associated + * with this sandbox id. OEMCrypto can assume that this sandbox will be tied + * to the current process or VM until OEMCrypto_Terminate is called. See the + * section "VM and Sandbox Support" above for more details. * - * Description: - * This tells OEMCrypto which sandbox the current process belongs to. Any - * persistent memory used to store the generation number should be associated - * with this sandbox id. OEMCrypto can assume that this sandbox will be tied - * to the current process or VM until OEMCrypto_Terminate is called. See the - * section "VM and Sandbox Support" above for more details. + * If OEMCrypto does not support sandboxes, it will return + * OEMCrypto_ERROR_NOT_IMPLEMENTED. On most platforms, this function will + * just return OEMCrypto_ERROR_NOT_IMPLEMENTED. If OEMCrypto supports + * sandboxes, this function returns OEMCrypto_SUCCESS on success, and + * OEMCrypto_ERROR_UNKNOWN_FAILURE on failure. * - * If OEMCrypto does not support sandboxes, it will return - * OEMCrypto_ERROR_NOT_IMPLEMENTED. On most platforms, this function will - * just return OEMCrypto_ERROR_NOT_IMPLEMENTED. If OEMCrypto supports - * sandboxes, this function returns OEMCrypto_SUCCESS on success, and - * OEMCrypto_ERROR_UNKNOWN_FAILURE on failure. + * The CDM layer will call OEMCrypto_SetSandbox once before + * OEMCrypto_Initialize. After this function is called and returns success, + * it will be OEMCrypto's responsibility to keep calls to usage table + * functions separate, and to accept a call to OEMCrypto_Terminate for each + * sandbox. * - * The CDM layer will call OEMCrypto_SetSandbox once before - * OEMCrypto_Initialize. After this function is called and returns success, - * it will be OEMCrypto's responsibility to keep calls to usage table - * functions separate, and to accept a call to OEMCrypto_Terminate for each - * sandbox. + * @param[in] sandbox_id: a short string unique to the current sandbox. + * @param[in] sandbox_id_length: length of sandbox_id. * - * Parameters: - * [in] sandbox_id: a short string unique to the current sandbox. - * [in] sandbox_id_length: length of sandbox_id. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_INIT_FAILED failed to initialize crypto hardware + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED sandbox functionality not supported * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_INIT_FAILED failed to initialize crypto hardware - * OEMCrypto_ERROR_NOT_IMPLEMENTED - sandbox functionality not supported - * - * Threading: + * @threading * This is an "Initialization and Termination Function" and will not be * called simultaneously with any other function, as if the CDM holds a write * lock on the OEMCrypto system. It is called once before * OEMCrypto_Initialize. * - * Version: + * @version * This method is new in version 15 of the API. */ OEMCryptoResult OEMCrypto_SetSandbox(const uint8_t* sandbox_id, size_t sandbox_id_length); -/* - * OEMCrypto_Initialize +/** + * Initialize the crypto firmware/hardware. * - * Description: - * Initialize the crypto firmware/hardware. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_INIT_FAILED failed to initialize crypto hardware * - * Parameters: - * None - * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_INIT_FAILED failed to initialize crypto hardware - * - * Threading: + * @threading * This is an "Initialization and Termination Function" and will not be * called simultaneously with any other function, as if the CDM holds a write * lock on the OEMCrypto system. * - * Version: + * @version * This method is supported by all API versions. */ OEMCryptoResult OEMCrypto_Initialize(void); -/* - * OEMCrypto_Terminate +/** + * Closes the crypto operation and releases all related resources. * - * Description: - * Closes the crypto operation and releases all related resources. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_TERMINATE_FAILED failed to de-initialize crypto + * hardware * - * Parameters: - * None - * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_TERMINATE_FAILED failed to de-initialize crypto hardware - * - * Threading: + * @threading * This is an "Initialization and Termination Function" and will not be * called simultaneously with any other function, as if the CDM holds a write * lock on the OEMCrypto system. No other functions will be called before the * system is re-initialized. * - * Version: + * @version * This method is supported by all API versions. */ OEMCryptoResult OEMCrypto_Terminate(void); -/* - * OEMCrypto_OpenSession +/// @} + +/// @addtogroup keyladder +/// @{ +/** + * Open a new crypto security engine context. The security engine hardware + * and firmware shall acquire resources that are needed to support the + * session, and return a session handle that identifies that session in + * future calls. * - * Description: - * Open a new crypto security engine context. The security engine hardware - * and firmware shall acquire resources that are needed to support the - * session, and return a session handle that identifies that session in - * future calls. + * This function shall call ODK_InitializeSessionValues to initialize the + * session's clock values, timer values, and nonce values. + * ODK_InitializeSessionValues is described in the document "License Duration + * and Renewal", to initialize the session's clock values. * - * This function shall call ODK_InitializeSessionValues to initialize the - * session's clock values, timer values, and nonce values. - * ODK_InitializeSessionValues is described in the document "License Duration - * and Renewal", to initialize the session's clock values. + * @param[out] session: an opaque handle that the crypto firmware uses to + * identify the session. * - * Parameters: - * [out] session: an opaque handle that the crypto firmware uses to identify - * the session. - * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_TOO_MANY_SESSIONS failed because too many sessions are open - * OEMCrypto_ERROR_OPEN_SESSION_FAILED there is a resource issue or the + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_TOO_MANY_SESSIONS failed because too many sessions + * are open + * @retval OEMCrypto_ERROR_OPEN_SESSION_FAILED there is a resource issue or the * security engine is not properly initialized. - * OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Threading: + * @threading * This is a "Session Initialization Function" and will not be called * simultaneously with any other function, as if the CDM holds a write lock * on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_OpenSession(OEMCrypto_SESSION* session); -/* - * OEMCrypto_CloseSession +/** + * Closes the crypto security engine session and frees any associated + * resources. If this session is associated with a Usage Entry, all resident + * memory associated with it will be freed. It is the CDM layer's + * responsibility to call OEMCrypto_UpdateUsageEntry before closing the + * session. * - * Description: - * Closes the crypto security engine session and frees any associated - * resources. If this session is associated with a Usage Entry, all resident - * memory associated with it will be freed. It is the CDM layer's - * responsibility to call OEMCrypto_UpdateUsageEntry before closing the - * session. + * @param[in] session: handle for the session to be closed. * - * Parameters: - * [in] session: handle for the session to be closed. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_INVALID_SESSION no open session with that id. + * @retval OEMCrypto_ERROR_CLOSE_SESSION_FAILED illegal/unrecognized handle or + * the security engine is not properly initialized. + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_INVALID_SESSION no open session with that id. - * OEMCrypto_ERROR_CLOSE_SESSION_FAILED illegal/unrecognized handle or the - * security engine is not properly initialized. - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Session Initialization Function" and will not be called * simultaneously with any other function, as if the CDM holds a write lock * on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 13. */ OEMCryptoResult OEMCrypto_CloseSession(OEMCrypto_SESSION session); -/* - * OEMCrypto_GenerateDerivedKeys +/** + * Generates three secondary keys, mac_key[server], mac_key[client], and + * encrypt_key, for handling signing and content key decryption under the + * license server protocol for CENC. * - * Description: - * Generates three secondary keys, mac_key[server], mac_key[client], and - * encrypt_key, for handling signing and content key decryption under the - * license server protocol for CENC. + * Refer to the Key Derivation section above for more details. This function + * computes the AES-128-CMAC of the enc_key_context and stores it in secure + * memory as the encrypt_key. It then computes four cycles of AES-128-CMAC of + * the mac_key_context and stores it in the mac_keys -- the first two cycles + * generate the mac_key[server] and the second two cycles generate the + * mac_key[client]. These two keys will be stored until the next call to + * OEMCrypto_LoadKeys(). The device key from the keybox is used as the key + * for the AES-128-CMAC. * - * Refer to the Key Derivation section above for more details. This function - * computes the AES-128-CMAC of the enc_key_context and stores it in secure - * memory as the encrypt_key. It then computes four cycles of AES-128-CMAC of - * the mac_key_context and stores it in the mac_keys -- the first two cycles - * generate the mac_key[server] and the second two cycles generate the - * mac_key[client]. These two keys will be stored until the next call to - * OEMCrypto_LoadKeys(). The device key from the keybox is used as the key - * for the AES-128-CMAC. - * - * Parameters: - * [in] session: handle for the session to be used. - * [in] mac_key_context: pointer to memory containing context data for - * computing the HMAC generation key. - * [in] mac_key_context_length: length of the HMAC key context data, in bytes. - * [in] enc_key_context: pointer to memory containing context data for - * computing the encryption key. - * [in] enc_key_context_length: length of the encryption key context data, in - * bytes. + * @param[in] session: handle for the session to be used. + * @param[in] mac_key_context: pointer to memory containing context data for + * computing the HMAC generation key. + * @param[in] mac_key_context_length: length of the HMAC key context data, in + * bytes. + * @param[in] enc_key_context: pointer to memory containing context data for + * computing the encryption key. + * @param[in] enc_key_context_length: length of the encryption key context data, + * in bytes. * * Results: * mac_key[server]: the 256 bit mac key is generated and stored in secure @@ -688,31 +791,30 @@ OEMCryptoResult OEMCrypto_CloseSession(OEMCrypto_SESSION session); * enc_key: the 128 bit encryption key is generated and stored in secure * memory. * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_NO_DEVICE_KEY - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_INVALID_CONTEXT - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_NO_DEVICE_KEY + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_INVALID_CONTEXT + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support mac_key_context and enc_key_context sizes as * described in the section OEMCrypto_ResourceRatingTier. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffers are * too large. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 12. */ OEMCryptoResult OEMCrypto_GenerateDerivedKeys( @@ -721,50 +823,47 @@ OEMCryptoResult OEMCrypto_GenerateDerivedKeys( const OEMCrypto_SharedMemory* enc_key_context, size_t enc_key_context_length); -/* - * OEMCrypto_DeriveKeysFromSessionKey +/** + * Generates three secondary keys, mac_key[server], mac_key[client] and + * encrypt_key, for handling signing and content key decryption under the + * license server protocol for CENC. * - * Description: - * Generates three secondary keys, mac_key[server], mac_key[client] and - * encrypt_key, for handling signing and content key decryption under the - * license server protocol for CENC. + * This function is similar to OEMCrypto_GenerateDerivedKeys, except that it + * uses a session key to generate the secondary keys instead of the Widevine + * Keybox device key. These three keys will be stored in secure memory until + * the next call to LoadLicense or LoadProvisioning. * - * This function is similar to OEMCrypto_GenerateDerivedKeys, except that it - * uses a session key to generate the secondary keys instead of the Widevine - * Keybox device key. These three keys will be stored in secure memory until - * the next call to LoadLicense or LoadProvisioning. + * If the session's private key is an RSA key, then the session key is passed + * in encrypted by the device RSA public key as the derivation_key, and must + * be decrypted with the RSA private key before use. * - * If the session's private key is an RSA key, then the session key is passed - * in encrypted by the device RSA public key as the derivation_key, and must - * be decrypted with the RSA private key before use. + * If the sesion's private key is an ECC key, then the session key is the + * SHA256 of the shared secret key calculated by ECDH between the device's + * ECC private key and the derivation_key. See the document "OEMCrypto + * Elliptic Curve Support" for details. * - * If the sesion's private key is an ECC key, then the session key is the - * SHA256 of the shared secret key calculated by ECDH between the device's - * ECC private key and the derivation_key. See the document "OEMCrypto - * Elliptic Curve Support" for details. + * Once the enc_key and mac_keys have been generated, all calls to LoadKeys + * or LoadLicense proceed in the same manner for license requests using RSA + * or using a Widevine keybox token. * - * Once the enc_key and mac_keys have been generated, all calls to LoadKeys - * or LoadLicense proceed in the same manner for license requests using RSA - * or using a Widevine keybox token. - * - * Verification: + * @verification * If the RSA key's allowed_schemes is not kSign_RSASSA_PSS, then no keys are * derived and the error OEMCrypto_ERROR_INVALID_RSA_KEY is returned. An RSA * key cannot be used for both deriving session keys and also for PKCS1 * signatures. * - * Parameters: - * [in] session: handle for the session to be used. - * [in] derivation_key: session key, encrypted with the public RSA key (from - * the DRM certifcate) using RSA-OAEP. - * [in] derivation_key_length: length of derivation_key, in bytes. - * [in] mac_key_context: pointer to memory containing context data for - * computing the HMAC generation key. - * [in] mac_key_context_length: length of the HMAC key context data, in bytes. - * [in] enc_key_context: pointer to memory containing context data for - * computing the encryption key. - * [in] enc_key_context_length: length of the encryption key context data, in - * bytes. + * @param[in] session: handle for the session to be used. + * @param[in] derivation_key: session key, encrypted with the public RSA key + * (from the DRM certifcate) using RSA-OAEP. + * @param[in] derivation_key_length: length of derivation_key, in bytes. + * @param[in] mac_key_context: pointer to memory containing context data for + * computing the HMAC generation key. + * @param[in] mac_key_context_length: length of the HMAC key context data, in + * bytes. + * @param[in] enc_key_context: pointer to memory containing context data for + * computing the encryption key. + * @param[in] enc_key_context_length: length of the encryption key context data, + * in bytes. * * Results: * mac_key[server]: the 256 bit mac key is generated and stored in secure @@ -774,31 +873,30 @@ OEMCryptoResult OEMCrypto_GenerateDerivedKeys( * enc_key: the 128 bit encryption key is generated and stored in secure * memory. * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_DEVICE_NOT_RSA_PROVISIONED - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_INVALID_CONTEXT - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_DEVICE_NOT_RSA_PROVISIONED + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_INVALID_CONTEXT + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support mac_key_context and enc_key_context sizes as * described in the section OEMCrypto_ResourceRatingTier. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffers are * too large. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_DeriveKeysFromSessionKey( @@ -808,575 +906,544 @@ OEMCryptoResult OEMCrypto_DeriveKeysFromSessionKey( const OEMCrypto_SharedMemory* enc_key_context, size_t enc_key_context_length); -/* - * OEMCrypto_GenerateNonce +/** + * Generates a 32-bit nonce to detect possible replay attack on the key + * control block. The nonce is stored in secure memory and will be used in + * the license or provisioning request. * - * Description: - * Generates a 32-bit nonce to detect possible replay attack on the key - * control block. The nonce is stored in secure memory and will be used in - * the license or provisioning request. + * Because the nonce will be used to prevent replay attacks, it is desirable + * that a rogue application cannot rapidly call this function until a + * repeated nonce is created randomly. This is called a nonce flood. With + * this in mind, if more than 200 nonces are requested within one second, + * OEMCrypto will return an error after the 200th and not generate any more + * nonces for the rest of the second. After an error, if the application + * waits at least one second before requesting more nonces, then OEMCrypto + * will reset the error condition and generate valid nonces again. * - * Because the nonce will be used to prevent replay attacks, it is desirable - * that a rogue application cannot rapidly call this function until a - * repeated nonce is created randomly. This is called a nonce flood. With - * this in mind, if more than 200 nonces are requested within one second, - * OEMCrypto will return an error after the 200th and not generate any more - * nonces for the rest of the second. After an error, if the application - * waits at least one second before requesting more nonces, then OEMCrypto - * will reset the error condition and generate valid nonces again. + * The nonce should be stored in the session's ODK_NonceValue field by + * calling the function ODK_SetNonceValue(&nonce_values, nonce). The ODK + * functions are documented in "Widevine Core Message Serialization". * - * The nonce should be stored in the session's ODK_NonceValue field by - * calling the function ODK_SetNonceValue(&nonce_values, nonce). The ODK - * functions are documented in "Widevine Core Message Serialization". + * This function shall only be called at most once per open session. It shall + * only be called before signing either a provisioning request or a license + * request. If an attempt is made to generate a nonce while in the wrong + * state, an error of OEMCrypto_ERROR_INVALID_CONTEXT is returned. * - * This function shall only be called at most once per open session. It shall - * only be called before signing either a provisioning request or a license - * request. If an attempt is made to generate a nonce while in the wrong - * state, an error of OEMCrypto_ERROR_INVALID_CONTEXT is returned. - * - * Parameters: - * [in] session: handle for the session to be used. - * [out] nonce: pointer to memory to receive the computed nonce. + * @param[in] session: handle for the session to be used. + * @param[out] nonce: pointer to memory to receive the computed nonce. * * Results: - * nonce: the nonce is also stored in secure memory. Each session should - * store 4 nonces. + * nonce: the nonce is also stored in secure memory. * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Threading: + * @threading * This is a "Session Initialization Function" and will not be called * simultaneously with any other function, as if the CDM holds a write lock * on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_GenerateNonce(OEMCrypto_SESSION session, uint32_t* nonce); -/* - * OEMCrypto_PrepAndSignLicenseRequest +/** + * OEMCrypto will use ODK_PrepareCoreLicenseRequest to prepare the core + * message. If it returns OEMCrypto_SUCCESS, then OEMCrypto shall sign the + * the message body using the DRM certificate's private key. If it returns an + * error, the error should be returned by OEMCrypto to the CDM layer. + * ODK_PrepareCoreLicenseRequest is described in the document "Widevine Core + * Message Serialization". * - * Description: - * OEMCrypto will use ODK_PrepareCoreLicenseRequest to prepare the core - * message. If it returns OEMCrypto_SUCCESS, then OEMCrypto shall sign the - * the message body using the DRM certificate's private key. If it returns an - * error, the error should be returned by OEMCrypto to the CDM layer. - * ODK_PrepareCoreLicenseRequest is described in the document "Widevine Core - * Message Serialization". + * The message body is the buffer starting at message + core_message_size, + * and with length message_length - core_message_size. The reason OEMCrypto + * only signs the message body and not the entire message is to allow a v16 + * device to request a license from a v15 license server. * - * The message body is the buffer starting at message + core_message_size, - * and with length message_length - core_message_size. The reason OEMCrypto - * only signs the message body and not the entire message is to allow a v16 - * device to request a license from a v15 license server. + * If the session's private RSA key has an "allowed_schemes" bit field, then + * it must be 0x1 (RSASSA-PSS with SHA1). If not, then an error of + * OEMCrypto_ERROR_SIGNATURE_FAILURE shall be returned. * - * If the session's private RSA key has an "allowed_schemes" bit field, then - * it must be 0x1 (RSASSA-PSS with SHA1). If not, then an error of - * OEMCrypto_ERROR_SIGNATURE_FAILURE shall be returned. + * OEMCrypto shall compute a hash of the core license request. The core + * license request is the buffer starting at message and with length + * core_message_size. The hash will be saved with the session and verified + * that it matches a hash in the license response. * - * OEMCrypto shall compute a hash of the core license request. The core - * license request is the buffer starting at message and with length - * core_message_size. The hash will be saved with the session and verified - * that it matches a hash in the license response. + * OEMCrypto shall also call the function ODK_InitializeClockValues, + * described in the document "License Duration and Renewal", to initialize + * the session's clock values. * - * OEMCrypto shall also call the function ODK_InitializeClockValues, - * described in the document "License Duration and Renewal", to initialize - * the session's clock values. + * Refer to the Signing Messages Sent to a Server section above for more + * details about the signature algorithm. * - * Refer to the Signing Messages Sent to a Server section above for more - * details about the signature algorithm. + * NOTE: if signature pointer is null and/or input signature_length is zero, + * this function returns OEMCrypto_ERROR_SHORT_BUFFER and sets output + * signature_length to the size needed to receive the output signature. * - * NOTE: if signature pointer is null and/or input signature_length is zero, - * this function returns OEMCrypto_ERROR_SHORT_BUFFER and sets output - * signature_length to the size needed to receive the output signature. + * @param[in] session: handle for the session to be used. + * @param[in,out] message: Pointer to memory for the entire message. Modified by + * OEMCrypto via the ODK library. + * @param[in] message_length: length of the entire message buffer. + * @param[in,out] core_message_size: length of the core message at the beginning + * of the message. (in) size of buffer reserved for the core message, in + * bytes. (out) actual length of the core message, in bytes. + * @param[out] signature: pointer to memory to receive the computed signature. + * @param[in,out] signature_length: (in) length of the signature buffer, in + * bytes. (out) actual length of the signature, in bytes. * - * Parameters: - * [in] session: handle for the session to be used. - * [in/out] message: Pointer to memory for the entire message. Modified by - * OEMCrypto via the ODK library. - * [in] message_length: length of the entire message buffer. - * [in/out] core_message_size: length of the core message at the beginning of - * the message. (in) size of buffer reserved for the core message, in - * bytes. (out) actual length of the core message, in bytes. - * [out] signature: pointer to memory to receive the computed signature. - * [in/out] signature_length: (in) length of the signature buffer, in bytes. - * (out) actual length of the signature, in bytes. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_SHORT_BUFFER if signature buffer is not large enough + * to hold the signature. + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_SIGNATURE_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_SHORT_BUFFER if signature buffer is not large enough to - * hold the signature. - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_SIGNATURE_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support message sizes as described in the section * OEMCrypto_ResourceRatingTier. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_PrepAndSignLicenseRequest( OEMCrypto_SESSION session, uint8_t* message, size_t message_length, size_t* core_message_size, uint8_t* signature, size_t* signature_length); -/* - * OEMCrypto_PrepAndSignRenewalRequest +/** + * OEMCrypto will use ODK_PrepareCoreRenewalRequest, as described in the + * document "Widevine Core Message Serialization", to prepare the core + * message. * - * Description: - * OEMCrypto will use ODK_PrepareCoreRenewalRequest, as described in the - * document "Widevine Core Message Serialization", to prepare the core - * message. + * If it returns an error, the error should be returned by OEMCrypto to the + * CDM layer. If it returns OEMCrypto_SUCCESS, then OEMCrypto computes the + * signature using the renewal mac key which was delivered in the license via + * LoadLicense. * - * If it returns an error, the error should be returned by OEMCrypto to the - * CDM layer. If it returns OEMCrypto_SUCCESS, then OEMCrypto computes the - * signature using the renewal mac key which was delivered in the license via - * LoadLicense. + * If nonce_values.api_level is 16, then OEMCrypto shall compute the + * signature of the entire message using the session's client renewal mac + * key. The entire message is the buffer starting at message with length + * message_length. * - * If nonce_values.api_level is 16, then OEMCrypto shall compute the - * signature of the entire message using the session's client renewal mac - * key. The entire message is the buffer starting at message with length - * message_length. + * If nonce_values.api_major_version is 15, then OEMCrypto shall compute the + * signature of the message body using the session's client renewal mac key. + * The message body is the buffer starting at message+core_message_size with + * length message_length - core_message_size. If the session has not had a + * license loaded, it will use the usage entries client mac key to sign the + * message body. * - * If nonce_values.api_major_version is 15, then OEMCrypto shall compute the - * signature of the message body using the session's client renewal mac key. - * The message body is the buffer starting at message+core_message_size with - * length message_length - core_message_size. If the session has not had a - * license loaded, it will use the usage entries client mac key to sign the - * message body. + * This function generates a HMAC-SHA256 signature using the mac_key[client] + * for license request signing under the license server protocol for CENC. * - * This function generates a HMAC-SHA256 signature using the mac_key[client] - * for license request signing under the license server protocol for CENC. + * The key used for signing should be the mac_key[client] that was generated + * for this session or loaded for this session by OEMCrypto_LoadKeys, + * OEMCrypto_LoadLicense, or OEMCrypto_LoadUsageEntry. * - * The key used for signing should be the mac_key[client] that was generated - * for this session or loaded for this session by OEMCrypto_LoadKeys, - * OEMCrypto_LoadLicense, or OEMCrypto_LoadUsageEntry. + * Refer to the Signing Messages Sent to a Server section above for more + * details. * - * Refer to the Signing Messages Sent to a Server section above for more - * details. + * If a usage entry has been loaded, but keys have not been loaded through + * OEMCrypto_LoadKeys, then the derived mac keys and the keys in the usage + * entry may be different. In this case, the mac keys specified in the usage + * entry should be used. * - * If a usage entry has been loaded, but keys have not been loaded through - * OEMCrypto_LoadKeys, then the derived mac keys and the keys in the usage - * entry may be different. In this case, the mac keys specified in the usage - * entry should be used. + * NOTE: if signature pointer is null and/or input signature_length is zero, + * this function returns OEMCrypto_ERROR_SHORT_BUFFER and sets output + * signature_length to the size needed to receive the output signature. * - * NOTE: if signature pointer is null and/or input signature_length is zero, - * this function returns OEMCrypto_ERROR_SHORT_BUFFER and sets output - * signature_length to the size needed to receive the output signature. + * @param[in] session: handle for the session to be used. + * @param[in,out] message: Pointer to memory for the entire message. Modified by + * OEMCrypto via the ODK library. + * @param[in] message_length: length of the entire message buffer. + * @param[in,out] core_message_size: length of the core message at the beginning + * of the message. (in) size of buffer reserved for the core message, in + * bytes. (out) actual length of the core message, in bytes. + * @param[out] signature: pointer to memory to receive the computed signature. + * @param[in,out] signature_length: (in) length of the signature buffer, in + * bytes. (out) actual length of the signature, in bytes. * - * Parameters: - * [in] session: handle for the session to be used. - * [in/out] message: Pointer to memory for the entire message. Modified by - * OEMCrypto via the ODK library. - * [in] message_length: length of the entire message buffer. - * [in/out] core_message_size: length of the core message at the beginning of - * the message. (in) size of buffer reserved for the core message, in - * bytes. (out) actual length of the core message, in bytes. - * [out] signature: pointer to memory to receive the computed signature. - * [in/out] signature_length: (in) length of the signature buffer, in bytes. - * (out) actual length of the signature, in bytes. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_SHORT_BUFFER if signature buffer is not large enough + * to hold the signature. + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_SHORT_BUFFER if signature buffer is not large enough to - * hold the signature. - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support message sizes as described in the section * OEMCrypto_ResourceRatingTier. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_PrepAndSignRenewalRequest( OEMCrypto_SESSION session, uint8_t* message, size_t message_length, size_t* core_message_size, uint8_t* signature, size_t* signature_length); -/* - * OEMCrypto_PrepAndSignProvisioningRequest +/** + * OEMCrypto will use OEMCrypto_PrepAndSignProvisioningRequest, as described + * in the document "Widevine Core Message Serialization", to prepare the core + * message. If it returns an error, the error should be returned by OEMCrypto + * to the CDM layer. If it returns OEMCrypto_SUCCESS, then OEMCrypto shall + * compute the signature of the entire message. The entire message is the + * buffer starting at message with length message_length. * - * Description: - * OEMCrypto will use OEMCrypto_PrepAndSignProvisioningRequest, as described - * in the document "Widevine Core Message Serialization", to prepare the core - * message. If it returns an error, the error should be returned by OEMCrypto - * to the CDM layer. If it returns OEMCrypto_SUCCESS, then OEMCrypto shall - * compute the signature of the entire message. The entire message is the - * buffer starting at message with length message_length. + * For a device that has a keybox, i.e. Provisioning 2.0, OEMCrypto will sign + * the request with the session's derived client mac key from the previous + * call to OEMCrypto_GenerateDerivedKeys. * - * For a device that has a keybox, i.e. Provisioning 2.0, OEMCrypto will sign - * the request with the session's derived client mac key from the previous - * call to OEMCrypto_GenerateDerivedKeys. + * For a device that has an OEM Certificate, i.e. Provisioning 3.0, OEMCrypto + * will sign the request with the private key associated with the OEM + * Certificate. The key shall have been loaded by a previous call to + * OEMCrypto_LoadDRMPrivateKey. * - * For a device that has an OEM Certificate, i.e. Provisioning 3.0, OEMCrypto - * will sign the request with the private key associated with the OEM - * Certificate. The key shall have been loaded by a previous call to - * OEMCrypto_LoadDRMPrivateKey. + * Refer to the Signing Messages Sent to a Server section above for more + * details. * - * Refer to the Signing Messages Sent to a Server section above for more - * details. + * NOTE: if signature pointer is null and/or input signature_length is zero, + * this function returns OEMCrypto_ERROR_SHORT_BUFFER and sets output + * signature_length to the size needed to receive the output signature. * - * NOTE: if signature pointer is null and/or input signature_length is zero, - * this function returns OEMCrypto_ERROR_SHORT_BUFFER and sets output - * signature_length to the size needed to receive the output signature. + * @param[in] session: handle for the session to be used. + * @param[in,out] message: Pointer to memory for the entire message. Modified by + * OEMCrypto via the ODK library. + * @param[in] message_length: length of the entire message buffer. + * @param[in,out] core_message_size: length of the core message at the beginning + * of the message. (in) size of buffer reserved for the core message, in + * bytes. (out) actual length of the core message, in bytes. + * @param[out] signature: pointer to memory to receive the computed signature. + * @param[in,out] signature_length: (in) length of the signature buffer, in + * bytes. (out) actual length of the signature, in bytes. * - * Parameters: - * [in] session: handle for the session to be used. - * [in/out] message: Pointer to memory for the entire message. Modified by - * OEMCrypto via the ODK library. - * [in] message_length: length of the entire message buffer. - * [in/out] core_message_size: length of the core message at the beginning of - * the message. (in) size of buffer reserved for the core message, in - * bytes. (out) actual length of the core message, in bytes. - * [out] signature: pointer to memory to receive the computed signature. - * [in/out] signature_length: (in) length of the signature buffer, in bytes. - * (out) actual length of the signature, in bytes. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_SHORT_BUFFER if signature buffer is not large enough + * to hold the signature. + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_SHORT_BUFFER if signature buffer is not large enough to - * hold the signature. - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support message sizes as described in the section * OEMCrypto_ResourceRatingTier. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_PrepAndSignProvisioningRequest( OEMCrypto_SESSION session, uint8_t* message, size_t message_length, size_t* core_message_size, uint8_t* signature, size_t* signature_length); -/* - * OEMCrypto_LoadSRM +/** + * Verify and install a new SRM file. The device shall install the new file + * only if verification passes. If verification fails, the existing SRM will + * be left in place. Verification is defined by DCP, and includes + * verification of the SRM's signature and verification that the SRM version + * number will not be decreased. See the section HDCP SRM Update above for + * more details about the SRM. This function is for devices that support HDCP + * v2.2 or higher and wish to receive 4k content. * - * Description: - * Verify and install a new SRM file. The device shall install the new file - * only if verification passes. If verification fails, the existing SRM will - * be left in place. Verification is defined by DCP, and includes - * verification of the SRM's signature and verification that the SRM version - * number will not be decreased. See the section HDCP SRM Update above for - * more details about the SRM. This function is for devices that support HDCP - * v2.2 or higher and wish to receive 4k content. + * @param[in] bufer: buffer containing the SRM + * @param[in] buffer_length: length of the SRM, in bytes. * - * Parameters: - * [in] bufer: buffer containing the SRM - * [in] buffer_length: length of the SRM, in bytes. - * - * Returns: - * OEMCrypto_SUCCESS - if the file was valid and was installed. - * OEMCrypto_ERROR_INVALID_CONTEXT - if the SRM version is too low, or the - * file is corrupted. - * OEMCrypto_ERROR_SIGNATURE_FAILURE - If the signature is invalid. - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - if the buffer is too large for the + * @retval OEMCrypto_SUCCESS if the file was valid and was installed. + * @retval OEMCrypto_ERROR_INVALID_CONTEXT if the SRM version is too low, or + * the file is corrupted. + * @retval OEMCrypto_ERROR_SIGNATURE_FAILURE If the signature is invalid. + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is too large for the * device. - * OEMCrypto_ERROR_NOT_IMPLEMENTED - * OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Buffer Sizes: + * @buffer_size * The size of the buffer is determined by the HDCP specification. * - * Threading: + * @threading * This is an "Initialization and Termination Function" and will not be * called simultaneously with any other function, as if the CDM holds a write * lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 13. */ OEMCryptoResult OEMCrypto_LoadSRM(const uint8_t* buffer, size_t buffer_length); -/* - * OEMCrypto_LoadKeys +/** + * Install a set of keys for performing decryption in the current session. + * This function will be deprecated and will only be used for legacy license + * from a license server that does not yet support the v16 interface. * - * Description: - * Install a set of keys for performing decryption in the current session. - * This function will be deprecated and will only be used for legacy license - * from a license server that does not yet support the v16 interface. + * The relevant fields have been extracted from the License Response protocol + * message, but the entire message and associated signature are provided so + * the message can be verified (using HMAC-SHA256 with the derived + * mac_key[server]). If the signature verification fails, ignore all other + * arguments and return OEMCrypto_ERROR_SIGNATURE_FAILURE. Otherwise, add the + * keys to the session context. * - * The relevant fields have been extracted from the License Response protocol - * message, but the entire message and associated signature are provided so - * the message can be verified (using HMAC-SHA256 with the derived - * mac_key[server]). If the signature verification fails, ignore all other - * arguments and return OEMCrypto_ERROR_SIGNATURE_FAILURE. Otherwise, add the - * keys to the session context. + * The keys will be decrypted using the current encrypt_key (AES-128-CBC) and + * the IV given in the KeyObject. Each key control block will be decrypted + * using the first 128 bits of the corresponding content key (AES-128-CBC) + * and the IV given in the KeyObject. * - * The keys will be decrypted using the current encrypt_key (AES-128-CBC) and - * the IV given in the KeyObject. Each key control block will be decrypted - * using the first 128 bits of the corresponding content key (AES-128-CBC) - * and the IV given in the KeyObject. + * If its length is not zero, enc_mac_keys will be used to create new + * mac_keys. After all keys have been decrypted and validated, the new + * mac_keys are decrypted with the current encrypt_key and the offered IV. + * The new mac_keys replaces the current mac_keys for future calls to + * OEMCrypto_RefreshKeys(). The first 256 bits of the mac_keys become the + * mac_key[server] and the following 256 bits of the mac_keys become the + * mac_key[client]. * - * If its length is not zero, enc_mac_keys will be used to create new - * mac_keys. After all keys have been decrypted and validated, the new - * mac_keys are decrypted with the current encrypt_key and the offered IV. - * The new mac_keys replaces the current mac_keys for future calls to - * OEMCrypto_RefreshKeys(). The first 256 bits of the mac_keys become the - * mac_key[server] and the following 256 bits of the mac_keys become the - * mac_key[client]. + * The mac_key and encrypt_key were generated and stored by the previous call + * to OEMCrypto_GenerateDerivedKeys() or + * OEMCrypto_DeriveKeysFromSessionKey(). The nonce was generated and stored + * in the session's nonce_values by the previous call to + * OEMCrypto_GenerateNonce(). * - * The mac_key and encrypt_key were generated and stored by the previous call - * to OEMCrypto_GenerateDerivedKeys() or - * OEMCrypto_DeriveKeysFromSessionKey(). The nonce was generated and stored - * in the session's nonce_values by the previous call to - * OEMCrypto_GenerateNonce(). + * This session's elapsed time clock is started at 0. The clock will be used + * in OEMCrypto_DecryptCENC(). * - * This session's elapsed time clock is started at 0. The clock will be used - * in OEMCrypto_DecryptCENC(). + * NOTE: The calling software must have previously established the mac_keys + * and encrypt_key with a call to OEMCrypto_DeriveKeysFromSessionKey(). * - * NOTE: The calling software must have previously established the mac_keys - * and encrypt_key with a call to OEMCrypto_DeriveKeysFromSessionKey(). + * Refer to the Verification of Messages from a Server section above for more + * details. * - * Refer to the Verification of Messages from a Server section above for more - * details. + * If the parameter license_type is OEMCrypto_ContentLicense, then the fields + * key_id and key_data in an OEMCrypto_KeyObject are loaded in to the + * content_key_id and content_key_data fields of the key table entry. In this + * case, entitlement key ids and entitlement key data is left blank. * - * If the parameter license_type is OEMCrypto_ContentLicense, then the fields - * key_id and key_data in an OEMCrypto_KeyObject are loaded in to the - * content_key_id and content_key_data fields of the key table entry. In this - * case, entitlement key ids and entitlement key data is left blank. + * If the parameter license_type is OEMCrypto_EntitlementLicense, then the + * fields key_id and key_data in an OEMCrypto_KeyObject are loaded in to the + * entitlement_key_id and entitlement_key_data fields of the key table entry. + * In this case, content key ids and content key data will be loaded later + * with a call to OEMCrypto_LoadEntitledContentKeys(). * - * If the parameter license_type is OEMCrypto_EntitlementLicense, then the - * fields key_id and key_data in an OEMCrypto_KeyObject are loaded in to the - * entitlement_key_id and entitlement_key_data fields of the key table entry. - * In this case, content key ids and content key data will be loaded later - * with a call to OEMCrypto_LoadEntitledContentKeys(). + * OEMCrypto may assume that the key_id_length is at most 16. However, + * OEMCrypto shall correctly handle key id lengths from 1 to 16 bytes. * - * OEMCrypto may assume that the key_id_length is at most 16. However, - * OEMCrypto shall correctly handle key id lengths from 1 to 16 bytes. + * OEMCrypto shall handle at least 20 keys per session. This allows a single + * license to contain separate keys for 3 key rotations (previous interval, + * current interval, next interval) times 4 content keys (audio, SD, HD, UHD) + * plus up to 8 keys for watermarks. * - * OEMCrypto shall handle at least 20 keys per session. This allows a single - * license to contain separate keys for 3 key rotations (previous interval, - * current interval, next interval) times 4 content keys (audio, SD, HD, UHD) - * plus up to 8 keys for watermarks. + * After a call to OEMCrypto_LoadKeys, oemcrypto should clear the encrypt_key + * for the session. * - * After a call to OEMCrypto_LoadKeys, oemcrypto should clear the encrypt_key - * for the session. + * @verification + * The following checks should be performed. If any check fails, an error is + * returned, and none of the keys are loaded. + * 1. The signature of the message shall be computed, and the API shall + * verify the computed signature matches the signature passed in. If + * not, return OEMCrypto_ERROR_SIGNATURE_FAILURE. The signature + * verification shall use a constant-time algorithm (a signature + * mismatch will always take the same time as a successful comparison). + * 2. If there already is a license loaded into this session, return + * OEMCrypto_ERROR_LICENSE_RELOAD. + * 3. The enc_mac_keys substring must either have zero length, or satisfy + * the range check. I.e. (offset < message_length) && (offset + length + * <= message_length) && (offset <= offset + length), and offset + length + * does not cause an integer overflow. If it does not have zero length, + * then enc_mac_keys_iv must not have zero length, and must also satisfy + * the range check. If not, return OEMCrypto_ERROR_INVALID_CONTEXT. If + * the length is zero, then OEMCrypto may assume that the offset is also + * zero. + * 4. The API shall verify that each substring in each KeyObject points to + * a location in the message. I.e. (offset < message_length) && + * (offset + length <= message_length) && (offset <= offset + length), + * and offset + length does not cause an integer overflow, for each of + * key_id, key_data_iv, key_data, key_control_iv, key_control. If not, + * return OEMCrypto_ERROR_INVALID_CONTEXT. + * 5. Each key's control block, after decryption, shall have a valid + * verification field. If not, return OEMCrypto_ERROR_INVALID_CONTEXT. + * 6. If any key control block has the Nonce_Enabled bit set, that key's + * Nonce field shall match a nonce in the cache. If not, return + * OEMCrypto_ERROR_INVALID_NONCE. If there is a match, remove that + * nonce from the cache. Note that all the key control blocks in a + * particular call shall have the same nonce value. + * 7. If any key control block has the Require_AntiRollback_Hardware bit + * set, and the device does not protect the usage table from rollback, + * then do not load the keys and return OEMCrypto_ERROR_UNKNOWN_FAILURE. + * 8. If the key control block has a nonzero Replay_Control, then the + * verification described below is also performed. + * 9. If the key control block has the bit SRMVersionRequired is set, then + * the verification described below is also performed. If the SRM + * requirement is not met, then the key control block's HDCP_Version + * will be changed to 0xF - local display only. + * 10. If key_array_length == 0, then return + * OEMCrypto_ERROR_INVALID_CONTEXT. + * 11. If this session is associated with a usage table entry, and that + * entry is marked as "inactive" (either kInactiveUsed or + * kInactiveUnused), then the keys are not loaded, and the error + * OEMCrypto_ERROR_LICENSE_INACTIVE is returned. + * 12. The data in enc_mac_keys_iv is not identical to the 16 bytes before + * enc_mac_keys. If it is, return OEMCrypto_ERROR_INVALID_CONTEXT. + * Usage Table and Provider Session Token (pst) + * If a key control block has a nonzero value for Replay_Control, then all + * keys in this license will have the same value for Replay_Control. In this + * case, the following additional checks are performed. + * - The substring pst must have nonzero length and must satisfy the range + * check described above. If not, return + * OEMCrypto_ERROR_INVALID_CONTEXT. + * - The session must be associated with a usage table entry, either + * created via OEMCrypto_CreateNewUsageEntry or loaded via + * OEMCrypto_LoadUsageEntry. + * - If Replay_Control is 1 = Nonce_Required, then OEMCrypto will perform a + * nonce check as described above. OEMCrypto will verify that the + * usage entry is newly created with OEMCrypto_CreateNewUsageEntry. If + * an existing entry was reloaded, an error + * OEMCrypto_ERROR_INVALID_CONTEXT is returned and no keys are loaded. + * OEMCrypto will then copy the pst and the mac keys to the usage entry, + * and set the status to Unused. This Replay_Control prevents the + * license from being loaded more than once, and will be used for online + * streaming. + * - If Replay_Control is 2 = "Require existing Session Usage table entry + * or Nonce", then OEMCrypto will behave slightly differently on the + * first call to LoadKeys for this license. + * * If the usage entry was created with OEMCrypto_CreateNewUsageEntry + * for this session, then OEMCrypto will verify the nonce for each + * key. OEMCrypto will copy the pst and mac keys to the usage + * entry. The license received time of the entry will be updated + * to the current time, and the status will be set to Unused. + * * If the usage entry was loaded with OEMCrypto_LoadUsageEntry for + * this session, then OEMCrypto will NOT verify the nonce for each + * key. Instead, it will verify that the pst passed in matches + * that in the entry. Also, the entry's mac keys will be verified + * against the current session's mac keys. This allows an offline + * license to be reloaded but maintain continuity of the playback + * times from one session to the next. + * * If the nonce is not valid and a usage entry was not loaded, the + * return error is OEMCrypto_ERROR_INVALID_NONCE. + * * If the loaded usage entry has a pst that does not match, + * OEMCrypto returns the error OEMCrypto_ERROR_WRONG_PST. + * * If the loaded usage entry has mac keys that do not match the + * license, OEMCrypto returns the error OEMCrypto_ERROR_WRONG_KEYS. + * Note: If LoadKeys updates the mac keys, then the new updated mac keys will + * be used with the Usage Entry -- i.e. the new keys are stored in the + * usage table when creating a new entry, or the new keys are verified + * against those in the usage table if there is an existing entry. If + * LoadKeys does not update the mac keys, the existing session mac keys are + * used. * - * Verification: - * The following checks should be performed. If any check fails, an error is - * returned, and none of the keys are loaded. - * 1. The signature of the message shall be computed, and the API shall - * verify the computed signature matches the signature passed in. If - * not, return OEMCrypto_ERROR_SIGNATURE_FAILURE. The signature - * verification shall use a constant-time algorithm (a signature - * mismatch will always take the same time as a successful comparison). - * 2. If there already is a license loaded into this session, return - * OEMCrypto_ERROR_LICENSE_RELOAD. - * 3. The enc_mac_keys substring must either have zero length, or satisfy - * the range check. I.e. (offset < message_length) && (offset + length - * < message_length) && (offset < offset + length),and offset + length - * does not cause an integer overflow. If it does not have zero length, - * then enc_mac_keys_iv must not have zero length, and must also satisfy - * the range check. If not, return OEMCrypto_ERROR_INVALID_CONTEXT. If - * the length is zero, then OEMCrypto may assume that the offset is also - * zero. - * 4. The API shall verify that each substring in each KeyObject points to - * a location in the message. I.e. (offset < message_length) && - * (offset + length < message_length) && (offset < offset + length) and - * offset + length does not cause an integer overflow, for each of - * key_id, key_data_iv, key_data, key_control_iv, key_control. If not, - * return OEMCrypto_ERROR_INVALID_CONTEXT. - * 5. Each key's control block, after decryption, shall have a valid - * verification field. If not, return OEMCrypto_ERROR_INVALID_CONTEXT. - * 6. If any key control block has the Nonce_Enabled bit set, that key's - * Nonce field shall match a nonce in the cache. If not, return - * OEMCrypto_ERROR_INVALID_NONCE. If there is a match, remove that - * nonce from the cache. Note that all the key control blocks in a - * particular call shall have the same nonce value. - * 7. If any key control block has the Require_AntiRollback_Hardware bit - * set, and the device does not protect the usage table from rollback, - * then do not load the keys and return OEMCrypto_ERROR_UNKNOWN_FAILURE. - * 8. If the key control block has a nonzero Replay_Control, then the - * verification described below is also performed. - * 9. If the key control block has the bit SRMVersionRequired is set, then - * the verification described below is also performed. If the SRM - * requirement is not met, then the key control block's HDCP_Version - * will be changed to 0xF - local display only. - * 10. If key_array_length == 0, then return - * OEMCrypto_ERROR_INVALID_CONTEXT. - * 11. If this session is associated with a usage table entry, and that - * entry is marked as "inactive" (either kInactiveUsed or - * kInactiveUnused), then the keys are not loaded, and the error - * OEMCrypto_ERROR_LICENSE_INACTIVE is returned. - * 12. The data in enc_mac_keys_iv is not identical to the 16 bytes before - * enc_mac_keys. If it is, return OEMCrypto_ERROR_INVALID_CONTEXT. - * Usage Table and Provider Session Token (pst) - * If a key control block has a nonzero value for Replay_Control, then all - * keys in this license will have the same value for Replay_Control. In this - * case, the following additional checks are performed. - * - The substring pst must have nonzero length and must satisfy the range - * check described above. If not, return - * OEMCrypto_ERROR_INVALID_CONTEXT. - * - The session must be associated with a usage table entry, either - * created via OEMCrypto_CreateNewUsageEntry or loaded via - * OEMCrypto_LoadUsageEntry. - * - If Replay_Control is 1 = Nonce_Required, then OEMCrypto will perform a - * nonce check as described above. OEMCrypto will verify that the - * usage entry is newly created with OEMCrypto_CreateNewUsageEntry. If - * an existing entry was reloaded, an error - * OEMCrypto_ERROR_INVALID_CONTEXT is returned and no keys are loaded. - * OEMCrypto will then copy the pst and the mac keys to the usage entry, - * and set the status to Unused. This Replay_Control prevents the - * license from being loaded more than once, and will be used for online - * streaming. - * - If Replay_Control is 2 = "Require existing Session Usage table entry - * or Nonce", then OEMCrypto will behave slightly differently on the - * first call to LoadKeys for this license. - * * If the usage entry was created with OEMCrypto_CreateNewUsageEntry - * for this session, then OEMCrypto will verify the nonce for each - * key. OEMCrypto will copy the pst and mac keys to the usage - * entry. The license received time of the entry will be updated - * to the current time, and the status will be set to Unused. - * * If the usage entry was loaded with OEMCrypto_LoadUsageEntry for - * this session, then OEMCrypto will NOT verify the nonce for each - * key. Instead, it will verify that the pst passed in matches - * that in the entry. Also, the entry's mac keys will be verified - * against the current session's mac keys. This allows an offline - * license to be reloaded but maintain continuity of the playback - * times from one session to the next. - * * If the nonce is not valid and a usage entry was not loaded, the - * return error is OEMCrypto_ERROR_INVALID_NONCE. - * * If the loaded usage entry has a pst that does not match, - * OEMCrypto returns the error OEMCrypto_ERROR_WRONG_PST. - * * If the loaded usage entry has mac keys that do not match the - * license, OEMCrypto returns the error OEMCrypto_ERROR_WRONG_KEYS. - * Note: If LoadKeys updates the mac keys, then the new updated mac keys will - * be used with the Usage Entry -- i.e. the new keys are stored in the - * usage table when creating a new entry, or the new keys are verified - * against those in the usage table if there is an existing entry. If - * LoadKeys does not update the mac keys, the existing session mac keys are - * used. + * Sessions that are associated with an entry will need to be able to update + * and verify the status of the entry, and the time stamps in the entry. * - * Sessions that are associated with an entry will need to be able to update - * and verify the status of the entry, and the time stamps in the entry. + * Devices that do not support the Usage Table will return + * OEMCrypto_ERROR_INVALID_CONTEXT if the Replay_Control is nonzero. * - * Devices that do not support the Usage Table will return - * OEMCrypto_ERROR_INVALID_CONTEXT if the Replay_Control is nonzero. + * Timer Update + * After verification, the session's clock and timer values are updated by + * calling the function ODK_InitializeV15Values as described in the document + * "Widevine Core Message Serialization". * - * Timer Update - * After verification, the session's clock and timer values are updated by - * calling the function ODK_InitializeV15Values as described in the document - * "Widevine Core Message Serialization". + * SRM Restriction Data * - * SRM Restriction Data + * If any key control block has the flag SRMVersionRequired set, then the + * following verification is also performed. * - * If any key control block has the flag SRMVersionRequired set, then the - * following verification is also performed. + * 1. The substring srm_restriction_data must have nonzero length and must + * satisfy the range check described above. If not, return + * OEMCrypto_ERROR_INVALID_CONTEXT. + * 2. The first 8 bytes of srm_restriction_data must match the string + * "HDCPDATA". If not, return OEMCrypto_ERROR_INVALID_CONTEXT. + * 3. The next 4 bytes of srm_restriction_data will be converted from + * network byte order. If the current SRM installed on the device has a + * version number less than this, then the SRM requirement is not met. + * If the device does not support SRM files, or OEMCrypto cannot + * determine the current SRM version number, then the SRM requirement is + * not met. + * Note: if the current SRM version requirement is not met, LoadKeys will + * still succeed and the keys will be loaded. However, those keys with the + * SRMVersionRequired bit set will have their HDCP_Version increased to 0xF - + * local display only. Any future call to SelectKey for these keys while + * there is an external display will return OEMCrypto_ERROR_INSUFFICIENT_HDCP + * at that time. * - * 1. The substring srm_restriction_data must have nonzero length and must - * satisfy the range check described above. If not, return - * OEMCrypto_ERROR_INVALID_CONTEXT. - * 2. The first 8 bytes of srm_restriction_data must match the string - * "HDCPDATA". If not, return OEMCrypto_ERROR_INVALID_CONTEXT. - * 3. The next 4 bytes of srm_restriction_data will be converted from - * network byte order. If the current SRM installed on the device has a - * version number less than this, then the SRM requirement is not met. - * If the device does not support SRM files, or OEMCrypto cannot - * determine the current SRM version number, then the SRM requirement is - * not met. - * Note: if the current SRM version requirement is not met, LoadKeys will - * still succeed and the keys will be loaded. However, those keys with the - * SRMVersionRequired bit set will have their HDCP_Version increased to 0xF - - * local display only. Any future call to SelectKey for these keys while - * there is an external display will return OEMCrypto_ERROR_INSUFFICIENT_HDCP - * at that time. + * @param[in] session: crypto session identifier. + * @param[in] message: pointer to memory containing message to be verified. + * @param[in] message_length: length of the message, in bytes. + * @param[in] signature: pointer to memory containing the signature. + * @param[in] signature_length: length of the signature, in bytes. + * @param[in] enc_mac_keys_iv: IV for decrypting new mac_key. Size is 128 bits. + * @param[in] enc_mac_keys: encrypted mac_keys for generating new mac_keys. + * Size is 512 bits. + * @param[in] key_array_length: number of keys present. + * @param[in] key_array: set of keys to be installed. + * @param[in] pst: the Provider Session Token. + * @param[in] srm_restriction_data: optional data specifying the minimum SRM + * version. + * @param[in] license_type: specifies if the license contains content keys or + * entitlement keys. * - * Parameters: - * [in] session: crypto session identifier. - * [in] message: pointer to memory containing message to be verified. - * [in] message_length: length of the message, in bytes. - * [in] signature: pointer to memory containing the signature. - * [in] signature_length: length of the signature, in bytes. - * [in] enc_mac_keys_iv: IV for decrypting new mac_key. Size is 128 bits. - * [in] enc_mac_keys: encrypted mac_keys for generating new mac_keys. Size is - * 512 bits. - * [in] key_array_length: number of keys present. - * [in] key_array: set of keys to be installed. - * [in] pst: the Provider Session Token. - * [in] srm_restriction_data: optional data specifying the minimum SRM - * version. - * [in] license_type: specifies if the license contains content keys or - * entitlement keys. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_NO_DEVICE_KEY + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_INVALID_CONTEXT + * @retval OEMCrypto_ERROR_SIGNATURE_FAILURE + * @retval OEMCrypto_ERROR_INVALID_NONCE + * @retval OEMCrypto_ERROR_TOO_MANY_KEYS + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_ERROR_LICENSE_RELOAD * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_NO_DEVICE_KEY - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_INVALID_CONTEXT - * OEMCrypto_ERROR_SIGNATURE_FAILURE - * OEMCrypto_ERROR_INVALID_NONCE - * OEMCrypto_ERROR_TOO_MANY_KEYS - * OEMCrypto_ERROR_NOT_IMPLEMENTED - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * OEMCrypto_ERROR_LICENSE_RELOAD - * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support message sizes as described in the section * OEMCrypto_ResourceRatingTier. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_LoadKeys( @@ -1387,251 +1454,248 @@ OEMCryptoResult OEMCrypto_LoadKeys( OEMCrypto_Substring pst, OEMCrypto_Substring srm_restriction_data, OEMCrypto_LicenseType license_type); -/* - * OEMCrypto_LoadLicense +/** + * Install a set of keys for performing decryption in the current session. * - * Description: - * Install a set of keys for performing decryption in the current session. + * First, OEMCrypto shall verify the signature of the message using + * HMAC-SHA256 with the derived mac_key[server]. The signature verification + * shall use a constant-time algorithm (a signature mismatch will always take + * the same time as a successful comparison). The signature is over the + * entire message buffer starting at message with length message_length. If + * the signature verification fails, ignore all other arguments and return + * OEMCrypto_ERROR_SIGNATURE_FAILURE. Otherwise, add the keys to the session + * context. * - * First, OEMCrypto shall verify the signature of the message using - * HMAC-SHA256 with the derived mac_key[server]. The signature verification - * shall use a constant-time algorithm (a signature mismatch will always take - * the same time as a successful comparison). The signature is over the - * entire message buffer starting at message with length message_length. If - * the signature verification fails, ignore all other arguments and return - * OEMCrypto_ERROR_SIGNATURE_FAILURE. Otherwise, add the keys to the session - * context. + * NOTE: The calling software must have previously established the mac_keys + * and encrypt_key with a call to OEMCrypto_DeriveKeysFromSessionKey(). * - * NOTE: The calling software must have previously established the mac_keys - * and encrypt_key with a call to OEMCrypto_DeriveKeysFromSessionKey(). + * Refer to the Verification of Messages from a Server section above for more + * details. * - * Refer to the Verification of Messages from a Server section above for more - * details. + * The function ODK_ParseLicense is called to parse the message. If it + * returns an error, OEMCrypto shall return that error to the CDM layer. The + * function ODK_ParseLicense is described in the document "Widevine Core + * Message Serialization". * - * The function ODK_ParseLicense is called to parse the message. If it - * returns an error, OEMCrypto shall return that error to the CDM layer. The - * function ODK_ParseLicense is described in the document "Widevine Core - * Message Serialization". + * Below, all fields are found in the struct ODK_ParsedLicense parsed_license + * returned by ODK_ParseLicense. * - * Below, all fields are found in the struct ODK_ParsedLicense parsed_license - * returned by ODK_ParseLicense. + * The keys will be decrypted using the current encrypt_key (AES-128-CBC) and + * the IV given in the KeyObject. Each key control block will be decrypted + * using the first 128 bits of the corresponding content key (AES-128-CBC) + * and the IV given in the KeyObject. * - * The keys will be decrypted using the current encrypt_key (AES-128-CBC) and - * the IV given in the KeyObject. Each key control block will be decrypted - * using the first 128 bits of the corresponding content key (AES-128-CBC) - * and the IV given in the KeyObject. + * If its length is not zero, enc_mac_keys will be used to create new + * mac_keys. After all keys have been decrypted and validated, the new + * mac_keys are decrypted with the current encrypt_key and the offered IV. + * The new mac_keys replaces the current mac_keys for future signing renewal + * requests and loading renewal responses. The first 256 bits of the mac_keys + * become the mac_key[server] and the following 256 bits of the mac_keys + * become the mac_key[client]. If enc_mac_keys is null, then there will not + * be a call to OEMCrypto_LoadRenewal for this session and the current + * mac_keys may be deleted. * - * If its length is not zero, enc_mac_keys will be used to create new - * mac_keys. After all keys have been decrypted and validated, the new - * mac_keys are decrypted with the current encrypt_key and the offered IV. - * The new mac_keys replaces the current mac_keys for future signing renewal - * requests and loading renewal responses. The first 256 bits of the mac_keys - * become the mac_key[server] and the following 256 bits of the mac_keys - * become the mac_key[client]. If enc_mac_keys is null, then there will not - * be a call to OEMCrypto_LoadRenewal for this session and the current - * mac_keys may be deleted. + * If the field license_type is OEMCrypto_ContentLicense, then the fields + * key_id and key_data in an OEMCrypto_KeyObject are loaded in to the + * content_key_id and content_key_data fields of the key table entry. In this + * case, entitlement key ids and entitlement key data is left blank. * - * If the field license_type is OEMCrypto_ContentLicense, then the fields - * key_id and key_data in an OEMCrypto_KeyObject are loaded in to the - * content_key_id and content_key_data fields of the key table entry. In this - * case, entitlement key ids and entitlement key data is left blank. + * If the field license_type is OEMCrypto_EntitlementLicense, then the + * fields key_id and key_data in an OEMCrypto_KeyObject are loaded in to the + * entitlement_key_id and entitlement_key_data fields of the key table entry. + * In this case, content key ids and content key data will be loaded later + * with a call to OEMCrypto_LoadEntitledContentKeys(). * - * If the field license_type is OEMCrypto_EntitlementLicense, then the - * fields key_id and key_data in an OEMCrypto_KeyObject are loaded in to the - * entitlement_key_id and entitlement_key_data fields of the key table entry. - * In this case, content key ids and content key data will be loaded later - * with a call to OEMCrypto_LoadEntitledContentKeys(). + * OEMCrypto may assume that the key_id_length is at most 16. However, + * OEMCrypto shall correctly handle key id lengths from 1 to 16 bytes. * - * OEMCrypto may assume that the key_id_length is at most 16. However, - * OEMCrypto shall correctly handle key id lengths from 1 to 16 bytes. + * OEMCrypto shall handle multiple keys, as described in the section on + * Resource Rating Tiers in this document. * - * OEMCrypto shall handle multiple keys, as described in the section on - * Resource Rating Tiers in this document. + * After a call to OEMCrypto_LoadLicense, oemcrypto should clear the + * encrypt_key for the session. * - * After a call to OEMCrypto_LoadLicense, oemcrypto should clear the - * encrypt_key for the session. + * @verification + * The following checks should be performed. If any check fails, an error is + * returned, and none of the keys are loaded. + * 13. The signature of the message shall be computed, and the API shall + * verify the computed signature matches the signature passed in. If + * not, return OEMCrypto_ERROR_SIGNATURE_FAILURE. The signature + * verification shall use a constant-time algorithm (a signature + * mismatch will always take the same time as a successful comparison). + * 14. If there already is a license loaded into this session, return + * OEMCrypto_ERROR_LICENSE_RELOAD. + * 15. The enc_mac_keys substring must either have zero length, or satisfy + * the range check. I.e. (offset < message_length) && (offset + length + * <= message_length) && (offset <= offset + length), and offset + length + * does not cause an integer overflow. If it does not have zero length, + * then enc_mac_keys_iv must not have zero length, and must also satisfy + * the range check. If not, return OEMCrypto_ERROR_INVALID_CONTEXT. If + * the length is zero, then OEMCrypto may assume that the offset is also + * zero. + * 16. The API shall verify that each substring in each KeyObject points to + * a location in the message. I.e. (offset < message_length) && + * (offset + length <= message_length) && (offset <= offset + length), + * and offset + length does not cause an integer overflow, for each of + * key_id, key_data_iv, key_data, key_control_iv, key_control. If not, + * return OEMCrypto_ERROR_INVALID_CONTEXT. + * 17. Each key's control block, after decryption, shall have a valid + * verification field. If not, return OEMCrypto_ERROR_INVALID_CONTEXT. + * 18. If any key control block has the Nonce_Enabled bit set, that key's + * Nonce field shall match a nonce in the cache. If not, return + * OEMCrypto_ERROR_INVALID_NONCE. If there is a match, remove that + * nonce from the cache. Note that all the key control blocks in a + * particular call shall have the same nonce value. + * 19. If any key control block has the Require_AntiRollback_Hardware bit + * set, and the device does not protect the usage table from rollback, + * then do not load the keys and return OEMCrypto_ERROR_UNKNOWN_FAILURE. + * 20. If the key control block has a nonzero Replay_Control, then the + * verification described below is also performed. + * 21. If the key control block has the bit SRMVersionRequired is set, then + * the verification described below is also performed. If the SRM + * requirement is not met, then the key control block's HDCP_Version + * will be changed to 0xF - local display only. + * 22. If key_array_length == 0, then return + * OEMCrypto_ERROR_INVALID_CONTEXT. + * 23. If this session is associated with a usage table entry, and that + * entry is marked as "inactive" (either kInactiveUsed or + * kInactiveUnused), then the keys are not loaded, and the error + * OEMCrypto_ERROR_LICENSE_INACTIVE is returned. + * 24. The data in enc_mac_keys_iv is not identical to the 16 bytes before + * enc_mac_keys. If it is, return OEMCrypto_ERROR_INVALID_CONTEXT. * - * Verification: - * The following checks should be performed. If any check fails, an error is - * returned, and none of the keys are loaded. - * 13. The signature of the message shall be computed, and the API shall - * verify the computed signature matches the signature passed in. If - * not, return OEMCrypto_ERROR_SIGNATURE_FAILURE. The signature - * verification shall use a constant-time algorithm (a signature - * mismatch will always take the same time as a successful comparison). - * 14. If there already is a license loaded into this session, return - * OEMCrypto_ERROR_LICENSE_RELOAD. - * 15. The enc_mac_keys substring must either have zero length, or satisfy - * the range check. I.e. (offset < message_length) && (offset + length - * < message_length) && (offset < offset + length),and offset + length - * does not cause an integer overflow. If it does not have zero length, - * then enc_mac_keys_iv must not have zero length, and must also satisfy - * the range check. If not, return OEMCrypto_ERROR_INVALID_CONTEXT. If - * the length is zero, then OEMCrypto may assume that the offset is also - * zero. - * 16. The API shall verify that each substring in each KeyObject points to - * a location in the message. I.e. (offset < message_length) && - * (offset + length < message_length) && (offset < offset + length) and - * offset + length does not cause an integer overflow, for each of - * key_id, key_data_iv, key_data, key_control_iv, key_control. If not, - * return OEMCrypto_ERROR_INVALID_CONTEXT. - * 17. Each key's control block, after decryption, shall have a valid - * verification field. If not, return OEMCrypto_ERROR_INVALID_CONTEXT. - * 18. If any key control block has the Nonce_Enabled bit set, that key's - * Nonce field shall match a nonce in the cache. If not, return - * OEMCrypto_ERROR_INVALID_NONCE. If there is a match, remove that - * nonce from the cache. Note that all the key control blocks in a - * particular call shall have the same nonce value. - * 19. If any key control block has the Require_AntiRollback_Hardware bit - * set, and the device does not protect the usage table from rollback, - * then do not load the keys and return OEMCrypto_ERROR_UNKNOWN_FAILURE. - * 20. If the key control block has a nonzero Replay_Control, then the - * verification described below is also performed. - * 21. If the key control block has the bit SRMVersionRequired is set, then - * the verification described below is also performed. If the SRM - * requirement is not met, then the key control block's HDCP_Version - * will be changed to 0xF - local display only. - * 22. If key_array_length == 0, then return - * OEMCrypto_ERROR_INVALID_CONTEXT. - * 23. If this session is associated with a usage table entry, and that - * entry is marked as "inactive" (either kInactiveUsed or - * kInactiveUnused), then the keys are not loaded, and the error - * OEMCrypto_ERROR_LICENSE_INACTIVE is returned. - * 24. The data in enc_mac_keys_iv is not identical to the 16 bytes before - * enc_mac_keys. If it is, return OEMCrypto_ERROR_INVALID_CONTEXT. + * Usage Table and Provider Session Token (pst) + * The function ODK_ParseLicense takes several parameters that may need more + * explanation. + * The parameter usage_entry_present shall be set to true if a usage entry + * was created or loaded for this session. This parameter is used by + * ODK_ParseLicense for usage entry verification. + * The parameter initial_license_load shall be false if the usage entry was + * loaded. If there is no usage entry or if the usage entry was created with + * OEMCrypto_CreateNewUsageEntry, then initial_license_load shall be true. + * If a usage entry is present, then it shall be verified after the call to + * ODK_ParseLicense. + * If initial_license_load is true: + * 1. OEMCrypto shall copy the PST from the parsed license to the usage + * entry. + * 2. OEMCrypto shall verify that the server and client mac keys were + * updated by the license. The server and client mac keys shall be + * copied to the usage entry. + * If initial_license_load is false: + * 1. OEMCrypto shall verify the PST from the parsed license matches that + * in the usage entry. If not, then an error OEMCrypto_ERROR_WRONG_PST + * is returned. + * 2. OEMCrypto shall verify that the server and client mac keys were + * updated by the license. OEMCrypto shall verify that the server and + * client mac keys match those in the usage entry. If not the error + * OEMCrypto_ERROR_WRONG_KEYS is returned. + * If a key control block has a nonzero value for Replay_Control, then all + * keys in this license will have the same value for Replay_Control. In this + * case, the following additional checks are performed. + * - The substring pst must have nonzero length and must satisfy the range + * check described above. If not, return + * OEMCrypto_ERROR_INVALID_CONTEXT. + * - The session must be associated with a usage table entry, either + * created via OEMCrypto_CreateNewUsageEntry or loaded via + * OEMCrypto_LoadUsageEntry. + * - If Replay_Control is 1 = Nonce_Required, then OEMCrypto will perform a + * nonce check as described above. OEMCrypto will verify that the + * usage entry is newly created with OEMCrypto_CreateNewUsageEntry. If + * an existing entry was reloaded, an error + * OEMCrypto_ERROR_INVALID_CONTEXT is returned and no keys are loaded. + * OEMCrypto will then copy the pst and the mac keys to the usage entry, + * and set the status to Unused. The license received time of the entry + * will be updated to the current time, and the status will be set to + * Unused. This Replay_Control prevents the license from being loaded + * more than once, and will be used for online streaming. + * - If Replay_Control is 2 = "Require existing Session Usage table entry + * or Nonce", then OEMCrypto will behave slightly differently on the + * first call to LoadKeys for this license. + * * If the usage entry was created with OEMCrypto_CreateNewUsageEntry + * for this session, then OEMCrypto will verify the nonce for each + * key. OEMCrypto will copy the pst and mac keys to the usage + * entry. The license received time of the entry will be updated + * to the current time, and the status will be set to Unused. + * * If the usage entry was loaded with OEMCrypto_LoadUsageEntry for + * this session, then OEMCrypto will NOT verify the nonce for each + * key. Instead, it will verify that the pst passed in matches + * that in the entry. Also, the entry's mac keys will be verified + * against the current session's mac keys. This allows an offline + * license to be reloaded but maintain continuity of the playback + * times from one session to the next. + * * If the nonce is not valid and a usage entry was not loaded, the + * return error is OEMCrypto_ERROR_INVALID_NONCE. + * * If the loaded usage entry has a pst that does not match, + * OEMCrypto returns the error OEMCrypto_ERROR_WRONG_PST. + * * If the loaded usage entry has mac keys that do not match the + * license, OEMCrypto returns the error OEMCrypto_ERROR_WRONG_KEYS. + * Note: If LoadKeys updates the mac keys, then the new updated mac keys will + * be used with the Usage Entry -- i.e. the new keys are stored in the + * usage table when creating a new entry, or the new keys are verified + * against those in the usage table if there is an existing entry. If + * LoadKeys does not update the mac keys, the existing session mac keys are + * used. + * Sessions that are associated with an entry will need to be able to update + * and verify the status of the entry, and the time stamps in the entry. + * Devices that do not support the Usage Table will return + * OEMCrypto_ERROR_INVALID_CONTEXT if the Replay_Control is nonzero. + * SRM Restriction Data + * If any key control block has the flag SRMVersionRequired set, then the + * following verification is also performed. + * 4. The substring srm_restriction_data must have nonzero length and must + * satisfy the range check described above. If not, return + * OEMCrypto_ERROR_INVALID_CONTEXT. + * 5. The first 8 bytes of srm_restriction_data must match the string + * "HDCPDATA". If not, return OEMCrypto_ERROR_INVALID_CONTEXT. + * 6. The next 4 bytes of srm_restriction_data will be converted from + * network byte order. If the current SRM installed on the device has a + * version number less than this, then the SRM requirement is not met. + * If the device does not support SRM files, or OEMCrypto cannot + * determine the current SRM version number, then the SRM requirement is + * not met. + * Note: if the current SRM version requirement is not met, LoadKeys will + * still succeed and the keys will be loaded. However, those keys with the + * SRMVersionRequired bit set will have their HDCP_Version increased to 0xF - + * local display only. Any future call to SelectKey for these keys while + * there is an external display will return OEMCrypto_ERROR_INSUFFICIENT_HDCP + * at that time. * - * Usage Table and Provider Session Token (pst) - * The function ODK_ParseLicense takes several parameters that may need more - * explanation. - * The parameter usage_entry_present shall be set to true if a usage entry - * was created or loaded for this session. This parameter is used by - * ODK_ParseLicense for usage entry verification. - * The parameter initial_license_load shall be false if the usage entry was - * loaded. If there is no usage entry or if the usage entry was created with - * OEMCrypto_CreateNewUsageEntry, then initial_license_load shall be true. - * If a usage entry is present, then it shall be verified after the call to - * ODK_ParseLicense. - * If initial_license_load is true: - * 1. OEMCrypto shall copy the PST from the parsed license to the usage - * entry. - * 2. OEMCrypto shall verify that the server and client mac keys were - * updated by the license. The server and client mac keys shall be - * copied to the usage entry. - * If initial_license_load is false: - * 1. OEMCrypto shall verify the PST from the parsed license matches that - * in the usage entry. If not, then an error OEMCrypto_ERROR_WRONG_PST - * is returned. - * 2. OEMCrypto shall verify that the server and client mac keys were - * updated by the license. OEMCrypto shall verify that the server and - * client mac keys match those in the usage entry. If not the error - * OEMCrypto_ERROR_WRONG_KEYS is returned. - * If a key control block has a nonzero value for Replay_Control, then all - * keys in this license will have the same value for Replay_Control. In this - * case, the following additional checks are performed. - * - The substring pst must have nonzero length and must satisfy the range - * check described above. If not, return - * OEMCrypto_ERROR_INVALID_CONTEXT. - * - The session must be associated with a usage table entry, either - * created via OEMCrypto_CreateNewUsageEntry or loaded via - * OEMCrypto_LoadUsageEntry. - * - If Replay_Control is 1 = Nonce_Required, then OEMCrypto will perform a - * nonce check as described above. OEMCrypto will verify that the - * usage entry is newly created with OEMCrypto_CreateNewUsageEntry. If - * an existing entry was reloaded, an error - * OEMCrypto_ERROR_INVALID_CONTEXT is returned and no keys are loaded. - * OEMCrypto will then copy the pst and the mac keys to the usage entry, - * and set the status to Unused. This Replay_Control prevents the - * license from being loaded more than once, and will be used for online - * streaming. - * - If Replay_Control is 2 = "Require existing Session Usage table entry - * or Nonce", then OEMCrypto will behave slightly differently on the - * first call to LoadKeys for this license. - * * If the usage entry was created with OEMCrypto_CreateNewUsageEntry - * for this session, then OEMCrypto will verify the nonce for each - * key. OEMCrypto will copy the pst and mac keys to the usage - * entry. The license received time of the entry will be updated - * to the current time, and the status will be set to Unused. - * * If the usage entry was loaded with OEMCrypto_LoadUsageEntry for - * this session, then OEMCrypto will NOT verify the nonce for each - * key. Instead, it will verify that the pst passed in matches - * that in the entry. Also, the entry's mac keys will be verified - * against the current session's mac keys. This allows an offline - * license to be reloaded but maintain continuity of the playback - * times from one session to the next. - * * If the nonce is not valid and a usage entry was not loaded, the - * return error is OEMCrypto_ERROR_INVALID_NONCE. - * * If the loaded usage entry has a pst that does not match, - * OEMCrypto returns the error OEMCrypto_ERROR_WRONG_PST. - * * If the loaded usage entry has mac keys that do not match the - * license, OEMCrypto returns the error OEMCrypto_ERROR_WRONG_KEYS. - * Note: If LoadKeys updates the mac keys, then the new updated mac keys will - * be used with the Usage Entry -- i.e. the new keys are stored in the - * usage table when creating a new entry, or the new keys are verified - * against those in the usage table if there is an existing entry. If - * LoadKeys does not update the mac keys, the existing session mac keys are - * used. - * Sessions that are associated with an entry will need to be able to update - * and verify the status of the entry, and the time stamps in the entry. - * Devices that do not support the Usage Table will return - * OEMCrypto_ERROR_INVALID_CONTEXT if the Replay_Control is nonzero. - * SRM Restriction Data - * If any key control block has the flag SRMVersionRequired set, then the - * following verification is also performed. - * 4. The substring srm_restriction_data must have nonzero length and must - * satisfy the range check described above. If not, return - * OEMCrypto_ERROR_INVALID_CONTEXT. - * 5. The first 8 bytes of srm_restriction_data must match the string - * "HDCPDATA". If not, return OEMCrypto_ERROR_INVALID_CONTEXT. - * 6. The next 4 bytes of srm_restriction_data will be converted from - * network byte order. If the current SRM installed on the device has a - * version number less than this, then the SRM requirement is not met. - * If the device does not support SRM files, or OEMCrypto cannot - * determine the current SRM version number, then the SRM requirement is - * not met. - * Note: if the current SRM version requirement is not met, LoadKeys will - * still succeed and the keys will be loaded. However, those keys with the - * SRMVersionRequired bit set will have their HDCP_Version increased to 0xF - - * local display only. Any future call to SelectKey for these keys while - * there is an external display will return OEMCrypto_ERROR_INSUFFICIENT_HDCP - * at that time. + * @param[in] session: crypto session identifier. + * @param[in] message: pointer to memory containing data. + * @param[in] message_length: length of the message, in bytes. + * @param[in] core_message_length: length of the core submessage, in bytes. + * @param[in] signature: pointer to memory containing the signature. + * @param[in] signature_length: length of the signature, in bytes. * - * Parameters: - * [in] session: crypto session identifier. - * [in] message: pointer to memory containing data. - * [in] message_length: length of the message, in bytes. - * [in] core_message_length: length of the core submessage, in bytes. - * [in] signature: pointer to memory containing the signature. - * [in] signature_length: length of the signature, in bytes. + * @retval OEMCrypto_SUCCESS success OEMCrypto_ERROR_NO_DEVICE_KEY + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_NO_DEVICE_KEY + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_INVALID_CONTEXT + * @retval OEMCrypto_ERROR_SIGNATURE_FAILURE + * @retval OEMCrypto_ERROR_INVALID_NONCE + * @retval OEMCrypto_ERROR_TOO_MANY_KEYS + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_ERROR_LICENSE_RELOAD * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_NO_DEVICE_KEY - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_INVALID_CONTEXT - * OEMCrypto_ERROR_SIGNATURE_FAILURE - * OEMCrypto_ERROR_INVALID_NONCE - * OEMCrypto_ERROR_TOO_MANY_KEYS - * OEMCrypto_ERROR_NOT_IMPLEMENTED - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * OEMCrypto_ERROR_LICENSE_RELOAD - * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support message sizes as described in the section * OEMCrypto_ResourceRatingTier. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_LoadLicense(OEMCrypto_SESSION session, @@ -1641,65 +1705,60 @@ OEMCryptoResult OEMCrypto_LoadLicense(OEMCrypto_SESSION session, const uint8_t* signature, size_t signature_length); -/* - * OEMCrypto_LoadEntitledContentKeys +/** + * Load content keys into a session which already has entitlement keys + * loaded. This function will only be called for a session after a call to + * OEMCrypto_LoadKeys with the parameter type license_type equal to + * OEMCrypto_EntitlementLicense. This function may be called multiple times + * for the same session. * - * Description: - * Load content keys into a session which already has entitlement keys - * loaded. This function will only be called for a session after a call to - * OEMCrypto_LoadKeys with the parameter type license_type equal to - * OEMCrypto_EntitlementLicense. This function may be called multiple times - * for the same session. + * If the session does not have license_type equal to + * OEMCrypto_EntitlementLicense, return OEMCrypto_ERROR_INVALID_CONTEXT and + * perform no work. * - * If the session does not have license_type equal to - * OEMCrypto_EntitlementLicense, return OEMCrypto_ERROR_INVALID_CONTEXT and - * perform no work. + * For each key object in key_array, OEMCrypto shall look up the entry in the + * key table with the corresponding entitlement_key_id. * - * For each key object in key_array, OEMCrypto shall look up the entry in the - * key table with the corresponding entitlement_key_id. + * 1. If no entry is found, return OEMCrypto_KEY_NOT_ENTITLED. + * 2. If the entry already has a content_key_id and content_key_data, that + * id and data are erased. + * 3. The content_key_id from the key_array is copied to the entry's + * content_key_id. + * 4. The content_key_data decrypted using the entitlement_key_data as a + * key for AES-256-CBC with an IV of content_key_data_iv. Wrapped + * content is padded using PKCS#7 padding. Notice that the entitlement + * key will be an AES 256 bit key. The clear content key data will be + * stored in the entry's content_key_data. + * Entries in the key table that do not correspond to anything in the + * key_array are not modified or removed. * - * 1. If no entry is found, return OEMCrypto_KEY_NOT_ENTITLED. - * 2. If the entry already has a content_key_id and content_key_data, that - * id and data are erased. - * 3. The content_key_id from the key_array is copied to the entry's - * content_key_id. - * 4. The content_key_data decrypted using the entitlement_key_data as a - * key for AES-256-CBC with an IV of content_key_data_iv. Wrapped - * content is padded using PKCS#7 padding. Notice that the entitlement - * key will be an AES 256 bit key. The clear content key data will be - * stored in the entry's content_key_data. - * Entries in the key table that do not correspond to anything in the - * key_array are not modified or removed. + * For devices that use a hardware key ladder, it may be more convenient to + * store the encrypted content key data in the key table, and decrypt it when + * the function SelectKey is called. * - * For devices that use a hardware key ladder, it may be more convenient to - * store the encrypted content key data in the key table, and decrypt it when - * the function SelectKey is called. + * @param[in] session: handle for the session to be used. + * @param[in] message: pointer to memory containing message to be verified. + * @param[in] message_length: length of the message, in bytes. + * @param[in] key_array_length: number of keys present. + * @param[in] key_array: set of key updates. * - * Parameters: - * [in] session: handle for the session to be used. - * [in] message: pointer to memory containing message to be verified. - * [in] message_length: length of the message, in bytes. - * [in] key_array_length: number of keys present. - * [in] key_array: set of key updates. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_INVALID_CONTEXT + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_KEY_NOT_ENTITLED + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_INVALID_CONTEXT - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_KEY_NOT_ENTITLED - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method is new in API version 14. */ OEMCryptoResult OEMCrypto_LoadEntitledContentKeys( @@ -1707,100 +1766,95 @@ OEMCryptoResult OEMCrypto_LoadEntitledContentKeys( size_t key_array_length, const OEMCrypto_EntitledContentKeyObject* key_array); -/* - * OEMCrypto_RefreshKeys +/** + * Updates the license clock values to allow playback to continue. This + * function is being deprecated and is only used for version v15 licenses -- + * i.e. offline license saved before an update or licenses from a server that + * has not update to the v16 license server SDK. * - * Description: - * Updates the license clock values to allow playback to continue. This - * function is being deprecated and is only used for version v15 licenses -- - * i.e. offline license saved before an update or licenses from a server that - * has not update to the v16 license server SDK. + * OEMCrypto shall compute the signature of the message using + * mac_key[server], and shall verify the computed signature matches the + * signature passed in. If not, return OEMCrypto_ERROR_SIGNATURE_FAILURE. The + * signature verification shall use a constant-time algorithm (a signature + * mismatch will always take the same time as a successful comparison). * - * OEMCrypto shall compute the signature of the message using - * mac_key[server], and shall verify the computed signature matches the - * signature passed in. If not, return OEMCrypto_ERROR_SIGNATURE_FAILURE. The - * signature verification shall use a constant-time algorithm (a signature - * mismatch will always take the same time as a successful comparison). + * The key control from the first OEMCrypto_KeyRefreshObject in the key_array + * shall be extracted. If it is encrypted, as described below, it shall be + * decrypted. The duration from the key control shall be extracted and + * converted to host byte order. This duration shall be passed to the + * function ODK_RefreshV15Values as the parameter new_key_duration. * - * The key control from the first OEMCrypto_KeyRefreshObject in the key_array - * shall be extracted. If it is encrypted, as described below, it shall be - * decrypted. The duration from the key control shall be extracted and - * converted to host byte order. This duration shall be passed to the - * function ODK_RefreshV15Values as the parameter new_key_duration. + * If the KeyRefreshObject's key_control_iv has zero length, then the + * key_control is not encrypted. If the key_control_iv is specified, then + * key_control is encrypted with the first 128 bits of the corresponding + * content key. * - * If the KeyRefreshObject's key_control_iv has zero length, then the - * key_control is not encrypted. If the key_control_iv is specified, then - * key_control is encrypted with the first 128 bits of the corresponding - * content key. + * If the KeyRefreshObject's key_id has zero length, then it is an error for + * the key_control_iv to have nonzero length. OEMCrypto shall return an error + * of OEMCrypto_ERROR_INVALID_CONTEXT. * - * If the KeyRefreshObject's key_id has zero length, then it is an error for - * the key_control_iv to have nonzero length. OEMCrypto shall return an error - * of OEMCrypto_ERROR_INVALID_CONTEXT. + * If the session's license_type is OEMCrypto_ContentLicense, and the + * KeyRefreshObject's key_id is not null, then the entry in the keytable with + * the matching content_key_id is used. * - * If the session's license_type is OEMCrypto_ContentLicense, and the - * KeyRefreshObject's key_id is not null, then the entry in the keytable with - * the matching content_key_id is used. + * If the session's license_type is OEMCrypto_EntitlementLicense, and the + * KeyRefreshObject's key_id is not null, then the entry in the keytable with + * the matching entitlment_key_id is used. * - * If the session's license_type is OEMCrypto_EntitlementLicense, and the - * KeyRefreshObject's key_id is not null, then the entry in the keytable with - * the matching entitlment_key_id is used. + * The function ODK_RefreshV15Values shall be called to update the clock + * values. See the document "Widevine Core Message Serialization" for the + * documentation of the ODK library functions. * - * The function ODK_RefreshV15Values shall be called to update the clock - * values. See the document "Widevine Core Message Serialization" for the - * documentation of the ODK library functions. + * If ODK_RefreshV15Values returns * - * If ODK_RefreshV15Values returns + * - ODK_SET_TIMER: Success. The timer should be reset to the specified + * timer value. + * - ODK_DISABLE_TIMER: Success, but disable timer. Unlimited playback is + * allowed. + * - ODK_TIMER_EXPIRED: Set timer as disabled. Playback is not allowed. + * - ODK_STALE_RENEWAL: This renewal is not the most recently signed. It is + * rejected. Return this error + * - Any other error - OEMCrypto shall pass any other error up to the + * caller of OEMCrypto_RefreshKeys. * - * - ODK_SET_TIMER: Success. The timer should be reset to the specified - * timer value. - * - ODK_DISABLE_TIMER: Success, but disable timer. Unlimited playback is - * allowed. - * - ODK_TIMER_EXPIRED: Set timer as disabled. Playback is not allowed. - * - ODK_STALE_RENEWAL: This renewal is not the most recently signed. It is - * rejected. Return this error - * - Any other error - OEMCrypto shall pass any other error up to the - * caller of OEMCrypto_RefreshKeys. + * NOTE: OEMCrypto_LoadKeys() must be called first to load the keys into the + * session. * - * NOTE: OEMCrypto_LoadKeys() must be called first to load the keys into the - * session. + * @param[in] session: handle for the session to be used. + * @param[in] message: pointer to memory containing message to be verified. + * @param[in] message_length: length of the message, in bytes. + * @param[in] signature: pointer to memory containing the signature. + * @param[in] signature_length: length of the signature, in bytes. + * @param[in] num_keys: number of keys present. + * @param[in] key_array: set of key updates. * - * Parameters: - * [in] session: handle for the session to be used. - * [in] message: pointer to memory containing message to be verified. - * [in] message_length: length of the message, in bytes. - * [in] signature: pointer to memory containing the signature. - * [in] signature_length: length of the signature, in bytes. - * [in] num_keys: number of keys present. - * [in] key_array: set of key updates. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_NO_DEVICE_KEY + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_INVALID_CONTEXT + * @retval OEMCrypto_ERROR_SIGNATURE_FAILURE + * @retval OEMCrypto_ERROR_INVALID_NONCE + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_NO_CONTENT_KEY + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_NO_DEVICE_KEY - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_INVALID_CONTEXT - * OEMCrypto_ERROR_SIGNATURE_FAILURE - * OEMCrypto_ERROR_INVALID_NONCE - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_NO_CONTENT_KEY - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support message sizes as described in the section * OEMCrypto_ResourceRatingTier. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_RefreshKeys( @@ -1808,78 +1862,73 @@ OEMCryptoResult OEMCrypto_RefreshKeys( const uint8_t* signature, size_t signature_length, size_t num_keys, const OEMCrypto_KeyRefreshObject* key_array); -/* - * OEMCrypto_LoadRenewal +/** + * Updates the clock values and resets the renewal timer for the current + * session. * - * Description: - * Updates the clock values and resets the renewal timer for the current - * session. + * OEMCrypto shall verify the signature of the entire message using the + * session's renewal mac key for the server. The entire message is the buffer + * starting at message with length message_length. If the signature does not + * match, OEMCrypto returns OEMCrypto_ERROR_SIGNATURE_FAILURE. * - * OEMCrypto shall verify the signature of the entire message using the - * session's renewal mac key for the server. The entire message is the buffer - * starting at message with length message_length. If the signature does not - * match, OEMCrypto returns OEMCrypto_ERROR_SIGNATURE_FAILURE. + * OEMCrypto shall verify that nonce_values.api_major_version is 16. If not, + * return the error OEMCrypto_ERROR_INVALID_CONTEXT. Legacy licenses will use + * the function OEMCrypto_RefreshKeys instead of OEMCrypto_LoadRenewal. * - * OEMCrypto shall verify that nonce_values.api_major_version is 16. If not, - * return the error OEMCrypto_ERROR_INVALID_CONTEXT. Legacy licenses will use - * the function OEMCrypto_RefreshKeys instead of OEMCrypto_LoadRenewal. + * If the signature passes, OEMCrypto shall use the function + * ODK_ParseRenewal, as described in the document "Widevine Core Message + * Serialization" to parse and verify the message. If ODK_ParseRenewal + * returns an error OEMCrypto returns the error to the CDM layer. * - * If the signature passes, OEMCrypto shall use the function - * ODK_ParseRenewal, as described in the document "Widevine Core Message - * Serialization" to parse and verify the message. If ODK_ParseRenewal - * returns an error OEMCrypto returns the error to the CDM layer. + * The function ODK_ParseRenewal updates the clock values for the session, + * and may return ODK_SET_TIMER, ODK_DISABLE_TIMER or ODK_TIMER_EXPIRED on + * success. These values shall be handled by OEMCrypto, as discussed in the + * document "License Duration and Renewal". * - * The function ODK_ParseRenewal updates the clock values for the session, - * and may return ODK_SET_TIMER, ODK_DISABLE_TIMER or ODK_TIMER_EXPIRED on - * success. These values shall be handled by OEMCrypto, as discussed in the - * document "License Duration and Renewal". + * NOTE: OEMCrypto_LoadLicense() must be called first to load the keys into + * the session. * - * NOTE: OEMCrypto_LoadLicense() must be called first to load the keys into - * the session. - * - * Verification: + * @verification * The signature of the message shall be computed using mac_key[server], and * the API shall verify the computed signature matches the signature passed * in. If not, return OEMCrypto_ERROR_SIGNATURE_FAILURE. The signature * verification shall use a constant-time algorithm (a signature mismatch * will always take the same time as a successful comparison). * - * Parameters: - * [in] session: handle for the session to be used. - * [in] message: pointer to memory containing message to be verified. - * [in] message_length: length of the message, in bytes. - * [in] core_message_length: length of the core submessage, in bytes. - * [in] signature: pointer to memory containing the signature. - * [in] signature_length: length of the signature, in bytes. + * @param[in] session: handle for the session to be used. + * @param[in] message: pointer to memory containing message to be verified. + * @param[in] message_length: length of the message, in bytes. + * @param[in] core_message_length: length of the core submessage, in bytes. + * @param[in] signature: pointer to memory containing the signature. + * @param[in] signature_length: length of the signature, in bytes. * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_NO_DEVICE_KEY - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_INVALID_CONTEXT - * OEMCrypto_ERROR_SIGNATURE_FAILURE - * OEMCrypto_ERROR_INVALID_NONCE - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * ODK_STALE_RENEWAL + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_NO_DEVICE_KEY + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_INVALID_CONTEXT + * @retval OEMCrypto_ERROR_SIGNATURE_FAILURE + * @retval OEMCrypto_ERROR_INVALID_NONCE + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval ODK_STALE_RENEWAL * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support message sizes as described in the section * OEMCrypto_ResourceRatingTier. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 12. */ OEMCryptoResult OEMCrypto_LoadRenewal(OEMCrypto_SESSION session, @@ -1889,23 +1938,20 @@ OEMCryptoResult OEMCrypto_LoadRenewal(OEMCrypto_SESSION session, const uint8_t* signature, size_t signature_length); -/* - * OEMCrypto_QueryKeyControl +/** + * Returns the decrypted key control block for the given content_key_id. This + * function is for application developers to debug license server and key + * timelines. It only returns a key control block if LoadKeys was successful, + * otherwise it returns OEMCrypto_ERROR_NO_CONTENT_KEY. The developer of the + * OEMCrypto library must be careful that the keys themselves are not + * accidentally revealed. * - * Description: - * Returns the decrypted key control block for the given content_key_id. This - * function is for application developers to debug license server and key - * timelines. It only returns a key control block if LoadKeys was successful, - * otherwise it returns OEMCrypto_ERROR_NO_CONTENT_KEY. The developer of the - * OEMCrypto library must be careful that the keys themselves are not - * accidentally revealed. + * Note: returns control block in original, network byte order. If OEMCrypto + * converts fields to host byte order internally for storage, it should + * convert them back. Since OEMCrypto might not store the nonce or validation + * fields, values of 0 may be used instead. * - * Note: returns control block in original, network byte order. If OEMCrypto - * converts fields to host byte order internally for storage, it should - * convert them back. Since OEMCrypto might not store the nonce or validation - * fields, values of 0 may be used instead. - * - * Verification: + * @verification * The following checks should be performed. * 1. If key_id is null, return OEMCrypto_ERROR_INVALID_CONTEXT. * 2. If key_control_block_length is null, return @@ -1917,30 +1963,29 @@ OEMCryptoResult OEMCrypto_LoadRenewal(OEMCrypto_SESSION session, * 5. If the specified key has not been loaded, return * OEMCrypto_ERROR_NO_CONTENT_KEY. * - * Parameters: - * [in] session: handle for the session to be used. - * [in] content_key_id: The unique id of the key of interest. - * [in] content_key_id_length: The length of key_id, in bytes. From 1 to 16, - * inclusive. - * [out] key_control_block: A caller-owned buffer. - * [in/out] key_control_block_length. The length of key_control_block buffer. + * @param[in] session: handle for the session to be used. + * @param[in] content_key_id: The unique id of the key of interest. + * @param[in] content_key_id_length: The length of key_id, in bytes. From 1 to + * 16, inclusive. + * @param[out] key_control_block: A caller-owned buffer. + * @param[in,out] key_control_block_length. The length of key_control_block + * buffer. * - * Returns: - * OEMCrypto_SUCCESS - * OEMCrypto_ERROR_INVALID_CONTEXT - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_SUCCESS + * @retval OEMCrypto_ERROR_INVALID_CONTEXT + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method is new in API version 10. */ OEMCryptoResult OEMCrypto_QueryKeyControl(OEMCrypto_SESSION session, @@ -1949,88 +1994,86 @@ OEMCryptoResult OEMCrypto_QueryKeyControl(OEMCrypto_SESSION session, uint8_t* key_control_block, size_t* key_control_block_length); -/* - * OEMCrypto_SelectKey +/// @} + +/// @addtogroup decryption +/// @{ + +/** + * Select a content key and install it in the hardware key ladder for + * subsequent decryption operations (OEMCrypto_DecryptCENC()) for this + * session. The specified key must have been previously "installed" via + * OEMCrypto_LoadKeys(), OEMCrypto_LoadLicense, or + * OEMCrypto_LoadEntitledContentKeys(). * - * Description: - * Select a content key and install it in the hardware key ladder for - * subsequent decryption operations (OEMCrypto_DecryptCENC()) for this - * session. The specified key must have been previously "installed" via - * OEMCrypto_LoadKeys(), OEMCrypto_LoadLicense, or - * OEMCrypto_LoadEntitledContentKeys(). + * A key control block is associated with the key and the session, and is + * used to configure the session context. The Key Control data is documented + * in "Key Control Block Definition". * - * A key control block is associated with the key and the session, and is - * used to configure the session context. The Key Control data is documented - * in "Key Control Block Definition". + * Step 1: Lookup the content key data via the offered key_id. The key data + * includes the key value, and the key control block. * - * Step 1: Lookup the content key data via the offered key_id. The key data - * includes the key value, and the key control block. + * Step 2: Latch the content key into the hardware key ladder. Set permission + * flags based on the key's control block. * - * Step 2: Latch the content key into the hardware key ladder. Set permission - * flags based on the key's control block. + * Step 3: use the latched content key to decrypt (AES-128-CTR or + * AES-128-CBC) buffers passed in via OEMCrypto_DecryptCENC(). If the key is + * 256 bits it will be used for OEMCrypto_Generic_Sign or + * OEMCrypto_Generic_Verify as specified in the key control block. If the key + * will be used for OEMCrypto_Generic_Encrypt or OEMCrypto_Generic_Decrypt + * then the cipher mode will always be OEMCrypto_CipherMode_CBC. Continue to + * use this key for this session until OEMCrypto_SelectKey() is called again, + * or until OEMCrypto_CloseSession() is called. * - * Step 3: use the latched content key to decrypt (AES-128-CTR or - * AES-128-CBC) buffers passed in via OEMCrypto_DecryptCENC(). If the key is - * 256 bits it will be used for OEMCrypto_Generic_Sign or - * OEMCrypto_Generic_Verify as specified in the key control block. If the key - * will be used for OEMCrypto_Generic_Encrypt or OEMCrypto_Generic_Decrypt - * then the cipher mode will always be OEMCrypto_CipherMode_CBC. Continue to - * use this key for this session until OEMCrypto_SelectKey() is called again, - * or until OEMCrypto_CloseSession() is called. + * @verification + * 1. If the key id is not found in the keytable for this session, then the + * key state is not changed and OEMCrypto shall return + * OEMCrypto_ERROR_NO_CONTENT_KEY. + * 2. If the key control block has the bit Disable_Analog_Output set, then + * the device should disable analog video output. If the device has + * analog video output that cannot be disabled, then the key is not + * selected, and OEMCrypto_ERROR_ANALOG_OUTPUT is returned. This step is + * optional -- SelectKey may return OEMCrypto_SUCCESS and delay the + * error until a call to OEMCrypto_DecryptCENC. + * 3. If the key control block has HDCP required, and the device cannot + * enforce HDCP, then the key is not selected, and + * OEMCrypto_ERROR_INSUFFICIENT_HDCP is returned. This step is optional + * -- SelectKey may return OEMCrypto_SUCCESS and delay the error until a + * call to OEMCrypto_DecryptCENC. + * 4. If the key control block has a nonzero value for HDCP_Version, and + * the device cannot enforce at least that version of HDCP, then the key + * is not selected, and OEMCrypto_ERROR_INSUFFICIENT_HDCP is returned. * - * Verification: - * 1. If the key id is not found in the keytable for this session, then the - * key state is not changed and OEMCrypto shall return - * OEMCrypto_ERROR_NO_CONTENT_KEY. - * 2. If the key control block has the bit Disable_Analog_Output set, then - * the device should disable analog video output. If the device has - * analog video output that cannot be disabled, then the key is not - * selected, and OEMCrypto_ERROR_ANALOG_OUTPUT is returned. This step is - * optional -- SelectKey may return OEMCrypto_SUCCESS and delay the - * error until a call to OEMCrypto_DecryptCENC. - * 3. If the key control block has HDCP required, and the device cannot - * enforce HDCP, then the key is not selected, and - * OEMCrypto_ERROR_INSUFFICIENT_HDCP is returned. This step is optional - * -- SelectKey may return OEMCrypto_SUCCESS and delay the error until a - * call to OEMCrypto_DecryptCENC. - * 4. If the key control block has a nonzero value for HDCP_Version, and - * the device cannot enforce at least that version of HDCP, then the key - * is not selected, and OEMCrypto_ERROR_INSUFFICIENT_HDCP is returned. + * @param[in] session: crypto session identifier. + * @param[in] content_key_id: pointer to the content Key ID. + * @param[in] content_key_id_length: length of the content Key ID, in bytes. + * From 1 to 16, inclusive. + * @param[in] cipher_mode: whether the key should be prepared for CTR mode or + * CBC mode when used in later calls to DecryptCENC. This should be ignored + * when the key is used for Generic Crypto calls. * - * Parameters: - * [in] session: crypto session identifier. - * [in] content_key_id: pointer to the content Key ID. - * [in] content_key_id_length: length of the content Key ID, in bytes. From - * 1 to 16, inclusive. - * [in] cipher_mode: whether the key should be prepared for CTR mode or CBC - * mode when used in later calls to DecryptCENC. This should be ignored - * when the key is used for Generic Crypto calls. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_KEY_EXPIRED if the session's timer has expired + * @retval OEMCrypto_ERROR_INVALID_SESSION crypto session ID invalid or not open + * @retval OEMCrypto_ERROR_NO_DEVICE_KEY failed to decrypt device key + * @retval OEMCrypto_ERROR_NO_CONTENT_KEY failed to decrypt content key + * @retval OEMCrypto_ERROR_CONTROL_INVALID invalid or unsupported control input + * @retval OEMCrypto_ERROR_KEYBOX_INVALID cannot decrypt and read from Keybox + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_ANALOG_OUTPUT + * @retval OEMCrypto_ERROR_INSUFFICIENT_HDCP + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_KEY_EXPIRED - if the session's timer has expired - * OEMCrypto_ERROR_INVALID_SESSION crypto session ID invalid or not open - * OEMCrypto_ERROR_NO_DEVICE_KEY failed to decrypt device key - * OEMCrypto_ERROR_NO_CONTENT_KEY failed to decrypt content key - * OEMCrypto_ERROR_CONTROL_INVALID invalid or unsupported control input - * OEMCrypto_ERROR_KEYBOX_INVALID cannot decrypt and read from Keybox - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_KEY_EXPIRED - * OEMCrypto_ERROR_ANALOG_OUTPUT - * OEMCrypto_ERROR_INSUFFICIENT_HDCP - * OEMCrypto_ERROR_NO_CONTENT_KEY - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_SelectKey(OEMCrypto_SESSION session, @@ -2038,365 +2081,359 @@ OEMCryptoResult OEMCrypto_SelectKey(OEMCrypto_SESSION session, size_t content_key_id_length, OEMCryptoCipherMode cipher_mode); -/* - * OEMCrypto_DecryptCENC +/** + * Decrypts or copies a series of input payloads into output buffers using + * the session context indicated by the session parameter. The input payload + * is delivered in the form of samples. The samples are subdivided into + * subsamples. "Samples" and "subsamples" are defined as in the ISO Common + * Encryption standard (ISO/IEC 23001-7:2016). The samples parameter contains + * a list of samples, each of which has its own input and output buffers. + * Each sample contains a buffers field that contains the input and output + * buffers in its input_data and output fields, respectively. * - * Description: - * Decrypts or copies a series of input payloads into output buffers using - * the session context indicated by the session parameter. The input payload - * is delivered in the form of samples. The samples are subdivided into - * subsamples. "Samples" and "subsamples" are defined as in the ISO Common - * Encryption standard (ISO/IEC 23001-7:2016). The samples parameter contains - * a list of samples, each of which has its own input and output buffers. - * Each sample contains a buffers field that contains the input and output - * buffers in its input_data and output fields, respectively. + * Each sample contains an array of subsample descriptions in its subsamples + * field. Each subsample is defined as a number of clear bytes followed by a + * number of encrypted bytes. Subsamples are consecutive inside the sample; + * the clear bytes of the second subsample begin immediately after the + * encrypted bytes of the first subsample. This follows the definition in the + * ISO-CENC standard. * - * Each sample contains an array of subsample descriptions in its subsamples - * field. Each subsample is defined as a number of clear bytes followed by a - * number of encrypted bytes. Subsamples are consecutive inside the sample; - * the clear bytes of the second subsample begin immediately after the - * encrypted bytes of the first subsample. This follows the definition in the - * ISO-CENC standard. + * Decryption mode is AES-128-CTR or AES-128-CBC depending on the value of + * cipher_mode previously passed in to OEMCrypto_SelectKey. For the encrypted + * portion of subsamples, the content key associated with the session is + * latched in the active hardware key ladder and is used for the decryption + * operation. For the clear portion of subsamples, the data is simply copied. * - * Decryption mode is AES-128-CTR or AES-128-CBC depending on the value of - * cipher_mode previously passed in to OEMCrypto_SelectKey. For the encrypted - * portion of subsamples, the content key associated with the session is - * latched in the active hardware key ladder and is used for the decryption - * operation. For the clear portion of subsamples, the data is simply copied. + * After decryption, all the input_data bytes are copied to the location + * described by the output field. The output field is an + * OEMCrypto_DestBufferDesc, which could be one of: * - * After decryption, all the input_data bytes are copied to the location - * described by the output field. The output field is an - * OEMCrypto_DestBufferDesc, which could be one of: + * 1. The structure OEMCrypto_DestBufferDesc contains a pointer to a clear + * text buffer. The OEMCrypto library shall verify that key control + * allows data to be returned in clear text. If it is not authorized, + * this method should return an error. + * 2. The structure OEMCrypto_DestBufferDesc contains a handle to a secure + * buffer. + * 3. The structure OEMCrypto_DestBufferDesc indicates that the data should + * be sent directly to the decoder and renderer. + * Depending on your platform's needs, you may not need to support all three + * of these options. * - * 1. The structure OEMCrypto_DestBufferDesc contains a pointer to a clear - * text buffer. The OEMCrypto library shall verify that key control - * allows data to be returned in clear text. If it is not authorized, - * this method should return an error. - * 2. The structure OEMCrypto_DestBufferDesc contains a handle to a secure - * buffer. - * 3. The structure OEMCrypto_DestBufferDesc indicates that the data should - * be sent directly to the decoder and renderer. - * Depending on your platform's needs, you may not need to support all three - * of these options. + * SINGLE-SAMPLE DECRYPTION AND SINGLE-SUBSAMPLE DECRYPTION: * - * SINGLE-SAMPLE DECRYPTION AND SINGLE-SUBSAMPLE DECRYPTION: + * If the OEMCrypto implementation is not able to handle the amount of + * samples and subsamples passed into it, it should return + * OEMCrypto_ERROR_BUFFER_TOO_LARGE, in which case the CDM can respond by + * breaking the samples up into smaller pieces and trying to decrypt each of + * them individually. It is possible that the CDM will break the samples + * array up into pieces that are still too large, in which case OEMCrypto may + * return OEMCrypto_ERROR_BUFFER_TOO_LARGE again. * - * If the OEMCrypto implementation is not able to handle the amount of - * samples and subsamples passed into it, it should return - * OEMCrypto_ERROR_BUFFER_TOO_LARGE, in which case the CDM can respond by - * breaking the samples up into smaller pieces and trying to decrypt each of - * them individually. It is possible that the CDM will break the samples - * array up into pieces that are still too large, in which case OEMCrypto may - * return OEMCrypto_ERROR_BUFFER_TOO_LARGE again. + * If the OEMCrypto implementation cannot handle multiple samples at once, it + * may return OEMCrypto_ERROR_BUFFER_TOO_LARGE any time it receives more than + * one sample in a single call to OEMCrypto_DecryptCENC. * - * If the OEMCrypto implementation cannot handle multiple samples at once, it - * may return OEMCrypto_ERROR_BUFFER_TOO_LARGE any time it receives more than - * one sample in a single call to OEMCrypto_DecryptCENC. + * Similarly, if the OEMCrypto implementation cannot handle multiple + * subsamples at once, it may return OEMCrypto_ERROR_BUFFER_TOO_LARGE any + * time it receives more than one subsample in a single call to + * OEMCrypto_DecryptCENC. * - * Similarly, if the OEMCrypto implementation cannot handle multiple - * subsamples at once, it may return OEMCrypto_ERROR_BUFFER_TOO_LARGE any - * time it receives more than one subsample in a single call to - * OEMCrypto_DecryptCENC. + * The exact way that the CDM code breaks up the samples array is not + * guaranteed by this specification. The CDM may break down the array of + * samples into many arrays each containing one sample. The CDM may break + * down samples into subsamples and pass individual subsamples into + * OEMCrypto, just like in OEMCrypto v15. The CDM may break down individual + * subsamples into smaller subsamples, just like in OEMCrypto v15. * - * The exact way that the CDM code breaks up the samples array is not - * guaranteed by this specification. The CDM may break down the array of - * samples into many arrays each containing one sample. The CDM may break - * down samples into subsamples and pass individual subsamples into - * OEMCrypto, just like in OEMCrypto v15. The CDM may break down individual - * subsamples into smaller subsamples, just like in OEMCrypto v15. + * If OEMCrypto requests that the CDM break samples into subsamples, the + * "samples" passed into OEMCrypto_DecryptCENC will no longer be full + * samples. When a full sample is passed into OEMCrypto_DecryptCENC, the + * first subsample in the subsample array will have the + * OEMCrypto_FirstSubsample flag set in its subsample_flags field and the + * last subsample array will have the OEMCrypto_LastSubsample flag set in its + * subsample_flags field. If this is not the case, OEMCrypto will need to + * accumulate more subsamples from successive calls to OEMCrypto_DecryptCENC + * to receive the full sample. * - * If OEMCrypto requests that the CDM break samples into subsamples, the - * "samples" passed into OEMCrypto_DecryptCENC will no longer be full - * samples. When a full sample is passed into OEMCrypto_DecryptCENC, the - * first subsample in the subsample array will have the - * OEMCrypto_FirstSubsample flag set in its subsample_flags field and the - * last subsample array will have the OEMCrypto_LastSubsample flag set in its - * subsample_flags field. If this is not the case, OEMCrypto will need to - * accumulate more subsamples from successive calls to OEMCrypto_DecryptCENC - * to receive the full sample. + * The first subsample in the sample will always have + * OEMCrypto_FirstSubsample set and the last subsample will always have the + * OEMCrypto_LastSubsample flag set, even if those subsamples are passed in + * separate calls to OEMCrypto_DecryptCENC. This is the same as in OEMCrypto + * v15. The decrypted data will not be used until after the subsample with + * the flag OEMCrypto_LastSubsample has been sent to OEMCrypto. This can be + * relied on by OEMCrypto for optimization by not doing decrypt until the + * last subsample has been received. However, a device that can do decrypt of + * more than one subsample at a time will always have better performance if + * it can receive those subsamples in one OEMCrypto_Decrypt call rather than + * as individual subsamples. * - * The first subsample in the sample will always have - * OEMCrypto_FirstSubsample set and the last subsample will always have the - * OEMCrypto_LastSubsample flag set, even if those subsamples are passed in - * separate calls to OEMCrypto_DecryptCENC. This is the same as in OEMCrypto - * v15. The decrypted data will not be used until after the subsample with - * the flag OEMCrypto_LastSubsample has been sent to OEMCrypto. This can be - * relied on by OEMCrypto for optimization by not doing decrypt until the - * last subsample has been received. However, a device that can do decrypt of - * more than one subsample at a time will always have better performance if - * it can receive those subsamples in one OEMCrypto_Decrypt call rather than - * as individual subsamples. + * Although the exact way that the CDM code breaks up the samples array when + * it receives OEMCrypto_ERROR_BUFFER_TOO_LARGE is not guaranteed by this + * specification, here is a sample way it might work: * - * Although the exact way that the CDM code breaks up the samples array when - * it receives OEMCrypto_ERROR_BUFFER_TOO_LARGE is not guaranteed by this - * specification, here is a sample way it might work: + * 1. It tries to pass the array of samples to OEMCrypto_DecryptCENC. + * 2. If OEMCrypto returns OEMCrypto_ERROR_BUFFER_TOO_LARGE, it tries to + * pass each sample individually into OEMCrypto_DecryptCENC. + * 3. If OEMCrypto returns OEMCrypto_ERROR_BUFFER_TOO_LARGE, it tries to + * pass the clear and encrypted parts of each subsample individually + * into OEMCrypto_DecryptCENC. At this point, (and in the subsequent + * steps) it is replicating the behavior of OEMCrypto v15 and lower. + * 4. If OEMCrypto returns OEMCrypto_ERROR_BUFFER_TOO_LARGE, it breaks each + * piece of a subsample into smaller pieces, down to the minimum + * subsample size required by the device's resource rating tier. It + * passes these pieces into OEMCrypto_DecryptCENC. + * 5. If OEMCrypto returns OEMCrypto_ERROR_BUFFER_TOO_LARGE, the device has + * failed to meet its resource rating tier requirements. It returns an + * error. + * Because this process requires a lot of back-and-forth between the CDM and + * OEMCrypto, partners are strongly recommended to support decrypting full + * samples or even multiple samples in their OEMCrypto implementation. * - * 1. It tries to pass the array of samples to OEMCrypto_DecryptCENC. - * 2. If OEMCrypto returns OEMCrypto_ERROR_BUFFER_TOO_LARGE, it tries to - * pass each sample individually into OEMCrypto_DecryptCENC. - * 3. If OEMCrypto returns OEMCrypto_ERROR_BUFFER_TOO_LARGE, it tries to - * pass the clear and encrypted parts of each subsample individually - * into OEMCrypto_DecryptCENC. At this point, (and in the subsequent - * steps) it is replicating the behavior of OEMCrypto v15 and lower. - * 4. If OEMCrypto returns OEMCrypto_ERROR_BUFFER_TOO_LARGE, it breaks each - * piece of a subsample into smaller pieces, down to the minimum - * subsample size required by the device's resource rating tier. It - * passes these pieces into OEMCrypto_DecryptCENC. - * 5. If OEMCrypto returns OEMCrypto_ERROR_BUFFER_TOO_LARGE, the device has - * failed to meet its resource rating tier requirements. It returns an - * error. - * Because this process requires a lot of back-and-forth between the CDM and - * OEMCrypto, partners are strongly recommended to support decrypting full - * samples or even multiple samples in their OEMCrypto implementation. + * ISO-CENC SCHEMES: * - * ISO-CENC SCHEMES: + * The ISO Common Encryption standard (ISO/IEC 23001-7:2016) defines four + * "schemes" that may be used to encrypt content: 'cenc', 'cens', 'cbc1', and + * 'cbcs'. Starting with v16, OEMCrypto only supports 'cenc' and 'cbcs'. The + * schemes 'cens' and 'cbc1' are not supported. * - * The ISO Common Encryption standard (ISO/IEC 23001-7:2016) defines four - * "schemes" that may be used to encrypt content: 'cenc', 'cens', 'cbc1', and - * 'cbcs'. Starting with v16, OEMCrypto only supports 'cenc' and 'cbcs'. The - * schemes 'cens' and 'cbc1' are not supported. + * The decryption mode, either OEMCrypto_CipherMode_CTR or + * OEMCrypto_CipherMode_CBC, was already specified in the call to + * OEMCrypto_SelectKey. The encryption pattern is specified by the fields in + * the parameter pattern. A description of partial encryption patterns for + * 'cbcs' can be found in the ISO-CENC standard, section 10.4. * - * The decryption mode, either OEMCrypto_CipherMode_CTR or - * OEMCrypto_CipherMode_CBC, was already specified in the call to - * OEMCrypto_SelectKey. The encryption pattern is specified by the fields in - * the parameter pattern. A description of partial encryption patterns for - * 'cbcs' can be found in the ISO-CENC standard, section 10.4. + * 'cenc' SCHEME: * - * 'cenc' SCHEME: + * The 'cenc' scheme is OEMCrypto_CipherMode_CTR without an encryption + * pattern. All the bytes in the encrypted portion of each subsample are + * encrypted. In the pattern parameter, both the encrypt and skip fields will + * be zero. * - * The 'cenc' scheme is OEMCrypto_CipherMode_CTR without an encryption - * pattern. All the bytes in the encrypted portion of each subsample are - * encrypted. In the pattern parameter, both the encrypt and skip fields will - * be zero. + * The length of a crypto block in AES-128 is 16 bytes. In the 'cenc' scheme, + * if an encrypted subsample has a length that is not a multiple of 16 bytes, + * then all the bytes of the encrypted subsample must be decrypted, but the + * next encrypted subsample will begin by completing the incomplete crypto + * block from the previous encrypted subsample. The following diagram + * provides an example: * - * The length of a crypto block in AES-128 is 16 bytes. In the 'cenc' scheme, - * if an encrypted subsample has a length that is not a multiple of 16 bytes, - * then all the bytes of the encrypted subsample must be decrypted, but the - * next encrypted subsample will begin by completing the incomplete crypto - * block from the previous encrypted subsample. The following diagram - * provides an example: + * (See drawing in "Widevine Modular DRM Security Integration Guide") * - * (See drawing in "Widevine Modular DRM Security Integration Guide") + * To help with this, the block_offset field of each subsample will contain + * the number of bytes the initial crypto block of that subsample should be + * offset by. In the example above, the block_offset for the first subsample + * would be 0 and the block_offset for the second subsample would be 12. + * 'cenc' is the only mode that allows for a nonzero block_offset. This field + * satisfies 0 <= block_offset < 16. * - * To help with this, the block_offset field of each subsample will contain - * the number of bytes the initial crypto block of that subsample should be - * offset by. In the example above, the block_offset for the first subsample - * would be 0 and the block_offset for the second subsample would be 12. - * 'cenc' is the only mode that allows for a nonzero block_offset. This field - * satisfies 0 <= block_offset < 16. + * 'cbcs' SCHEME: * - * 'cbcs' SCHEME: + * The 'cbcs' scheme is OEMCrypto_CipherMode_CBC with an encryption pattern. + * Only some of the bytes in the encrypted portion of each subsample are + * encrypted. In the pattern parameter, the encrypt and skip fields will + * usually be non-zero. This mode allows devices to decrypt FMP4 HLS content, + * SAMPLE-AES HLS content, as well as content using the DASH 'cbcs' scheme. * - * The 'cbcs' scheme is OEMCrypto_CipherMode_CBC with an encryption pattern. - * Only some of the bytes in the encrypted portion of each subsample are - * encrypted. In the pattern parameter, the encrypt and skip fields will - * usually be non-zero. This mode allows devices to decrypt FMP4 HLS content, - * SAMPLE-AES HLS content, as well as content using the DASH 'cbcs' scheme. + * The skip field of OEMCrypto_CENCEncryptPatternDesc may also be zero. If + * the skip field is zero, then patterns are not in use and all crypto blocks + * in the encrypted part of the subsample are encrypted. It is not valid for + * the encrypt field to be zero. * - * The skip field of OEMCrypto_CENCEncryptPatternDesc may also be zero. If - * the skip field is zero, then patterns are not in use and all crypto blocks - * in the encrypted part of the subsample are encrypted. It is not valid for - * the encrypt field to be zero. + * The length of a crypto block in AES-128 is 16 bytes. In the 'cbcs' scheme, + * if the encrypted part of a subsample has a length that is not a multiple + * of 16 bytes, then the final bytes that do not make up a full crypto block + * are clear and should never be decrypted. The following diagram provides an + * example: * - * The length of a crypto block in AES-128 is 16 bytes. In the 'cbcs' scheme, - * if the encrypted part of a subsample has a length that is not a multiple - * of 16 bytes, then the final bytes that do not make up a full crypto block - * are clear and should never be decrypted. The following diagram provides an - * example: + * (See drawing in "Widevine Modular DRM Security Integration Guide") * - * (See drawing in "Widevine Modular DRM Security Integration Guide") + * Whether any given protected block is actually encrypted also depends on + * the pattern. But the bytes at the end that do not make up a full crypto + * block will never be encrypted, regardless of what the pattern is. Even if + * the pattern says to decrypt every protected block, these bytes are clear + * and should not be decrypted. * - * Whether any given protected block is actually encrypted also depends on - * the pattern. But the bytes at the end that do not make up a full crypto - * block will never be encrypted, regardless of what the pattern is. Even if - * the pattern says to decrypt every protected block, these bytes are clear - * and should not be decrypted. + * Of course, if the encrypted subsample has a length that is a multiple of + * 16 bytes, all the bytes in it are protected, and they may need to be + * decrypted following the pattern. The following diagram provides an example: * - * Of course, if the encrypted subsample has a length that is a multiple of - * 16 bytes, all the bytes in it are protected, and they may need to be - * decrypted following the pattern. The following diagram provides an example: + * (See drawing in "Widevine Modular DRM Security Integration Guide") * - * (See drawing in "Widevine Modular DRM Security Integration Guide") + * INITIALIZATION VECTOR BETWEEN SUBSAMPLES: * - * INITIALIZATION VECTOR BETWEEN SUBSAMPLES: + * The IV is specified for the initial subsample in a sample in the iv field + * of the OEMCrypto_SampleDescription. OEMCrypto is responsible for correctly + * updating the IV for subsequent subsamples according to the ISO Common + * Encryption standard (ISO/IEC 23001-7:2016). Section 9.5.2.3 covers 'cenc' + * and section 9.5.2.5 covers 'cbcs'. A summary of the ISO-CENC behavior + * follows: * - * The IV is specified for the initial subsample in a sample in the iv field - * of the OEMCrypto_SampleDescription. OEMCrypto is responsible for correctly - * updating the IV for subsequent subsamples according to the ISO Common - * Encryption standard (ISO/IEC 23001-7:2016). Section 9.5.2.3 covers 'cenc' - * and section 9.5.2.5 covers 'cbcs'. A summary of the ISO-CENC behavior - * follows: + * For 'cenc', the IV at the end of each subsample carries forward to the + * next subsample and becomes the IV at the beginning of the next subsample. + * If the subsample ends on a crypto block boundary, then the IV should be + * incremented as normal at the end of the crypto block. If the subsample + * ends in the middle of a crypto block, the same IV should continue to be + * used until the crypto block is completed in the next subsample. Only + * increment the IV after the partial crypto block is completed. * - * For 'cenc', the IV at the end of each subsample carries forward to the - * next subsample and becomes the IV at the beginning of the next subsample. - * If the subsample ends on a crypto block boundary, then the IV should be - * incremented as normal at the end of the crypto block. If the subsample - * ends in the middle of a crypto block, the same IV should continue to be - * used until the crypto block is completed in the next subsample. Only - * increment the IV after the partial crypto block is completed. + * For 'cbcs', the IV is reset at the beginning of each subsample. Each + * subsample should start with the IV that was passed into + * OEMCrypto_DecryptCENC. * - * For 'cbcs', the IV is reset at the beginning of each subsample. Each - * subsample should start with the IV that was passed into - * OEMCrypto_DecryptCENC. + * To phrase it another way: In 'cenc', the encrypted portions of the + * subsamples can be concatenated to form one continuous ciphertext. In + * 'cbcs', each encrypted portion of a subsample is a separate ciphertext. + * Each separate ciphertext begins with the IV specified in the iv field of + * the OEMCrypto_SampleDescription. * - * To phrase it another way: In 'cenc', the encrypted portions of the - * subsamples can be concatenated to form one continuous ciphertext. In - * 'cbcs', each encrypted portion of a subsample is a separate ciphertext. - * Each separate ciphertext begins with the IV specified in the iv field of - * the OEMCrypto_SampleDescription. + * INITIALIZATION VECTOR WITHIN SUBSAMPLES: * - * INITIALIZATION VECTOR WITHIN SUBSAMPLES: + * Once it has the IV for each subsample, OEMCrypto is responsible for + * correctly updating the IV for each crypto block of each encrypted + * subsample portion, as outlined in the ISO Common Encryption standard + * (ISO/IEC 23001-7:2016). Section 9.5.1 includes general information about + * IVs in subsample decryption. A summary of the ISO-CENC behavior follows: * - * Once it has the IV for each subsample, OEMCrypto is responsible for - * correctly updating the IV for each crypto block of each encrypted - * subsample portion, as outlined in the ISO Common Encryption standard - * (ISO/IEC 23001-7:2016). Section 9.5.1 includes general information about - * IVs in subsample decryption. A summary of the ISO-CENC behavior follows: + * For 'cenc', the subsample's IV is the counter value to be used for the + * initial encrypted block of the subsample. The IV length is the AES block + * size. For subsequent encrypted AES blocks, OEMCrypto must calculate the IV + * by incrementing the lower 64 bits (byte 8-15) of the IV value used for the + * previous block. The counter rolls over to zero when it reaches its maximum + * value (0xFFFFFFFFFFFFFFFF). The upper 64 bits (byte 0-7) of the IV do not + * change. * - * For 'cenc', the subsample's IV is the counter value to be used for the - * initial encrypted block of the subsample. The IV length is the AES block - * size. For subsequent encrypted AES blocks, OEMCrypto must calculate the IV - * by incrementing the lower 64 bits (byte 8-15) of the IV value used for the - * previous block. The counter rolls over to zero when it reaches its maximum - * value (0xFFFFFFFFFFFFFFFF). The upper 64 bits (byte 0-7) of the IV do not - * change. + * For 'cbcs', the subsample's IV is the initialization vector for the + * initial encrypted block of the subsample. Within each subsample, each + * crypto block is used as the IV for the next crypto block, as prescribed by + * AES-CBC. * - * For 'cbcs', the subsample's IV is the initialization vector for the - * initial encrypted block of the subsample. Within each subsample, each - * crypto block is used as the IV for the next crypto block, as prescribed by - * AES-CBC. + * NOTES: * - * NOTES: + * If the destination buffer is secure, an offset may be specified. + * OEMCrypto_DecryptCENC begins storing data buffers.output.secure.offset + * bytes after the beginning of the secure buffer. * - * If the destination buffer is secure, an offset may be specified. - * OEMCrypto_DecryptCENC begins storing data buffers.output.secure.offset - * bytes after the beginning of the secure buffer. + * If the session has an entry in the Usage Table, then OEMCrypto must update + * the time_of_last_decrypt. If the status of the entry is "unused", then + * change the status to "active" and set the time_of_first_decrypt. * - * If the session has an entry in the Usage Table, then OEMCrypto must update - * the time_of_last_decrypt. If the status of the entry is "unused", then - * change the status to "active" and set the time_of_first_decrypt. + * OEMCrypto cannot assume that the buffers of consecutive samples are + * consecutive in memory. * - * OEMCrypto cannot assume that the buffers of consecutive samples are - * consecutive in memory. + * A subsample may consist entirely of encrypted bytes or clear bytes. In + * this case, the clear or the encrypted part of the subsample will be zero, + * indicating that no bytes of that kind appear in the subsample. * - * A subsample may consist entirely of encrypted bytes or clear bytes. In - * this case, the clear or the encrypted part of the subsample will be zero, - * indicating that no bytes of that kind appear in the subsample. + * The ISO-CENC spec implicitly limits both the skip and encrypt values to be + * 4 bits, so they are at most 15. * - * The ISO-CENC spec implicitly limits both the skip and encrypt values to be - * 4 bits, so they are at most 15. + * (See drawing in "Widevine Modular DRM Security Integration Guide") * - * (See drawing in "Widevine Modular DRM Security Integration Guide") + * If OEMCrypto assembles all of the encrypted subsample portions into a + * single buffer and then decrypts it in one pass, it can assume that the + * block offset is 0. * - * If OEMCrypto assembles all of the encrypted subsample portions into a - * single buffer and then decrypts it in one pass, it can assume that the - * block offset is 0. + * (See drawing in "Widevine Modular DRM Security Integration Guide") * - * (See drawing in "Widevine Modular DRM Security Integration Guide") - * - * Verification: - * The total size of all the subsamples cannot exceed the total size of the - * input buffer. OEMCrypto integrations should validate this and return - * OEMCrypto_ERROR_UNKNOWN_FAILURE if the subsamples are larger than the - * input buffer. No decryption should be performed in this case. - * If the subsamples all contain only clear bytes, then no further - * verification is performed. This call shall copy clear data even when there - * are no keys loaded, or there is no selected key. - * If this is the first use of a key for this session, then OEMCrypto shall - * call ODK_AttemptFirstPlayback to update the session's clock values and - * verify playback is allowed. If this is not the first use of a key for this - * session, then OEMCrypto shall call ODK_UpdateLastPlaybackTime. See the - * document "License Duration and Renewal" for handling the return value of - * these ODK functions. - * The following checks should be performed if any subsamples contain any - * encrypted bytes. If any check fails, an error is returned, and no - * decryption is performed. - * 1. If the current key's control block has the Data_Path_Type bit set, - * then the API shall verify that the output buffer is secure or direct. - * If not, return OEMCrypto_ERROR_DECRYPT_FAILED. - * 2. If the current key control block has the bit Disable_Analog_Output - * set, then the device should disable analog video output. If the - * device has analog video output that cannot be disabled, then - * OEMCrypto_ERROR_ANALOG_OUTPUT is returned. (See note on delayed - * error conditions below) - * 3. If the current key's control block has the HDCP bit set, then the API - * shall verify that the buffer will be displayed locally, or output - * externally using HDCP only. If not, return - * OEMCrypto_ERROR_INSUFFICIENT_HDCP. (See note on delayed error - * conditions below) - * 4. If the current key's control block has a nonzero value for - * HDCP_Version, then the current version of HDCP for the device and the - * display combined will be compared against the version specified in - * the control block. If the current version is not at least as high as - * that in the control block, and the device is not able to restrict - * displays with HDCP levels lower than what's in the control block, - * return OEMCrypto_ERROR_INSUFFICIENT_HDCP. If the device is able to - * restrict those displays, return - * OEMCrypto_WARNING_MIXED_OUTPUT_PROTECTION. (See note on delayed - * error conditions below) - * 5. If the current session has an entry in the Usage Table, and the - * status of that entry is either kInactiveUsed or kInactiveUnused, then - * return the error OEMCrypto_ERROR_LICENSE_INACTIVE. - * 6. If a Decrypt Hash has been initialized via OEMCrypto_SetDecryptHash, - * and the current key's control block does not have the - * Allow_Hash_Verification bit set, then do not compute a hash and - * return OEMCrypto_ERROR_UNKNOWN_FAILURE. + * @verification + * The total size of all the subsamples cannot exceed the total size of the + * input buffer. OEMCrypto integrations should validate this and return + * OEMCrypto_ERROR_UNKNOWN_FAILURE if the subsamples are larger than the + * input buffer. No decryption should be performed in this case. + * If the subsamples all contain only clear bytes, then no further + * verification is performed. This call shall copy clear data even when there + * are no keys loaded, or there is no selected key. + * If this is the first use of a key for this session, then OEMCrypto shall + * call ODK_AttemptFirstPlayback to update the session's clock values and + * verify playback is allowed. If this is not the first use of a key for this + * session, then OEMCrypto shall call ODK_UpdateLastPlaybackTime. See the + * document "License Duration and Renewal" for handling the return value of + * these ODK functions. + * The following checks should be performed if any subsamples contain any + * encrypted bytes. If any check fails, an error is returned, and no + * decryption is performed. + * 1. If the current key's control block has the Data_Path_Type bit set, + * then the API shall verify that the output buffer is secure or direct. + * If not, return OEMCrypto_ERROR_DECRYPT_FAILED. + * 2. If the current key control block has the bit Disable_Analog_Output + * set, then the device should disable analog video output. If the + * device has analog video output that cannot be disabled, then + * OEMCrypto_ERROR_ANALOG_OUTPUT is returned. (See note on delayed + * error conditions below) + * 3. If the current key's control block has the HDCP bit set, then the API + * shall verify that the buffer will be displayed locally, or output + * externally using HDCP only. If not, return + * OEMCrypto_ERROR_INSUFFICIENT_HDCP. (See note on delayed error + * conditions below) + * 4. If the current key's control block has a nonzero value for + * HDCP_Version, then the current version of HDCP for the device and the + * display combined will be compared against the version specified in + * the control block. If the current version is not at least as high as + * that in the control block, and the device is not able to restrict + * displays with HDCP levels lower than what's in the control block, + * return OEMCrypto_ERROR_INSUFFICIENT_HDCP. If the device is able to + * restrict those displays, return + * OEMCrypto_WARNING_MIXED_OUTPUT_PROTECTION. (See note on delayed + * error conditions below) + * 5. If the current session has an entry in the Usage Table, and the + * status of that entry is either kInactiveUsed or kInactiveUnused, then + * return the error OEMCrypto_ERROR_LICENSE_INACTIVE. + * 6. If a Decrypt Hash has been initialized via OEMCrypto_SetDecryptHash, + * and the current key's control block does not have the + * Allow_Hash_Verification bit set, then do not compute a hash and + * return OEMCrypto_ERROR_UNKNOWN_FAILURE. * * Delayed Error Conditions * - * On some devices, the HDCP subsystem is not directly connected to the - * OEMCrypto TA. This means that returning the error - * OEMCrypto_ERROR_INSUFFICIENT_HDCP at the time of the decrypt call is a - * performance hit. However, some devices have the ability to tag output - * buffers with security requirements, such as the required HDCP level. - * For those devices, when a call to OEMCrypto_DecryptCENC is made using a - * key that requires HDCP output, and if the HDCP level on the output does - * not meet the required level. - * - OEMCrypto may tag the output buffer as requiring HDCP at the required - * level and return OEMCrypto_SUCCESS. - * - Output shall not be sent to the display. - * - On the second or third call to OEMCrypto_DecryptCENC with the same - * key, OEMCrypto shall return OEMCrypto_ERROR_INSUFFICIENT_HDCP. - * For those devices, when a call to OEMCrypto_DecryptCENC is made using a - * key that requires HDCP output, and if the HDCP level on some of the - * displays does not meet the required level. - * - OEMCrypto may tag the output buffer as requiring HDCP at the required - * level and return OEMCrypto_SUCCESS. - * - Output shall only be sent to the display with sufficient output - * control, e.g. the local display. - * - On the second or third call to OEMCrypto_DecryptCENC with the same - * key, OEMCrypto shall return OEMCrypto_WARNING_MIXED_OUTPUT_PROTECTION. - * In either case, a call to OEMCrypto_GetHDCPCapability shall return the - * current HDCP level. + * On some devices, the HDCP subsystem is not directly connected to the + * OEMCrypto TA. This means that returning the error + * OEMCrypto_ERROR_INSUFFICIENT_HDCP at the time of the decrypt call is a + * performance hit. However, some devices have the ability to tag output + * buffers with security requirements, such as the required HDCP level. + * For those devices, when a call to OEMCrypto_DecryptCENC is made using a + * key that requires HDCP output, and if the HDCP level on the output does + * not meet the required level. + * - OEMCrypto may tag the output buffer as requiring HDCP at the required + * level and return OEMCrypto_SUCCESS. + * - Output shall not be sent to the display. + * - On the second or third call to OEMCrypto_DecryptCENC with the same + * key, OEMCrypto shall return OEMCrypto_ERROR_INSUFFICIENT_HDCP. + * For those devices, when a call to OEMCrypto_DecryptCENC is made using a + * key that requires HDCP output, and if the HDCP level on some of the + * displays does not meet the required level. + * - OEMCrypto may tag the output buffer as requiring HDCP at the required + * level and return OEMCrypto_SUCCESS. + * - Output shall only be sent to the display with sufficient output + * control, e.g. the local display. + * - On the second or third call to OEMCrypto_DecryptCENC with the same + * key, OEMCrypto shall return OEMCrypto_WARNING_MIXED_OUTPUT_PROTECTION. + * In either case, a call to OEMCrypto_GetHDCPCapability shall return the + * current HDCP level. * - * Parameters: - * [in] session: Crypto session identifier. The crypto session in which - * decrypt is to be performed. - * [in] samples: A caller-owned array of OEMCrypto_SampleDescription - * structures. Each entry in this array contains one sample of the - * content. - * [in] samples_length: The length of the array pointed to by the samples - * parameter. - * [in] pattern: A caller-owned structure indicating the encrypt/skip pattern - * as specified in the ISO-CENC standard. + * @param[in] session: Crypto session identifier. The crypto session in which + * decrypt is to be performed. + * @param[in] samples: A caller-owned array of OEMCrypto_SampleDescription + * structures. Each entry in this array contains one sample of the content. + * @param[in] samples_length: The length of the array pointed to by the samples + * parameter. + * @param[in] pattern: A caller-owned structure indicating the encrypt/skip + * pattern as specified in the ISO-CENC standard. * - * Returns: - * OEMCrypto_SUCCESS - * OEMCrypto_ERROR_NO_DEVICE_KEY - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_INVALID_CONTEXT - * OEMCrypto_ERROR_DECRYPT_FAILED - * OEMCrypto_ERROR_KEY_EXPIRED - * OEMCrypto_ERROR_INSUFFICIENT_HDCP - * OEMCrypto_ERROR_ANALOG_OUTPUT - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_OUTPUT_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_SUCCESS + * @retval OEMCrypto_ERROR_NO_DEVICE_KEY + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_INVALID_CONTEXT + * @retval OEMCrypto_ERROR_DECRYPT_FAILED + * @retval OEMCrypto_ERROR_KEY_EXPIRED + * @retval OEMCrypto_ERROR_INSUFFICIENT_HDCP + * @retval OEMCrypto_ERROR_ANALOG_OUTPUT + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_OUTPUT_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support subsample sizes and total input buffer sizes as * specified by its resource rating tier. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is @@ -2411,14 +2448,14 @@ OEMCryptoResult OEMCrypto_SelectKey(OEMCrypto_SESSION session, * application, which can decide to skip the current frame of video or to * switch to a lower resolution. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. This method changed its name in API * version 11. */ @@ -2428,65 +2465,57 @@ OEMCryptoResult OEMCrypto_DecryptCENC( size_t samples_length, // the number of samples. const OEMCrypto_CENCEncryptPatternDesc* pattern); -/* - * OEMCrypto_CopyBuffer +/** + * Copies the payload in the buffer referenced by the *data parameter into + * the buffer referenced by the out_buffer parameter. The data is simply + * copied. The definition of OEMCrypto_DestBufferDesc and subsample_flags are + * the same as in OEMCrypto_DecryptCENC, above. * - * Description: - * Copies the payload in the buffer referenced by the *data parameter into - * the buffer referenced by the out_buffer parameter. The data is simply - * copied. The definition of OEMCrypto_DestBufferDesc and subsample_flags are - * the same as in OEMCrypto_DecryptCENC, above. + * The main difference between this and DecryptCENC is that this function may be + * used before a license is loaded into a session. In particular, an application + * will use this to copy the clear leader of a video to a secure buffer while + * the license request is being generated, sent to the server, and the response + * is being processed. This functionality is needed because an application may + * not have read or write access to a secure destination buffer. * - * The main difference between this and DecryptCENC is that this function - * does not need an open session, and it may be called concurrently with - * other functions on a multithreaded system. In particular, an application - * will use this to copy the clear leader of a video to a secure buffer while - * the license request is being generated, sent to the server, and the - * response is being processed. This functionality is needed because an - * application may not have read or write access to a secure destination - * buffer. + * NOTES: * - * NOTES: + * This method may be called several times before the data is used. The first + * buffer in a chunk of data will have the OEMCrypto_FirstSubsample bit set + * in subsample_flags. The last buffer in a chunk of data will have the + * OEMCrypto_LastSubsample bit set in subsample_flags. The data will not be + * used until after OEMCrypto_LastSubsample has been set. If an + * implementation copies data immediately, it may ignore subsample_flags. * - * This method may be called several times before the data is used. The first - * buffer in a chunk of data will have the OEMCrypto_FirstSubsample bit set - * in subsample_flags. The last buffer in a chunk of data will have the - * OEMCrypto_LastSubsample bit set in subsample_flags. The data will not be - * used until after OEMCrypto_LastSubsample has been set. If an - * implementation copies data immediately, it may ignore subsample_flags. + * If the destination buffer is secure, an offset may be specified. + * CopyBuffer begins storing data out_buffer->secure.offset bytes after the + * beginning of the secure buffer. * - * If the destination buffer is secure, an offset may be specified. - * CopyBuffer begins storing data out_buffer->secure.offset bytes after the - * beginning of the secure buffer. + * @verification + * The following checks should be performed. + * 1. If either data or out_buffer is null, return + * OEMCrypto_ERROR_INVALID_CONTEXT. * - * Verification: - * The following checks should be performed. - * 1. If either data or out_buffer is null, return - * OEMCrypto_ERROR_INVALID_CONTEXT. + * @param[in] session: crypto session identifier. + * @param[in] data_addr: An unaligned pointer to the buffer to be copied. + * @param[in] data_addr_length: The length of the buffer, in bytes. + * @param[in] out_buffer_descriptor: A caller-owned descriptor that specifies + * the handling of the byte stream. See OEMCrypto_DestbufferDesc for details. + * @param[in] subsample_flags: bitwise flags indicating if this is the first, + * middle, or last subsample in a chunk of data. 1 = first subsample, 2 = + * last subsample, 3 = both first and last subsample, 0 = neither first nor + * last subsample. * - * Parameters: - * [in] session: crypto session identifier. - * [in] data_addr: An unaligned pointer to the buffer to be copied. - * [in] data_addr_length: The length of the buffer, in bytes. - * [in] out_buffer_descriptor: A caller-owned descriptor that specifies the - * handling of the byte stream. See OEMCrypto_DestbufferDesc for - * details. - * [in] subsample_flags: bitwise flags indicating if this is the first, - * middle, or last subsample in a chunk of data. 1 = first subsample, 2 - * = last subsample, 3 = both first and last subsample, 0 = neither - * first nor last subsample. + * @retval OEMCrypto_SUCCESS + * @retval OEMCrypto_ERROR_INVALID_CONTEXT + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_OUTPUT_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS - * OEMCrypto_ERROR_INVALID_CONTEXT - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_OUTPUT_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support subsample sizes and total input buffer sizes as * specified by its resource rating tier. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is @@ -2501,14 +2530,14 @@ OEMCryptoResult OEMCrypto_DecryptCENC( * application, which can decide to skip the current frame of video or to * switch to a lower resolution. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method is changed in API version 15. */ OEMCryptoResult OEMCrypto_CopyBuffer( @@ -2517,19 +2546,16 @@ OEMCryptoResult OEMCrypto_CopyBuffer( const OEMCrypto_DestBufferDesc* out_buffer_descriptor, uint8_t subsample_flags); -/* - * OEMCrypto_Generic_Encrypt +/** + * This function encrypts a generic buffer of data using the current key. * - * Description: - * This function encrypts a generic buffer of data using the current key. + * If the session has an entry in the Usage Table, then OEMCrypto will update + * the time_of_last_decrypt. If the status of the entry is "unused", then + * change the status to "active" and set the time_of_first_decrypt. * - * If the session has an entry in the Usage Table, then OEMCrypto will update - * the time_of_last_decrypt. If the status of the entry is "unused", then - * change the status to "active" and set the time_of_first_decrypt. + * OEMCrypto shall be able to handle buffers at least 100 KiB long. * - * OEMCrypto shall be able to handle buffers at least 100 KiB long. - * - * Verification: + * @verification * The following checks should be performed. If any check fails, an error is * returned, and the data is not encrypted. * 1. The control bit for the current key shall have the Allow_Encrypt set. @@ -2544,43 +2570,41 @@ OEMCryptoResult OEMCrypto_CopyBuffer( * status of that entry is either kInactiveUsed or kInactiveUnused, then * return the error OEMCrypto_ERROR_LICENSE_INACTIVE. * - * Parameters: - * [in] session: crypto session identifier. - * [in] in_buffer: pointer to memory containing data to be encrypted. - * [in] in_buffer_length: length of the buffer, in bytes. The algorithm may - * restrict in_buffer_length to be a multiple of block size. - * [in] iv: IV for encrypting data. Size is 128 bits. - * [in] algorithm: Specifies which encryption algorithm to use. Currently, - * only CBC 128 mode is allowed for encryption. - * [out] out_buffer: pointer to buffer in which encrypted data should be - * stored. + * @param[in] session: crypto session identifier. + * @param[in] in_buffer: pointer to memory containing data to be encrypted. + * @param[in] in_buffer_length: length of the buffer, in bytes. The algorithm + * may restrict in_buffer_length to be a multiple of block size. + * @param[in] iv: IV for encrypting data. Size is 128 bits. + * @param[in] algorithm: Specifies which encryption algorithm to use. + * Currently, only CBC 128 mode is allowed for encryption. + * @param[out] out_buffer: pointer to buffer in which encrypted data should be + * stored. * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_KEY_EXPIRED - * OEMCrypto_ERROR_NO_DEVICE_KEY - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_KEY_EXPIRED + * @retval OEMCrypto_ERROR_NO_DEVICE_KEY + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support buffers sizes of at least 100 KiB for generic * crypto operations. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_Generic_Encrypt( @@ -2588,19 +2612,16 @@ OEMCryptoResult OEMCrypto_Generic_Encrypt( size_t in_buffer_length, const uint8_t* iv, OEMCrypto_Algorithm algorithm, OEMCrypto_SharedMemory* out_buffer); -/* - * OEMCrypto_Generic_Decrypt +/** + * This function decrypts a generic buffer of data using the current key. * - * Description: - * This function decrypts a generic buffer of data using the current key. + * If the session has an entry in the Usage Table, then OEMCrypto will update + * the time_of_last_decrypt. If the status of the entry is "unused", then + * change the status to "active" and set the time_of_first_decrypt. * - * If the session has an entry in the Usage Table, then OEMCrypto will update - * the time_of_last_decrypt. If the status of the entry is "unused", then - * change the status to "active" and set the time_of_first_decrypt. + * OEMCrypto should be able to handle buffers at least 100 KiB long. * - * OEMCrypto should be able to handle buffers at least 100 KiB long. - * - * Verification: + * @verification * The following checks should be performed. If any check fails, an error is * returned, and the data is not decrypted. * 1. The control bit for the current key shall have the Allow_Decrypt set. @@ -2617,44 +2638,42 @@ OEMCryptoResult OEMCrypto_Generic_Encrypt( * status of that entry is either kInactiveUsed or kInactiveUnused, then * return the error OEMCrypto_ERROR_LICENSE_INACTIVE. * - * Parameters: - * [in] session: crypto session identifier. - * [in] in_buffer: pointer to memory containing data to be encrypted. - * [in] in_buffer_length: length of the buffer, in bytes. The algorithm may - * restrict in_buffer_length to be a multiple of block size. - * [in] iv: IV for encrypting data. Size is 128 bits. - * [in] algorithm: Specifies which encryption algorithm to use. Currently, - * only CBC 128 mode is allowed for decryption. - * [out] out_buffer: pointer to buffer in which decrypted data should be - * stored. + * @param[in] session: crypto session identifier. + * @param[in] in_buffer: pointer to memory containing data to be encrypted. + * @param[in] in_buffer_length: length of the buffer, in bytes. The algorithm + * may restrict in_buffer_length to be a multiple of block size. + * @param[in] iv: IV for encrypting data. Size is 128 bits. + * @param[in] algorithm: Specifies which encryption algorithm to use. + * Currently, only CBC 128 mode is allowed for decryption. + * @param[out] out_buffer: pointer to buffer in which decrypted data should be + * stored. * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_KEY_EXPIRED - * OEMCrypto_ERROR_DECRYPT_FAILED - * OEMCrypto_ERROR_NO_DEVICE_KEY - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_KEY_EXPIRED + * @retval OEMCrypto_ERROR_DECRYPT_FAILED + * @retval OEMCrypto_ERROR_NO_DEVICE_KEY + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support buffers sizes of at least 100 KiB for generic * crypto operations. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_Generic_Decrypt( @@ -2662,17 +2681,14 @@ OEMCryptoResult OEMCrypto_Generic_Decrypt( size_t in_buffer_length, const uint8_t* iv, OEMCrypto_Algorithm algorithm, OEMCrypto_SharedMemory* out_buffer); -/* - * OEMCrypto_Generic_Sign +/** + * This function signs a generic buffer of data using the current key. * - * Description: - * This function signs a generic buffer of data using the current key. + * If the session has an entry in the Usage Table, then OEMCrypto will update + * the time_of_last_decrypt. If the status of the entry is "unused", then + * change the status to "active" and set the time_of_first_decrypt. * - * If the session has an entry in the Usage Table, then OEMCrypto will update - * the time_of_last_decrypt. If the status of the entry is "unused", then - * change the status to "active" and set the time_of_first_decrypt. - * - * Verification: + * @verification * The following checks should be performed. If any check fails, an error is * returned, and the data is not signed. * 1. The control bit for the current key shall have the Allow_Sign set. @@ -2686,44 +2702,43 @@ OEMCryptoResult OEMCrypto_Generic_Decrypt( * status of that entry is either kInactiveUsed or kInactiveUnused, then * return the error OEMCrypto_ERROR_LICENSE_INACTIVE. * - * Parameters: - * [in] session: crypto session identifier. - * [in] buffer: pointer to memory containing data to be encrypted. - * [in] buffer_length: length of the buffer, in bytes. - * [in] algorithm: Specifies which algorithm to use. - * [out] signature: pointer to buffer in which signature should be stored. - * May be null on the first call in order to find required buffer size. - * [in/out] signature_length: (in) length of the signature buffer, in bytes. - * (out) actual length of the signature + * @param[in] session: crypto session identifier. + * @param[in] buffer: pointer to memory containing data to be encrypted. + * @param[in] buffer_length: length of the buffer, in bytes. + * @param[in] algorithm: Specifies which algorithm to use. + * @param[out] signature: pointer to buffer in which signature should be + * stored. May be null on the first call in order to find required buffer + * size. + * @param[in,out] signature_length: (in) length of the signature buffer, in + * bytes. (out) actual length of the signature * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_KEY_EXPIRED - * OEMCrypto_ERROR_SHORT_BUFFER if signature buffer is not large enough to - * hold the output signature. - * OEMCrypto_ERROR_NO_DEVICE_KEY - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_KEY_EXPIRED + * @retval OEMCrypto_ERROR_SHORT_BUFFER if signature buffer is not large enough + * to hold the output signature. + * @retval OEMCrypto_ERROR_NO_DEVICE_KEY + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support buffers sizes of at least 100 KiB for generic * crypto operations. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_Generic_Sign(OEMCrypto_SESSION session, @@ -2733,18 +2748,15 @@ OEMCryptoResult OEMCrypto_Generic_Sign(OEMCrypto_SESSION session, OEMCrypto_SharedMemory* signature, size_t* signature_length); -/* - * OEMCrypto_Generic_Verify +/** + * This function verifies the signature of a generic buffer of data using the + * current key. * - * Description: - * This function verifies the signature of a generic buffer of data using the - * current key. + * If the session has an entry in the Usage Table, then OEMCrypto will update + * the time_of_last_decrypt. If the status of the entry is "unused", then + * change the status to "active" and set the time_of_first_decrypt. * - * If the session has an entry in the Usage Table, then OEMCrypto will update - * the time_of_last_decrypt. If the status of the entry is "unused", then - * change the status to "active" and set the time_of_first_decrypt. - * - * Verification: + * @verification * The following checks should be performed. If any check fails, an error is * returned. * 1. The control bit for the current key shall have the Allow_Verify set. @@ -2764,41 +2776,39 @@ OEMCryptoResult OEMCrypto_Generic_Sign(OEMCrypto_SESSION session, * status of that entry is either kInactiveUsed or kInactiveUnused, then * return the error OEMCrypto_ERROR_LICENSE_INACTIVE. * - * Parameters: - * [in] session: crypto session identifier. - * [in] buffer: pointer to memory containing data to be encrypted. - * [in] buffer_length: length of the buffer, in bytes. - * [in] algorithm: Specifies which algorithm to use. - * [in] signature: pointer to buffer in which signature resides. - * [in] signature_length: length of the signature buffer, in bytes. + * @param[in] session: crypto session identifier. + * @param[in] buffer: pointer to memory containing data to be encrypted. + * @param[in] buffer_length: length of the buffer, in bytes. + * @param[in] algorithm: Specifies which algorithm to use. + * @param[in] signature: pointer to buffer in which signature resides. + * @param[in] signature_length: length of the signature buffer, in bytes. * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_KEY_EXPIRED - * OEMCrypto_ERROR_SIGNATURE_FAILURE - * OEMCrypto_ERROR_NO_DEVICE_KEY - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_KEY_EXPIRED + * @retval OEMCrypto_ERROR_SIGNATURE_FAILURE + * @retval OEMCrypto_ERROR_NO_DEVICE_KEY + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support buffers sizes of at least 100 KiB for generic * crypto operations. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_Generic_Verify( @@ -2806,62 +2816,62 @@ OEMCryptoResult OEMCrypto_Generic_Verify( size_t buffer_length, OEMCrypto_Algorithm algorithm, const OEMCrypto_SharedMemory* signature, size_t signature_length); -/* - * OEMCrypto_WrapKeyboxOrOEMCert +/// @} + +/// @addtogroup factory_provision +/// @{ + +/** + * A device should be provisioned at the factory with either an OEM + * Certificate or a keybox. We will call this data the root of trust. During + * manufacturing, the root of trust should be encrypted with the OEM root key + * and stored on the file system in a region that will not be erased during + * factory reset. This function may be used by legacy systems that use the + * two-step WrapKeyboxOrOEMCert/InstallKeyboxOrOEMCert approach. When the + * Widevine DRM plugin initializes, it will look for a wrapped root of trust + * in the file /factory/wv.keys and install it into the security processor by + * calling OEMCrypto_InstallKeyboxOrOEMCert(). * - * Description: - * A device should be provisioned at the factory with either an OEM - * Certificate or a keybox. We will call this data the root of trust. During - * manufacturing, the root of trust should be encrypted with the OEM root key - * and stored on the file system in a region that will not be erased during - * factory reset. This function may be used by legacy systems that use the - * two-step WrapKeyboxOrOEMCert/InstallKeyboxOrOEMCert approach. When the - * Widevine DRM plugin initializes, it will look for a wrapped root of trust - * in the file /factory/wv.keys and install it into the security processor by - * calling OEMCrypto_InstallKeyboxOrOEMCert(). + * Figure 10. OEMCrypto_WrapKeyboxOrOEMCert Operation * - * Figure 10. OEMCrypto_WrapKeyboxOrOEMCert Operation + * OEMCrypto_WrapKeyboxOrOEMCert() is used to generate an OEM-encrypted root + * of trust that may be passed to OEMCrypto_InstallKeyboxOrOEMCert() for + * provisioning. The root of trust may be either passed in the clear or + * previously encrypted with a transport key. If a transport key is supplied, + * the keybox is first decrypted with the transport key before being wrapped + * with the OEM root key. This function is only needed if the root of trust + * provisioning method involves saving the keybox or OEM Certificate to the + * file system. * - * OEMCrypto_WrapKeyboxOrOEMCert() is used to generate an OEM-encrypted root - * of trust that may be passed to OEMCrypto_InstallKeyboxOrOEMCert() for - * provisioning. The root of trust may be either passed in the clear or - * previously encrypted with a transport key. If a transport key is supplied, - * the keybox is first decrypted with the transport key before being wrapped - * with the OEM root key. This function is only needed if the root of trust - * provisioning method involves saving the keybox or OEM Certificate to the - * file system. + * @param[in] keybox_or_cert: pointer to root of trust data to encrypt -- this + * is either a keybox or an OEM Certificate private key. May be NULL on the + * first call to test the size of the wrapped keybox. The keybox may either + * be clear or previously encrypted. + * @param[in] keybox_or_cert_length: length the keybox or cert data in bytes + * @param[out] wrapped_keybox_or_cert: Pointer to wrapped keybox or cert + * @param[in,out] wrapped_keybox_or_cert_length: Pointer to the length of the + * wrapped keybox or certificate key in bytes + * @param[in] transport_key: Optional. AES transport key. If provided, the + * keybox_or_cert parameter was previously encrypted with this key. The + * keybox will be decrypted with the transport key using AES-CBC and a null + * IV. + * @param[in] transport_key_length: Optional. Number of bytes in the + * transport_key, if used. * - * Parameters: - * [in] keybox_or_cert - pointer to root of trust data to encrypt -- this is - * either a keybox or an OEM Certificate private key. May be NULL on - * the first call to test size of wrapped keybox. The keybox may either - * be clear or previously encrypted. - * [in] keybox_or_cert_length - length the keybox or cert data in bytes - * [out] wrapped_keybox_or_cert – Pointer to wrapped keybox or cert - * [out] wrapped_keybox_or_cert_length – Pointer to the length of the wrapped - * keybox or certificate key in bytes - * [in] transport_key – Optional. AES transport key. If provided, the - * keybox_or_cert parameter was previously encrypted with this key. The - * keybox will be decrypted with the transport key using AES-CBC and a - * null IV. - * [in] transport_key_length – Optional. Number of bytes in the - * transport_key, if used. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_WRITE_KEYBOX failed to encrypt the keybox + * @retval OEMCrypto_ERROR_SHORT_BUFFER if keybox is provided as NULL, to + * determine the size of the wrapped keybox + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_WRITE_KEYBOX failed to encrypt the keybox - * OEMCrypto_ERROR_SHORT_BUFFER if keybox is provided as NULL, to determine - * the size of the wrapped keybox - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_NOT_IMPLEMENTED - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is an "Initialization and Termination Function" and will not be * called simultaneously with any other function, as if the CDM holds a write * lock on the OEMCrypto system. * - * Version: + * @version * This method is supported in all API versions. */ OEMCryptoResult OEMCrypto_WrapKeyboxOrOEMCert( @@ -2869,714 +2879,606 @@ OEMCryptoResult OEMCrypto_WrapKeyboxOrOEMCert( uint8_t* wrapped_keybox_or_cert, size_t* wrapped_keybox_or_cert_length, const uint8_t* transport_key, size_t transport_key_length); -/* - * OEMCrypto_InstallKeyboxOrOEMCert +/** + * Decrypts a wrapped root of trust and installs it in the security + * processor. The root of trust is unwrapped then encrypted with the OEM root + * key. This function is called from the Widevine DRM plugin at + * initialization time if there is no valid root of trust installed. It looks + * for wrapped data in the file /factory/wv.keys and if it is present, will + * read the file and call OEMCrypto_InstallKeyboxOrOEMCert() with the + * contents of the file. This function is only needed if the factory + * provisioning method involves saving the keybox or OEM Certificate to the + * file system. * - * Description: - * Decrypts a wrapped root of trust and installs it in the security - * processor. The root of trust is unwrapped then encrypted with the OEM root - * key. This function is called from the Widevine DRM plugin at - * initialization time if there is no valid root of trust installed. It looks - * for wrapped data in the file /factory/wv.keys and if it is present, will - * read the file and call OEMCrypto_InstallKeyboxOrOEMCert() with the - * contents of the file. This function is only needed if the factory - * provisioning method involves saving the keybox or OEM Certificate to the - * file system. + * @param[in] keybox_or_cert: pointer to encrypted data as input + * @param[in] keybox_or_cert_length: length of the data in bytes * - * Parameters: - * [in] keybox_or_cert - pointer to encrypted data as input - * [in] keybox_or_cert_length - length of the data in bytes + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_BAD_MAGIC + * @retval OEMCrypto_ERROR_BAD_CRC + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_BAD_MAGIC - * OEMCrypto_ERROR_BAD_CRC - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_NOT_IMPLEMENTED - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is an "Initialization and Termination Function" and will not be * called simultaneously with any other function, as if the CDM holds a write * lock on the OEMCrypto system. * - * Version: + * @version * This method is supported in all API versions. */ OEMCryptoResult OEMCrypto_InstallKeyboxOrOEMCert(const uint8_t* keybox_or_cert, size_t keybox_or_cert_length); -/* - * OEMCrypto_GetProvisioningMethod +/** + * This function is for OEMCrypto to tell the layer above what provisioning + * method it uses: keybox or OEM certificate. * - * Description: - * This function is for OEMCrypto to tell the layer above what provisioning - * method it uses: keybox or OEM certificate. + * @retval OEMCrypto_DrmCertificate means the device has a DRM certificate built + * into the system. This cannot be used by level 1 devices. This + * provisioning method is deprecated and should not be used on new + * devices. OEMCertificate provisioning should be used instead. + * @retval OEMCrypto_Keybox means the device has a unique keybox. For level 1 + * devices this keybox must be securely installed by the device + * manufacturer. + * @retval OEMCrypto_OEMCertificate means the device has a factory installed OEM + * certificate. This is also called Provisioning 3.0. + * @retval OEMCrypto_ProvisioningError indicates a serious problem with the + * OEMCrypto library. * - * Parameters: - * none - * - * Returns: - * - DrmCertificate means the device has a DRM certificate built into the - * system. This cannot be used by level 1 devices. This provisioning - * method is deprecated and should not be used on new devices. - * OEMCertificate provisioning should be used instead. - * - Keybox means the device has a unique keybox. For level 1 devices this - * keybox must be securely installed by the device manufacturer. - * - OEMCertificate means the device has a factory installed OEM - * certificate. This is also called Provisioning 3.0. - * - ProvisioningError indicates a serious problem with the OEMCrypto - * library. - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method is new API version 12. */ OEMCrypto_ProvisioningMethod OEMCrypto_GetProvisioningMethod(void); -/* - * OEMCrypto_IsKeyboxOrOEMCertValid +/** + * If the device has a keybox, this validates the Widevine Keybox loaded into + * the security processor device. This method verifies two fields in the + * keybox: * - * Description: - * If the device has a keybox, this validates the Widevine Keybox loaded into - * the security processor device. This method verifies two fields in the - * keybox: + * - Verify the MAGIC field contains a valid signature (such as, + * 'k''b''o''x'). + * - Compute the CRC using CRC-32-POSIX-1003.2 standard and compare the + * checksum to the CRC stored in the Keybox. + * The CRC is computed over the entire Keybox excluding the 4 bytes of the + * CRC (for example, Keybox[0..123]). For a description of the fields stored + * in the keybox, see Keybox Definition. * - * - Verify the MAGIC field contains a valid signature (such as, - * 'k''b''o''x'). - * - Compute the CRC using CRC-32-POSIX-1003.2 standard and compare the - * checksum to the CRC stored in the Keybox. - * The CRC is computed over the entire Keybox excluding the 4 bytes of the - * CRC (for example, Keybox[0..123]). For a description of the fields stored - * in the keybox, see Keybox Definition. + * If the device has an OEM Certificate, this validates the certificate + * private key. * - * If the device has an OEM Certificate, this validates the certificate - * private key. + * @retval OEMCrypto_SUCCESS + * @retval OEMCrypto_ERROR_BAD_MAGIC + * @retval OEMCrypto_ERROR_BAD_CRC + * @retval OEMCrypto_ERROR_KEYBOX_INVALID + * @retval OEMCrypto_ERROR_INVALID_RSA_KEY + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Parameters: - * none - * - * Returns: - * OEMCrypto_SUCCESS - * OEMCrypto_ERROR_BAD_MAGIC - * OEMCrypto_ERROR_BAD_CRC - * OEMCrypto_ERROR_KEYBOX_INVALID - * OEMCrypto_ERROR_INVALID_RSA_KEY - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method is supported in all API versions. */ OEMCryptoResult OEMCrypto_IsKeyboxOrOEMCertValid(void); -/* - * OEMCrypto_GetDeviceID +/** + * Return a device unique id. For devices with a keybox, retrieve the + * DeviceID from the Keybox. For devices that have an OEM Certificate instead + * of a keybox, it should set the device ID to a device-unique string, such + * as the device serial number. The ID should be device-unique and it should + * be stable -- i.e. it should not change across a device reboot or a system + * upgrade. This shall match the device id found in the core provisioning + * request message. The maximum length of the device id is 64 bytes. The + * device ID field in a keybox is 32 bytes. * - * Description: - * Return a device unique id. For devices with a keybox, retrieve the - * DeviceID from the Keybox. For devices that have an OEM Certificate instead - * of a keybox, it should set the device ID to a device-unique string, such - * as the device serial number. The ID should be device-unique and it should - * be stable -- i.e. it should not change across a device reboot or a system - * upgrade. This shall match the device id found in the core provisioning - * request message. The maximum length of the device id is 64 bytes. The - * device ID field in a keybox is 32 bytes. + * @param[out] device_id: pointer to the buffer that receives the Device ID. + * @param[in,out] device_id_length - on input, size of the caller's device ID + * buffer. On output, the number of bytes written into the buffer. * - * Parameters: - * [out] device_id - pointer to the buffer that receives the Device ID. - * [in/out] device_id_length – on input, size of the caller's device ID - * buffer. On output, the number of bytes written into the buffer. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_SHORT_BUFFER if the buffer is too small to return + * device ID + * @retval OEMCrypto_ERROR_NO_DEVICEID failed to return Device Id + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_SHORT_BUFFER if the buffer is too small to return device ID - * OEMCrypto_ERROR_NO_DEVICEID failed to return Device Id - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method is supported in all API versions. */ OEMCryptoResult OEMCrypto_GetDeviceID(uint8_t* device_id, size_t* device_id_length); -/* - * OEMCrypto_GetKeyData +/// @} + +/// @addtogroup keybox +/// @{ + +/** + * Return the Key Data field from the Keybox. * - * Description: - * Return the Key Data field from the Keybox. + * @param[out] key_data: pointer to the buffer to hold the Key Data field from + * the Keybox + * @param[in,out] key_data_length: on input, the allocated buffer size. On + * output, the number of bytes in Key Data * - * Parameters: - * [out] keyData - pointer to the buffer to hold the Key Data field from the - * Keybox - * [in/out] keyDataLength – on input, the allocated buffer size. On output, - * the number of bytes in Key Data + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_SHORT_BUFFER if the buffer is too small to return + * KeyData + * @retval OEMCrypto_ERROR_NO_KEYDATA + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED: this function is for + * Provisioning 2.0 only. + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_SHORT_BUFFER if the buffer is too small to return KeyData - * OEMCrypto_ERROR_NO_KEYDATA - * OEMCrypto_ERROR_NOT_IMPLEMENTED - this function is for Provisioning 2.0 - * only. - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method is supported in all API versions. */ OEMCryptoResult OEMCrypto_GetKeyData(uint8_t* key_data, size_t* key_data_length); -/* - * OEMCrypto_LoadTestKeybox +/** + * Temporarily use the specified test keybox until the next call to + * OEMCrypto_Terminate. This allows a standard suite of unit tests to be run + * on a production device without permanently changing the keybox. Using the + * test keybox is not persistent. OEMCrypto cannot assume that this keybox is + * the same as previous keyboxes used for testing. * - * Description: - * Temporarily use the specified test keybox until the next call to - * OEMCrypto_Terminate. This allows a standard suite of unit tests to be run - * on a production device without permanently changing the keybox. Using the - * test keybox is not persistent. OEMCrypto cannot assume that this keybox is - * the same as previous keyboxes used for testing. + * Devices that use an OEM Certificate instead of a keybox (i.e. Provisioning + * 3.0) do not need to support this functionality, and may return + * OEMCrypto_ERROR_NOT_IMPLEMENTED. * - * Devices that use an OEM Certificate instead of a keybox (i.e. Provisioning - * 3.0) do not need to support this functionality, and may return - * OEMCrypto_ERROR_NOT_IMPLEMENTED. + * @param[in] buffer: pointer to memory containing test keybox, in binary form. + * @param[in] buffer_length: length of the buffer, in bytes. * - * Parameters: - * [in] buffer: pointer to memory containing test keybox, in binary form. - * [in] buffer_length: length of the buffer, in bytes. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED this function is for + * Provisioning 2.0 only. + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_NOT_IMPLEMENTED - this function is for Provisioning 2.0 - * only. - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is an "Initialization and Termination Function" and will not be * called simultaneously with any other function, as if the CDM holds a write * lock on the OEMCrypto system. It is called after OEMCrypto_Initialize and * after OEMCrypto_GetProvisioningMethod and only if the provisoining method * is OEMCrypto_Keybox, * - * Version: + * @version * This method changed in API version 14. */ OEMCryptoResult OEMCrypto_LoadTestKeybox(const uint8_t* buffer, size_t buffer_length); -/* - * OEMCrypto_LoadOEMPrivateKey +/// @} + +/// @addtogroup oem_cert +/// @{ +/** + * After a call to this function, all session functions using an RSA key + * should use the OEM certificate's private RSA key. See the section above + * discussing Provisioning 3.0. * - * Description: - * After a call to this function, all session functions using an RSA key - * should use the OEM certificate's private RSA key. See the section above - * discussing Provisioning 3.0. + * @param[in] session: this function affects the specified session only. * - * Parameters: - * - [in] session: this function affects the specified session only. + * @retval OEMCrypto_SUCCESS + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED this function is for + * Provisioning 3.0 only. + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS - * OEMCrypto_ERROR_NOT_IMPLEMENTED - this function is for Provisioning 3.0 - * only. - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method is new API version 16. */ OEMCryptoResult OEMCrypto_LoadOEMPrivateKey(OEMCrypto_SESSION session); -/* - * OEMCrypto_GetOEMPublicCertificate +/** + * This function should place the OEM public certificate in the buffer + * public_cert. See the section above discussing Provisioning 3.0. * - * Description: - * This function should place the OEM public certificate in the buffer - * public_cert. See the section above discussing Provisioning 3.0. + * If the buffer is not large enough, OEMCrypto should update + * public_cert_length and return OEMCrypto_ERROR_SHORT_BUFFER. * - * If the buffer is not large enough, OEMCrypto should update - * public_cert_length and return OEMCrypto_ERROR_SHORT_BUFFER. + * @param[out] public_cert: the buffer where the public certificate is stored. + * @param[in,out] public_cert_length: on input, this is the available size of + * the buffer. On output, this is the number of bytes needed for the + * certificate. * - * Parameters: - * - [out] public_cert: the buffer where the public certificate is stored. - * - [in/out] public_cert_length: on input, this is the available size of - * the buffer. On output, this is the number of bytes needed for the - * certificate. + * @retval OEMCrypto_SUCCESS + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED this function is for + * Provisioning 3.0 only. + * @retval OEMCrypto_ERROR_SHORT_BUFFER + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS - * OEMCrypto_ERROR_NOT_IMPLEMENTED - this function is for Provisioning 3.0 - * only. - * OEMCrypto_ERROR_SHORT_BUFFER - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method is new API version 16. */ OEMCryptoResult OEMCrypto_GetOEMPublicCertificate(uint8_t* public_cert, size_t* public_cert_length); -/* - * OEMCrypto_GetRandom +/// @} + +/// @addtogroup validation +/// @{ + +/** + * Returns a buffer filled with hardware-generated random bytes, if supported + * by the hardware. If the hardware feature does not exist, return + * OEMCrypto_ERROR_RNG_NOT_SUPPORTED. * - * Description: - * Returns a buffer filled with hardware-generated random bytes, if supported - * by the hardware. If the hardware feature does not exist, return - * OEMCrypto_ERROR_RNG_NOT_SUPPORTED. + * @param[out] random_data: pointer to the buffer that receives random data + * @param[in] random_data_length: length of the random data buffer in bytes * - * Parameters: - * [out] random_data- pointer to the buffer that receives random data - * [in] random_data_length- length of the random data buffer in bytes + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_RNG_FAILED failed to generate random number + * @retval OEMCrypto_ERROR_RNG_NOT_SUPPORTED function not supported + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_RNG_FAILED failed to generate random number - * OEMCrypto_ERROR_RNG_NOT_SUPPORTED function not supported - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Buffer Sizes: - * OEMCrypto shall support random_data_length- sizes of at least 32 bytes + * @buffer_size + * OEMCrypto shall support random_data_length sizes of at least 32 bytes * for random number generation. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method is supported in all API versions. */ OEMCryptoResult OEMCrypto_GetRandom(uint8_t* random_data, size_t random_data_length); -/* - * OEMCrypto_APIVersion +/** + * This function returns the current API version number. The version number + * allows the calling application to avoid version mis-match errors, because + * this API is part of a shared library. * - * Description: - * This function returns the current API version number. The version number - * allows the calling application to avoid version mis-match errors, because - * this API is part of a shared library. + * There is a possibility that some API methods will be backwards compatible, + * or backwards compatible at a reduced security level. * - * There is a possibility that some API methods will be backwards compatible, - * or backwards compatible at a reduced security level. + * There is no plan to introduce forward-compatibility. Applications will + * reject a library with a newer version of the API. * - * There is no plan to introduce forward-compatibility. Applications will - * reject a library with a newer version of the API. + * The version specified in this document is 16. Any OEM that returns this + * version number guarantees it passes all unit tests associated with this + * version. * - * The version specified in this document is 16. Any OEM that returns this - * version number guarantees it passes all unit tests associated with this - * version. + * @retval The supported API, as specified in the header file OEMCryptoCENC.h. * - * Parameters: - * none - * - * Returns: - * The supported API, as specified in the header file OEMCryptoCENC.h. - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in each API version. */ uint32_t OEMCrypto_APIVersion(void); -/* - * OEMCrypto_MinorAPIVersion +/** + * This function returns the current API minor version number. The version + * number allows the calling application to avoid version mis-match errors, + * because this API is part of a shared library. * - * Description: - * This function returns the current API minor version number. The version - * number allows the calling application to avoid version mis-match errors, - * because this API is part of a shared library. + * The minor version specified in this document is 2. Any OEM that returns + * this version number guarantees it passes all unit tests associated with + * this version. * - * The minor version specified in this document is 2. Any OEM that returns - * this version number guarantees it passes all unit tests associated with - * this version. + * @retval The supported API, as specified in the header file OEMCryptoCENC.h. * - * Parameters: - * none - * - * Returns: - * The supported API, as specified in the header file OEMCryptoCENC.h. - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in each API version. */ uint32_t OEMCrypto_MinorAPIVersion(void); -/* - * OEMCrypto_BuildInformation +/** + * Report the build information of the OEMCrypto library as a short null + * terminated C string. The string should be at most 128 characters long. + * This string should be updated with each release or OEMCrypto build. * - * Description: - * Report the build information of the OEMCrypto library as a short null - * terminated C string. The string should be at most 128 characters long. - * This string should be updated with each release or OEMCrypto build. + * Some SOC vendors deliver a binary OEMCrypto library to a device + * manufacturer. This means the OEMCrypto version may not be exactly in sync + * with the system's versions. This string can be used to help track which + * version is installed on a device. * - * Some SOC vendors deliver a binary OEMCrypto library to a device - * manufacturer. This means the OEMCrypto version may not be exactly in sync - * with the system's versions. This string can be used to help track which - * version is installed on a device. + * It may be used for logging or bug tracking and may be bubbled up to the + * app so that it may track metrics on errors. * - * It may be used for logging or bug tracking and may be bubbled up to the - * app so that it may track metrics on errors. + * Since the OEMCrypto API also changes its minor version number when there + * are minor corrections, it would be useful to include the API version + * number in this string, e.g. "15.1" or "15.2" if those minor versions are + * released. * - * Since the OEMCrypto API also changes its minor version number when there - * are minor corrections, it would be useful to include the API version - * number in this string, e.g. "15.1" or "15.2" if those minor versions are - * released. + * @retval A printable null terminated C string, suitable for a single line in a + * log. * - * Parameters: - * none - * - * Returns: - * A printable null terminated C string, suitable for a single line in a log. - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in each API version. */ const char* OEMCrypto_BuildInformation(void); -/* - * OEMCrypto_Security_Patch_Level +/** + * This function returns the current patch level of the software running in + * the trusted environment. The patch level is defined by the OEM, and is + * only incremented when a security update has been added. * - * Description: - * This function returns the current patch level of the software running in - * the trusted environment. The patch level is defined by the OEM, and is - * only incremented when a security update has been added. + * See the section Security Patch Level above for more details. * - * See the section Security Patch Level above for more details. + * @retval The OEM defined version number. * - * Parameters: - * none - * - * Returns: - * The OEM defined version number. - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method was introduced in API version 11. */ uint8_t OEMCrypto_Security_Patch_Level(void); -/* - * OEMCrypto_SecurityLevel +/** + * Returns a string specifying the security level of the library. * - * Description: - * Returns a string specifying the security level of the library. + * Since this function is spoofable, it is not relied on for security + * purposes. It is for information only. * - * Since this function is spoofable, it is not relied on for security - * purposes. It is for information only. + * @retval A null terminated string. Useful value are "L1", "L2" and "L3". * - * Parameters: - * none - * - * Returns: - * A null terminated string. Useful value are "L1", "L2" and "L3". - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in API version 6. */ const char* OEMCrypto_SecurityLevel(void); -/* - * OEMCrypto_GetHDCPCapability +/** + * Returns the maximum HDCP version supported by the device, and the HDCP + * version supported by the device and any connected display. * - * Description: - * Returns the maximum HDCP version supported by the device, and the HDCP - * version supported by the device and any connected display. + * Valid values for HDCP_Capability are: * - * Valid values for HDCP_Capability are: + * The value 0xFF means the device is using a local, secure, data path + * instead of HDMI output. Notice that HDCP must use flag Type 1: all + * downstream devices will also use the same version or higher. * - * The value 0xFF means the device is using a local, secure, data path - * instead of HDMI output. Notice that HDCP must use flag Type 1: all - * downstream devices will also use the same version or higher. + * The maximum HDCP level should be the maximum value that the device can + * enforce. For example, if the device has an HDCP 1.0 port and an HDCP 2.0 + * port, and the first port can be disabled, then the maximum is HDCP 2.0. If + * the first port cannot be disabled, then the maximum is HDCP 1.0. The + * maximum value can be used by the application or server to decide if a + * license may be used in the future. For example, a device may be connected + * to an external display while an offline license is downloaded, but the + * user intends to view the content on a local display. The user will want to + * download the higher quality content. * - * The maximum HDCP level should be the maximum value that the device can - * enforce. For example, if the device has an HDCP 1.0 port and an HDCP 2.0 - * port, and the first port can be disabled, then the maximum is HDCP 2.0. If - * the first port cannot be disabled, then the maximum is HDCP 1.0. The - * maximum value can be used by the application or server to decide if a - * license may be used in the future. For example, a device may be connected - * to an external display while an offline license is downloaded, but the - * user intends to view the content on a local display. The user will want to - * download the higher quality content. + * The current HDCP level should be the level of HDCP currently negotiated + * with any connected receivers or repeaters either through HDMI or a + * supported wireless format. If multiple ports are connected, the current + * level should be the minimum HDCP level of all ports. If the key control + * block requires an HDCP level equal to or lower than the current HDCP + * level, the key is expected to be usable. If the key control block requires + * a higher HDCP level, the key is expected to be forbidden. * - * The current HDCP level should be the level of HDCP currently negotiated - * with any connected receivers or repeaters either through HDMI or a - * supported wireless format. If multiple ports are connected, the current - * level should be the minimum HDCP level of all ports. If the key control - * block requires an HDCP level equal to or lower than the current HDCP - * level, the key is expected to be usable. If the key control block requires - * a higher HDCP level, the key is expected to be forbidden. + * When a key has version HDCP_V2_3 required in the key control block, the + * transmitter must have HDCP version 2.3 and have negotiated a connection + * with a version 2.2 or 2.3 receiver or repeater. The transmitter must + * configure the content stream to be Type 1. Since the transmitter cannot + * distinguish between 2.2 and 2.3 downstream receivers when connected to a + * repeater, it may transmit to both 2.2 and 2.3 receivers, but not 2.1 + * receivers. * - * When a key has version HDCP_V2_3 required in the key control block, the - * transmitter must have HDCP version 2.3 and have negotiated a connection - * with a version 2.2 or 2.3 receiver or repeater. The transmitter must - * configure the content stream to be Type 1. Since the transmitter cannot - * distinguish between 2.2 and 2.3 downstream receivers when connected to a - * repeater, it may transmit to both 2.2 and 2.3 receivers, but not 2.1 - * receivers. + * For example, if the transmitter is 2.3, and is connected to a receiver + * that supports 2.3 then the current level is HDCP_V2_3. If the transmitter + * is 2.3 and is connected to a 2.3 repeater, the current level is HDCP_V2_3 + * even though the repeater can negotiate a connection with a 2.2 downstream + * receiver for a Type 1 Content Stream. * - * For example, if the transmitter is 2.3, and is connected to a receiver - * that supports 2.3 then the current level is HDCP_V2_3. If the transmitter - * is 2.3 and is connected to a 2.3 repeater, the current level is HDCP_V2_3 - * even though the repeater can negotiate a connection with a 2.2 downstream - * receiver for a Type 1 Content Stream. + * As another example, if the transmitter can support 2.3, but a receiver + * supports 2.0, then the current level is HDCP_V2. * - * As another example, if the transmitter can support 2.3, but a receiver - * supports 2.0, then the current level is HDCP_V2. + * When a license requires HDCP, a device may use a wireless protocol to + * connect to a display only if that protocol supports the version of HDCP as + * required by the license. Both WirelessHD (formerly WiFi Display) and + * Miracast support HDCP. * - * When a license requires HDCP, a device may use a wireless protocol to - * connect to a display only if that protocol supports the version of HDCP as - * required by the license. Both WirelessHD (formerly WiFi Display) and - * Miracast support HDCP. + * @param[out] current: this is the current HDCP version, based on the device + * itself, and the display to which it is connected. + * @param[out] maximum: this is the maximum supported HDCP version for the + * device, ignoring any attached device. * - * Parameters: - * [out] current - this is the current HDCP version, based on the device - * itself, and the display to which it is connected. - * [out] maximum - this is the maximum supported HDCP version for the device, - * ignoring any attached device. + * @retval OEMCrypto_SUCCESS + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in API version 10. */ OEMCryptoResult OEMCrypto_GetHDCPCapability(OEMCrypto_HDCP_Capability* current, OEMCrypto_HDCP_Capability* maximum); -/* - * OEMCrypto_SupportsUsageTable +/** + * This is used to determine if the device can support a usage table. Since + * this function is spoofable, it is not relied on for security purposes. It + * is for information only. The usage table is described in the section above. * - * Description: - * This is used to determine if the device can support a usage table. Since - * this function is spoofable, it is not relied on for security purposes. It - * is for information only. The usage table is described in the section above. - * - * Parameters: - * none - * - * Returns: - * Returns true if the device can maintain a usage table. Returns false + * @retval Returns true if the device can maintain a usage table. Returns false * otherwise. * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in API version 9. */ bool OEMCrypto_SupportsUsageTable(void); -/* - * OEMCrypto_MaximumUsageTableHeaderSize +/** + * Estimates the maximum usage table size. If the device does not have a + * fixed size, this returns an estimate. A maximum size of 0 means the header + * is constrained only by dynamic memory allocation. * - * Description: - * Estimates the maximum usage table size. If the device does not have a - * fixed size, this returns an estimate. A maximum size of 0 means the header - * is constrained only by dynamic memory allocation. + * Widevine requires the size to be at least 300 entries. * - * Widevine requires the size to be at least 300 entries. + * @retval Returns an estimate for the maximum size of the usage table header. * - * Parameters: - * none - * - * Returns: - * Returns an estimate for the maximum size of the usage table header. - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in API version 16. */ size_t OEMCrypto_MaximumUsageTableHeaderSize(void); -/* - * OEMCrypto_IsAntiRollbackHwPresent +/** + * Indicate whether there is hardware protection to detect and/or prevent the + * rollback of the usage table. For example, if the usage table contents is + * stored entirely on a secure file system that the user cannot read or write + * to. Another example is if the usage table has a generation number and the + * generation number is stored in secure memory that is not user accessible. * - * Description: - * Indicate whether there is hardware protection to detect and/or prevent the - * rollback of the usage table. For example, if the usage table contents is - * stored entirely on a secure file system that the user cannot read or write - * to. Another example is if the usage table has a generation number and the - * generation number is stored in secure memory that is not user accessible. - * - * Parameters: - * none - * - * Returns: - * Returns true if oemcrypto uses anti-rollback hardware. Returns false + * @retval Returns true if oemcrypto uses anti-rollback hardware. Returns false * otherwise. * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method is new in API version 10. */ bool OEMCrypto_IsAntiRollbackHwPresent(void); -/* - * OEMCrypto_GetNumberOfOpenSessions +/** + * Returns the current number of open sessions. The CDM and OEMCrypto + * consumers can query this value so they can use resources more effectively. * - * Description: - * Returns the current number of open sessions. The CDM and OEMCrypto - * consumers can query this value so they can use resources more effectively. + * @param[out] count: this is the current number of opened sessions. * - * Parameters: - * [out] count - this is the current number of opened sessions. + * @retval OEMCrypto_SUCCESS + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method is new in API version 10. */ OEMCryptoResult OEMCrypto_GetNumberOfOpenSessions(size_t* count); -/* - * OEMCrypto_GetMaxNumberOfSessions +/** + * Returns the maximum number of concurrent OEMCrypto sessions supported by + * the device. The CDM and OEMCrypto consumers can query this value so they + * can use resources more effectively. If the maximum number of sessions + * depends on a dynamically allocated shared resource, the returned value + * should be a best estimate of the maximum number of sessions. * - * Description: - * Returns the maximum number of concurrent OEMCrypto sessions supported by - * the device. The CDM and OEMCrypto consumers can query this value so they - * can use resources more effectively. If the maximum number of sessions - * depends on a dynamically allocated shared resource, the returned value - * should be a best estimate of the maximum number of sessions. + * OEMCrypto shall support a minimum of 10 sessions. Some applications use + * multiple sessions to pre-fetch licenses, so high end devices should + * support more sessions -- we recommend a minimum of 50 sessions. * - * OEMCrypto shall support a minimum of 10 sessions. Some applications use - * multiple sessions to pre-fetch licenses, so high end devices should - * support more sessions -- we recommend a minimum of 50 sessions. + * @param[out] max: this is the max number of supported sessions. * - * Parameters: - * [out] max - this is the max number of supported sessions. + * @retval OEMCrypto_SUCCESS + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in API version 12. */ OEMCryptoResult OEMCrypto_GetMaxNumberOfSessions(size_t* max); -/* - * OEMCrypto_SupportedCertificates +/** + * Returns the type of certificates keys that this device supports. With very + * few exceptions, all devices should support at least 2048 bit RSA keys. + * High end devices should also support 3072 bit RSA keys. Devices that are + * cast receivers should also support RSA cast receiver certificates. * - * Description: - * Returns the type of certificates keys that this device supports. With very - * few exceptions, all devices should support at least 2048 bit RSA keys. - * High end devices should also support 3072 bit RSA keys. Devices that are - * cast receivers should also support RSA cast receiver certificates. + * Beginning with OEMCrypto v14, the provisioning server may deliver to the + * device an RSA key that uses the Carmichael totient. This does not change + * the RSA algorithm -- however the product of the private and public keys is + * not necessarily the Euler number \phi (n). OEMCrypto should not reject + * such keys. * - * Beginning with OEMCrypto v14, the provisioning server may deliver to the - * device an RSA key that uses the Carmichael totient. This does not change - * the RSA algorithm -- however the product of the private and public keys is - * not necessarily the Euler number \phi (n). OEMCrypto should not reject - * such keys. - * - * Parameters: - * none - * - * Returns: + * @return * Returns the bitwise or of the following flags. It is likely that high end * devices will support both 2048 and 3072 bit keys while the widevine * servers transition to new key sizes. @@ -3592,367 +3494,343 @@ OEMCryptoResult OEMCrypto_GetMaxNumberOfSessions(size_t* max); * - 0x200 = OEMCrypto_Supports_ECC_secp384r1 - Elliptic Curve secp384r1 * - 0x400 = OEMCrypto_Supports_ECC_secp521r1 - Elliptic Curve secp521r1 * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in API version 16. */ uint32_t OEMCrypto_SupportedCertificates(void); -/* - * OEMCrypto_IsSRMUpdateSupported +/** + * Returns true if the device supports SRM files and the file can be updated + * via the function OEMCrypto_LoadSRM. This also returns false for devices + * that do not support an SRM file, devices that do not support HDCP, and + * devices that have no external display support. * - * Description: - * Returns true if the device supports SRM files and the file can be updated - * via the function OEMCrypto_LoadSRM. This also returns false for devices - * that do not support an SRM file, devices that do not support HDCP, and - * devices that have no external display support. + * @retval true if LoadSRM is supported. + * @retval false otherwise. * - * Parameters: - * none - * - * Returns: - * true - if LoadSRM is supported. - * false - otherwise. - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in API version 13. */ bool OEMCrypto_IsSRMUpdateSupported(void); -/* - * OEMCrypto_GetCurrentSRMVersion +/** + * Returns the version number of the current SRM file. If the device does not + * support SRM files, this will return OEMCrypto_ERROR_NOT_IMPLEMENTED. If + * the device only supports local displays, it would return + * OEMCrypto_LOCAL_DISPLAY_ONLY. If the device has an SRM, but cannot use + * OEMCrypto to update the SRM, then this function would set version to be + * the current version number, and return OEMCrypto_SUCCESS, but it would + * return false from OEMCrypto_IsSRMUpdateSupported. * - * Description: - * Returns the version number of the current SRM file. If the device does not - * support SRM files, this will return OEMCrypto_ERROR_NOT_IMPLEMENTED. If - * the device only supports local displays, it would return - * OEMCrypto_LOCAL_DISPLAY_ONLY. If the device has an SRM, but cannot use - * OEMCrypto to update the SRM, then this function would set version to be - * the current version number, and return OEMCrypto_SUCCESS, but it would - * return false from OEMCrypto_IsSRMUpdateSupported. + * @param[out] version: current SRM version number. * - * Parameters: - * [out] version: current SRM version number. + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_SUCCESS + * @retval OEMCrypto_LOCAL_DISPLAY_ONLY to indicate version was not set, and + * is not needed. + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_ERROR_NOT_IMPLEMENTED - * OEMCrypto_SUCCESS - * OEMCrypto_LOCAL_DISPLAY_ONLY - to indicate version was not set, and is not - * needed. - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in API version 13. */ OEMCryptoResult OEMCrypto_GetCurrentSRMVersion(uint16_t* version); -/* - * OEMCrypto_GetAnalogOutputFlags +/** + * Returns whether the device supports analog output or not. This information + * will be sent to the license server, and may be used to determine the type + * of license allowed. This function is for reporting only. It is paired with + * the key control block flags Disable_Analog_Output and CGMS. * - * Description: - * Returns whether the device supports analog output or not. This information - * will be sent to the license server, and may be used to determine the type - * of license allowed. This function is for reporting only. It is paired with - * the key control block flags Disable_Analog_Output and CGMS. - * - * Parameters: - * none. - * - * Returns: - * Returns a bitwise OR of the following flags. - * - 0x0 = OEMCrypto_No_Analog_Output -- the device has no analog output. - * - 0x1 = OEMCrypto_Supports_Analog_Output - the device does have analog + * @return + * Returns a bitwise OR of all possible return values. + * * 0x0 = OEMCrypto_No_Analog_Output: the device has no analog output. + * * 0x1 = OEMCrypto_Supports_Analog_Output: the device does have analog * output. - * - 0x2 = OEMCrypto_Can_Disable_Analog_Ouptput - the device does have + * * 0x2 = OEMCrypto_Can_Disable_Analog_Ouptput: the device does have * analog output, but it will disable analog output if required by the * key control block. - * - 0x4 = OEMCrypto_Supports_CGMS_A - the device supports signaling 2-bit + * * 0x4 = OEMCrypto_Supports_CGMS_A: the device supports signaling 2-bit * CGMS-A, if required by the key control block * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method is new in API version 14. */ uint32_t OEMCrypto_GetAnalogOutputFlags(void); -/* - * OEMCrypto_ResourceRatingTier +/** + * This function returns a positive number indicating which resource rating + * it supports. This value will bubble up to the application level as a + * property. This will allow applications to estimate what resolution and + * bandwidth the device is expected to support. * - * Description: - * This function returns a positive number indicating which resource rating - * it supports. This value will bubble up to the application level as a - * property. This will allow applications to estimate what resolution and - * bandwidth the device is expected to support. + * OEMCrypto unit tests and Android GTS tests will verify that devices do + * support the resource values specified in the table below at the tier + * claimed by the device. If a device claims to be a low end device, the + * OEMCrypto unit tests will only verify the low end performance values. * - * OEMCrypto unit tests and Android GTS tests will verify that devices do - * support the resource values specified in the table below at the tier - * claimed by the device. If a device claims to be a low end device, the - * OEMCrypto unit tests will only verify the low end performance values. + * OEMCrypto implementers should consider the numbers below to be minimum + * values. * - * OEMCrypto implementers should consider the numbers below to be minimum - * values. + * These performance parameters are for OEMCrypto only. In particular, + * bandwidth and codec resolution are determined by the platform. * - * These performance parameters are for OEMCrypto only. In particular, - * bandwidth and codec resolution are determined by the platform. + * Some parameters need more explanation. The Sample size is typically the + * size of one encoded frame, but might be several frames for AV1. Converting + * this to resolution depends on the Codec, which is not specified by + * OEMCrypto. Some content has the sample broken into several subsamples. The + * "number of subsamples" restriction requires that any content can be broken + * into at least that many subsamples. However, this number may be larger if + * DecryptCENC returns OEMCrypto_ERROR_BUFFER_TOO_LARGE. In that case, the + * layer above OEMCrypto will break the sample into subsamples of size + * "Decrypt Buffer Size" as specified in the table below. The "Decrypt Buffer + * Size" means the size of one subsample that may be passed into DecryptCENC + * or CopyBuffer without returning error OEMCrypto_ERROR_BUFFER_TOO_LARGE. * - * Some parameters need more explanation. The Sample size is typically the - * size of one encoded frame, but might be several frames for AV1. Converting - * this to resolution depends on the Codec, which is not specified by - * OEMCrypto. Some content has the sample broken into several subsamples. The - * "number of subsamples" restriction requires that any content can be broken - * into at least that many subsamples. However, this number may be larger if - * DecryptCENC returns OEMCrypto_ERROR_BUFFER_TOO_LARGE. In that case, the - * layer above OEMCrypto will break the sample into subsamples of size - * "Decrypt Buffer Size" as specified in the table below. The "Decrypt Buffer - * Size" means the size of one subsample that may be passed into DecryptCENC - * or CopyBuffer without returning error OEMCrypto_ERROR_BUFFER_TOO_LARGE. + * The minimum subsample buffer size is the smallest buffer that the CDM + * layer above OEMCrypto will use when breaking a sample into subsamples. As + * mentioned above, the CDM layer will only break a sample into smaller + * subsamples if OEMCrypto returns OEMCrypto_ERROR_BUFFER_TOO_LARGE. Because + * this might be a performance problem, OEMCrypto implementers are encouraged + * to process larger subsamples and to process multiple subsamples in a + * single call to DecryptCENC. * - * The minimum subsample buffer size is the smallest buffer that the CDM - * layer above OEMCrypto will use when breaking a sample into subsamples. As - * mentioned above, the CDM layer will only break a sample into smaller - * subsamples if OEMCrypto returns OEMCrypto_ERROR_BUFFER_TOO_LARGE. Because - * this might be a performance problem, OEMCrypto implementers are encouraged - * to process larger subsamples and to process multiple subsamples in a - * single call to DecryptCENC. + * The number of keys per session is an indication of how many different + * track types there can be for a piece of content. Typically, content will + * have several keys corresponding to audio and video at different + * resolutions. If the content uses key rotation, there could be three keys + * -- previous interval, current interval, and next interval -- for each + * resolution. * - * The number of keys per session is an indication of how many different - * track types there can be for a piece of content. Typically, content will - * have several keys corresponding to audio and video at different - * resolutions. If the content uses key rotation, there could be three keys - * -- previous interval, current interval, and next interval -- for each - * resolution. + * Concurrent playback sessions versus concurrent sessions: some applications + * will preload multiple licenses before the user picks which content to + * play. Each of these licenses corresponds to an open session. Once playback + * starts, some platforms support picture-in-picture or multiple displays. + * Each of these pictures would correspond to a separate playback session + * with active decryption. * - * Concurrent playback sessions versus concurrent sessions: some applications - * will preload multiple licenses before the user picks which content to - * play. Each of these licenses corresponds to an open session. Once playback - * starts, some platforms support picture-in-picture or multiple displays. - * Each of these pictures would correspond to a separate playback session - * with active decryption. + * The total number of keys for all sessions indicates that the device may + * share key memory over multiple sessions. For example, on a Tier 3 device, + * the device must support four sessions with 20 keys each (80 total), or 20 + * sessions with 4 keys each (80 total), but it does not need to support 20 + * sessions with 20 keys each. * - * The total number of keys for all sessions indicates that the device may - * share key memory over multiple sessions. For example, on a Tier 3 device, - * the device must support four sessions with 20 keys each (80 total), or 20 - * sessions with 4 keys each (80 total), but it does not need to support 20 - * sessions with 20 keys each. + * The message size that is needed for a license with a large number of keys + * is larger than in previous versions. The message size limit applies to all + * functions that sign or verify messages. It also applies to the size of + * context buffers in the derive key functions. * - * The message size that is needed for a license with a large number of keys - * is larger than in previous versions. The message size limit applies to all - * functions that sign or verify messages. It also applies to the size of - * context buffers in the derive key functions. + * Decrypted frames per second -- strictly speaking, OEMCrypto only controls + * the decryption part of playback and cannot control the decoding and + * display part. However, devices that support the higher resource tiers + * should also support a higher frame rate. Platforms may enforce these + * values. For example Android will enforce a frame rate via a GTS test. * - * Decrypted frames per second -- strictly speaking, OEMCrypto only controls - * the decryption part of playback and cannot control the decoding and - * display part. However, devices that support the higher resource tiers - * should also support a higher frame rate. Platforms may enforce these - * values. For example Android will enforce a frame rate via a GTS test. + * Note on units: We will use KiB to mean 1024 bytes and MiB to mean 1024 + * KiB, as described at https://en.wikipedia.org/wiki/Kibibyte. * - * Note on units: We will use KiB to mean 1024 bytes and MiB to mean 1024 - * KiB, as described at https://en.wikipedia.org/wiki/Kibibyte. + *
+ * +--------------------------------+---------+----------+---------+---------+
+ * |Resource Rating Tier            |1 - Low  |2 - Medium|3 - High |4 - Very |
+ * |                                |         |          |         |    High |
+ * +--------------------------------+---------+----------+---------+---------+
+ * |Minimum Sample size             |1 MiB    |2 MiB     |4 MiB    |16 MiB   |
+ * +--------------------------------+---------+----------+---------+---------+
+ * |Minimum Number of Subsamples    |10       |16        |32       |64       |
+ * | (H264 or HEVC)                 |         |          |         |         |
+ * +--------------------------------+---------+----------+---------+---------+
+ * |Minimum Number of Subsamples    |9        |9         |9        |9        |
+ * |(VP9)                           |         |          |         |         |
+ * +--------------------------------+---------+----------+---------+---------+
+ * |Minimum Number of Subsamples    |72       |144       |288      |576      |
+ * |(AV1)                           |         |          |         |         |
+ * +--------------------------------+---------+----------+---------+---------+
+ * |Minimum subsample buffer size   |100 KiB  |500 KiB   |1 MiB    |4 MiB    |
+ * +--------------------------------+---------+----------+---------+---------+
+ * |Minimum Generic crypto buffer   |10 KiB   |100 KiB   |500 KiB  |1 MiB    |
+ * |size                            |         |          |         |         |
+ * +--------------------------------+---------+----------+---------+---------+
+ * |Minimum number of concurrent    |10       |20        |30       |40       |
+ * |sessions                        |         |          |         |         |
+ * +--------------------------------+---------+----------+---------+---------+
+ * |Minimum number of keys per      |4        |20        |20       |30       |
+ * |session                         |         |          |         |         |
+ * +--------------------------------+---------+----------+---------+---------+
+ * |Minimum total number of keys    |16       |40        |80       |90       |
+ * | (all sessions)                 |         |          |         |         |
+ * +--------------------------------+---------+----------+---------+---------+
+ * |Minimum Message Size            |8 KiB    |8 KiB     |16 KiB   |32 KiB   |
+ * +--------------------------------+---------+----------+---------+---------+
+ * |Decrypted Frames per Second     |30 fps SD|30 fps HD |60 fps HD|60 fps 8k|
+ * +--------------------------------+---------+----------+---------+---------+
+ * 
* - * +--------------------------------+---------+----------+---------+---------+ - * |Resource Rating Tier |1 - Low |2 - Medium|3 - High |4 - Very | - * | | | | | High | - * +--------------------------------+---------+----------+---------+---------+ - * |Minimum Sample size |1 MiB |2 MiB |4 MiB |16 MiB | - * +--------------------------------+---------+----------+---------+---------+ - * |Minimum Number of Subsamples |10 |16 |32 |64 | - * | (H264 or HEVC) | | | | | - * +--------------------------------+---------+----------+---------+---------+ - * |Minimum Number of Subsamples |9 |9 |9 |9 | - * |(VP9) | | | | | - * +--------------------------------+---------+----------+---------+---------+ - * |Minimum Number of Subsamples |72 |144 |288 |576 | - * |(AV1) | | | | | - * +--------------------------------+---------+----------+---------+---------+ - * |Minimum subsample buffer size |100 KiB |500 KiB |1 MiB |4 MiB | - * +--------------------------------+---------+----------+---------+---------+ - * |Minimum Generic crypto buffer |10 KiB |100 KiB |500 KiB |1 MiB | - * |size | | | | | - * +--------------------------------+---------+----------+---------+---------+ - * |Minimum number of concurrent |10 |20 |30 |40 | - * |sessions | | | | | - * +--------------------------------+---------+----------+---------+---------+ - * |Minimum number of keys per |4 |20 |20 |30 | - * |session | | | | | - * +--------------------------------+---------+----------+---------+---------+ - * |Minimum total number of keys |16 |40 |80 |90 | - * | (all sessions) | | | | | - * +--------------------------------+---------+----------+---------+---------+ - * |Minimum Message Size |8 KiB |8 KiB |16 KiB |32 KiB | - * +--------------------------------+---------+----------+---------+---------+ - * |Decrypted Frames per Second |30 fps SD|30 fps HD |60 fps HD|60 fps 8k| - * +--------------------------------+---------+----------+---------+---------+ + * @return + * Returns an integer indicating which resource tier the device supports. * - * Parameters: - * none. - * - * Returns: - * Returns an integer indicating which resource tier the device supports. - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method is new in API version 15. */ uint32_t OEMCrypto_ResourceRatingTier(void); -/* - * OEMCrypto_LoadProvisioning +/// @} + +/// @addtogroup drm_cert +/// @{ + +/** + * Load and parse a provisioning response, and then rewrap the private key + * for storage on the filesystem. We recommend that the OEM use an encryption + * key and signing key generated using an algorithm at least as strong as + * that in GenerateDerivedKeys. * - * Description: - * Load and parse a provisioning response, and then rewrap the private key - * for storage on the filesystem. We recommend that the OEM use an encryption - * key and signing key generated using an algorithm at least as strong as - * that in GenerateDerivedKeys. + * First, OEMCrypto shall verify the signature of the message using + * HMAC-SHA256 with the derived mac_key[server]. The signature verification + * shall use a constant-time algorithm (a signature mismatch will always take + * the same time as a successful comparison). The signature is over the + * entire message buffer starting at message with length message_length. If + * the signature verification fails, ignore all other arguments and return + * OEMCrypto_ERROR_SIGNATURE_FAILURE. * - * First, OEMCrypto shall verify the signature of the message using - * HMAC-SHA256 with the derived mac_key[server]. The signature verification - * shall use a constant-time algorithm (a signature mismatch will always take - * the same time as a successful comparison). The signature is over the - * entire message buffer starting at message with length message_length. If - * the signature verification fails, ignore all other arguments and return - * OEMCrypto_ERROR_SIGNATURE_FAILURE. + * NOTE: The calling software must have previously established the mac_keys + * and encrypt_key with a call to OEMCrypto_DeriveKeysFromSessionKey or + * OEMCrypto_GenerateDerivedKeys. * - * NOTE: The calling software must have previously established the mac_keys - * and encrypt_key with a call to OEMCrypto_DeriveKeysFromSessionKey or - * OEMCrypto_GenerateDerivedKeys. + * The function ODK_ParseProvisioning is called to parse the message. If it + * returns an error, OEMCrypto shall return that error to the CDM layer. The + * function ODK_ParseProvisioning is described in the document "Widevine Core + * Message Serialization". * - * The function ODK_ParseProvisioning is called to parse the message. If it - * returns an error, OEMCrypto shall return that error to the CDM layer. The - * function ODK_ParseProvisioning is described in the document "Widevine Core - * Message Serialization". + * Below, all fields are found in the struct ODK_ParsedLicense parsed_license + * returned by ODK_ParsedProvisioning. * - * Below, all fields are found in the struct ODK_ParsedLicense parsed_license - * returned by ODK_ParsedProvisioning. + * After decrypting `parsed_response->enc_private_key`, If the first four bytes + * of the buffer are the string "SIGN", then the actual RSA key begins on the + * 9th byte of the buffer. The second four bytes of the buffer is the 32 bit + * field "allowed_schemes" of type RSA_Padding_Scheme, which is used in + * OEMCrypto_GenerateRSASignature. The value of allowed_schemes must also be + * wrapped with RSA key. We recommend storing the magic string "SIGN" with + * the key to distinguish keys that have a value for allowed_schemes from + * those that should use the default allowed_schemes. Devices that do not + * support the alternative signing algorithms may refuse to load these keys + * and return an error of OEMCrypto_ERROR_NOT_IMPLEMENTED. The main use case + * for these alternative signing algorithms is to support devices that use + * X509 certificates for authentication when acting as a ChromeCast receiver. + * This is not needed for devices that wish to send data to a ChromeCast. * - * After decrypting enc_rsa_key, If the first four bytes of the buffer are - * the string "SIGN", then the actual RSA key begins on the 9th byte of the - * buffer. The second four bytes of the buffer is the 32 bit field - * "allowed_schemes"of type RSA_Padding_Scheme, which is used in - * OEMCrypto_GenerateRSASignature. The value of allowed_schemes must also be - * wrapped with RSA key. We recommend storing the magic string "SIGN" with - * the key to distinguish keys that have a value for allowed_schemes from - * those that should use the default allowed_schemes. Devices that do not - * support the alternative signing algorithms may refuse to load these keys - * and return an error of OEMCrypto_ERROR_NOT_IMPLEMENTED. The main use case - * for these alternative signing algorithms is to support devices that use - * X509 certificates for authentication when acting as a ChromeCast receiver. - * This is not needed for devices that wish to send data to a ChromeCast. - * - * If the first four bytes of the buffer enc_rsa_key are not the string - * "SIGN", then the default value of allowed_schemes = 1 (kSign_RSASSA_PSS) - * will be used. + * If the first four bytes of the buffer `enc_private_key` are not the string + * "SIGN", then this key may not be used with OEMCrypto_GenerateRSASignature. * * Verification and Algorithm: - * The following checks should be performed. If any check fails, an error is - * returned, and the key is not loaded. - * 1. Check that all the pointer values passed into it are within the - * buffer specified by message and message_length. - * 2. Verify that in_wrapped_rsa_key_length is large enough to hold the - * rewrapped key, returning OEMCrypto_ERROR_SHORT_BUFFER otherwise. - * 3. Verify the message signature, using the derived signing key - * (mac_key[server]) from a previous call to - * OEMCrypto_GenerateDerivedKeys or OEMCrypto_DeriveKeysFromSessionKey. - * 4. The function ODK_ParseProvisioning is called to parse the message. - * 5. Decrypt enc_rsa_key in the buffer rsa_key using the session's derived - * encryption key (enc_key). Use enc_rsa_key_iv as the initial vector - * for AES_128-CBC mode, with PKCS#5 padding. The rsa_key should be kept - * in secure memory and protected from the user. - * 6. If the first four bytes of the buffer rsa_key are the string "SIGN", - * then the actual RSA key begins on the 9th byte of the buffer. The - * second four bytes of the buffer is the 32 bit field - * "allowed_schemes", of type RSA_Padding_Scheme, which is used in - * OEMCrypto_GenerateRSASignature. The value of allowed_schemes must - * also be wrapped with RSA key. We recommend storing the magic string - * "SIGN" with the key to distinguish keys that have a value for - * allowed_schemes from those that should use the default - * allowed_schemes. Devices that do not support the alternative signing - * algorithms may refuse to load these keys and return an error of - * OEMCrypto_ERROR_NOT_IMPLEMENTED. The main use case for these - * alternative signing algorithms is to support devices that use X.509 - * certificates for authentication when acting as a ChromeCast receiver. - * This is not needed for devices that wish to send data to a ChromeCast. - * 7. If the first four bytes of the buffer rsa_key are not the string - * "SIGN", then the default value of allowed_schemes = 1 - * (kSign_RSASSA_PSS) will be used. - * 8. After possibly skipping past the first 8 bytes signifying the allowed - * signing algorithm, the rest of the buffer rsa_key contains an RSA - * device key in PKCS#8 binary DER encoded format. The OEMCrypto library - * shall verify that this RSA key is valid. - * 9. Re-encrypt the device RSA key with an internal key (such as the OEM - * key or Widevine Keybox key) and the generated IV using AES-128-CBC - * with PKCS#5 padding. - * 10. Copy the rewrapped key to the buffer specified by wrapped_rsa_key - * and the size of the wrapped key to wrapped_rsa_key_length. + * The following checks should be performed. If any check fails, an error is + * returned, and the key is not loaded. + * 1. Check that all the pointer values passed into it are within the + * buffer specified by message and message_length. + * 2. Verify that (in) wrapped_private_key_length is large enough to hold + * the rewrapped key, returning OEMCrypto_ERROR_SHORT_BUFFER otherwise. + * 3. Verify the message signature, using the derived signing key + * (mac_key[server]) from a previous call to + * OEMCrypto_GenerateDerivedKeys or OEMCrypto_DeriveKeysFromSessionKey. + * 4. The function ODK_ParseProvisioning is called to parse the message. + * 5. Decrypt enc_private_key in the buffer private_key using the session's + * derived encryption key (enc_key). Use enc_private_key_iv as the initial + * vector for AES_128-CBC mode, with PKCS#5 padding. The private_key should + * be kept in secure memory and protected from the user. + * 6. If the first four bytes of the buffer private_key are the string "SIGN", + * then the actual RSA key begins on the 9th byte of the buffer. The + * second four bytes of the buffer is the 32 bit field + * "allowed_schemes", of type RSA_Padding_Scheme, which is used in + * OEMCrypto_GenerateRSASignature. The value of allowed_schemes must + * also be wrapped with RSA key. We recommend storing the magic string + * "SIGN" with the key to distinguish keys that have a value for + * allowed_schemes from those that should use the default + * allowed_schemes. Devices that do not support the alternative signing + * algorithms may refuse to load these keys and return an error of + * OEMCrypto_ERROR_NOT_IMPLEMENTED. The main use case for these + * alternative signing algorithms is to support devices that use X.509 + * certificates for authentication when acting as a ChromeCast receiver. + * This is not needed for devices that wish to send data to a ChromeCast. + * 7. If the first four bytes of the buffer private_key are not the string + * "SIGN", this key may not be used with OEMCrypto_GenerateRSASignature. + * 8. After possibly skipping past the first 8 bytes signifying the allowed + * signing algorithm, the rest of the buffer private_key contains an ECC + * private key or an RSA private key in PKCS#8 binary DER encoded + * format. The OEMCrypto library shall verify that this private key is + * valid. + * 9. Re-encrypt the device private key with an internal key (such as the OEM + * key or Widevine Keybox key) and the generated IV using AES-128-CBC + * with PKCS#5 padding. + * 10. Copy the rewrapped key to the buffer specified by wrapped_private_key + * and the size of the wrapped key to wrapped_private_key_length. * - * Parameters: - * [in] session: crypto session identifier. - * [in] message: pointer to memory containing data. - * [in] message_length: length of the message, in bytes. - * [in] core_message_length: length of the core submessage, in bytes. - * [in] signature: pointer to memory containing the signature. - * [in] signature_length: length of the signature, in bytes. - * [out] wrapped_private_key: pointer to buffer in which encrypted RSA or ECC - * private key should be stored. May be null on the first call in order - * to find required buffer size. - * [in/out] wrapped_private_key_length: (in) length of the encrypted private - * key, in bytes. - * (out) actual length of the encrypted private key + * @param[in] session: crypto session identifier. + * @param[in] message: pointer to memory containing data. + * @param[in] message_length: length of the message, in bytes. + * @param[in] core_message_length: length of the core submessage, in bytes. + * @param[in] signature: pointer to memory containing the signature. + * @param[in] signature_length: length of the signature, in bytes. + * @param[out] wrapped_private_key: pointer to buffer in which encrypted RSA or + * ECC private key should be stored. May be null on the first call in order + * to find required buffer size. + * @param[in,out] wrapped_private_key_length: (in) length of the encrypted + * private key, in bytes. (out) actual length of the encrypted private key * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_NO_DEVICE_KEY - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_INVALID_RSA_KEY - * OEMCrypto_ERROR_SIGNATURE_FAILURE - * OEMCrypto_ERROR_INVALID_NONCE - * OEMCrypto_ERROR_SHORT_BUFFER - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_NO_DEVICE_KEY + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_INVALID_RSA_KEY + * @retval OEMCrypto_ERROR_SIGNATURE_FAILURE + * @retval OEMCrypto_ERROR_INVALID_NONCE + * @retval OEMCrypto_ERROR_SHORT_BUFFER + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support message sizes as described in the section * OEMCrypto_ResourceRatingTier. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_LoadProvisioning( @@ -3961,23 +3839,20 @@ OEMCryptoResult OEMCrypto_LoadProvisioning( size_t signature_length, uint8_t* wrapped_private_key, size_t* wrapped_private_key_length); -/* - * OEMCrypto_LoadDRMPrivateKey +/** + * Loads a wrapped RSA or ECC private key to secure memory for use by this + * session in future calls to OEMCrypto_PrepAndSignLicenseRequest or + * OEMCrypto_DeriveKeysFromSessionKey. The wrapped private key will be the + * one verified and wrapped by OEMCrypto_LoadProvisioning. The private key + * should be stored in secure memory. * - * Description: - * Loads a wrapped RSA or ECC private key to secure memory for use by this - * session in future calls to OEMCrypto_PrepAndSignLicenseRequest or - * OEMCrypto_DeriveKeysFromSessionKey. The wrapped private key will be the - * one verified and wrapped by OEMCrypto_LoadProvisioning. The private key - * should be stored in secure memory. + * If the bit field "allowed_schemes" was wrapped with this RSA key, its + * value will be loaded and stored with the RSA key, and the key may be used + * with calls to OEMCrypto_GenerateRSASignature. If there was not a bit field + * wrapped with the RSA key, the key will be used for + * OEMCrypto_PrepAndSignLicenseRequest or OEMCrypto_DeriveKeysFromSessionKey * - * If the bit field "allowed_schemes" was wrapped with this RSA key, its - * value will be loaded and stored with the RSA key, and the key may be used - * with calls to OEMCrypto_GenerateRSASignature. If there was not a bit field - * wrapped with the RSA key, the key will be used for - * OEMCrypto_PrepAndSignLicenseRequest or OEMCrypto_DeriveKeysFromSessionKey - * - * Verification: + * @verification * The following checks should be performed. If any check fails, an error is * returned, and the RSA key is not loaded. * 1. The wrapped key has a valid signature, as described in @@ -3986,151 +3861,136 @@ OEMCryptoResult OEMCrypto_LoadProvisioning( * 3. If a value for allowed_schemes is included with the key, it is a * valid value. * - * Parameters: - * [in] session: crypto session identifier. - * [in] key_type: indicates either an RSA or ECC key for devices that support - * both. - * [in] wrapped_rsa_key: wrapped device RSA key stored on the device. Format - * is PKCS#8, binary DER encoded, and encrypted with a key internal to - * the OEMCrypto instance, using AES-128-CBC with PKCS#5 padding. This - * is the wrapped key generated by OEMCrypto_RewrapDeviceRSAKey. - * [in] wrapped_rsa_key_length: length of the wrapped key buffer, in bytes. + * @param[in] session: crypto session identifier. + * @param[in] key_type: indicates either an RSA or ECC key for devices that + * support both. + * @param[in] wrapped_private_key: wrapped device private key (RSA or ECC). + * This is the wrapped key generated by OEMCrypto_LoadProvisioning. + * @param[in] wrapped_private_key_length: length of the wrapped key buffer, in + * bytes. * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_NO_DEVICE_KEY - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_INVALID_RSA_KEY - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_NO_DEVICE_KEY + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_INVALID_RSA_KEY + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_LoadDRMPrivateKey(OEMCrypto_SESSION session, OEMCrypto_PrivateKeyType key_type, - const uint8_t* wrapped_rsa_key, - size_t wrapped_rsa_key_length); + const uint8_t* wrapped_private_key, + size_t wrapped_private_key_length); -/* - * OEMCrypto_LoadTestRSAKey +/** + * Some platforms do not support keyboxes or OEM Certificates. On those + * platforms, there is a DRM certificate baked into the OEMCrypto library. + * This is unusual, and is only available for L3 devices. In order to debug + * and test those devices, they should be able to switch to the test DRM + * certificate. * - * Description: - * Some platforms do not support keyboxes or OEM Certificates. On those - * platforms, there is a DRM certificate baked into the OEMCrypto library. - * This is unusual, and is only available for L3 devices. In order to debug - * and test those devices, they should be able to switch to the test DRM - * certificate. + * Temporarily use the standard test RSA key until the next call to + * OEMCrypto_Terminate. This allows a standard suite of unit tests to be run + * on a production device without permanently changing the key. Using the + * test key is not persistent. * - * Temporarily use the standard test RSA key until the next call to - * OEMCrypto_Terminate. This allows a standard suite of unit tests to be run - * on a production device without permanently changing the key. Using the - * test key is not persistent. + * The test key can be found in the unit test code, oemcrypto_test.cpp, in + * PKCS8 form as the constant kTestRSAPKCS8PrivateKeyInfo2_2048. * - * The test key can be found in the unit test code, oemcrypto_test.cpp, in - * PKCS8 form as the constant kTestRSAPKCS8PrivateKeyInfo2_2048. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED devices that use a keybox should + * not implement this function + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Parameters: - * none - * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_NOT_IMPLEMENTED - devices that use a keybox should not - * implement this function - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is an "Initialization and Termination Function" and will not be * called simultaneously with any other function, as if the CDM holds a write * lock on the OEMCrypto system. * - * Version: + * @version * This method is new in API version 10. */ OEMCryptoResult OEMCrypto_LoadTestRSAKey(void); -/* - * OEMCrypto_GenerateRSASignature +/** + * The OEMCrypto_GenerateRSASignature method is only used for devices that + * are CAST receivers. This function is called after + * OEMCrypto_LoadDRMPrivateKey for the same session. * - * Description: - * The OEMCrypto_GenerateRSASignature method is only used for devices that - * are CAST receivers. This function is called after - * OEMCrypto_LoadDRMPrivateKey for the same session. + * The parameter padding_scheme has two possible legacy values: * - * The parameter padding_scheme has two possible legacy values: + * 0x1 - RSASSA-PSS with SHA1. * - * 0x1 - RSASSA-PSS with SHA1. + * 0x2 - PKCS1 with block type 1 padding (only). * - * 0x2 - PKCS1 with block type 1 padding (only). + * The only supported padding scheme is 0x2 since version 16 of this API. In + * this second case, the "message" is already a digest, so no further hashing + * is applied, and the message_length can be no longer than 83 bytes. If the + * message_length is greater than 83 bytes OEMCrypto_ERROR_SIGNATURE_FAILURE + * shall be returned. * - * The only supported padding scheme is 0x2 since version 16 of this API. In - * this second case, the "message" is already a digest, so no further hashing - * is applied, and the message_length can be no longer than 83 bytes. If the - * message_length is greater than 83 bytes OEMCrypto_ERROR_SIGNATURE_FAILURE - * shall be returned. + * The second padding scheme is for devices that use X509 certificates for + * authentication. The main example is devices that work as a Cast receiver, + * like a ChromeCast, not for devices that wish to send to the Cast device, + * such as almost all Android devices. OEMs that do not support X509 + * certificate authentication need not implement this function and can return + * OEMCrypto_ERROR_NOT_IMPLEMENTED. * - * The second padding scheme is for devices that use X509 certificates for - * authentication. The main example is devices that work as a Cast receiver, - * like a ChromeCast, not for devices that wish to send to the Cast device, - * such as almost all Android devices. OEMs that do not support X509 - * certificate authentication need not implement this function and can return - * OEMCrypto_ERROR_NOT_IMPLEMENTED. - * - * Verification: + * @verification * Both the padding_scheme and the RSA key's allowed_schemes must be 0x2. If * not, then the signature is not computed and the error * OEMCrypto_ERROR_INVALID_RSA_KEY is returned. * - * Parameters: - * [in] session: crypto session identifier. - * [in] message: pointer to memory containing message to be signed. - * [in] message_length: length of the message, in bytes. - * [out] signature: buffer to hold the message signature. On return, it will - * contain the message signature generated with the device private RSA - * key using RSASSA-PSS. Will be null on the first call in order to - * find required buffer size. - * [in/out] signature_length: (in) length of the signature buffer, in bytes. - * (out) actual length of the signature - * [in] padding_scheme: specify which scheme to use for the signature. + * @param[in] session: crypto session identifier. + * @param[in] message: pointer to memory containing message to be signed. + * @param[in] message_length: length of the message, in bytes. + * @param[out] signature: buffer to hold the message signature. On return, it + * will contain the message signature generated with the device private RSA + * key using RSASSA-PSS. Will be null on the first call in order to find + * required buffer size. + * @param[in,out] signature_length: (in) length of the signature buffer, in + * bytes. (out) actual length of the signature + * @param[in] padding_scheme: specify which scheme to use for the signature. * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_SHORT_BUFFER if the signature buffer is too small. - * OEMCrypto_ERROR_INVALID_SESSION - * OEMCrypto_ERROR_INVALID_CONTEXT - * OEMCrypto_ERROR_INVALID_RSA_KEY - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_NOT_IMPLEMENTED - if algorithm > 0, and the device does - * not support that algorithm. - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_SHORT_BUFFER if the signature buffer is too small. + * @retval OEMCrypto_ERROR_INVALID_SESSION + * @retval OEMCrypto_ERROR_INVALID_CONTEXT + * @retval OEMCrypto_ERROR_INVALID_RSA_KEY + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED if algorithm > 0, and the device + * does not support that algorithm. + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support message sizes as described in the section * OEMCrypto_ResourceRatingTier. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_GenerateRSASignature( @@ -4138,196 +3998,181 @@ OEMCryptoResult OEMCrypto_GenerateRSASignature( uint8_t* signature, size_t* signature_length, RSA_Padding_Scheme padding_scheme); -/* - * OEMCrypto_CreateUsageTableHeader +/// @} + +/// @addtogroup usage_table +/// @{ + +/** + * This creates a new Usage Table Header with no entries. If there is already + * a generation number stored in secure storage, it will be incremented by 1 + * and used as the new Master Generation Number. This will only be called if + * the CDM layer finds no existing usage table on the file system. OEMCrypto + * will encrypt and sign the new, empty, header and return it in the provided + * buffer. * - * Description: - * This creates a new Usage Table Header with no entries. If there is already - * a generation number stored in secure storage, it will be incremented by 1 - * and used as the new Master Generation Number. This will only be called if - * the CDM layer finds no existing usage table on the file system. OEMCrypto - * will encrypt and sign the new, empty, header and return it in the provided - * buffer. + * The new entry should be created with a status of kUnused and all times + * times should be set to 0. * - * The new entry should be created with a status of kUnused and all times - * times should be set to 0. + * Devices that do not implement a Session Usage Table may return + * OEMCrypto_ERROR_NOT_IMPLEMENTED. * - * Devices that do not implement a Session Usage Table may return - * OEMCrypto_ERROR_NOT_IMPLEMENTED. + * @param[out] header_buffer: pointer to memory where encrypted usage table + * header is written. + * @param[in,out] header_buffer_length: (in) length of the header_buffer, in + * bytes. (out) actual length of the header_buffer * - * Parameters: - * [out] header_buffer: pointer to memory where encrypted usage table header - * is written. - * [in/out] header_buffer_length: (in) length of the header_buffer, in bytes. - * (out) actual length of the header_buffer + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_SHORT_BUFFER if header_buffer_length is too small. + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_SHORT_BUFFER - if header_buffer_length is too small. - * OEMCrypto_ERROR_NOT_IMPLEMENTED - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Usage Table Function" and will not be called simultaneously * with any other function, as if the CDM holds a write lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in API version 13. */ OEMCryptoResult OEMCrypto_CreateUsageTableHeader(uint8_t* header_buffer, size_t* header_buffer_length); -/* - * OEMCrypto_LoadUsageTableHeader +/** + * This loads the Usage Table Header. The buffer's signature is verified and + * the buffer is decrypted. OEMCrypto will verify the verification string. If + * the Master Generation Number is more than 1 off, the table is considered + * bad, the headers are NOT loaded, and the error + * OEMCrypto_ERROR_GENERATION_SKEW is returned. If the generation number is + * off by 1, the warning OEMCrypto_WARNING_GENERATION_SKEW is returned but + * the header is still loaded. This warning may be logged by the CDM layer. * - * Description: - * This loads the Usage Table Header. The buffer's signature is verified and - * the buffer is decrypted. OEMCrypto will verify the verification string. If - * the Master Generation Number is more than 1 off, the table is considered - * bad, the headers are NOT loaded, and the error - * OEMCrypto_ERROR_GENERATION_SKEW is returned. If the generation number is - * off by 1, the warning OEMCrypto_WARNING_GENERATION_SKEW is returned but - * the header is still loaded. This warning may be logged by the CDM layer. + * @param[in] buffer: pointer to memory containing encrypted usage table header. + * @param[in] buffer_length: length of the buffer, in bytes. * - * Parameters: - * [in] buffer: pointer to memory containing encrypted usage table header. - * [in] buffer_length: length of the buffer, in bytes. - * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_SHORT_BUFFER - * OEMCrypto_ERROR_NOT_IMPLEMENTED - some devices do not implement usage + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_SHORT_BUFFER + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED some devices do not implement usage * tables. - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_WARNING_GENERATION_SKEW - if the generation number is off by - * exactly 1. - * OEMCrypto_ERROR_GENERATION_SKEW - if the generation number is off by more - * than 1. - * OEMCrypto_ERROR_SIGNATURE_FAILURE - if the signature failed. - * OEMCrypto_ERROR_BAD_MAGIC - verification string does not match. - * OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_WARNING_GENERATION_SKEW if the generation number is off + * by exactly 1. + * @retval OEMCrypto_ERROR_GENERATION_SKEW if the generation number is off by + * more than 1. + * @retval OEMCrypto_ERROR_SIGNATURE_FAILURE if the signature failed. + * @retval OEMCrypto_ERROR_BAD_MAGIC verification string does not match. + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Threading: + * @threading * This is a "Usage Table Function" and will not be called simultaneously * with any other function, as if the CDM holds a write lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_LoadUsageTableHeader(const uint8_t* buffer, size_t buffer_length); -/* - * OEMCrypto_CreateNewUsageEntry +/** + * This creates a new usage entry. The size of the header will be increased + * by 8 bytes, and secure volatile memory will be allocated for it. The new + * entry will be associated with the given session. The status of the new + * entry will be set to "unused". OEMCrypto will set *usage_entry_number to + * be the index of the new entry. The first entry created will have index 0. + * The new entry will be initialized with a generation number equal to the + * master generation number, which will also be stored in the header's new + * slot. Then the master generation number will be incremented. Since each + * entry's generation number is less than the master generation number, the + * new entry will have a generation number that is larger than all other + * entries and larger than all previously deleted entries. This helps prevent + * a rogue application from deleting an entry and then loading an old version + * of it. * - * Description: - * This creates a new usage entry. The size of the header will be increased - * by 8 bytes, and secure volatile memory will be allocated for it. The new - * entry will be associated with the given session. The status of the new - * entry will be set to "unused". OEMCrypto will set *usage_entry_number to - * be the index of the new entry. The first entry created will have index 0. - * The new entry will be initialized with a generation number equal to the - * master generation number, which will also be stored in the header's new - * slot. Then the master generation number will be incremented. Since each - * entry's generation number is less than the master generation number, the - * new entry will have a generation number that is larger than all other - * entries and larger than all previously deleted entries. This helps prevent - * a rogue application from deleting an entry and then loading an old version - * of it. + * If the session already has a usage entry associated with it, the error + * OEMCrypto_ERROR_MULTIPLE_USAGE_ENTRIES is returned. * - * If the session already has a usage entry associated with it, the error - * OEMCrypto_ERROR_MULTIPLE_USAGE_ENTRIES is returned. + * @param[in] session: handle for the session to be used. + * @param[out] usage_entry_number: index of new usage entry. * - * Parameters: - * [in] session: handle for the session to be used. - * [out] usage_entry_number: index of new usage entry. - * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_NOT_IMPLEMENTED - some devices do not implement usage + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED some devices do not implement usage * tables. - * OEMCrypto_ERROR_INSUFFICIENT_RESOURCES - if there is no room in memory to - * increase the size of the usage table header. The CDM layer can - * delete some entries and then try again, or it can pass the error up - * to the application. - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * OEMCrypto_ERROR_MULTIPLE_USAGE_ENTRIES - if there already is a usage entry - * loaded into this session + * @retval OEMCrypto_ERROR_INSUFFICIENT_RESOURCES if there is no room in + * memory to increase the size of the usage table header. The CDM layer + * can delete some entries and then try again, or it can pass the error + * up to the application. + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_ERROR_MULTIPLE_USAGE_ENTRIES if there already is a usage + * entry loaded into this session * - * Threading: + * @threading * This is a "Usage Table Function" and will not be called simultaneously * with any other function, as if the CDM holds a write lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in API version 13. */ OEMCryptoResult OEMCrypto_CreateNewUsageEntry(OEMCrypto_SESSION session, uint32_t* usage_entry_number); -/* - * OEMCrypto_LoadUsageEntry +/** + * This loads a usage entry saved previously by UpdateUsageEntry. The + * signature at the beginning of the buffer is verified and the buffer will + * be decrypted. Then the verification field in the entry will be verified. + * The index in the entry must match the index passed in. The generation + * number in the entry will be compared against the entry's corresponding + * generation number in the header. If it is off by 1, a warning is returned, + * but the entry is still loaded. This warning may be logged by the CDM + * layer. If the generation number is off by more than 1, an error is + * returned and the entry is not loaded. * - * Description: - * This loads a usage entry saved previously by UpdateUsageEntry. The - * signature at the beginning of the buffer is verified and the buffer will - * be decrypted. Then the verification field in the entry will be verified. - * The index in the entry must match the index passed in. The generation - * number in the entry will be compared against the entry's corresponding - * generation number in the header. If it is off by 1, a warning is returned, - * but the entry is still loaded. This warning may be logged by the CDM - * layer. If the generation number is off by more than 1, an error is - * returned and the entry is not loaded. + * OEMCrypto shall call ODK_ReloadClockValues, as described in "License + * Duration and Renewal" to set the session's clock values. * - * OEMCrypto shall call ODK_ReloadClockValues, as described in "License - * Duration and Renewal" to set the session's clock values. + * If the entry is already loaded into another open session, then this fails + * and returns OEMCrypto_ERROR_INVALID_SESSION. If the session already has a + * usage entry associated with it, the error + * OEMCrypto_ERROR_MULTIPLE_USAGE_ENTRIES is returned. * - * If the entry is already loaded into another open session, then this fails - * and returns OEMCrypto_ERROR_INVALID_SESSION. If the session already has a - * usage entry associated with it, the error - * OEMCrypto_ERROR_MULTIPLE_USAGE_ENTRIES is returned. + * Before version API 16, the usage entry stored the time that the license + * was loaded. This value is now interpreted as the time that the licence + * request was signed. This can be achieved by simply renaming the field and + * using the same value when reloading an older entry. * - * Before version API 16, the usage entry stored the time that the license - * was loaded. This value is now interpreted as the time that the licence - * request was signed. This can be achieved by simply renaming the field and - * using the same value when reloading an older entry. + * @param[in] session: handle for the session to be used. + * @param[in] usage_entry_number: index of existing usage entry. + * @param[in] buffer: pointer to memory containing encrypted usage table entry. + * @param[in] buffer_length: length of the buffer, in bytes. * - * Parameters: - * [in] session: handle for the session to be used. - * [in] usage_entry_number: index of existing usage entry. - * [in] buffer: pointer to memory containing encrypted usage table entry. - * [in] buffer_length: length of the buffer, in bytes. - * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_SHORT_BUFFER - * OEMCrypto_ERROR_NOT_IMPLEMENTED - some devices do not implement usage + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_SHORT_BUFFER + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED some devices do not implement usage * tables. - * OEMCrypto_ERROR_UNKNOWN_FAILURE - index beyond end of table. - * OEMCrypto_ERROR_INVALID_SESSION - entry associated with another session or - * the index is wrong. - * OEMCrypto_WARNING_GENERATION_SKEW - if the generation number is off by - * exactly 1. - * OEMCrypto_ERROR_GENERATION_SKEW - if the generation number is off by more - * than 1. - * OEMCrypto_ERROR_SIGNATURE_FAILURE - if the signature failed. - * OEMCrypto_ERROR_BAD_MAGIC - verification string does not match. - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * OEMCrypto_ERROR_MULTIPLE_USAGE_ENTRIES - if there already is a usage entry - * loaded into this session + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE index beyond end of table. + * @retval OEMCrypto_ERROR_INVALID_SESSION entry associated with another + * session or the index is wrong. + * @retval OEMCrypto_WARNING_GENERATION_SKEW if the generation number is off + * by exactly 1. + * @retval OEMCrypto_ERROR_GENERATION_SKEW if the generation number is off by + * more than 1. + * @retval OEMCrypto_ERROR_SIGNATURE_FAILURE if the signature failed. + * @retval OEMCrypto_ERROR_BAD_MAGIC verification string does not match. + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_ERROR_MULTIPLE_USAGE_ENTRIES if there already is a usage + * entry loaded into this session * - * Threading: + * @threading * This is a "Usage Table Function" and will not be called simultaneously * with any other function, as if the CDM holds a write lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in API version 13. */ OEMCryptoResult OEMCrypto_LoadUsageEntry(OEMCrypto_SESSION session, @@ -4335,68 +4180,63 @@ OEMCryptoResult OEMCrypto_LoadUsageEntry(OEMCrypto_SESSION session, const uint8_t* buffer, size_t buffer_length); -/* - * OEMCrypto_UpdateUsageEntry +/** + * Updates the session's usage entry and fills buffers with the encrypted and + * signed entry and usage table header. * - * Description: - * Updates the session's usage entry and fills buffers with the encrypted and - * signed entry and usage table header. + * OEMCrypto shall call ODK_UpdateLastPlaybackTime to update the session's + * clock values, as discussed in the document "License Duration and Renewal". + * The values in the session's clock values structure are copied to the usage + * entry. * - * OEMCrypto shall call ODK_UpdateLastPlaybackTime to update the session's - * clock values, as discussed in the document "License Duration and Renewal". - * The values in the session's clock values structure are copied to the usage - * entry. + * OEMCrypto shall update all time and status values in the entry, and then + * increment the entry's generation number. The corresponding generation + * number in the usage table header is also incremented so that it matches + * the one in the entry. The master generation number in the usage table + * header is incremented and the master generation number is copied to secure + * persistent storage. OEMCrypto will encrypt and sign the entry into the + * entry_buffer, and it will encrypt and sign the usage table header into the + * header_buffer. Some actions, such as the first decrypt and deactivating an + * entry, will also increment the entry's generation number as well as + * changing the entry's status and time fields. The first decryption will + * change the status from Inactive to Active, and it will set the time stamp + * "first decrypt". * - * OEMCrypto shall update all time and status values in the entry, and then - * increment the entry's generation number. The corresponding generation - * number in the usage table header is also incremented so that it matches - * the one in the entry. The master generation number in the usage table - * header is incremented and the master generation number is copied to secure - * persistent storage. OEMCrypto will encrypt and sign the entry into the - * entry_buffer, and it will encrypt and sign the usage table header into the - * header_buffer. Some actions, such as the first decrypt and deactivating an - * entry, will also increment the entry's generation number as well as - * changing the entry's status and time fields. The first decryption will - * change the status from Inactive to Active, and it will set the time stamp - * "first decrypt". + * If the usage entry has the flag ForbidReport set, then the flag is + * cleared. It is the responsibility of the CDM layer to call this function + * and save the usage table before the next call to ReportUsage and before + * the CDM is terminated. Failure to do so will result in generation number + * skew, which will invalidate all of the usage table. * - * If the usage entry has the flag ForbidReport set, then the flag is - * cleared. It is the responsibility of the CDM layer to call this function - * and save the usage table before the next call to ReportUsage and before - * the CDM is terminated. Failure to do so will result in generation number - * skew, which will invalidate all of the usage table. + * If either entry_buffer_length or header_buffer_length is not large enough, + * they are set to the needed size, and return OEMCrypto_ERROR_SHORT_BUFFER. + * In this case, the entry is not updated, ForbidReport is not cleared, + * generation numbers are not incremented, and no other work is done. * - * If either entry_buffer_length or header_buffer_length is not large enough, - * they are set to the needed size, and return OEMCrypto_ERROR_SHORT_BUFFER. - * In this case, the entry is not updated, ForbidReport is not cleared, - * generation numbers are not incremented, and no other work is done. + * @param[in] session: handle for the session to be used. + * @param[out] header_buffer: pointer to memory where encrypted usage table + * header is written. + * @param[in,out] header_buffer_length: (in) length of the header_buffer, in + * bytes. (out) actual length of the header_buffer + * @param[out] entry_buffer: pointer to memory where encrypted usage table entry + * is written. + * @param[in,out] entry_buffer_length: (in) length of the entry_buffer, in + * bytes. (out) actual length of the entry_buffer * - * Parameters: - * [in] session: handle for the session to be used. - * [out] header_buffer: pointer to memory where encrypted usage table header - * is written. - * [in/out] header_buffer_length: (in) length of the header_buffer, in bytes. - * (out) actual length of the header_buffer - * [out] entry_buffer: pointer to memory where encrypted usage table entry is - * written. - * [in/out] entry_buffer_length: (in) length of the entry_buffer, in bytes. - * (out) actual length of the entry_buffer - * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_SHORT_BUFFER - * OEMCrypto_ERROR_NOT_IMPLEMENTED - some devices do not implement usage + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_SHORT_BUFFER + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED some devices do not implement usage * tables. - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Threading: + * @threading * This is a "Usage Table Function" and will not be called simultaneously * with any other function, as if the CDM holds a write lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_UpdateUsageEntry( @@ -4404,393 +4244,363 @@ OEMCryptoResult OEMCrypto_UpdateUsageEntry( size_t* header_buffer_length, OEMCrypto_SharedMemory* entry_buffer, size_t* entry_buffer_length); -/* - * OEMCrypto_DeactivateUsageEntry +/** + * This deactivates the usage entry associated with the current session. This + * means that the status of the usage entry is changed to InactiveUsed if it + * was Active, or InactiveUnused if it was Unused. This also increments the + * entry's generation number, and the header's master generation number. The + * corresponding generation number in the usage table header is also + * incremented so that it matches the one in the entry. The entry's flag + * ForbidReport will be set. This flag prevents an application from + * generating a report of a deactivated license without first saving the + * entry. * - * Description: - * This deactivates the usage entry associated with the current session. This - * means that the status of the usage entry is changed to InactiveUsed if it - * was Active, or InactiveUnused if it was Unused. This also increments the - * entry's generation number, and the header's master generation number. The - * corresponding generation number in the usage table header is also - * incremented so that it matches the one in the entry. The entry's flag - * ForbidReport will be set. This flag prevents an application from - * generating a report of a deactivated license without first saving the - * entry. + * OEMCrypto shall call ODK_DeactivateUsageEntry to update the session's + * clock values, as discussed in the document "License Duration and Renewal". * - * OEMCrypto shall call ODK_DeactivateUsageEntry to update the session's - * clock values, as discussed in the document "License Duration and Renewal". + * It is allowed to call this function multiple times. If the state is + * already InactiveUsed or InactiveUnused, then this function does not change + * the entry or its state. * - * It is allowed to call this function multiple times. If the state is - * already InactiveUsed or InactiveUnused, then this function does not change - * the entry or its state. + * @param[in] session: handle for the session to be used. + * @param[in] pst: pointer to memory containing Provider Session Token. + * @param[in] pst_length: length of the pst, in bytes. * - * Parameters: - * [in] session: handle for the session to be used. - * [in] pst: pointer to memory containing Provider Session Token. - * [in] pst_length: length of the pst, in bytes. + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_INVALID_CONTEXT an entry was not created or loaded, + * or the pst does not match. + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_INVALID_CONTEXT - an entry was not created or loaded, or - * the pst does not match. - * OEMCrypto_ERROR_NOT_IMPLEMENTED - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support pst sizes of at least 255 bytes. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Usage Table Function" and will not be called simultaneously * with any other function, as if the CDM holds a write lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in API version 16. */ OEMCryptoResult OEMCrypto_DeactivateUsageEntry(OEMCrypto_SESSION session, const uint8_t* pst, size_t pst_length); -/* - * OEMCrypto_ReportUsage +/** + * All fields of OEMCrypto_PST_Report are in network byte order. * - * Description: - * All fields of OEMCrypto_PST_Report are in network byte order. + * If the buffer_length is not sufficient to hold a report structure, set + * buffer_length and return OEMCrypto_ERROR_SHORT_BUFFER. * - * If the buffer_length is not sufficient to hold a report structure, set - * buffer_length and return OEMCrypto_ERROR_SHORT_BUFFER. + * If an entry was not loaded or created with OEMCrypto_CreateNewUsageEntry + * or OEMCrypto_LoadUsageEntry, or if the pst does not match that in the + * entry, return the error OEMCrypto_ERROR_INVALID_CONTEXT. * - * If an entry was not loaded or created with OEMCrypto_CreateNewUsageEntry - * or OEMCrypto_LoadUsageEntry, or if the pst does not match that in the - * entry, return the error OEMCrypto_ERROR_INVALID_CONTEXT. + * If the usage entry's flag ForbidReport is set, indicating the entry has + * not been saved since the entry was deactivated, then the error + * OEMCrypto_ERROR_ENTRY_NEEDS_UPDATE is returned and a report is not + * generated. Similarly, if any key in the session has been used since the + * last call to OEMCrypto_UpdateUsageEntry, then the report is not generated, + * and OEMCrypto returns the error OEMCrypto_ERROR_ENTRY_NEEDS_UPDATE. * - * If the usage entry's flag ForbidReport is set, indicating the entry has - * not been saved since the entry was deactivated, then the error - * OEMCrypto_ERROR_ENTRY_NEEDS_UPDATE is returned and a report is not - * generated. Similarly, if any key in the session has been used since the - * last call to OEMCrypto_UpdateUsageEntry, then the report is not generated, - * and OEMCrypto returns the error OEMCrypto_ERROR_ENTRY_NEEDS_UPDATE. + * The pst_report is filled out by subtracting the times in the Usage Entry + * from the current time on the secure clock. This design was chosen to avoid + * a requirement to sync the device's secure clock with any external clock. * - * The pst_report is filled out by subtracting the times in the Usage Entry - * from the current time on the secure clock. This design was chosen to avoid - * a requirement to sync the device's secure clock with any external clock. + * (See drawing in "Widevine Modular DRM Security Integration Guide") * - * (See drawing in "Widevine Modular DRM Security Integration Guide") + * Valid values for status are: * - * Valid values for status are: + * - 0 = kUnused -- the keys have not been used to decrypt. + * - 1 = kActive -- the keys have been used, and have not been deactivated. + * - 2 = kInactive - deprecated. Use kInactiveUsed or kInactiveUnused. + * - 3 = kInactiveUsed -- the keys have been marked inactive after being + * active. + * - 4 = kInactiveUnused -- they keys have been marked inactive, but were + * never active. + * The clock_security_level is reported as follows: * - * - 0 = kUnused -- the keys have not been used to decrypt. - * - 1 = kActive -- the keys have been used, and have not been deactivated. - * - 2 = kInactive - deprecated. Use kInactiveUsed or kInactiveUnused. - * - 3 = kInactiveUsed -- the keys have been marked inactive after being - * active. - * - 4 = kInactiveUnused -- they keys have been marked inactive, but were - * never active. - * The clock_security_level is reported as follows: + * - 0 = Insecure Clock - clock just uses system time. + * - 1 = Secure Timer - clock runs from a secure timer which is initialized + * from system time when OEMCrypto becomes active and cannot be modified + * by user software or the user while OEMCrypto is active. A secure + * timer cannot run backwards, even while OEMCrypto is not active. + * - 2 = Secure Clock - Real-time clock set from a secure source that + * cannot be modified by user software regardless of whether OEMCrypto + * is active or inactive. The clock time can only be modified by + * tampering with the security software or hardware. + * - 3 = Hardware Secure Clock - Real-time clock set from a secure source + * that cannot be modified by user software and there are security + * features that prevent the user from modifying the clock in hardware, + * such as a tamper proof battery. + * (See drawing in "Widevine Modular DRM Security Integration Guide") * - * - 0 = Insecure Clock - clock just uses system time. - * - 1 = Secure Timer - clock runs from a secure timer which is initialized - * from system time when OEMCrypto becomes active and cannot be modified - * by user software or the user while OEMCrypto is active. A secure - * timer cannot run backwards, even while OEMCrypto is not active. - * - 2 = Secure Clock - Real-time clock set from a secure source that - * cannot be modified by user software regardless of whether OEMCrypto - * is active or inactive. The clock time can only be modified by - * tampering with the security software or hardware. - * - 3 = Hardware Secure Clock - Real-time clock set from a secure source - * that cannot be modified by user software and there are security - * features that prevent the user from modifying the clock in hardware, - * such as a tamper proof battery. - * (See drawing in "Widevine Modular DRM Security Integration Guide") + * After pst_report has been filled in, the HMAC SHA1 signature is computed + * for the buffer from bytes 20 to the end of the pst field. The signature is + * computed using the mac_key[client] which is stored in the usage table. The + * HMAC SHA1 signature is used to prevent a rogue application from using + * OMECrypto_GenerateSignature to forge a Usage Report. * - * After pst_report has been filled in, the HMAC SHA1 signature is computed - * for the buffer from bytes 20 to the end of the pst field. The signature is - * computed using the mac_key[client] which is stored in the usage table. The - * HMAC SHA1 signature is used to prevent a rogue application from using - * OMECrypto_GenerateSignature to forge a Usage Report. + * Before version 16 of this API, seconds_since_license_received was reported + * instead of seconds_since_license_signed. For any practical bookkeeping + * purposes, these events are essentially at the same time. * - * Before version 16 of this API, seconds_since_license_received was reported - * instead of seconds_since_license_signed. For any practical bookkeeping - * purposes, these events are essentially at the same time. + * Devices that do not implement a Session Usage Table may return + * OEMCrypto_ERROR_NOT_IMPLEMENTED. * - * Devices that do not implement a Session Usage Table may return - * OEMCrypto_ERROR_NOT_IMPLEMENTED. + * @param[in] session: handle for the session to be used. + * @param[in] pst: pointer to memory containing Provider Session Token. + * @param[in] pst_length: length of the pst, in bytes. + * @param[out] buffer: pointer to buffer in which usage report should be + * stored. May be null on the first call in order to find required buffer + * size. + * @param[in,out] buffer_length: (in) length of the report buffer, in bytes. + * (out) actual length of the report * - * Parameters: - * [in] session: handle for the session to be used. - * [in] pst: pointer to memory containing Provider Session Token. - * [in] pst_length: length of the pst, in bytes. - * [out] buffer: pointer to buffer in which usage report should be stored. - * May be null on the first call in order to find required buffer size. - * [in/out] buffer_length: (in) length of the report buffer, in bytes. - * (out) actual length of the report + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_SHORT_BUFFER if report buffer is not large enough + * to hold the output report. + * @retval OEMCrypto_ERROR_INVALID_SESSION no open session with that id. + * @retval OEMCrypto_ERROR_INVALID_CONTEXT + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_ENTRY_NEEDS_UPDATE if no call to UpdateUsageEntry + * since last call to Deactivate or since key use. + * @retval OEMCrypto_ERROR_WRONG_PST report asked for wrong pst. + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_SHORT_BUFFER - if report buffer is not large enough to - * hold the output report. - * OEMCrypto_ERROR_INVALID_SESSION - no open session with that id. - * OEMCrypto_ERROR_INVALID_CONTEXT - * OEMCrypto_ERROR_NOT_IMPLEMENTED - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_ENTRY_NEEDS_UPDATE - if no call to UpdateUsageEntry since - * last call to Deactivate or since key use. - * OEMCrypto_ERROR_WRONG_PST - report asked for wrong pst. - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Buffer Sizes: + * @buffer_size * OEMCrypto shall support pst sizes of at least 255 bytes. * OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is * larger than the supported size. * - * Threading: + * @threading * This is a "Usage Table Function" and will not be called simultaneously * with any other function, as if the CDM holds a write lock on the OEMCrypto * system. * - * Version: + * @version * This method changed in API version 13. */ OEMCryptoResult OEMCrypto_ReportUsage(OEMCrypto_SESSION session, const uint8_t* pst, size_t pst_length, uint8_t* buffer, size_t* buffer_length); -/* - * OEMCrypto_MoveEntry +/** + * Moves the entry associated with the current session from one location in + * the usage table header to another. This function is used by the CDM layer + * to defragment the usage table. This does not modify any data in the entry, + * except the index and the generation number. The index in the session's + * usage entry will be changed to new_index. The generation number in + * session's usage entry and in the header for new_index will be increased to + * the master generation number, and then the master generation number is + * incremented. If there was an existing entry at the new location, it will + * be overwritten. It is an error to call this when the entry that was at + * new_index is associated with a currently open session. In this case, the + * error code OEMCrypto_ERROR_ENTRY_IN_USE is returned. It is the CDM layer's + * responsibility to call UpdateUsageEntry after moving an entry. It is an + * error for new_index to be beyond the end of the existing usage table + * header. * - * Description: - * Moves the entry associated with the current session from one location in - * the usage table header to another. This function is used by the CDM layer - * to defragment the usage table. This does not modify any data in the entry, - * except the index and the generation number. The index in the session's - * usage entry will be changed to new_index. The generation number in - * session's usage entry and in the header for new_index will be increased to - * the master generation number, and then the master generation number is - * incremented. If there was an existing entry at the new location, it will - * be overwritten. It is an error to call this when the entry that was at - * new_index is associated with a currently open session. In this case, the - * error code OEMCrypto_ERROR_ENTRY_IN_USE is returned. It is the CDM layer's - * responsibility to call UpdateUsageEntry after moving an entry. It is an - * error for new_index to be beyond the end of the existing usage table - * header. + * Devices that do not implement a Session Usage Table may return + * OEMCrypto_ERROR_NOT_IMPLEMENTED. * - * Devices that do not implement a Session Usage Table may return - * OEMCrypto_ERROR_NOT_IMPLEMENTED. + * @param[in] session: handle for the session to be used. + * @param[in] new_index: new index to be used for the session's usage entry * - * Parameters: - * [in] session: handle for the session to be used. - * [in] new_index: new index to be used for the session's usage entry + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE + * @retval OEMCrypto_ERROR_ENTRY_IN_USE + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_NOT_IMPLEMENTED - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - * OEMCrypto_ERROR_ENTRY_IN_USE - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Usage Table Function" and will not be called simultaneously * with any other function, as if the CDM holds a write lock on the OEMCrypto * system. * - * Version: + * @version * This method is new in API version 13. */ OEMCryptoResult OEMCrypto_MoveEntry(OEMCrypto_SESSION session, uint32_t new_index); -/* - * OEMCrypto_ShrinkUsageTableHeader +/** + * This shrinks the usage table and the header. This function is used by the + * CDM layer after it has defragmented the usage table and can delete unused + * entries. It is an error if any open session is associated with an entry + * that will be erased - the error OEMCrypto_ERROR_ENTRY_IN_USE shall be + * returned in this case, and the header shall not be modified. If + * new_entry_count is larger than the current size, then the header is not + * changed and the error OEMCrypto_ERROR_UNKNOWN_FAILURE is returned. If the + * header has not been previously loaded, then an error is returned. + * OEMCrypto will increment the master generation number in the header and + * store the new value in secure persistent storage. Then, OEMCrypto will + * encrypt and sign the header into the provided buffer. The generation + * numbers of all remaining entries will remain unchanged. The next time + * OEMCrypto_CreateNewUsageEntry is called, the new entry will have an index + * of new_entry_count. * - * Description: - * This shrinks the usage table and the header. This function is used by the - * CDM layer after it has defragmented the usage table and can delete unused - * entries. It is an error if any open session is associated with an entry - * that will be erased - the error OEMCrypto_ERROR_ENTRY_IN_USE shall be - * returned in this case, and the header shall not be modified. If - * new_entry_count is larger than the current size, then the header is not - * changed and the error OEMCrypto_ERROR_UNKNOWN_FAILURE is returned. If the - * header has not been previously loaded, then an error is returned. - * OEMCrypto will increment the master generation number in the header and - * store the new value in secure persistent storage. Then, OEMCrypto will - * encrypt and sign the header into the provided buffer. The generation - * numbers of all remaining entries will remain unchanged. The next time - * OEMCrypto_CreateNewUsageEntry is called, the new entry will have an index - * of new_entry_count. + * Devices that do not implement a Session Usage Table may return + * OEMCrypto_ERROR_NOT_IMPLEMENTED. * - * Devices that do not implement a Session Usage Table may return - * OEMCrypto_ERROR_NOT_IMPLEMENTED. + * If header_buffer_length is not large enough to hold the new table, it is + * set to the needed value, the generation number is not incremented, and + * OEMCrypto_ERROR_SHORT_BUFFER is returned. * - * If header_buffer_length is not large enough to hold the new table, it is - * set to the needed value, the generation number is not incremented, and - * OEMCrypto_ERROR_SHORT_BUFFER is returned. + * If the header has not been loaded or created, return the error + * OEMCrypto_ERROR_UNKNOWN_FAILURE. * - * If the header has not been loaded or created, return the error - * OEMCrypto_ERROR_UNKNOWN_FAILURE. + * @param[in] new_entry_count: number of entries in the to be in the header. + * @param[out] header_buffer: pointer to memory where encrypted usage table + * header is written. + * @param[in,out] header_buffer_length: (in) length of the header_buffer, in + * bytes. (out) actual length of the header_buffer * - * Parameters: - * [in] new_entry_count: number of entries in the to be in the header. - * [out] header_buffer: pointer to memory where encrypted usage table header - * is written. - * [in/out] header_buffer_length: (in) length of the header_buffer, in bytes. - * (out) actual length of the header_buffer + * @retval OEMCrypto_SUCCESS success + * @retval OEMCrypto_ERROR_SHORT_BUFFER + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE + * @retval OEMCrypto_ERROR_ENTRY_IN_USE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS success - * OEMCrypto_ERROR_SHORT_BUFFER - * OEMCrypto_ERROR_NOT_IMPLEMENTED - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * OEMCrypto_ERROR_ENTRY_IN_USE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Usage Table Function" and will not be called simultaneously * with any other function, as if the CDM holds a write lock on the OEMCrypto * system. * - * Version: + * @version * This method is new in API version 13. */ OEMCryptoResult OEMCrypto_ShrinkUsageTableHeader(uint32_t new_entry_count, uint8_t* header_buffer, size_t* header_buffer_length); -/* - * OEMCrypto_RemoveSRM +/// @} + +/// @addtogroup test_verify +/// @{ + +/** + * Delete the current SRM. Any valid SRM, regardless of its version number, + * will be installable after this via OEMCrypto_LoadSRM. * - * Description: - * Delete the current SRM. Any valid SRM, regardless of its version number, - * will be installable after this via OEMCrypto_LoadSRM. + * This function should not be implemented on production devices, and will + * only be used to verify unit tests on a test device. * - * This function should not be implemented on production devices, and will - * only be used to verify unit tests on a test device. + * @retval OEMCrypto_SUCCESS if the SRM file was deleted. + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED always on production devices. * - * Parameters: - * none - * - * Returns: - * OEMCrypto_SUCCESS - if the SRM file was deleted. - * OEMCrypto_ERROR_NOT_IMPLEMENTED - always on production devices. - * - * Threading: + * @threading * This is an "Initialization and Termination Function" and will not be * called simultaneously with any other function, as if the CDM holds a write * lock on the OEMCrypto system. * - * Version: + * @version * This method is new in API version 13. */ OEMCryptoResult OEMCrypto_RemoveSRM(void); -/* - * OEMCrypto_SupportsDecryptHash +/** + * Returns the type of hash function supported for Full Decrypt Path Testing. + * A hash type of OEMCrypto_Hash_Not_Supported = 0 means this feature is not + * supported. OEMCrypto is not required by Google to support this feature, + * but support will greatly improve automated testing. A hash type of + * OEMCrypto_CRC_Clear_Buffer = 1 means the device will be able to compute + * the CRC 32 checksum of the decrypted content in the secure buffer after a + * call to OEMCrypto_DecryptCENC. Google intends to provide test applications + * on some platforms, such as Android, that will automate decryption testing + * using the CRC 32 checksum of all frames in some test content. * - * Description: - * Returns the type of hash function supported for Full Decrypt Path Testing. - * A hash type of OEMCrypto_Hash_Not_Supported = 0 means this feature is not - * supported. OEMCrypto is not required by Google to support this feature, - * but support will greatly improve automated testing. A hash type of - * OEMCrypto_CRC_Clear_Buffer = 1 means the device will be able to compute - * the CRC 32 checksum of the decrypted content in the secure buffer after a - * call to OEMCrypto_DecryptCENC. Google intends to provide test applications - * on some platforms, such as Android, that will automate decryption testing - * using the CRC 32 checksum of all frames in some test content. + * If an SOC vendor cannot support CRC 32 checksums of decrypted output, but + * can support some other hash or checksum, then the function should return + * OEMCrypto_Partner_Defined_Hash = 2 and those partners should modify the + * test application to compute the appropriate hash. An application that + * computes the CRC 32 hashes of test content and builds a hash file in the + * correct format will be provided by Widevine. The source of this + * application will be provided so that partners may modify it to compute + * their own hash format and generate their own hashes. * - * If an SOC vendor cannot support CRC 32 checksums of decrypted output, but - * can support some other hash or checksum, then the function should return - * OEMCrypto_Partner_Defined_Hash = 2 and those partners should modify the - * test application to compute the appropriate hash. An application that - * computes the CRC 32 hashes of test content and builds a hash file in the - * correct format will be provided by Widevine. The source of this - * application will be provided so that partners may modify it to compute - * their own hash format and generate their own hashes. + * @retval OEMCrypto_Hash_Not_Supported = 0; + * @retval OEMCrypto_CRC_Clear_Buffer = 1; + * @retval OEMCrypto_Partner_Defined_Hash = 2; * - * Returns: - * OEMCrypto_Hash_Not_Supported = 0; - * OEMCrypto_CRC_Clear_Buffer = 1; - * OEMCrypto_Partner_Defined_Hash = 2; - * - * Threading: + * @threading * This is a "Property Function" and may be called simultaneously with any * other property function or session function, but not any initialization or * usage table function, as if the CDM holds a read lock on the OEMCrypto * system. * - * Version: + * @version * This method is new in API version 15. */ uint32_t OEMCrypto_SupportsDecryptHash(void); -/* - * OEMCrypto_SetDecryptHash +/** + * Set the hash value for the next frame to be decrypted. This function is + * called before the first subsample is passed to OEMCrypto_DecryptCENC, when + * the subsample_flag has the bit OEMCrypto_FirstSubsample set. The hash is + * over all of the frame or sample: encrypted and clear subsamples + * concatenated together, up to, and including the subsample with the + * subsample_flag having the bit OEMCrypto_LastSubsample set. If hashing the + * output is not supported, then this will return + * OEMCrypto_ERROR_NOT_IMPLEMENTED. If the hash is ill formed or there are + * other error conditions, this returns OEMCrypto_ERROR_UNKNOWN_FAILURE. The + * length of the hash will be at most 128 bytes, and will be 4 bytes (32 + * bits) for the default CRC32 hash. * - * Description: - * Set the hash value for the next frame to be decrypted. This function is - * called before the first subsample is passed to OEMCrypto_DecryptCENC, when - * the subsample_flag has the bit OEMCrypto_FirstSubsample set. The hash is - * over all of the frame or sample: encrypted and clear subsamples - * concatenated together, up to, and including the subsample with the - * subsample_flag having the bit OEMCrypto_LastSubsample set. If hashing the - * output is not supported, then this will return - * OEMCrypto_ERROR_NOT_IMPLEMENTED. If the hash is ill formed or there are - * other error conditions, this returns OEMCrypto_ERROR_UNKNOWN_FAILURE. The - * length of the hash will be at most 128 bytes, and will be 4 bytes (32 - * bits) for the default CRC32 hash. + * This may be called before the first call to SelectKey. In that case, this + * function cannot verify that the key control block allows hash + * verification. The function DecryptCENC should verify that the key control + * bit allows hash verification when it is called. If an attempt is made to + * compute a hash when the selected key does not have the bit + * Allow_Hash_Verification set, then a hash should not be computed, and + * OEMCrypto_GetHashErrorCode should return the error + * OEMCrypto_ERROR_UNKNOWN_FAILURE. * - * This may be called before the first call to SelectKey. In that case, this - * function cannot verify that the key control block allows hash - * verification. The function DecryptCENC should verify that the key control - * bit allows hash verification when it is called. If an attempt is made to - * compute a hash when the selected key does not have the bit - * Allow_Hash_Verification set, then a hash should not be computed, and - * OEMCrypto_GetHashErrorCode should return the error - * OEMCrypto_ERROR_UNKNOWN_FAILURE. + * OEMCrypto should compute the hash of the frame and then compare it with + * the correct value. If the values differ, then OEMCrypto should latch in an + * error and save the frame number of the bad hash. It is allowed for + * OEMCrypto to postpone computation of the hash until the frame is + * displayed. This might happen if the actual decryption operation is carried + * out by a later step in the video pipeline, or if you are using a partner + * specified hash of the decoded frame. For this reason, an error state must + * be saved until the call to OEMCrypto_GetHashErrorCode is made. * - * OEMCrypto should compute the hash of the frame and then compare it with - * the correct value. If the values differ, then OEMCrypto should latch in an - * error and save the frame number of the bad hash. It is allowed for - * OEMCrypto to postpone computation of the hash until the frame is - * displayed. This might happen if the actual decryption operation is carried - * out by a later step in the video pipeline, or if you are using a partner - * specified hash of the decoded frame. For this reason, an error state must - * be saved until the call to OEMCrypto_GetHashErrorCode is made. + * @param[in] session: session id for current decrypt operation + * @param[in] frame_number: frame number for the recent DecryptCENC sample. + * @param[in] hash: hash or CRC of previously decrypted frame. + * @param[in] hash_length: length of hash, in bytes. * - * Parameters: - * [in] session: session id for current decrypt operation - * [in] frame_number: frame number for the recent DecryptCENC sample. - * [in] hash: hash or CRC of previously decrypted frame. - * [in] hash_length: length of hash, in bytes. + * @retval OEMCrypto_SUCCESS if the hash was set + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED function not implemented + * @retval OEMCrypto_ERROR_INVALID_SESSION session not open + * @retval OEMCrypto_ERROR_SHORT_BUFFER hash_length too short for supported + * hash type + * @retval OEMCrypto_ERROR_BUFFER_TOO_LARGE hash_length too long for supported + * hash type + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE other error + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS - if the hash was set - * OEMCrypto_ERROR_NOT_IMPLEMENTED - function not implemented - * OEMCrypto_ERROR_INVALID_SESSION - session not open - * OEMCrypto_ERROR_SHORT_BUFFER - hash_length too short for supported hash - * type - * OEMCrypto_ERROR_BUFFER_TOO_LARGE - hash_length too long for supported hash - * type - * OEMCrypto_ERROR_UNKNOWN_FAILURE - other error - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method is new in API version 15. */ OEMCryptoResult OEMCrypto_SetDecryptHash(OEMCrypto_SESSION session, @@ -4798,128 +4608,115 @@ OEMCryptoResult OEMCrypto_SetDecryptHash(OEMCrypto_SESSION session, const uint8_t* hash, size_t hash_length); -/* - * OEMCrypto_GetHashErrorCode +/** + * If the hash set in OEMCrypto_SetDecryptHash did not match the computed + * hash, then an error code was saved internally. This function returns that + * error and the frame number of the bad hash. This will be called + * periodically, but might not be in sync with the decrypt loop. OEMCrypto + * shall not reset the error state to "no error" once any frame has failed + * verification. It should be initialized to "no error" when the session is + * first opened. If there is more than one bad frame, it is the implementer's + * choice if it is more useful to return the number of the first bad frame, + * or the most recent bad frame. * - * Description: - * If the hash set in OEMCrypto_SetDecryptHash did not match the computed - * hash, then an error code was saved internally. This function returns that - * error and the frame number of the bad hash. This will be called - * periodically, but might not be in sync with the decrypt loop. OEMCrypto - * shall not reset the error state to "no error" once any frame has failed - * verification. It should be initialized to "no error" when the session is - * first opened. If there is more than one bad frame, it is the implementer's - * choice if it is more useful to return the number of the first bad frame, - * or the most recent bad frame. + * If the hash could not be computed -- either because the + * Allow_Hash_Verification was not set in the key control block, or because + * there were other issues -- this function should return + * OEMCrypto_ERROR_UNKNOWN_FAILURE. * - * If the hash could not be computed -- either because the - * Allow_Hash_Verification was not set in the key control block, or because - * there were other issues -- this function should return - * OEMCrypto_ERROR_UNKNOWN_FAILURE. + * @param[in] session: session id for operation. + * @param[out] failed_frame_number: frame number for sample with incorrect hash. * - * Parameters: - * [in] session: session id for operation. - * [out] failed_frame_number: frame number for sample with incorrect hash. + * @retval OEMCrypto_SUCCESS if all frames have had a correct hash + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_ERROR_BAD_HASH if any frame had an incorrect hash + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE if the hash could not be computed + * @retval OEMCrypto_ERROR_SESSION_LOST_STATE + * @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED * - * Returns: - * OEMCrypto_SUCCESS - if all frames have had a correct hash - * OEMCrypto_ERROR_NOT_IMPLEMENTED - * OEMCrypto_ERROR_BAD_HASH - if any frame had an incorrect hash - * OEMCrypto_ERROR_UNKNOWN_FAILURE - if the hash could not be computed - * OEMCrypto_ERROR_SESSION_LOST_STATE - * OEMCrypto_ERROR_SYSTEM_INVALIDATED - * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method is new in API version 15. */ OEMCryptoResult OEMCrypto_GetHashErrorCode(OEMCrypto_SESSION session, uint32_t* failed_frame_number); -/* - * OEMCrypto_AllocateSecureBuffer +/** + * Allocates a secure buffer and fills out the destination buffer information + * in output_descriptor. The integer secure_fd may also be set to indicate + * the source of the buffer. OEMCrypto may use the secure_fd to help track + * the buffer if it wishes. The unit tests will pass a pointer to the same + * destination buffer description and the same secure_fd to + * OEMCrypto_FreeSecureBuffer when the buffer is to be freed. * - * Description: - * Allocates a secure buffer and fills out the destination buffer information - * in output_descriptor. The integer secure_fd may also be set to indicate - * the source of the buffer. OEMCrypto may use the secure_fd to help track - * the buffer if it wishes. The unit tests will pass a pointer to the same - * destination buffer description and the same secure_fd to - * OEMCrypto_FreeSecureBuffer when the buffer is to be freed. + * This is especially helpful if the hash functions above are supported. This + * will only be used by the OEMCrypto unit tests, so we recommend returning + * OEMCrypto_ERROR_NOT_IMPLEMENTED for production devices if performance is + * an issue. If OEMCrypto_ERROR_NOT_IMPLEMENTED is returned, then secure + * buffer unit tests will be skipped. * - * This is especially helpful if the hash functions above are supported. This - * will only be used by the OEMCrypto unit tests, so we recommend returning - * OEMCrypto_ERROR_NOT_IMPLEMENTED for production devices if performance is - * an issue. If OEMCrypto_ERROR_NOT_IMPLEMENTED is returned, then secure - * buffer unit tests will be skipped. + * @param[in] session: session id for operation. + * @param[in] buffer_size: the requested buffer size. + * @param[out] output_descriptor: the buffer descriptor for the created + * buffer. This will be passed into the OEMCrypto_DecryptCENC function. + * @param[out] secure_fd: a pointer to platform dependent file or buffer + * descriptor. This will be passed to OEMCrypto_FreeSecureBuffer. * - * Parameters: - * [in] session: session id for operation. - * [in] buffer_size: the requested buffer size. - * [out] output_descriptor: the buffer descriptor for the created buffer. - * This will be passed into the OEMCrypto_DecryptCENC function. - * [out] secure_fd: a pointer to platform dependent file or buffer - * descriptor. This will be passed to OEMCrypto_FreeSecureBuffer. + * @retval OEMCrypto_SUCCESS if the buffer was created + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_ERROR_OUTPUT_TOO_LARGE + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE * - * Returns: - * OEMCrypto_SUCCESS - if the buffer was created - * OEMCrypto_ERROR_NOT_IMPLEMENTED - * OEMCrypto_ERROR_OUTPUT_TOO_LARGE - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method is new in API version 16. */ OEMCryptoResult OEMCrypto_AllocateSecureBuffer( OEMCrypto_SESSION session, size_t buffer_size, OEMCrypto_DestBufferDesc* output_descriptor, int* secure_fd); -/* - * OEMCrypto_FreeSecureBuffer +/** + * Frees a secure buffer that had previously been created with + * OEMCrypto_AllocateSecureBuffer. Any return value except OEMCrypto_SUCCESS + * will cause the unit test using secure buffers to fail. * - * Description: - * Frees a secure buffer that had previously been created with - * OEMCrypto_AllocateSecureBuffer. Any return value except OEMCrypto_SUCCESS - * will cause the unit test using secure buffers to fail. + * @param[in] session: session id for operation. + * @param[out] output_descriptor: the buffer descriptor modified by + * OEMCrypto_AllocateSecureBuffer + * @param[in] secure_fd: The integer returned by OEMCrypto_AllocateSecureBuffer * - * Parameters: - * [in] session: session id for operation. - * [out] output_descriptor: the buffer descriptor modified by - * OEMCrypto_AllocateSecureBuffer - * [in] secure_fd: The integer returned by OEMCrypto_AllocateSecureBuffer + * @retval OEMCrypto_SUCCESS if the buffer was freed + * @retval OEMCrypto_ERROR_NOT_IMPLEMENTED + * @retval OEMCrypto_ERROR_UNKNOWN_FAILURE * - * Returns: - * OEMCrypto_SUCCESS - if the buffer was freed - * OEMCrypto_ERROR_NOT_IMPLEMENTED - * OEMCrypto_ERROR_UNKNOWN_FAILURE - * - * Threading: + * @threading * This is a "Session Function" and may be called simultaneously with session * functions for other sessions but not simultaneously with other functions * for this session. It will not be called simultaneously with initialization * or usage table functions. It is as if the CDM holds a write lock for this * session, and a read lock on the OEMCrypto system. * - * Version: + * @version * This method is new in API version 16. */ OEMCryptoResult OEMCrypto_FreeSecureBuffer( OEMCrypto_SESSION session, OEMCrypto_DestBufferDesc* output_descriptor, int secure_fd); +/// @} + /****************************************************************************/ /****************************************************************************/ /* The following functions are deprecated. They are not required for the diff --git a/oemcrypto/include/OEMCryptoCENCCommon.h b/oemcrypto/include/OEMCryptoCENCCommon.h index 03d7030a..5e54cc6b 100644 --- a/oemcrypto/include/OEMCryptoCENCCommon.h +++ b/oemcrypto/include/OEMCryptoCENCCommon.h @@ -1,6 +1,6 @@ -/* Copyright 2019 Google LLC. All rights reserved. This file and proprietary */ -/* source code may only be used and distributed under the Widevine Master */ -/* License Agreement. */ +// Copyright 2019 Google LLC. All rights reserved. This file and proprietary +// source code may only be used and distributed under the Widevine Master +// License Agreement. /********************************************************************* * OEMCryptoCENCCommon.h @@ -20,7 +20,11 @@ extern "C" { #endif +/// @addtogroup common_types +/// @{ + /* clang-format off */ +/** Error and result codes returned by OEMCrypto functions. */ typedef enum OEMCryptoResult { OEMCrypto_SUCCESS = 0, OEMCrypto_ERROR_INIT_FAILED = 1, @@ -94,8 +98,7 @@ typedef enum OEMCryptoResult { } OEMCryptoResult; /* clang-format on */ -/* - * OEMCrypto_Usage_Entry_Status. +/** * Valid values for status in the usage table. */ typedef enum OEMCrypto_Usage_Entry_Status { @@ -106,7 +109,7 @@ typedef enum OEMCrypto_Usage_Entry_Status { kInactiveUnused = 4, } OEMCrypto_Usage_Entry_Status; -/* +/** * OEMCrypto_LicenseType is used in the license message to indicate if the key * objects are for content keys, or for entitlement keys. */ @@ -122,9 +125,7 @@ typedef enum OEMCrypto_PrivateKeyType { OEMCrypto_ECC_Private_Key = 1, } OEMCrypto_PrivateKeyType; -/* - * OEMCrypto_Substring - * +/** * Used to indicate a substring of a signed message in OEMCrypto_LoadKeys and * other functions which must verify that a parameter is contained within a * signed message. @@ -134,23 +135,22 @@ typedef struct { size_t length; } OEMCrypto_Substring; -/* - * OEMCrypto_KeyObject +/** * Points to the relevant fields for a content key. The fields are extracted * from the License Response message offered to OEMCrypto_LoadKeys(). Each * field points to one of the components of the key. Key data, key control, * and both IV fields are 128 bits (16 bytes): - * key_id - the unique id of this key. - * key_id_length - the size of key_id. OEMCrypto may assume this is at + * @param key_id: the unique id of this key. + * @param key_id_length: the size of key_id. OEMCrypto may assume this is at * most 16. However, OEMCrypto shall correctly handle key id lengths * from 1 to 16 bytes. - * key_data_iv - the IV for performing AES-128-CBC decryption of the + * @param key_data_iv: the IV for performing AES-128-CBC decryption of the * key_data field. - * key_data - the key data. It is encrypted (AES-128-CBC) with the + * @param key_data - the key data. It is encrypted (AES-128-CBC) with the * session's derived encrypt key and the key_data_iv. - * key_control_iv - the IV for performing AES-128-CBC decryption of the + * @param key_control_iv: the IV for performing AES-128-CBC decryption of the * key_control field. - * key_control - the key control block. It is encrypted (AES-128-CBC) with + * @param key_control: the key control block. It is encrypted (AES-128-CBC) with * the content key from the key_data field. * * The memory for the OEMCrypto_KeyObject fields is allocated and freed @@ -164,8 +164,10 @@ typedef struct { OEMCrypto_Substring key_control; } OEMCrypto_KeyObject; +/// @} + #ifdef __cplusplus } #endif -#endif /* WIDEVINE_ODK_INCLUDE_OEMCRYPTOCENCCOMMON_H_ */ +#endif // WIDEVINE_ODK_INCLUDE_OEMCRYPTOCENCCOMMON_H_ diff --git a/oemcrypto/test/fuzz_tests/README.md b/oemcrypto/test/fuzz_tests/README.md index aafeda15..cd3f5b52 100644 --- a/oemcrypto/test/fuzz_tests/README.md +++ b/oemcrypto/test/fuzz_tests/README.md @@ -139,9 +139,76 @@ ``` *Note*: Make sure LLVMFuzzerTestOneInput calls the function you want to fuzz. -* Add a new target to oemcrypto_fuzztests.gyp file and follow instructions in +* Add a new target to oemcrypto_fuzztests.gyp file and follow instructions in [testing fuzzer locally](#testing-fuzzer-locally) to build and test locally. +## Building OEMCrypto fuzz scripts and uploading them to Google Cloud Storage: + +* We are using Google Cloud Buid (GCB) in order to setup continuous + integration which uploads OEMCrypto fuzz binaries to Google Cloud Storage. + GCB expects build script in form of a docker image that is uploaded to + Google Container Registry(GCR). + + The cloud build scripts (docker images) for widevine projects are + [here](https://widevine-internal.googlesource.com/cloud/+/refs/heads/master/docker/README.md) + + Refer to README of the project to setup a new docker image and uploading + the image to GCR. + +* Git on borg repository needs to be integrated with GCB and a git trigger + needs to be set up in order to achieve continuous integration. Git trigger + will mention which docker image the GCB needs to use in order to build fuzz + binaries. GCB searches for docker images from GCR. + + Design document lists the steps to create a git trigger. + +### Adding a new fuzz script to the build script: + +* In order to update build script such as adding a new fuzzer to build script, + we need to update the build script in docker image from cloud repository. + [Build script.](https://widevine-internal.googlesource.com/cloud/+/refs/heads/master/docker + /cloud_build/oemcrypto/release/ubuntu/fuzz/build.sh) + + Add the new fuzz script name to fuzzers variable and follow steps in README + to upload new docker image. Make sure you update the tag to be higher than + latest version in GCR. + + Run the following command from your machine to update the docker image tag + in the git trigger. + + ```shell + stubby call --rpc_creds_file=/tmp/mint.txt \ + blade:alphasource-ci-proctor-metadata-service-prod \ + ProctorMetadataService.UpdateTrigger --proto2 <cloud scheduler->oemcrypto_fuzzing_code_coverage_reports and + click on `RUN NOW` button. - ```shell - # Run fuzz binary against corpus backup to generate default.profraw file. - $ ./out/Default/fuzz_binary path/to/corpus/backup -runs=0 - # Index raw profile files to generate coverage reports. - $ llvm-profdata merge -sparse default.profraw -o default.profdata - # Generate html coverage file. - $ llvm-cov show ./out/Default/fuzz_binary -format=html \ - -instr-profile=default.profdata -o default.html - ``` \ No newline at end of file +* The above step should invoke a google cloud build. Go to cloud build console + and find latest build job with Trigger Name + `oemcrypto-fuzzing-code-coverage-git-trigger`. + +* Once the build job is successful, latest code coverage reports can be + downloaded from [GCS](https://pantheon.corp.google.com/storage/browser/oemcrypto_fuzzing_code_coverage_reports;tab=objects?forceOnBucketsSortingFiltering=false&project=google.com:blockbuster-1154&prefix=). + The coverage report folder uploaded to GCS is appended with timestamp. \ No newline at end of file diff --git a/oemcrypto/test/fuzz_tests/oemcrypto_decrypt_cenc_fuzz.cc b/oemcrypto/test/fuzz_tests/oemcrypto_decrypt_cenc_fuzz.cc new file mode 100644 index 00000000..94d3136d --- /dev/null +++ b/oemcrypto/test/fuzz_tests/oemcrypto_decrypt_cenc_fuzz.cc @@ -0,0 +1,182 @@ +// Copyright 2020 Google LLC. All Rights Reserved. This file and proprietary +// source code may only be used and distributed under the Widevine Master +// License Agreement. + +#include "FuzzedDataProvider.h" +#include "OEMCryptoCENC.h" +#include "log.h" +#include "oemcrypto_fuzz_helper.h" +#include "oemcrypto_fuzz_structs.h" + +namespace wvoec { +const size_t MAX_FUZZ_SAMPLE_SIZE = 5 * MB; +// Free dynamic memory allocated by fuzzer script. +void FreeOutputBuffers(OEMCrypto_SESSION session_id, + OEMCrypto_SampleDescription* sample_description, + size_t sample_index, int* secure_fd_array) { + for (size_t i = 0; i < sample_index; i++) { + OEMCrypto_DestBufferDesc fuzzed_output_descriptor = + sample_description[i].buffers.output_descriptor; + switch (fuzzed_output_descriptor.type) { + case OEMCrypto_BufferType_Clear: { + delete[] fuzzed_output_descriptor.buffer.clear.address; + break; + } + case OEMCrypto_BufferType_Secure: { + OEMCrypto_FreeSecureBuffer(session_id, &fuzzed_output_descriptor, + secure_fd_array[i]); + break; + } + case OEMCrypto_BufferType_Direct: { + break; + } + } + } +} + +// Function to initialize output buffer pointers by allocating memory. +// Limiting output buffer size to 5 MB as 4 MB is maximum size specified +// by resource rating tier documentation. +bool InitializeOutputBuffers(OEMCrypto_SESSION session_id, + OEMCrypto_DestBufferDesc& output_descriptor, + size_t sample_index, + vector& secure_fd_array) { + switch (output_descriptor.type) { + case OEMCrypto_BufferType_Clear: { + output_descriptor.buffer.clear + .address = new OEMCrypto_SharedMemory[std::min( + MAX_FUZZ_SAMPLE_SIZE, output_descriptor.buffer.clear.address_length)]; + return true; + } + case OEMCrypto_BufferType_Secure: { + int* secure_fd; + OEMCryptoResult sts = OEMCrypto_AllocateSecureBuffer( + session_id, + std::min(MAX_FUZZ_SAMPLE_SIZE, + output_descriptor.buffer.secure.handle_length), + &output_descriptor, secure_fd); + if (sts == OEMCrypto_SUCCESS) secure_fd_array[sample_index] = *secure_fd; + return sts == OEMCrypto_SUCCESS; + } + case OEMCrypto_BufferType_Direct: { + return true; + } + } +} + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { + // Redirect printf and log statements from oemcrypto functions to a file to + // reduce noise + RedirectStdoutToFile(); + size_t samples_length; + + // Split data using separator. + auto inputs = SplitInput(data, size); + if (inputs.size() < 2) { + return 0; + } + + OEMCrypto_Decrypt_Cenc_Fuzz fuzzed_structure; + if (inputs[0].size() < sizeof(fuzzed_structure)) { + return 0; + } + // Copy OEMCrypto_Decrypt_Cenc_Fuzz from input data. + memcpy(&fuzzed_structure, data, sizeof(fuzzed_structure)); + ConvertDataToValidEnum(OEMCrypto_CipherMode_MaxValue, + &fuzzed_structure.cipher_mode); + + size_t remaining_size_for_samples = + inputs[0].size() - sizeof(fuzzed_structure); + // Initialize FDP structures to read data using inbuilt functions. + FuzzedDataProvider fuzzed_sample_data(data + sizeof(fuzzed_structure), + remaining_size_for_samples); + FuzzedDataProvider fuzzed_subsample_data(inputs[1].data(), inputs[1].size()); + + // Read subsamples from fuzzed data. + vector subsamples; + while (fuzzed_subsample_data.remaining_bytes() > + sizeof(OEMCrypto_SubSampleDescription)) { + OEMCrypto_SubSampleDescription subsample; + fuzzed_subsample_data.ConsumeData(&subsample, + sizeof(OEMCrypto_SubSampleDescription)); + subsamples.push_back(subsample); + } + if (subsamples.size() == 0) { + return 0; + } + + // Infer samples_length from fuzzed data. + size_t sample_description_size = sizeof(OEMCrypto_SampleDescription); + samples_length = + fuzzed_sample_data.remaining_bytes() / sample_description_size; + if (samples_length == 0) { + return 0; + } + + // Initialize sample_descriptions array. + vector sample_descriptions(samples_length); + // Create array to maintain secure_fd buffer values for secure buffers. + vector secure_fd_array(samples_length); + + OEMCryptoLicenseAPIFuzz license_api_fuzz; + Session* session = license_api_fuzz.session(); + // Copy samples from fuzzed data. + size_t input_subsample_index = 0; + size_t total_input_data_length = 0; + for (size_t i = 0; i < samples_length; i++) { + fuzzed_sample_data.ConsumeData(&sample_descriptions[i], + sample_description_size); + ConvertDataToValidEnum( + OEMCrypto_BufferType_MaxValue, + &sample_descriptions[i].buffers.output_descriptor.type); + + // Copy random data into input sample data. Cap input data length at 5 MB, + // 1 MB higher than that described by resource rating tier. + total_input_data_length += std::min( + MAX_FUZZ_SAMPLE_SIZE, sample_descriptions[i].buffers.input_data_length); + + // Copy sub sample data. + sample_descriptions[i].subsamples = &subsamples[input_subsample_index]; + input_subsample_index += sample_descriptions[i].subsamples_length; + if (input_subsample_index > subsamples.size()) return 0; + } // Sample loop. + + // Allocate input/output buffers for each sample description. + vector input_buffer(total_input_data_length); + RAND_bytes(input_buffer.data(), total_input_data_length); + size_t input_buffer_index = 0; + for (size_t i = 0; i < samples_length; i++) { + sample_descriptions[i].buffers.input_data = + &input_buffer[input_buffer_index]; + input_buffer_index += std::min( + MAX_FUZZ_SAMPLE_SIZE, sample_descriptions[i].buffers.input_data_length); + + // Create output buffer pointers. If secure buffer is not supported, we + // explicitly convert to clear buffer and fuzz. + if (!InitializeOutputBuffers( + session->session_id(), + sample_descriptions[i].buffers.output_descriptor, i, + secure_fd_array)) { + LOGI( + "[OEMCrypto decrypt CENC fuzz] Secure buffers are not supported. Use " + "clear buffer instead."); + sample_descriptions[i].buffers.output_descriptor.type = + OEMCrypto_BufferType_Clear; + InitializeOutputBuffers(session->session_id(), + sample_descriptions[i].buffers.output_descriptor, + i, secure_fd_array); + } + } + + // Load license and call decrypt_cenc API. + license_api_fuzz.LoadLicense(); + OEMCrypto_SelectKey(session->session_id(), session->license().keys[0].key_id, + session->license().keys[0].key_id_length, + fuzzed_structure.cipher_mode); + OEMCrypto_DecryptCENC(session->session_id(), sample_descriptions.data(), + samples_length, &fuzzed_structure.pattern); + FreeOutputBuffers(session->session_id(), sample_descriptions.data(), + samples_length, secure_fd_array.data()); + return 0; +} +} // namespace wvoec diff --git a/oemcrypto/test/fuzz_tests/oemcrypto_fuzz_helper.cc b/oemcrypto/test/fuzz_tests/oemcrypto_fuzz_helper.cc index 2984ff00..3596d619 100644 --- a/oemcrypto/test/fuzz_tests/oemcrypto_fuzz_helper.cc +++ b/oemcrypto/test/fuzz_tests/oemcrypto_fuzz_helper.cc @@ -5,4 +5,21 @@ namespace wvoec { void RedirectStdoutToFile() { freopen("log.txt", "a", stdout); } + +std::vector> SplitInput(const uint8_t* data, size_t size) { + std::vector> result; + auto current_pos = data; + auto end = data + size; + // Using memmem to find separator + while (const uint8_t* pos = reinterpret_cast( + memmem(current_pos, end - current_pos, kFuzzDataSeparator, + sizeof(kFuzzDataSeparator)))) { + result.push_back({current_pos, pos}); + current_pos = pos + sizeof(kFuzzDataSeparator); + } + if (current_pos < end) { + result.push_back({current_pos, end}); + } + return result; +} } // namespace wvoec diff --git a/oemcrypto/test/fuzz_tests/oemcrypto_fuzz_helper.h b/oemcrypto/test/fuzz_tests/oemcrypto_fuzz_helper.h index d74c1a88..7dc707ee 100644 --- a/oemcrypto/test/fuzz_tests/oemcrypto_fuzz_helper.h +++ b/oemcrypto/test/fuzz_tests/oemcrypto_fuzz_helper.h @@ -9,9 +9,9 @@ #include "FuzzedDataProvider.h" #include "OEMCryptoCENC.h" #include "oec_device_features.h" -#include "oec_session_util.h" #include "oemcrypto_corpus_generator_helper.h" #include "oemcrypto_session_tests_helper.h" + namespace wvoec { // Initial setup to create a valid OEMCrypto state such as initializing crypto // firmware/hardware, installing golden key box etc. in order to fuzz @@ -42,6 +42,15 @@ class OEMCryptoLicenseAPIFuzz : public InitializeFuzz { LicenseRoundTrip& license_messages() { return license_messages_; } + Session* session() { return &session_; } + + void LoadLicense() { + license_messages_.SignAndVerifyRequest(); + license_messages_.CreateDefaultResponse(); + license_messages_.EncryptAndSignResponse(); + license_messages_.LoadResponse(); + } + private: Session session_; LicenseRoundTrip license_messages_; @@ -89,6 +98,9 @@ void ConvertDataToValidEnum(T max_enum_value, T* t) { // Redirect printf and log statements from oemcrypto functions to a file to // reduce noise void RedirectStdoutToFile(); + +// Function to split fuzzer input using delimiter "-_^_". +std::vector> SplitInput(const uint8_t* data, size_t size); } // namespace wvoec #endif // OEMCRYPTO_FUZZ_HELPER_H_ diff --git a/oemcrypto/test/fuzz_tests/oemcrypto_fuzz_structs.h b/oemcrypto/test/fuzz_tests/oemcrypto_fuzz_structs.h index a12a1f0a..52fb400d 100644 --- a/oemcrypto/test/fuzz_tests/oemcrypto_fuzz_structs.h +++ b/oemcrypto/test/fuzz_tests/oemcrypto_fuzz_structs.h @@ -25,6 +25,17 @@ struct OEMCrypto_Request_Fuzz { // that ODK parses and actual message buffer to the request APIs. size_t signature_length; size_t core_message_length; + // Request message is of variable length and not included in this structure. +}; + +struct OEMCrypto_Decrypt_Cenc_Fuzz { + // Corpus format is as below, let | be separator. + // cipher_mode + pattern + sample_data for all samples | + // subsample_data for all samples + OEMCryptoCipherMode cipher_mode; + OEMCrypto_CENCEncryptPatternDesc pattern; + // Sample data and subsample data are of variable length and not included in + // this structure. }; } // namespace wvoec diff --git a/oemcrypto/test/fuzz_tests/oemcrypto_fuzztests.gyp b/oemcrypto/test/fuzz_tests/oemcrypto_fuzztests.gyp index a0cd6457..8d818bec 100644 --- a/oemcrypto/test/fuzz_tests/oemcrypto_fuzztests.gyp +++ b/oemcrypto/test/fuzz_tests/oemcrypto_fuzztests.gyp @@ -48,5 +48,17 @@ 'oemcrypto_renewal_request_fuzz.cc', ], }, + { + 'target_name': 'oemcrypto_decrypt_cenc_fuzz', + 'sources': [ + 'oemcrypto_decrypt_cenc_fuzz.cc', + ], + }, + { + 'target_name': 'oemcrypto_load_entitled_content_keys_fuzz', + 'sources': [ + 'oemcrypto_load_entitled_content_keys_fuzz.cc', + ], + }, ], } diff --git a/oemcrypto/test/fuzz_tests/oemcrypto_fuzztests.gypi b/oemcrypto/test/fuzz_tests/oemcrypto_fuzztests.gypi index f0d5d163..63293f45 100644 --- a/oemcrypto/test/fuzz_tests/oemcrypto_fuzztests.gypi +++ b/oemcrypto/test/fuzz_tests/oemcrypto_fuzztests.gypi @@ -62,6 +62,10 @@ # Need -g flag to include source line numbers in error stack trace. '-g', ], + 'ldflags': [ + '-fPIC', + '-fsanitize=fuzzer,address,undefined', + ], }], ['generate_code_coverage_report=="true"', { # Include flags to build fuzzer binaries to generate source based code coverage reports. @@ -70,12 +74,14 @@ '-fprofile-instr-generate', '-fcoverage-mapping', ], + 'ldflags': [ + '-fPIC', + '-fsanitize=fuzzer,address,undefined', + '-fprofile-instr-generate', + '-fcoverage-mapping', + ], }], ], # conditions - 'ldflags': [ - '-fPIC', - '-fsanitize=fuzzer,address,undefined', - ], 'libraries': [ '-lpthread', ], diff --git a/oemcrypto/test/fuzz_tests/oemcrypto_load_entitled_content_keys_fuzz.cc b/oemcrypto/test/fuzz_tests/oemcrypto_load_entitled_content_keys_fuzz.cc new file mode 100644 index 00000000..892d6e93 --- /dev/null +++ b/oemcrypto/test/fuzz_tests/oemcrypto_load_entitled_content_keys_fuzz.cc @@ -0,0 +1,66 @@ +// Copyright 2020 Google LLC. All Rights Reserved. This file and proprietary +// source code may only be used and distributed under the Widevine Master +// License Agreement. + +#include "FuzzedDataProvider.h" +#include "oemcrypto_fuzz_helper.h" +#include "oemcrypto_fuzz_structs.h" + +namespace wvoec { + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { + // Redirect printf and log statements from oemcrypto functions to a file to + // reduce noise + RedirectStdoutToFile(); + + // Corpus format is as below, let | be separator. + // message buffer with key data | entitled content key object array with + // offsets and lengths to read key data from message buffer. + // Split data using separator. + auto inputs = SplitInput(data, size); + if (inputs.size() < 2) { + return 0; + } + + FuzzedDataProvider fuzzed_entitled_content_key_array(inputs[1].data(), + inputs[1].size()); + + // Message to be verified. Return 0 if key data buffer is empty. + if (inputs[0].size() == 0) { + return 0; + } + + // Copy data to OEMCrypto_EntitledContentKeyObject array. + size_t entitled_content_key_object_size = + sizeof(OEMCrypto_EntitledContentKeyObject); + size_t entitled_content_key_array_length = + fuzzed_entitled_content_key_array.remaining_bytes() / + entitled_content_key_object_size; + if (entitled_content_key_array_length == 0) { + return 0; + } + OEMCrypto_EntitledContentKeyObject* entitled_content_key_array = + new OEMCrypto_EntitledContentKeyObject[entitled_content_key_array_length]; + + for (size_t i = 0; i < entitled_content_key_array_length; i++) { + fuzzed_entitled_content_key_array.ConsumeData( + &entitled_content_key_array[i], entitled_content_key_object_size); + } + + OEMCryptoLicenseAPIFuzz license_api_fuzz; + // Setting up state. Load default entitlement license to load entitlement + // keys into sessions key table. + license_api_fuzz.license_messages().set_license_type( + OEMCrypto_EntitlementLicense); + license_api_fuzz.LoadLicense(); + // Call OEMCrypto_LoadEntitledContentKeys with fuzzed buffers. + Session* session = license_api_fuzz.session(); + uint8_t* fuzzed_key_data = inputs[0].data(); + size_t fuzzed_key_data_size = inputs[0].size(); + OEMCrypto_LoadEntitledContentKeys( + session->session_id(), fuzzed_key_data, fuzzed_key_data_size, + entitled_content_key_array_length, entitled_content_key_array); + delete[] entitled_content_key_array; + return 0; +} +} // namespace wvoec diff --git a/oemcrypto/test/fuzz_tests/oemcrypto_load_renewal_fuzz.cc b/oemcrypto/test/fuzz_tests/oemcrypto_load_renewal_fuzz.cc index 93baee6d..f521b477 100644 --- a/oemcrypto/test/fuzz_tests/oemcrypto_load_renewal_fuzz.cc +++ b/oemcrypto/test/fuzz_tests/oemcrypto_load_renewal_fuzz.cc @@ -23,16 +23,16 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { const size_t renewal_response_size = size - sizeof(OEMCrypto_Renewal_Response_Fuzz); - OEMCryptoLicenseAPIFuzz license_api_fuzz; - license_api_fuzz.license_messages().SignAndVerifyRequest(); - license_api_fuzz.license_messages().CreateDefaultResponse(); + OEMCryptoRenewalAPIFuzz renewal_response_fuzz; + renewal_response_fuzz.license_messages().SignAndVerifyRequest(); + renewal_response_fuzz.license_messages().CreateDefaultResponse(); // Inject timer limits from fuzzed input to timer_limits field from // core license response. - license_api_fuzz.license_messages().InjectFuzzedTimerLimits(fuzzed_data); - license_api_fuzz.license_messages().EncryptAndSignResponse(); - license_api_fuzz.license_messages().LoadResponse(); + renewal_response_fuzz.license_messages().InjectFuzzedTimerLimits(fuzzed_data); + renewal_response_fuzz.license_messages().EncryptAndSignResponse(); + renewal_response_fuzz.license_messages().LoadResponse(); - OEMCryptoRenewalAPIFuzz renewal_response_fuzz; + // Call renewal response API using fuzzed data. renewal_response_fuzz.renewal_messages().SignAndVerifyRequest(); renewal_response_fuzz.renewal_messages().InjectFuzzedResponseData( fuzzed_data, renewal_response, renewal_response_size); diff --git a/oemcrypto/test/oec_decrypt_fallback_chain.cpp b/oemcrypto/test/oec_decrypt_fallback_chain.cpp index e8d82477..7c589c51 100644 --- a/oemcrypto/test/oec_decrypt_fallback_chain.cpp +++ b/oemcrypto/test/oec_decrypt_fallback_chain.cpp @@ -7,6 +7,7 @@ #include #include +#include "oemcrypto_corpus_generator_helper.h" #include "oemcrypto_types.h" #include "string_conversions.h" @@ -55,7 +56,12 @@ OEMCryptoResult DecryptFallbackChain::Decrypt( OEMCrypto_DecryptCENC(session_id, samples, samples_length, pattern); // No need for a fallback. Abort early. - if (sts != OEMCrypto_ERROR_BUFFER_TOO_LARGE) return sts; + if (sts != OEMCrypto_ERROR_BUFFER_TOO_LARGE) { + if (ShouldGenerateCorpus()) { + WriteDecryptCencCorpus(cipher_mode, samples, pattern, samples_length); + } + return sts; + } // Fall back to decrypting individual samples. for (size_t i = 0; i < samples_length; ++i) { @@ -75,7 +81,12 @@ OEMCryptoResult DecryptFallbackChain::DecryptSample( OEMCryptoResult sts = OEMCrypto_DecryptCENC(session_id, &sample, 1, pattern); // No need for a fallback. Abort early. - if (sts != OEMCrypto_ERROR_BUFFER_TOO_LARGE) return sts; + if (sts != OEMCrypto_ERROR_BUFFER_TOO_LARGE) { + if (ShouldGenerateCorpus()) { + WriteDecryptCencCorpus(cipher_mode, &sample, pattern, 1); + } + return sts; + } // Fall back to decrypting individual subsamples. OEMCrypto_SampleDescription fake_sample = sample; @@ -88,7 +99,7 @@ OEMCryptoResult DecryptFallbackChain::DecryptSample( fake_sample.subsamples = &subsample; fake_sample.subsamples_length = 1; - sts = DecryptSubsample(session_id, fake_sample, pattern); + sts = DecryptSubsample(session_id, fake_sample, pattern, cipher_mode); if (sts != OEMCrypto_SUCCESS) return sts; fake_sample.buffers.input_data += length; @@ -106,11 +117,17 @@ OEMCryptoResult DecryptFallbackChain::DecryptSample( // OEMCrypto implementation does not accept full subsamples. OEMCryptoResult DecryptFallbackChain::DecryptSubsample( OEMCrypto_SESSION session_id, const OEMCrypto_SampleDescription& sample, - const OEMCrypto_CENCEncryptPatternDesc* pattern) { + const OEMCrypto_CENCEncryptPatternDesc* pattern, + OEMCryptoCipherMode cipher_mode) { OEMCryptoResult sts = OEMCrypto_DecryptCENC(session_id, &sample, 1, pattern); // No need for a fallback. Abort early. - if (sts != OEMCrypto_ERROR_BUFFER_TOO_LARGE) return sts; + if (sts != OEMCrypto_ERROR_BUFFER_TOO_LARGE) { + if (ShouldGenerateCorpus()) { + WriteDecryptCencCorpus(cipher_mode, &sample, pattern, 1); + } + return sts; + } // Fall back to decrypting individual subsample halves. const OEMCrypto_SubSampleDescription& subsample = sample.subsamples[0]; @@ -132,7 +149,7 @@ OEMCryptoResult DecryptFallbackChain::DecryptSubsample( subsample.num_bytes_encrypted == 0) fake_subsample.subsample_flags |= OEMCrypto_LastSubsample; - sts = DecryptSubsampleHalf(session_id, fake_sample, pattern); + sts = DecryptSubsampleHalf(session_id, fake_sample, pattern, cipher_mode); if (sts != OEMCrypto_SUCCESS) return sts; // Advance the buffers for the other half, in case they're needed. @@ -154,7 +171,7 @@ OEMCryptoResult DecryptFallbackChain::DecryptSubsample( if (subsample.subsample_flags & OEMCrypto_LastSubsample) fake_subsample.subsample_flags |= OEMCrypto_LastSubsample; - sts = DecryptSubsampleHalf(session_id, fake_sample, pattern); + sts = DecryptSubsampleHalf(session_id, fake_sample, pattern, cipher_mode); if (sts != OEMCrypto_SUCCESS) return sts; } @@ -166,7 +183,11 @@ OEMCryptoResult DecryptFallbackChain::DecryptSubsample( // caller. OEMCryptoResult DecryptFallbackChain::DecryptSubsampleHalf( OEMCrypto_SESSION session_id, const OEMCrypto_SampleDescription& sample, - const OEMCrypto_CENCEncryptPatternDesc* pattern) { + const OEMCrypto_CENCEncryptPatternDesc* pattern, + OEMCryptoCipherMode cipher_mode) { + if (ShouldGenerateCorpus()) { + WriteDecryptCencCorpus(cipher_mode, &sample, pattern, 1); + } return OEMCrypto_DecryptCENC(session_id, &sample, 1, pattern); // In a real CDM, you would want some fallback here to handle the case where // the buffer is too big for the OEMCrypto implementation. But in the case of @@ -175,4 +196,40 @@ OEMCryptoResult DecryptFallbackChain::DecryptSubsampleHalf( // here. } +// Used for OEMCrypto Fuzzing: Corpus format is as below, let | be separator. +// cipher_mode + pattern + sample_data for all samples | +// subsample_data for all samples +void WriteDecryptCencCorpus( + OEMCryptoCipherMode cipher_mode, + const OEMCrypto_SampleDescription* samples_description, + const OEMCrypto_CENCEncryptPatternDesc* pattern, size_t samples_length) { + const std::string file_name = + GetFileName("oemcrypto_decrypt_cenc_fuzz_seed_corpus"); + // Cipher mode. + AppendToFile(file_name, reinterpret_cast(&cipher_mode), + sizeof(OEMCryptoCipherMode)); + + // Pattern. + AppendToFile(file_name, reinterpret_cast(pattern), + sizeof(OEMCrypto_CENCEncryptPatternDesc)); + + // Sample data for all samples. + for (size_t i = 0; i < samples_length; i++) { + AppendToFile(file_name, + reinterpret_cast(&samples_description[i]), + sizeof(OEMCrypto_SampleDescription)); + } + AppendSeparator(file_name); + + // Subsample data for all samples. + for (size_t i = 0; i < samples_length; i++) { + for (size_t j = 0; j < samples_description[i].subsamples_length; j++) { + AppendToFile( + file_name, + reinterpret_cast(&samples_description[i].subsamples[j]), + sizeof(OEMCrypto_SubSampleDescription)); + } + } +} + } // namespace wvoec diff --git a/oemcrypto/test/oec_decrypt_fallback_chain.h b/oemcrypto/test/oec_decrypt_fallback_chain.h index 0e1512b1..2379dafc 100644 --- a/oemcrypto/test/oec_decrypt_fallback_chain.h +++ b/oemcrypto/test/oec_decrypt_fallback_chain.h @@ -43,17 +43,24 @@ class DecryptFallbackChain { static OEMCryptoResult DecryptSubsample( OEMCrypto_SESSION session_id, const OEMCrypto_SampleDescription& sample, - const OEMCrypto_CENCEncryptPatternDesc* pattern); + const OEMCrypto_CENCEncryptPatternDesc* pattern, + OEMCryptoCipherMode cipher_mode); static OEMCryptoResult DecryptSubsampleHalf( OEMCrypto_SESSION session_id, const OEMCrypto_SampleDescription& sample, - const OEMCrypto_CENCEncryptPatternDesc* pattern); + const OEMCrypto_CENCEncryptPatternDesc* pattern, + OEMCryptoCipherMode cipher_mode); // There is no reason to have an instance of this class. DecryptFallbackChain() = delete; CORE_DISALLOW_COPY_AND_ASSIGN(DecryptFallbackChain); }; +void WriteDecryptCencCorpus(OEMCryptoCipherMode cipher_mode, + const OEMCrypto_SampleDescription* samples, + const OEMCrypto_CENCEncryptPatternDesc* pattern, + size_t samples_length); + } // namespace wvoec #endif // CDM_OEC_DECRYPT_FALLBACK_CHAIN_H_ diff --git a/oemcrypto/test/oec_device_features.cpp b/oemcrypto/test/oec_device_features.cpp index 7c4fa267..9649ce66 100644 --- a/oemcrypto/test/oec_device_features.cpp +++ b/oemcrypto/test/oec_device_features.cpp @@ -64,7 +64,7 @@ void DeviceFeatures::Initialize() { printf("generic_crypto = %s.\n", generic_crypto ? "true" : "false"); OEMCrypto_CloseSession(session); api_version = OEMCrypto_APIVersion(); - printf("api_version = %d.\n", api_version); + printf("api_version = %u.\n", api_version); // These unit tests only work with new usage tables. We do not test v12 // usage tables. if (api_version > 12) usage_table = OEMCrypto_SupportsUsageTable(); @@ -81,7 +81,7 @@ void DeviceFeatures::Initialize() { } printf("cast_receiver = %s.\n", cast_receiver ? "true" : "false"); resource_rating = OEMCrypto_ResourceRatingTier(); - printf("resource_rating = %d, security level %s.\n", resource_rating, + printf("resource_rating = %u, security level %s.\n", resource_rating, OEMCrypto_SecurityLevel()); uint32_t decrypt_hash_type = OEMCrypto_SupportsDecryptHash(); supports_crc = (decrypt_hash_type == OEMCrypto_CRC_Clear_Buffer); @@ -115,8 +115,7 @@ void DeviceFeatures::Initialize() { std::string security_level = OEMCrypto_SecurityLevel(); supports_level_1 = (security_level == "L1"); printf("SecurityLevel is %s (%s)\n", - supports_level_1 ? "Level 1" : "Not Level 1", - security_level.c_str()); + supports_level_1 ? "Level 1" : "Not Level 1", security_level.c_str()); CheckSecureBuffers(); OEMCrypto_Terminate(); initialized_ = true; @@ -130,6 +129,7 @@ std::string DeviceFeatures::RestrictFilter(const std::string& initial_filter) { if (!generic_crypto) FilterOut(&filter, "*GenericCrypto*"); if (!cast_receiver) FilterOut(&filter, "*CastReceiver*"); if (!usage_table) FilterOut(&filter, "*UsageTable*"); + if (!usage_table) FilterOut(&filter, "*BadRange_pst*"); if (derive_key_method == NO_METHOD) FilterOut(&filter, "*SessionTest*"); if (provisioning_method != OEMCrypto_OEMCertificate) FilterOut(&filter, "*Prov30*"); diff --git a/oemcrypto/test/oec_session_util.cpp b/oemcrypto/test/oec_session_util.cpp index 7cc37f8b..5dd0299b 100644 --- a/oemcrypto/test/oec_session_util.cpp +++ b/oemcrypto/test/oec_session_util.cpp @@ -31,6 +31,7 @@ #include "core_message_serialize.h" #include "disallow_copy_and_assign.h" #include "log.h" +#include "odk_attributes.h" #include "odk_structs.h" #include "oec_device_features.h" #include "oec_test_data.h" @@ -337,7 +338,7 @@ void ProvisioningRoundTrip::EncryptAndSignResponse() { } void ProvisioningRoundTrip::InjectFuzzedResponseData(const uint8_t* data, - size_t size) { + size_t size UNUSED) { // Interpreting fuzz data as unencrypted core_response + message_data const size_t core_response_size = sizeof(ODK_ParsedProvisioning); // Copy core_response from data and serialize. @@ -544,7 +545,7 @@ void LicenseRoundTrip::InjectFuzzedTimerLimits( } void LicenseRoundTrip::InjectFuzzedResponseData(const uint8_t* data, - size_t size) { + size_t size UNUSED) { // Interpreting fuzz data as unencrypted core_response + message_data const size_t core_response_size = sizeof(ODK_ParsedLicense); // Copy core_response from data. @@ -900,6 +901,17 @@ void EntitledMessage::LoadKeys(OEMCryptoResult expected_sts) { key_data->encrypted_content_key_data, KEY_SIZE, &aes_key, iv, AES_ENCRYPT); } + if (ShouldGenerateCorpus()) { + const std::string file_name = + GetFileName("oemcrypto_load_entitled_content_keys_fuzz_seed_corpus"); + // Corpus for load entitled keys fuzzer should be in the format: + // message buffer to be verified | entitled content key object array. + AppendToFile(file_name, reinterpret_cast(entitled_key_data_), + sizeof(entitled_key_data_)); + AppendSeparator(file_name); + AppendToFile(file_name, reinterpret_cast(entitled_key_array_), + num_keys_); + } ASSERT_EQ(expected_sts, OEMCrypto_LoadEntitledContentKeys( license_messages_->session()->session_id(), @@ -1311,10 +1323,9 @@ void Session::TestDecryptResult(OEMCryptoResult expected_result, void Session::TestSelectExpired(unsigned int key_index) { if (global_features.api_version >= 13) { - OEMCryptoResult status = - OEMCrypto_SelectKey(session_id(), license().keys[key_index].key_id, - license().keys[key_index].key_id_length, - OEMCrypto_CipherMode_CTR); + OEMCryptoResult status = OEMCrypto_SelectKey( + session_id(), license().keys[key_index].key_id, + license().keys[key_index].key_id_length, OEMCrypto_CipherMode_CTR); // It is OK for SelectKey to succeed with an expired key, but if there is // an error, it must be OEMCrypto_ERROR_KEY_EXIRED. if (status != OEMCrypto_SUCCESS) { @@ -1382,9 +1393,9 @@ void Session::LoadOEMCert(bool verify_cert) { // TODO(fredgc): Verify cert is signed by Google. int result = X509_verify_cert(store_ctx.get()); - ASSERT_GE(0, result) << " OEM Cert not valid. " << - X509_verify_cert_error_string( - X509_STORE_CTX_get_error(store_ctx.get())); + ASSERT_GE(0, result) << " OEM Cert not valid. " + << X509_verify_cert_error_string( + X509_STORE_CTX_get_error(store_ctx.get())); if (result == 0) { printf("Cert not verified: %s.\n", X509_verify_cert_error_string( @@ -1440,7 +1451,7 @@ bool Session::VerifyPSSSignature(EVP_PKEY* pkey, const uint8_t* message, } if (EVP_PKEY_CTX_set_signature_md(pkey_ctx, - const_cast(EVP_sha1())) != 1) { + const_cast(EVP_sha1())) != 1) { LOGE("EVP_PKEY_CTX_set_signature_md failed in VerifyPSSSignature"); goto err; } @@ -1489,18 +1500,17 @@ void Session::VerifyRSASignature(const vector& message, boringssl_ptr pkey(EVP_PKEY_new()); ASSERT_EQ(1, EVP_PKEY_set1_RSA(pkey.get(), public_rsa_)); - const bool ok = VerifyPSSSignature( - pkey.get(), message.data(), message.size(), signature, - signature_length); + const bool ok = + VerifyPSSSignature(pkey.get(), message.data(), message.size(), + signature, signature_length); EXPECT_TRUE(ok) << "PSS signature check failed."; } else if (padding_scheme == kSign_PKCS1_Block1) { vector padded_digest(signature_length); int size; // RSA_public_decrypt decrypts the signature, and then verifies that // it was padded with RSA PKCS1 padding. - size = RSA_public_decrypt( - signature_length, signature, padded_digest.data(), public_rsa_, - RSA_PKCS1_PADDING); + size = RSA_public_decrypt(signature_length, signature, padded_digest.data(), + public_rsa_, RSA_PKCS1_PADDING); EXPECT_GT(size, 0); padded_digest.resize(size); EXPECT_EQ(message, padded_digest); @@ -1566,16 +1576,14 @@ void Session::UpdateUsageEntry(std::vector* header_buffer) { void Session::LoadUsageEntry(uint32_t index, const vector& buffer) { usage_entry_number_ = index; encrypted_usage_entry_ = buffer; - ASSERT_EQ( - OEMCrypto_SUCCESS, - OEMCrypto_LoadUsageEntry( - session_id(), index, buffer.data(), buffer.size())); + ASSERT_EQ(OEMCrypto_SUCCESS, + OEMCrypto_LoadUsageEntry(session_id(), index, buffer.data(), + buffer.size())); } void Session::MoveUsageEntry(uint32_t new_index, std::vector* header_buffer, OEMCryptoResult expect_result) { - ASSERT_NO_FATAL_FAILURE(open()); ASSERT_NO_FATAL_FAILURE(ReloadUsageEntry()); ASSERT_EQ(expect_result, OEMCrypto_MoveEntry(session_id(), new_index)); @@ -1587,8 +1595,7 @@ void Session::MoveUsageEntry(uint32_t new_index, } void Session::GenerateReport(const std::string& pst, - OEMCryptoResult expected_result, - Session* other) { + OEMCryptoResult expected_result, Session* other) { ASSERT_TRUE(open_); if (other) { // If other is specified, copy mac keys. key_deriver_ = other->key_deriver_; @@ -1624,14 +1631,13 @@ void Session::GenerateReport(const std::string& pst, void Session::VerifyPST(const Test_PST_Report& expected) { wvcdm::Unpacked_PST_Report computed = pst_report(); EXPECT_EQ(expected.status, computed.status()); - char* pst_ptr = reinterpret_cast(computed.pst()); + char* pst_ptr = reinterpret_cast(computed.pst()); std::string computed_pst(pst_ptr, pst_ptr + computed.pst_length()); ASSERT_EQ(expected.pst, computed_pst); int64_t now = wvcdm::Clock().GetCurrentTime(); int64_t age = now - expected.time_created; // How old is this report. EXPECT_NEAR(expected.seconds_since_license_received + age, - computed.seconds_since_license_received(), - kTimeTolerance); + computed.seconds_since_license_received(), kTimeTolerance); // Decrypt times only valid on licenses that have been active. if (expected.status == kActive || expected.status == kInactiveUsed) { EXPECT_NEAR(expected.seconds_since_first_decrypt + age, @@ -1643,8 +1649,8 @@ void Session::VerifyPST(const Test_PST_Report& expected) { } std::vector signature(SHA_DIGEST_LENGTH); key_deriver_.ClientSignPstReport(pst_report_buffer_, &signature); - EXPECT_EQ(0, memcmp(computed.signature(), signature.data(), - SHA_DIGEST_LENGTH)); + EXPECT_EQ(0, + memcmp(computed.signature(), signature.data(), SHA_DIGEST_LENGTH)); } void Session::VerifyReport(Test_PST_Report expected, diff --git a/oemcrypto/test/oec_session_util.h b/oemcrypto/test/oec_session_util.h index ffde2994..a3773fd3 100644 --- a/oemcrypto/test/oec_session_util.h +++ b/oemcrypto/test/oec_session_util.h @@ -583,15 +583,14 @@ class Session { // Verify the Usage Report. If any time is greater than 10 minutes, it is // assumed to be an absolute time, and time_since will be computed relative to // now. - void VerifyReport(Test_PST_Report report, - int64_t time_license_received = 0, + void VerifyReport(Test_PST_Report report, int64_t time_license_received = 0, int64_t time_first_decrypt = 0, int64_t time_last_decrypt = 0); // Create an entry in the old usage table based on the given report. - void CreateOldEntry(const Test_PST_Report &report); + void CreateOldEntry(const Test_PST_Report& report); // Create a new entry and copy the old entry into it. Then very the report // is right. - void CopyAndVerifyOldEntry(const Test_PST_Report &report, + void CopyAndVerifyOldEntry(const Test_PST_Report& report, std::vector* header_buffer); // The unencrypted license response or license renewal response. diff --git a/oemcrypto/test/oemcrypto_corpus_generator_helper.cpp b/oemcrypto/test/oemcrypto_corpus_generator_helper.cpp index 33c0f7ac..0478de69 100644 --- a/oemcrypto/test/oemcrypto_corpus_generator_helper.cpp +++ b/oemcrypto/test/oemcrypto_corpus_generator_helper.cpp @@ -19,6 +19,16 @@ void AppendToFile(const std::string& file_name, const char* message, filebuf.close(); } +void AppendSeparator(const std::string& file_name) { + std::ofstream filebuf(file_name.c_str(), std::ios::app | std::ios::binary); + if (!filebuf) { + std::cout << "Cannot open file " << file_name.c_str() << std::endl; + } + filebuf.write(reinterpret_cast(&kFuzzDataSeparator), + sizeof(kFuzzDataSeparator)); + filebuf.close(); +} + std::string GetFileName(const char* directory) { std::string file_name(PATH_TO_CORPUS); file_name += directory; diff --git a/oemcrypto/test/oemcrypto_corpus_generator_helper.h b/oemcrypto/test/oemcrypto_corpus_generator_helper.h index e145fe63..9086a0c1 100644 --- a/oemcrypto/test/oemcrypto_corpus_generator_helper.h +++ b/oemcrypto/test/oemcrypto_corpus_generator_helper.h @@ -11,9 +11,14 @@ #include namespace wvoec { +const uint8_t kFuzzDataSeparator[] = {'-', '_', '^', '_'}; + void AppendToFile(const std::string& file_name, const char* message, const size_t message_size); +// Function to append separator "-_^_" between contents of corpus file. +void AppendSeparator(const std::string& file_name); + std::string GetFileName(const char* directory); void SetGenerateCorpus(bool should_generate_corpus); diff --git a/oemcrypto/test/oemcrypto_test.cpp b/oemcrypto/test/oemcrypto_test.cpp index 50e1027f..3210acad 100644 --- a/oemcrypto/test/oemcrypto_test.cpp +++ b/oemcrypto/test/oemcrypto_test.cpp @@ -2,8 +2,29 @@ // source code may only be used and distributed under the Widevine Master // License Agreement. // -// OEMCrypto unit tests -// + +/** + * @mainpage OEMCrypto Unit Tests + * + * The OEMCrypto unit tests are designed to verify that an implementation of + * OEMCrypto is correctly supporting the OEMCrypto API. + * + * @defgroup basic Basic Functionality Tests + * Basic functionality tests. + * + * @defgroup license License Request Tests + * Test for requesting and loading licenses. + * + * @defgroup renewal License Renewal Tests + * Tests for renewing licenses. + * + * @defgroup decrypt Decrypt Tests + * Tests for decrypting content. + * + * @defgroup usage_table Usage Table Tests + * Tests that use the usage table. + */ + #include #include #include @@ -17,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -82,6 +104,9 @@ constexpr size_t kBufferOverrunPadding = 16; // Resource tiers: constexpr size_t KiB = 1024; constexpr size_t MiB = 1024 * 1024; +// Huge input buffer length used for OEMCryptoMemory* tests. +constexpr size_t kHugeInputBufferLength = 100 * MiB; +constexpr bool kCheckStatus = true; // With OEMCrypto v15 and above, we have different resource requirements // depending on the resource rating reported by OEMCrypto. This function looks // up the required value for the specified resource for the target OEMCrypto @@ -93,6 +118,32 @@ T GetResourceValue(T (&resource_values)[N]) { return resource_values[global_features.resource_rating - 1]; } +// Used for testing oemcrypto APIs with huge buffers. +typedef const std::function oemcrypto_function; +// Function to test APIs that expect a buffer length as input +// by passing huge buffer lengths upto end_buffer_length and test that the API +// doesn't crash. +void TestHugeLengthDoesNotCrashAPI(oemcrypto_function f, + size_t start_buffer_length, + size_t end_buffer_length, + bool check_status) { + OEMCryptoResult sts = OEMCrypto_SUCCESS; + for (size_t buffer_length = start_buffer_length; + buffer_length < end_buffer_length && + (sts == OEMCrypto_SUCCESS || sts == OEMCrypto_ERROR_SHORT_BUFFER || + !check_status); + buffer_length *= 2) { + sts = f(buffer_length); + } +} + +// Function to test APIs that expect a buffer length as input +// by passing huge buffer lengths upto kHugeInputBufferLength and test that +// the API doesn't crash. +void TestHugeLengthDoesNotCrashAPI(oemcrypto_function f, bool check_status) { + TestHugeLengthDoesNotCrashAPI(f, 1, kHugeInputBufferLength, check_status); +} + // After API 16, we require 300 entries in the usage table. Before API 16, we // required 200. size_t RequiredUsageSize() { @@ -148,19 +199,27 @@ class OEMCryptoClientTest : public ::testing::Test, public SessionUtil { } }; -// -// General tests. -// This test is first, becuase it might give an idea why other -// tests are failing when the device has the wrong keybox installed. +/// @addtogroup basic +/// @{ + +/** + * Verifies initialization and logs version information. + * This test is first, because it might give an idea why other + * tests are failing when the device has the wrong keybox installed. + */ TEST_F(OEMCryptoClientTest, VersionNumber) { const std::string log_message = - "OEMCrypto unit tests for API 16.3. Tests last updated 2020-06-01"; + "OEMCrypto unit tests for API 16.4. Tests last updated 2020-10-07"; cout << " " << log_message << "\n"; LOGI("%s", log_message.c_str()); // If any of the following fail, then it is time to update the log message // above. EXPECT_EQ(ODK_MAJOR_VERSION, 16); - EXPECT_EQ(ODK_MINOR_VERSION, 3); + // Note on minor versions. Widevine requires version 16.3 or greater for CE + // CDM and Android devices. For CE CDM devices that do not support usage + // tables, we strongly recommend 16.4. + EXPECT_GE(ODK_MINOR_VERSION, 3); + EXPECT_LE(ODK_MINOR_VERSION, 4); EXPECT_EQ(kCurrentAPI, 16u); const char* level = OEMCrypto_SecurityLevel(); ASSERT_NE(nullptr, level); @@ -186,14 +245,18 @@ TEST_F(OEMCryptoClientTest, VersionNumber) { ASSERT_LE(version, kCurrentAPI); } -// The resource rating is a number from 1 to 4. The first three levels were -// initially defined in API 15 and they were expanded in API 16. +/** + * The resource rating is a number from 1 to 4. The first three levels + * were initially defined in API 15 and they were expanded in API 16. + */ TEST_F(OEMCryptoClientTest, ResourceRatingAPI15) { ASSERT_GE(OEMCrypto_ResourceRatingTier(), 1u); ASSERT_LE(OEMCrypto_ResourceRatingTier(), 4u); } -// OEMCrypto must declare what type of provisioning scheme it uses. +/** + * OEMCrypto must declare what type of provisioning scheme it uses. + */ TEST_F(OEMCryptoClientTest, ProvisioningDeclaredAPI12) { OEMCrypto_ProvisioningMethod provisioning_method = OEMCrypto_GetProvisioningMethod(); @@ -228,10 +291,10 @@ TEST_F(OEMCryptoClientTest, CheckHDCPCapabilityAPI09) { OEMCrypto_HDCP_Capability current, maximum; sts = OEMCrypto_GetHDCPCapability(¤t, &maximum); ASSERT_EQ(OEMCrypto_SUCCESS, sts); - printf(" Current HDCP Capability: 0x%02x = %s.\n", current, - HDCPCapabilityAsString(current)); - printf(" Maximum HDCP Capability: 0x%02x = %s.\n", maximum, - HDCPCapabilityAsString(maximum)); + printf(" Current HDCP Capability: 0x%02x = %s.\n", + static_cast(current), HDCPCapabilityAsString(current)); + printf(" Maximum HDCP Capability: 0x%02x = %s.\n", + static_cast(maximum), HDCPCapabilityAsString(maximum)); } TEST_F(OEMCryptoClientTest, CheckSRMCapabilityV13) { @@ -255,6 +318,14 @@ TEST_F(OEMCryptoClientTest, CheckSRMCapabilityV13) { OEMCrypto_LoadSRM(bad_srm.data(), bad_srm.size())); } +TEST_F(OEMCryptoClientTest, OEMCryptoMemoryLoadSrmForLargeSrm) { + auto oemcrypto_function = [](size_t buffer_length) { + vector srm_buffer(buffer_length); + return OEMCrypto_LoadSRM(srm_buffer.data(), srm_buffer.size()); + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, kCheckStatus); +} + TEST_F(OEMCryptoClientTest, CheckMaxNumberOfSessionsAPI10) { size_t sessions_count; ASSERT_EQ(OEMCrypto_SUCCESS, @@ -285,6 +356,15 @@ TEST_F(OEMCryptoClientTest, NormalInitTermination) { ASSERT_EQ(OEMCrypto_SUCCESS, OEMCrypto_Initialize()); } +// Test that set sandbox doesn't crash for a large sandbox id leangth. +TEST_F(OEMCryptoClientTest, OEMCryptoMemorySetSandboxForLargeSandboxIdLength) { + auto oemcrypto_function = [](size_t buffer_length) { + vector buffer(buffer_length); + return OEMCrypto_SetSandbox(buffer.data(), buffer.size()); + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, !kCheckStatus); +} + // // Session Tests // @@ -375,6 +455,17 @@ TEST_F(OEMCryptoClientTest, GetRandomLargeBuffer) { ASSERT_LE(count, 3); // P(count > 3) = 1/256^3 = 6e-8. } +// Verify that GetRandom doesn't crash for large input lengths. +TEST_F(OEMCryptoClientTest, OEMCryptoMemoryGetRandomForLargeBuffer) { + auto oemcrypto_function = [](size_t buffer_length) { + vector buffer(buffer_length); + // TODO(ellurubharath, fredgc): Need to re-evaluate this on a real device + // as GetRandom can be slow. + return OEMCrypto_GetRandom(buffer.data(), buffer.size()); + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, !kCheckStatus); +} + TEST_F(OEMCryptoClientTest, GenerateNonce) { Session s; ASSERT_NO_FATAL_FAILURE(s.open()); @@ -509,6 +600,131 @@ TEST_F(OEMCryptoClientTest, ClearCopyTestLargeSubsample) { ASSERT_EQ(input_buffer, output_buffer); } +TEST_F(OEMCryptoClientTest, OEMCryptoMemoryCopyBufferForHugeBufferLengths) { + Session s; + ASSERT_NO_FATAL_FAILURE(s.open()); + vector input_buffer; + OEMCrypto_DestBufferDesc dest_buffer_descriptor; + dest_buffer_descriptor.type = OEMCrypto_BufferType_Secure; + + auto oemcrypto_function = [&s, &dest_buffer_descriptor, + &input_buffer](size_t buffer_length) { + input_buffer.resize(buffer_length); + int secure_fd; + OEMCryptoResult sts = OEMCrypto_AllocateSecureBuffer( + s.session_id(), buffer_length, &dest_buffer_descriptor, &secure_fd); + if (sts != OEMCrypto_SUCCESS) { + LOGI("Secure buffers are not supported."); + return sts; + } + + dest_buffer_descriptor.buffer.secure.handle_length = buffer_length; + OEMCryptoResult status = OEMCrypto_CopyBuffer( + s.session_id(), input_buffer.data(), buffer_length, + &dest_buffer_descriptor, + OEMCrypto_FirstSubsample | OEMCrypto_LastSubsample); + OEMCrypto_FreeSecureBuffer(s.session_id(), &dest_buffer_descriptor, + secure_fd); + return status; + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, kCheckStatus); +} + +TEST_F(OEMCryptoClientTest, + OEMCryptoMemoryCopyBufferDirectForHugeBufferLengths) { + Session s; + ASSERT_NO_FATAL_FAILURE(s.open()); + vector input_buffer; + OEMCrypto_DestBufferDesc dest_buffer_descriptor; + dest_buffer_descriptor.type = OEMCrypto_BufferType_Direct; + + auto oemcrypto_function = [&s, &dest_buffer_descriptor, + &input_buffer](size_t buffer_length) { + input_buffer.resize(buffer_length); + OEMCryptoResult status = OEMCrypto_CopyBuffer( + s.session_id(), input_buffer.data(), buffer_length, + &dest_buffer_descriptor, + OEMCrypto_FirstSubsample | OEMCrypto_LastSubsample); + return status; + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, kCheckStatus); +} + +TEST_F(OEMCryptoClientTest, OEMCryptoMemoryCopyBufferForOutOfRangeOffset) { + Session s; + ASSERT_NO_FATAL_FAILURE(s.open()); + vector input_buffer; + OEMCrypto_DestBufferDesc dest_buffer_descriptor; + dest_buffer_descriptor.type = OEMCrypto_BufferType_Secure; + + size_t buffer_length = KiB; + input_buffer.resize(buffer_length); + int secure_fd; + if (OEMCrypto_AllocateSecureBuffer(s.session_id(), buffer_length, + &dest_buffer_descriptor, + &secure_fd) != OEMCrypto_SUCCESS) { + LOGI("Secure buffers are not supported."); + return; + } + + dest_buffer_descriptor.buffer.secure.handle_length = buffer_length; + auto oemcrypto_function = [&s, &dest_buffer_descriptor, &input_buffer, + &buffer_length](size_t offset) { + dest_buffer_descriptor.buffer.secure.offset = offset; + return OEMCrypto_CopyBuffer( + s.session_id(), input_buffer.data(), buffer_length, + &dest_buffer_descriptor, + OEMCrypto_FirstSubsample | OEMCrypto_LastSubsample); + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, kCheckStatus); + OEMCrypto_FreeSecureBuffer(s.session_id(), &dest_buffer_descriptor, + secure_fd); +} + +TEST_F(OEMCryptoClientTest, + OEMCryptoMemoryCopyBufferForOutOfRangeHandleLength) { + Session s; + ASSERT_NO_FATAL_FAILURE(s.open()); + vector input_buffer; + OEMCrypto_DestBufferDesc dest_buffer_descriptor; + dest_buffer_descriptor.type = OEMCrypto_BufferType_Secure; + + size_t buffer_length = KiB; + input_buffer.resize(buffer_length); + int secure_fd; + if (OEMCrypto_AllocateSecureBuffer(s.session_id(), buffer_length, + &dest_buffer_descriptor, + &secure_fd) != OEMCrypto_SUCCESS) { + LOGI("Secure buffers are not supported."); + return; + } + + dest_buffer_descriptor.buffer.secure.handle_length = kHugeInputBufferLength; + ASSERT_NO_FATAL_FAILURE( + OEMCrypto_CopyBuffer(s.session_id(), input_buffer.data(), buffer_length, + &dest_buffer_descriptor, + OEMCrypto_FirstSubsample | OEMCrypto_LastSubsample)); + OEMCrypto_FreeSecureBuffer(s.session_id(), &dest_buffer_descriptor, + secure_fd); +} + +TEST_F(OEMCryptoClientTest, ClearCopyTestInvalidSubsampleFlag) { + uint8_t oemcrypto_invalid_subsample_flag = 85; + Session s; + ASSERT_NO_FATAL_FAILURE(s.open()); + size_t max_size = GetResourceValue(kMaxSubsampleSize); + vector input_buffer(max_size); + GetRandBytes(input_buffer.data(), input_buffer.size()); + vector output_buffer(max_size); + OEMCrypto_DestBufferDesc dest_buffer_descriptor; + dest_buffer_descriptor.type = OEMCrypto_BufferType_Clear; + dest_buffer_descriptor.buffer.clear.address = output_buffer.data(); + dest_buffer_descriptor.buffer.clear.address_length = output_buffer.size(); + ASSERT_NO_FATAL_FAILURE(OEMCrypto_CopyBuffer( + s.session_id(), input_buffer.data(), input_buffer.size(), + &dest_buffer_descriptor, oemcrypto_invalid_subsample_flag)); +} + TEST_F(OEMCryptoClientTest, CanLoadTestKeys) { ASSERT_NE(DeviceFeatures::NO_METHOD, global_features.derive_key_method) << "Session tests cannot run with out a test keybox or RSA cert."; @@ -532,6 +748,33 @@ class OEMCryptoKeyboxTest : public OEMCryptoClientTest { } }; +// Test that OEMCrypto_InstallKeyboxOrOEMCert doesn't crash for large keybox. +TEST_F(OEMCryptoKeyboxTest, OEMCryptoMemoryInstallKeyboxForHugeKeyboxBuffer) { + auto f = [](size_t keybox_length) { + vector keybox(keybox_length); + memcpy(keybox.data(), &kTestKeybox, sizeof(kTestKeybox)); + return OEMCrypto_InstallKeyboxOrOEMCert(keybox.data(), keybox.size()); + }; + // Starting at sizeof(kTestKeybox) as we are copying valid keybox + // at beginning of generated buffers. + TestHugeLengthDoesNotCrashAPI(f, sizeof(kTestKeybox), kHugeInputBufferLength, + kCheckStatus); +} + +// This test verifies that load test key box doesn't crash for large +// buffer length. +TEST_F(OEMCryptoKeyboxTest, OEMCryptoMemoryLoadTestKeyBoxForHugeKeyboxBuffer) { + auto f = [](size_t keybox_length) { + vector keybox(keybox_length); + memcpy(keybox.data(), &kTestKeybox, sizeof(kTestKeybox)); + return OEMCrypto_LoadTestKeybox(keybox.data(), keybox.size()); + }; + // Starting at sizeof(kTestKeybox) as we are copying valid keybox + // at beginning of generated buffers. + TestHugeLengthDoesNotCrashAPI(f, sizeof(kTestKeybox), kHugeInputBufferLength, + kCheckStatus); +} + // This test is used to print the device ID to stdout. TEST_F(OEMCryptoKeyboxTest, NormalGetDeviceId) { OEMCryptoResult sts; @@ -543,6 +786,15 @@ TEST_F(OEMCryptoKeyboxTest, NormalGetDeviceId) { ASSERT_EQ(OEMCrypto_SUCCESS, sts); } +TEST_F(OEMCryptoKeyboxTest, OEMCryptoMemoryGetDeviceIdForHugeIdLength) { + auto oemcrypto_function = [](size_t input_length) { + size_t device_id_length = input_length; + vector device_id(device_id_length); + return OEMCrypto_GetDeviceID(device_id.data(), &device_id_length); + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, kCheckStatus); +} + TEST_F(OEMCryptoKeyboxTest, GetDeviceIdShortBuffer) { OEMCryptoResult sts; uint8_t dev_id[128]; @@ -570,11 +822,20 @@ TEST_F(OEMCryptoKeyboxTest, NormalGetKeyData) { sts = OEMCrypto_GetKeyData(key_data, &key_data_len); uint32_t* data = reinterpret_cast(key_data); - printf(" NormalGetKeyData: system_id = %d = 0x%04X, version=%d\n", + printf(" NormalGetKeyData: system_id = %u = 0x%04X, version=%u\n", htonl(data[1]), htonl(data[1]), htonl(data[0])); ASSERT_EQ(OEMCrypto_SUCCESS, sts); } +TEST_F(OEMCryptoKeyboxTest, OEMCryptoMemoryGetKeyIdForLargeIdLength) { + auto oemcrypto_function = [](size_t input_length) { + size_t key_data_length = input_length; + vector key_data(key_data_length); + return OEMCrypto_GetKeyData(key_data.data(), &key_data_length); + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, !kCheckStatus); +} + TEST_F(OEMCryptoKeyboxTest, GetKeyDataNullPointer) { OEMCryptoResult sts; uint8_t key_data[256]; @@ -606,6 +867,42 @@ TEST_F(OEMCryptoKeyboxTest, GenerateDerivedKeysFromKeyboxLargeBuffer) { enc_context.data(), enc_context.size())); } +TEST_F(OEMCryptoKeyboxTest, + OEMCryptoMemoryGenerateDerivedKeysForLargeMacContextLength) { + Session s; + ASSERT_NO_FATAL_FAILURE(s.open()); + vector mac_context; + vector enc_context; + s.FillDefaultContext(&mac_context, &enc_context); + + auto oemcrypto_function = [&s, &mac_context, + &enc_context](size_t buffer_length) { + mac_context.resize(buffer_length); + return OEMCrypto_GenerateDerivedKeys(s.session_id(), mac_context.data(), + mac_context.size(), enc_context.data(), + enc_context.size()); + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, kCheckStatus); +} + +TEST_F(OEMCryptoKeyboxTest, + OEMCryptoMemoryGenerateDerivedKeysForLargeEncContextLength) { + Session s; + ASSERT_NO_FATAL_FAILURE(s.open()); + vector mac_context; + vector enc_context; + s.FillDefaultContext(&mac_context, &enc_context); + + auto oemcrypto_function = [&s, &mac_context, + &enc_context](size_t buffer_length) { + enc_context.resize(buffer_length); + return OEMCrypto_GenerateDerivedKeys(s.session_id(), mac_context.data(), + mac_context.size(), enc_context.data(), + enc_context.size()); + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, kCheckStatus); +} + // This class is for tests that have an OEM Certificate instead of a keybox. class OEMCryptoProv30Test : public OEMCryptoClientTest {}; @@ -644,6 +941,11 @@ TEST_F(OEMCryptoProv30Test, OEMCertValid) { ASSERT_NO_FATAL_FAILURE(s.LoadOEMCert(kVerify)); // Load and verify. } +/// @} + +/// @addtogroup license +/// @{ + // This verifies that the OEM Certificate cannot be used for other RSA padding // schemes. Those schemes should only be used by cast receiver certificates. TEST_F(OEMCryptoProv30Test, OEMCertForbiddenPaddingScheme) { @@ -711,6 +1013,27 @@ TEST_F(OEMCryptoProv30Test, GetCertOnlyAPI16) { ASSERT_EQ(OEMCrypto_SUCCESS, license_messages.LoadResponse()); } +TEST_F(OEMCryptoProv30Test, OEMCryptoMemoryGetOEMPublicCertForLargeCertLength) { + if (wrapped_rsa_key_.size() == 0) { + // If we don't have a wrapped key yet, create one. + // This wrapped key will be shared by all sessions in the test. + ASSERT_NO_FATAL_FAILURE(CreateWrappedRSAKey()); + } + Session s; + ASSERT_NO_FATAL_FAILURE(s.open()); + // Install the DRM Cert's RSA key. + ASSERT_NO_FATAL_FAILURE(s.InstallRSASessionTestKey(wrapped_rsa_key_)); + ASSERT_NO_FATAL_FAILURE(s.PreparePublicKey()); + + auto oemcrypto_function = [](size_t input_length) { + size_t public_cert_length = input_length; + vector public_cert(public_cert_length); + return OEMCrypto_GetOEMPublicCertificate(public_cert.data(), + &public_cert_length); + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, !kCheckStatus); +} + // // AddKey Tests // @@ -836,6 +1159,7 @@ TEST_P(OEMCryptoLicenseTest, LoadKeyNoNonce) { ASSERT_NO_FATAL_FAILURE(license_messages_.CreateDefaultResponse()); ASSERT_NO_FATAL_FAILURE(license_messages_.EncryptAndSignResponse()); ASSERT_EQ(OEMCrypto_SUCCESS, license_messages_.LoadResponse()); + ASSERT_NO_FATAL_FAILURE(session_.TestDecryptCTR(true, OEMCrypto_SUCCESS)); } // Verify that a preloaded license may be loaded without first signing the @@ -849,6 +1173,8 @@ TEST_P(OEMCryptoLicenseTest, LoadKeyWithNoRequest) { license_messages_.set_api_version(license_api_version_); } license_messages_.set_control(0); + // Notice that we do not call SignAndVerifyRequest -- we do not need a request + // in order to generate a response for a preloaded license. // The test code uses the core request to create the core response. license_messages_.core_request().api_major_version = ODK_MAJOR_VERSION; license_messages_.core_request().api_minor_version = ODK_MINOR_VERSION; @@ -861,6 +1187,34 @@ TEST_P(OEMCryptoLicenseTest, LoadKeyWithNoRequest) { ASSERT_NO_FATAL_FAILURE(InstallTestRSAKey(&session2)); ASSERT_NO_FATAL_FAILURE(session2.GenerateDerivedKeysFromSessionKey()); ASSERT_EQ(OEMCrypto_SUCCESS, license_messages_.LoadResponse(&session2)); + ASSERT_NO_FATAL_FAILURE(session2.TestDecryptCTR(true, OEMCrypto_SUCCESS)); +} + +// Verify that a license may be reloaded without a nonce, but with a nonzero +// rental duration. In order to start the rental clock, we sign a dummy license +// instead. +TEST_P(OEMCryptoLicenseTest, LoadKeyWithNoRequestRentalDuration) { + ASSERT_NO_FATAL_FAILURE(license_messages_.SignAndVerifyRequest()); + license_messages_.set_control(0); + ASSERT_NO_FATAL_FAILURE(license_messages_.CreateDefaultResponse()); + // It is not recommended for a license without a nonce to have a nonzero + // rental duration. But there are content providers that have licenses with + // this policy. + license_messages_.core_response().timer_limits.rental_duration_seconds = + kDuration; + ASSERT_NO_FATAL_FAILURE(license_messages_.EncryptAndSignResponse()); + + // Load license in a different session, which did not create the request. + Session session2; + ASSERT_NO_FATAL_FAILURE(session2.open()); + ASSERT_NO_FATAL_FAILURE(InstallTestRSAKey(&session2)); + // However, in order to start the rental clock, we have to sign something. So + // we will sign a dummy license request. + LicenseRoundTrip dummy_license(&session2); + ASSERT_NO_FATAL_FAILURE(dummy_license.SignAndVerifyRequest()); + ASSERT_NO_FATAL_FAILURE(session2.GenerateDerivedKeysFromSessionKey()); + ASSERT_EQ(OEMCrypto_SUCCESS, license_messages_.LoadResponse(&session2)); + ASSERT_NO_FATAL_FAILURE(session2.TestDecryptCTR(true, OEMCrypto_SUCCESS)); } // Verify that a license may be loaded with a nonce. @@ -870,6 +1224,7 @@ TEST_P(OEMCryptoLicenseTest, LoadKeyWithNonce) { ASSERT_NO_FATAL_FAILURE(license_messages_.CreateDefaultResponse()); ASSERT_NO_FATAL_FAILURE(license_messages_.EncryptAndSignResponse()); ASSERT_EQ(OEMCrypto_SUCCESS, license_messages_.LoadResponse()); + ASSERT_NO_FATAL_FAILURE(session_.TestDecryptCTR(true, OEMCrypto_SUCCESS)); } // Verify that a second license may not be loaded in a session. @@ -1336,6 +1691,10 @@ TEST_F(OEMCryptoLicenseTestAPI16, BadCoreHashAPI16) { ASSERT_NO_FATAL_FAILURE(license_messages_.EncryptAndSignResponse()); ASSERT_NE(OEMCrypto_SUCCESS, license_messages_.LoadResponse()); } +/// @} + +/// @addtogroup decrypt +/// @{ // LoadKeys should fail if we try to load keys with no keys. TEST_P(OEMCryptoLicenseTest, LoadKeyNoKeys) { @@ -1520,6 +1879,58 @@ TEST_P(OEMCryptoLicenseTest, QueryKeyControl) { strlen(key_id), reinterpret_cast(&block), &size)); } +// Test OEMCrypto_QueryKeyControl doesn't crash for huge key_id_length. +TEST_F(OEMCryptoLicenseTestAPI16, + OEMCryptoMemoryQueryKeyControlForHugeKeyIdLength) { + ASSERT_NO_FATAL_FAILURE(session_.GenerateNonce()); + ASSERT_NO_FATAL_FAILURE(license_messages_.SignAndVerifyRequest()); + ASSERT_NO_FATAL_FAILURE(license_messages_.CreateDefaultResponse()); + ASSERT_NO_FATAL_FAILURE(license_messages_.EncryptAndSignResponse()); + ASSERT_EQ(OEMCrypto_SUCCESS, license_messages_.LoadResponse()); + + OEMCrypto_SESSION session_id = session_.session_id(); + vector valid_key_id( + license_messages_.response_data().keys[0].key_id, + license_messages_.response_data().keys[0].key_id + kTestKeyIdMaxLength); + auto oemcrypto_function = [&session_id, + &valid_key_id](size_t additional_key_id_length) { + vector key_id(valid_key_id); + key_id.resize(valid_key_id.size() + additional_key_id_length); + KeyControlBlock block; + size_t size = sizeof(block); + return OEMCrypto_QueryKeyControl(session_id, key_id.data(), key_id.size(), + reinterpret_cast(&block), &size); + }; + // We do not want to stop as soon as API results in an error as it would + // return error on first iteration as key_id is invalid. + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, !kCheckStatus); +} + +// Test OEMCrypto_QueryKeyControl doesn't crash for huge key_control_block +// length. +TEST_F(OEMCryptoLicenseTestAPI16, + OEMCryptoMemoryQueryKeyControlForHugeKeyControlBlockLength) { + ASSERT_NO_FATAL_FAILURE(session_.GenerateNonce()); + ASSERT_NO_FATAL_FAILURE(license_messages_.SignAndVerifyRequest()); + ASSERT_NO_FATAL_FAILURE(license_messages_.CreateDefaultResponse()); + ASSERT_NO_FATAL_FAILURE(license_messages_.EncryptAndSignResponse()); + ASSERT_EQ(OEMCrypto_SUCCESS, license_messages_.LoadResponse()); + + OEMCrypto_SESSION session_id = session_.session_id(); + uint8_t* key_id = license_messages_.response_data().keys[0].key_id; + size_t key_id_length = + license_messages_.response_data().keys[0].key_id_length; + auto oemcrypto_function = [&session_id, &key_id, + &key_id_length](size_t buffer_length) { + size_t key_control_block_length = buffer_length; + vector key_control_block(key_control_block_length); + return OEMCrypto_QueryKeyControl(session_id, key_id, key_id_length, + key_control_block.data(), + &key_control_block_length); + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, kCheckStatus); +} + // If the device says it supports anti-rollback in the hardware, then it should // accept a key control block with the anti-rollback hardware bit set. // Otherwise, it should reject that key control block. @@ -1718,6 +2129,11 @@ TEST_P(OEMCryptoSessionTestDecryptWithHDCP, DecryptAPI09) { INSTANTIATE_TEST_CASE_P(TestHDCP, OEMCryptoSessionTestDecryptWithHDCP, Range(1, 6)); +/// @} + +/// @addtogroup renewal +/// @{ + // // Load, Refresh Keys Test // @@ -1903,6 +2319,30 @@ TEST_P(OEMCryptoLicenseTest, HashForbiddenAPI15) { OEMCrypto_GetHashErrorCode(session_.session_id(), &frame_number)); } +// This test verifies that OEMCrypto_SetDecryptHash doesn't crash for a very +// large hash buffer. +TEST_F(OEMCryptoLicenseTestAPI16, + OEMCryptoMemoryDecryptHashForLargeHashBuffer) { + uint32_t session_id = session_.session_id(); + auto f = [session_id](size_t hash_length) { + uint32_t frame_number = 1; + vector hash_buffer(hash_length); + return OEMCrypto_SetDecryptHash(session_id, frame_number, + hash_buffer.data(), hash_buffer.size()); + }; + TestHugeLengthDoesNotCrashAPI(f, sizeof(uint32_t), kHugeInputBufferLength, + kCheckStatus); +} + +// This test verifies OEMCrypto_SetDecryptHash for out of range frame number. +TEST_P(OEMCryptoLicenseTest, DecryptHashForOutOfRangeFrameNumber) { + uint32_t frame_number = 40; + uint32_t hash = 42; + ASSERT_NO_FATAL_FAILURE(OEMCrypto_SetDecryptHash( + session_.session_id(), frame_number, + reinterpret_cast(&hash), sizeof(hash))); +} + // // Decrypt Tests -- these test Decrypt CTR mode only. // @@ -3075,6 +3515,50 @@ TEST_F(OEMCryptoUsesCertificate, GenerateDerivedKeysLargeBuffer) { enc_context.data(), enc_context.size())); } +TEST_F(OEMCryptoUsesCertificate, + OEMCryptoMemoryDeriveKeysFromSessionKeyForHugeMacContext) { + vector session_key; + vector enc_session_key; + ASSERT_NO_FATAL_FAILURE(session_.PreparePublicKey(encoded_rsa_key_.data(), + encoded_rsa_key_.size())); + ASSERT_TRUE(session_.GenerateRSASessionKey(&session_key, &enc_session_key)); + vector mac_context; + vector enc_context; + session_.FillDefaultContext(&mac_context, &enc_context); + OEMCrypto_SESSION session_id = session_.session_id(); + auto oemcrypto_function = [&session_id, &enc_context, &mac_context, + &enc_session_key](size_t buffer_length) { + mac_context.resize(buffer_length); + return OEMCrypto_DeriveKeysFromSessionKey( + session_id, enc_session_key.data(), enc_session_key.size(), + mac_context.data(), mac_context.size(), enc_context.data(), + enc_context.size()); + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, kCheckStatus); +} + +TEST_F(OEMCryptoUsesCertificate, + OEMCryptoMemoryDeriveKeysFromSessionKeyForLargeEncContext) { + vector session_key; + vector enc_session_key; + ASSERT_NO_FATAL_FAILURE(session_.PreparePublicKey(encoded_rsa_key_.data(), + encoded_rsa_key_.size())); + ASSERT_TRUE(session_.GenerateRSASessionKey(&session_key, &enc_session_key)); + vector mac_context; + vector enc_context; + session_.FillDefaultContext(&mac_context, &enc_context); + OEMCrypto_SESSION session_id = session_.session_id(); + auto oemcrypto_function = [&session_id, &enc_context, &mac_context, + &enc_session_key](size_t buffer_length) { + enc_context.resize(buffer_length); + return OEMCrypto_DeriveKeysFromSessionKey( + session_id, enc_session_key.data(), enc_session_key.size(), + mac_context.data(), mac_context.size(), enc_context.data(), + enc_context.size()); + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, kCheckStatus); +} + // This test attempts to use alternate algorithms for loaded device certs. class OEMCryptoLoadsCertificateAlternates : public OEMCryptoLoadsCertificate { protected: @@ -3178,19 +3662,82 @@ class OEMCryptoLoadsCertificateAlternates : public OEMCryptoLoadsCertificate { ASSERT_NO_FATAL_FAILURE(provisioning_messages.CreateDefaultResponse()); ASSERT_NO_FATAL_FAILURE(provisioning_messages.EncryptAndSignResponse()); OEMCryptoResult sts = provisioning_messages.LoadResponse(); - encoded_rsa_key_ = provisioning_messages.encoded_rsa_key(); - wrapped_rsa_key_ = provisioning_messages.wrapped_rsa_key(); - key_loaded_ = (wrapped_rsa_key_.size() > 0); + key_loaded_ = (OEMCrypto_SUCCESS == sts); + if (key_loaded_) { + encoded_rsa_key_ = provisioning_messages.encoded_rsa_key(); + wrapped_rsa_key_ = provisioning_messages.wrapped_rsa_key(); + EXPECT_GT(wrapped_rsa_key_.size(), 0u); + EXPECT_EQ(nullptr, find(wrapped_rsa_key_, encoded_rsa_key_)); + } if (force) { EXPECT_EQ(OEMCrypto_SUCCESS, sts); - EXPECT_EQ(nullptr, find(wrapped_rsa_key_, encoded_rsa_key_)); - ASSERT_TRUE(key_loaded_); } } bool key_loaded_; }; +TEST_F(OEMCryptoLoadsCertificateAlternates, + OEMCryptoMemoryGenerateRSASignatureForLargeBuffer) { + OEMCryptoResult sts; + LoadWithAllowedSchemes(kSign_PKCS1_Block1, false); + // If the device is a cast receiver, then this scheme is required. + if (global_features.cast_receiver) ASSERT_TRUE(key_loaded_); + if (key_loaded_) { + Session s; + ASSERT_NO_FATAL_FAILURE(s.open()); + sts = OEMCrypto_LoadDRMPrivateKey(s.session_id(), OEMCrypto_RSA_Private_Key, + wrapped_rsa_key_.data(), + wrapped_rsa_key_.size()); + ASSERT_EQ(OEMCrypto_SUCCESS, sts); + + vector message_buffer(10); + size_t signature_length = 0; + sts = OEMCrypto_GenerateRSASignature(s.session_id(), message_buffer.data(), + message_buffer.size(), nullptr, + &signature_length, kSign_PKCS1_Block1); + ASSERT_EQ(OEMCrypto_ERROR_SHORT_BUFFER, sts); + ASSERT_NE(static_cast(0), signature_length); + vector signature(signature_length); + + auto oemcrypto_function = [&](size_t buffer_length) { + message_buffer.resize(buffer_length); + return OEMCrypto_GenerateRSASignature( + s.session_id(), message_buffer.data(), message_buffer.size(), + signature.data(), &signature_length, kSign_PKCS1_Block1); + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, kCheckStatus); + s.close(); + } +} + +TEST_F(OEMCryptoLoadsCertificateAlternates, + OEMCryptoMemoryGenerateRSASignatureForLargeSignatureLength) { + OEMCryptoResult sts; + LoadWithAllowedSchemes(kSign_PKCS1_Block1, false); + // If the device is a cast receiver, then this scheme is required. + if (global_features.cast_receiver) ASSERT_TRUE(key_loaded_); + if (key_loaded_) { + Session s; + ASSERT_NO_FATAL_FAILURE(s.open()); + sts = OEMCrypto_LoadDRMPrivateKey(s.session_id(), OEMCrypto_RSA_Private_Key, + wrapped_rsa_key_.data(), + wrapped_rsa_key_.size()); + ASSERT_EQ(OEMCrypto_SUCCESS, sts); + + vector message_buffer(50); + vector signature; + auto oemcrypto_function = [&](size_t signature_length) { + signature.resize(signature_length); + return OEMCrypto_GenerateRSASignature( + s.session_id(), message_buffer.data(), message_buffer.size(), + signature.data(), &signature_length, kSign_PKCS1_Block1); + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, kCheckStatus); + s.close(); + } +} + // The alternate padding is only required for cast receivers, but all devices // should forbid the alternate padding for regular certificates. TEST_F(OEMCryptoLoadsCertificateAlternates, DisallowForbiddenPaddingAPI09) { @@ -3201,7 +3748,7 @@ TEST_F(OEMCryptoLoadsCertificateAlternates, DisallowForbiddenPaddingAPI09) { // The alternate padding is only required for cast receivers, but if a device // does load an alternate certificate, it should NOT use it for generating // a license request signature. -TEST_F(OEMCryptoLoadsCertificateAlternates, TestSignaturePKCS1_API16) { +TEST_F(OEMCryptoLoadsCertificateAlternates, TestSignaturePKCS1) { // Try to load an RSA key with alternative padding schemes. This signing // scheme is used by cast receivers. LoadWithAllowedSchemes(kSign_PKCS1_Block1, false); @@ -4282,6 +4829,9 @@ class OEMCryptoGenericCryptoTest : public OEMCryptoRefreshTest { if (alter_data) { signature[0] ^= 42; } + if (signature.size() < signature_size) { + signature.resize(signature_size); + } sts = OEMCrypto_SelectKey(session_.session_id(), session_.license().keys[key_index].key_id, @@ -4357,6 +4907,17 @@ TEST_P(OEMCryptoGenericCryptoTest, GenericKeyEncryptSameBufferAPI12) { ASSERT_EQ(expected_encrypted, buffer); } +TEST_P(OEMCryptoGenericCryptoTest, OEMCryptoMemorySelectKeyForHugeKeyIdLength) { + EncryptAndLoadKeys(); + OEMCrypto_SESSION session_id = session_.session_id(); + auto oemcrypto_function = [session_id](size_t key_id_length) { + vector key_id(key_id_length); + return OEMCrypto_SelectKey(session_id, key_id.data(), key_id.size(), + OEMCrypto_CipherMode_CTR); + }; + TestHugeLengthDoesNotCrashAPI(oemcrypto_function, !kCheckStatus); +} + // Test Generic_Decrypt works correctly. TEST_P(OEMCryptoGenericCryptoTest, GenericKeyDecrypt) { EncryptAndLoadKeys(); @@ -4821,6 +5382,11 @@ INSTANTIATE_TEST_CASE_P(TestAll, OEMCryptoGenericCryptoTest, INSTANTIATE_TEST_CASE_P(TestAll, OEMCryptoGenericCryptoKeyIdLengthTest, Range(kCurrentAPI - 1, kCurrentAPI + 1)); +/// @} + +/// @addtogroup usage_table +/// @{ + // Test usage table functionality. class LicenseWithUsageEntry { public: @@ -5871,7 +6437,7 @@ TEST_P(OEMCryptoUsageTableDefragTest, ManyUsageEntries) { OEMCryptoResult status = OEMCrypto_SUCCESS; while (successful_count < attempt_count && status == OEMCrypto_SUCCESS) { wvcdm::TestSleep::SyncFakeClock(); - LOGD("Creating license for entry %zd", successful_count); + LOGD("Creating license for entry %zu", successful_count); entries.push_back( std::unique_ptr(new LicenseWithUsageEntry())); entries.back()->set_pst("pst " + std::to_string(successful_count)); @@ -5897,7 +6463,7 @@ TEST_P(OEMCryptoUsageTableDefragTest, ManyUsageEntries) { successful_count++; } } - LOGD("successful_count = %d", successful_count); + LOGD("successful_count = %zu", successful_count); if (status != OEMCrypto_SUCCESS) { // If we failed to create this many entries because of limited resources, // then the error returned should be insufficient resources. @@ -6009,6 +6575,38 @@ TEST_P(OEMCryptoUsageTableTest, ReloadUsageTableWithSkew) { ASSERT_EQ(OEMCrypto_SUCCESS, entry.license_messages().LoadResponse()); } +TEST_P(OEMCryptoUsageTableTest, LoadAndReloadEntries) { + constexpr size_t kEntryCount = 10; + std::vector entries(kEntryCount); + + for (LicenseWithUsageEntry& entry : entries) { + entry.license_messages().set_api_version(license_api_version_); + } + + for (size_t i = 0; i < kEntryCount; ++i) { + const std::string create_description = + "Creating entry #" + std::to_string(i); + // Create and update a new entry. + LicenseWithUsageEntry& new_entry = entries[i]; + ASSERT_NO_FATAL_FAILURE(new_entry.MakeOfflineAndClose(this)) + << create_description; + // Reload all entries, starting with the most recently created. + for (size_t j = 0; j <= i; ++j) { + const std::string reload_description = + "Reloading entry #" + std::to_string(i - j) + + ", after creating entry #" + std::to_string(i); + LicenseWithUsageEntry& old_entry = entries[i - j]; + ASSERT_NO_FATAL_FAILURE(old_entry.session().open()); + ASSERT_NO_FATAL_FAILURE(old_entry.ReloadUsageEntry()) + << reload_description; + ASSERT_NO_FATAL_FAILURE( + old_entry.session().UpdateUsageEntry(&encrypted_usage_header_)) + << reload_description; + ASSERT_NO_FATAL_FAILURE(old_entry.session().close()); + } + } +} + // A usage report with the wrong pst should fail. TEST_P(OEMCryptoUsageTableTest, GenerateReportWrongPST) { LicenseWithUsageEntry entry; @@ -6174,9 +6772,7 @@ TEST_P(OEMCryptoUsageTableTest, VerifyUsageTimes) { // on a device that allows an application to set the clock. class OEMCryptoUsageTableTestWallClock : public OEMCryptoUsageTableTest { public: - void SetUp() override { - OEMCryptoUsageTableTest::SetUp(); - } + void SetUp() override { OEMCryptoUsageTableTest::SetUp(); } void TearDown() override { wvcdm::TestSleep::ResetRollback(); @@ -6320,4 +6916,5 @@ INSTANTIATE_TEST_CASE_P(TestAPI16, OEMCryptoUsageTableDefragTest, INSTANTIATE_TEST_CASE_P(TestAPI16, OEMCryptoUsageTableTestWallClock, Values(kCurrentAPI)); +/// @} } // namespace wvoec diff --git a/platforms/x86-64/environment.py b/platforms/x86-64/environment.py index 585b901c..8e52136e 100644 --- a/platforms/x86-64/environment.py +++ b/platforms/x86-64/environment.py @@ -1,7 +1,6 @@ export_variables = { 'CC': 'clang', 'CXX': 'clang++', - 'AR': 'ar', + 'LD': 'clang++', 'GYP_CROSSCOMPILE': '1', - 'CLANG_BUILD': '1', } diff --git a/platforms/x86-64/settings.gypi b/platforms/x86-64/settings.gypi index 068888cb..aaacc014 100644 --- a/platforms/x86-64/settings.gypi +++ b/platforms/x86-64/settings.gypi @@ -16,48 +16,59 @@ '-fvisibility=hidden', '-fno-common', '-Wno-unknown-warning-option', + + # Enable many warnings, and treat warnings as errors. Note that, for + # cross-compatibility reasons between GCC and Clang, we cannot just use + # -Werror to treat warnings as errors, as GCC has no equivalent of + # -Wno-unknown-warning-option. + '-Werror=all', + '-Werror=extra', + '-Werror=unused', + '-Werror=format=2', + '-Werror=format-nonliteral', + '-Werror=format-signedness', + '-Werror=cast-align', + '-Werror=return-type', + '-Werror=shadow', + + '-Wno-unused-parameter', # OEC Ref requires this + '-Wno-dangling-else', # Allowed by Google C++ Style ], # These are flags passed to the compiler for plain C only. 'cflags_c': [ # Compile using the C11 standard with POSIX extensions '-std=c11', '-D_POSIX_C_SOURCE=200809L', - # Warn on bad function casts + + # Enable C-specific warnings '-Wbad-function-cast', + '-Wno-error=bad-function-cast', + '-Wcast-qual', + '-Wno-error=cast-qual', ], # These are flags passed to the compiler for C++ only. 'cflags_cc': [ # Compile using the C++11 standard. '-std=c++11', - # Disable unused C++ features that are expensive. - '-fno-rtti', + # CE CDM does not use exceptions, and they are expensive. '-fno-exceptions', - # Enable all warnings, and treat warnings as errors. - '-Wall', - '-Werror', - '-Wextra', - '-Wunused', - '-Wcast-qual', - '-Wno-long-long', - '-Wno-variadic-macros', - '-Wno-inline', - '-Wformat=2', - '-Wno-format-nonliteral', - '-Wshadow', - '-Wnon-virtual-dtor', - #'-Woverloaded-virtual', - #'-Wsuggest-override', - #'-Wctor-dtor-privacy', - '-Wcast-align', - '-Wno-conversion', - '-Wignored-qualifiers', - '-Wreturn-type', - #'-Wstrict-null-sentinel', - #'-Wuseless-cast', - '-Wno-unused-parameter', # repeated in protobufs triggers this - '-Wno-unused-local-typedefs', # metrics requires this - #'-Wno-maybe-uninitialized', - '-Wno-dangling-else', # Allowed by Google C++ Style + + # Enable C++-specific warnings + '-Werror=cast-qual', + '-Werror=non-virtual-dtor', + '-Werror=strict-null-sentinel', + '-Werror=useless-cast', + + # TODO(b/156766290): We cannot enable these until we update to gTest 1.10 + # and update all our tests to use the new version of MOCK_METHOD that + # allows specifying |override|. + # + #'-Werror=overloaded-virtual', + #'-Werror=suggest-override', + #'-Werror=zero-as-null-pointer-constant', + + '-Wdeprecated-declarations', + '-Wno-error=deprecated-declarations', ], # These are flags passed to the linker. @@ -80,37 +91,17 @@ # These are settings specifically for the host toolchain. # The extra equals sign in the key name instructs gyp to replace # the generic settings above rather than append to them. - 'cflags=': [ - ], + 'cflags=': [], - 'cflags_c=': [ - ], + 'cflags_c=': [], - 'cflags_cc=': [ - '-Wcast-qual', - # '-Wextra', - '-Wno-unused', - '-Wno-long-long', - '-Wno-variadic-macros', - '-Wno-inline', - '-Wformat=2', - '-Wno-format-nonliteral', - '-Wnon-virtual-dtor', - #'-Woverloaded-virtual', - #'-Wctor-dtor-privacy', - '-Wcast-align', - '-Wno-ignored-qualifiers', - '-Wno-return-type', - ], + 'cflags_cc=': [], - 'ldflags=': [ - ], + 'ldflags=': [], - 'defines=': [ - ], + 'defines=': [], - 'include_dirs=': [ - ], + 'include_dirs=': [], }], # end _toolset == "host" condition ], # end target_conditions @@ -118,24 +109,43 @@ # These are additional settings per build configuration. # You may specify any of the keys above in this section # (cflags, cflags_c, cflags_cc, ldflags, defines, include_dirs). - 'Debug': { + 'debug': { 'cflags': [ - '-O0', - '-g', + '-g3', + + '-fsanitize=address,undefined,float-divide-by-zero,bounds', + '-fno-sanitize-recover=address,undefined,float-divide-by-zero,bounds', + '-fsanitize-address-use-after-scope', + # These are the flags recommended by the Address Sanitizer team when + # enabling Address Sanitizer. + '-U_FORTIFY_SOURCE', + '-O1', + '-fno-omit-frame-pointer', + '-fno-inline', + '-fno-optimize-sibling-calls', + ], + 'cflags_cc': [ + # CE CDM does not use RTTI, but UBSan needs it for its vptr checks + '-frtti', ], 'defines': [ '_DEBUG', '_GLIBCXX_DEBUG', ], 'ldflags': [ - '-g', + '-g3', + '-fsanitize=address,undefined,float-divide-by-zero,bounds', ], }, - 'Release': { + 'release': { 'cflags': [ '-O2', '-g0', ], + 'cflags_cc': [ + # CE CDM does not use RTTI, and it is expensive. + '-fno-rtti', + ], 'ldflags': [ '-flto', ], diff --git a/third_party/boringssl/boringssl.gyp b/third_party/boringssl/boringssl.gyp index 69b455e4..bcbb638a 100644 --- a/third_party/boringssl/boringssl.gyp +++ b/third_party/boringssl/boringssl.gyp @@ -4,35 +4,28 @@ 'asm_target_arch%': 'none', 'has_nasm%': 'false', 'nasm_path%': 'nasm.exe', + + 'dependent_included_warning_flags': [ + '-Wno-unknown-warning-option', + '-Wno-cast-qual', + '-Wno-ignored-qualifiers', + '-Wuseless-cast', + ], + 'dependent_excluded_warning_flags': [ + '-Wcast-qual', + '-Werror=cast-qual', + '-Wignored-qualifiers', + '-Werror=ignored-qualifiers', + '-Wuseless-cast', + '-Werror=useless-cast', + ], }, 'target_defaults': { + 'includes': ['../disable_warnings.gypi'], 'cflags': [ - '-g', '-fPIC', '-fvisibility=hidden', - # BoringSSL violates these warnings - '-Wno-cast-qual', - '-Wno-ignored-qualifiers', - ], - 'cflags!': [ - '-Wbad-function-cast', - '-Wcast-qual', - '-Wignored-qualifiers', - ], - 'cflags_cc!': [ - '-Wbad-function-cast', - '-Wcast-qual', - '-Wignored-qualifiers', - ], - 'cflags_c': [ - # BoringSSL violates these warnings - '-Wno-bad-function-cast', - ], - 'cflags_c!': [ - '-Wbad-function-cast', - '-Wcast-qual', - '-Wignored-qualifiers', ], 'msvs_settings': { @@ -62,29 +55,10 @@ 'direct_dependent_settings': { # BoringSSL's exported headers fail these warnings - 'cflags': [ - '-Wno-unknown-warning-option', - '-Wno-cast-qual', - '-Wno-ignored-qualifiers', - ], - 'cflags!': [ - '-Wbad-function-cast', - '-Wcast-qual', - '-Wignored-qualifiers', - ], - 'cflags_c': [ - '-Wno-bad-function-cast', - ], - 'cflags_c!': [ - '-Wbad-function-cast', - '-Wcast-qual', - '-Wignored-qualifiers', - ], - 'cflags_cc!': [ - '-Wbad-function-cast', - '-Wcast-qual', - '-Wignored-qualifiers', - ], + 'cflags': ['<@(dependent_included_warning_flags)'], + 'cflags!': ['<@(dependent_excluded_warning_flags)'], + 'cflags_c!': ['<@(dependent_excluded_warning_flags)'], + 'cflags_cc!': ['<@(dependent_excluded_warning_flags)'], }, 'type': 'static_library', @@ -251,13 +225,6 @@ 'kit/src/include', ], }, - - 'cflags_cc': [ - '-Wno-cast-align', - ], - 'cflags_cc!': [ - '-Wcast-align', - ], }, ], } diff --git a/third_party/disable_warnings.gypi b/third_party/disable_warnings.gypi new file mode 100644 index 00000000..8d23bc25 --- /dev/null +++ b/third_party/disable_warnings.gypi @@ -0,0 +1,37 @@ +# Copyright 2020 Google Inc. All Rights Reserved. +# +# Including this GYPI file in a |target| or |target_defaults| section will +# disable warnings for the affected target(s). This is generally only desirable +# in third-party code where we are not responsible for maintenance. + +{ + 'variables': { + 'disable_warnings_include': [ + '-Wno-error', + '-w', + ], + 'disable_warnings_exclude': [ + '-Werror', + '-Wall', + '-Wextra', + '-pedantic', + '-pedantic-errors', + ], + 'w_error_regex': '^-Werror', + }, + 'cflags': ['<@(disable_warnings_include)'], + + 'cflags!': ['<@(disable_warnings_exclude)'], + 'cflags_c!': ['<@(disable_warnings_exclude)'], + 'cflags_cc!': ['<@(disable_warnings_exclude)'], + + 'cflags/': [ + ['exclude', '<(w_error_regex)'], + ], + 'cflags_c/': [ + ['exclude', '<(w_error_regex)'], + ], + 'cflags_cc/': [ + ['exclude', '<(w_error_regex)'], + ], +} diff --git a/third_party/gmock.gyp b/third_party/gmock.gyp index d7c70a8b..4d80ab97 100644 --- a/third_party/gmock.gyp +++ b/third_party/gmock.gyp @@ -1,22 +1,27 @@ # Copyright 2013 Google Inc. All Rights Reserved. # This is for googletest release 1.8.0 { + 'variables': { + 'dependent_included_warning_flags': [ + '-Wno-unknown-warning-option', + '-Wno-deprecated-copy', + ], + 'dependent_excluded_warning_flags': [ + '-Wdeprecated-copy', + '-Werror=deprecated-copy', + ], + }, + 'target_defaults': { + 'includes': ['disable_warnings.gypi'], # It seems that if one target uses -fPIC, then all targets will need that # flag or else there will be linking errors. PIC means Position Independent # Code and is needed to build the shared library version of liboemrypto.so. - # Similarly, -g is all or nothing. It turns on debugging symbols. 'cflags': [ - '-g', '-fPIC', ], 'cflags_cc': [ '-std=c++11', - # gMock violates these warnings - '-Wno-deprecated-copy', - ], - 'cflags_cc!': [ - '-Wdeprecated-copy', ], 'ldflags': [ '-fPIC', @@ -32,13 +37,11 @@ 'googletest/googlemock/include', 'googletest/googletest/include', ], - 'cflags_cc': [ - # gMock's exported headers violate these warnings - '-Wno-deprecated-copy', - ], - 'cflags_cc!': [ - '-Wdeprecated-copy', - ], + # gMock & gTest's exported headers fail these warnings + 'cflags': ['<@(dependent_included_warning_flags)'], + 'cflags!': ['<@(dependent_excluded_warning_flags)'], + 'cflags_c!': ['<@(dependent_excluded_warning_flags)'], + 'cflags_cc!': ['<@(dependent_excluded_warning_flags)'], 'xcode_settings': { 'OTHER_CFLAGS': [ '-Wno-inconsistent-missing-override', diff --git a/third_party/protobuf.gypi b/third_party/protobuf.gypi index df98305d..6d461f92 100644 --- a/third_party/protobuf.gypi +++ b/third_party/protobuf.gypi @@ -18,6 +18,7 @@ '<(protobuf_source)/src/google/protobuf/any_lite.cc', '<(protobuf_source)/src/google/protobuf/arena.cc', '<(protobuf_source)/src/google/protobuf/extension_set.cc', + '<(protobuf_source)/src/google/protobuf/generated_enum_util.cc', '<(protobuf_source)/src/google/protobuf/generated_message_table_driven_lite.cc', '<(protobuf_source)/src/google/protobuf/generated_message_util.cc', '<(protobuf_source)/src/google/protobuf/implicit_weak_message.cc', @@ -25,6 +26,7 @@ '<(protobuf_source)/src/google/protobuf/io/io_win32.cc', '<(protobuf_source)/src/google/protobuf/io/strtod.cc', '<(protobuf_source)/src/google/protobuf/io/zero_copy_stream.cc', + '<(protobuf_source)/src/google/protobuf/io/zero_copy_stream_impl.cc', '<(protobuf_source)/src/google/protobuf/io/zero_copy_stream_impl_lite.cc', '<(protobuf_source)/src/google/protobuf/message_lite.cc', '<(protobuf_source)/src/google/protobuf/parse_context.cc', @@ -42,37 +44,16 @@ '<(protobuf_source)/src/google/protobuf/wire_format_lite.cc', ], - 'included_cflags': [ - # Ignore unknown warning options, to support both gcc & clang at once. + 'dependent_included_warning_flags': [ '-Wno-unknown-warning-option', - - # These flags come from Protobuf's BUILD file. - '-Wno-write-strings', - '-Woverloaded-virtual', - '-Wno-sign-compare', - '-Wno-unused-function', - - # These flags silence warnings that appear in protobuf upstream. - # We will not maintain a divergent copy of protobuf to fix them. '-Wno-shadow', - '-Wno-invalid-offsetof', - '-Wno-cast-qual', - '-Wno-ignored-qualifiers', - '-Wno-inconsistent-missing-override', - '-Wno-redundant-move', + '-Wno-useless-cast', ], - 'excluded_cflags': [ - # In addition to turning these off above, GYP's order-of-operations means - # that we need to filter the positive versions as well. - '-Wwrite-strings', - '-Wsign-compare', - '-Wunused-function', + 'dependent_excluded_warning_flags': [ '-Wshadow', - '-Winvalid-offsetof', - '-Wcast-qual', - '-Wignored-qualifiers', - '-Winconsistent-missing-override', - '-Wredundant-move', + '-Werror=shadow', + '-Wuseless-cast', + '-Werror=useless-cast', ], }, 'target_defaults': { @@ -96,10 +77,7 @@ '<(protobuf_source)', '<(protobuf_source)/src', ], - 'cflags': ['<@(included_cflags)'], - 'cflags!': ['<@(excluded_cflags)'], - 'cflags_cc': ['<@(included_cflags)'], - 'cflags_cc!': ['<@(excluded_cflags)'], + 'includes': ['disable_warnings.gypi'], 'xcode_settings': { 'OTHER_CFLAGS': ['-w'], 'USE_HEADERMAP': 'NO', @@ -120,10 +98,10 @@ 'defines': [ 'GOOGLE_PROTOBUF_NO_RTTI', ], - 'cflags': ['-Wno-unknown-warning-option', '-Wno-shadow'], - 'cflags!': ['-Wshadow'], - 'cflags_cc': ['-Wno-unknown-warning-option', '-Wno-shadow'], - 'cflags_cc!': ['-Wshadow'], + 'cflags': ['<@(dependent_included_warning_flags)'], + 'cflags!': ['<@(dependent_excluded_warning_flags)'], + 'cflags_c!': ['<@(dependent_excluded_warning_flags)'], + 'cflags_cc!': ['<@(dependent_excluded_warning_flags)'], }, }, { @@ -152,14 +130,12 @@ '<(protobuf_source)/src/google/protobuf/io/gzip_stream.cc', '<(protobuf_source)/src/google/protobuf/io/printer.cc', '<(protobuf_source)/src/google/protobuf/io/tokenizer.cc', - '<(protobuf_source)/src/google/protobuf/io/zero_copy_stream_impl.cc', '<(protobuf_source)/src/google/protobuf/map_field.cc', '<(protobuf_source)/src/google/protobuf/message.cc', '<(protobuf_source)/src/google/protobuf/reflection_ops.cc', '<(protobuf_source)/src/google/protobuf/service.cc', '<(protobuf_source)/src/google/protobuf/source_context.pb.cc', '<(protobuf_source)/src/google/protobuf/struct.pb.cc', - '<(protobuf_source)/src/google/protobuf/stubs/mathlimits.cc', '<(protobuf_source)/src/google/protobuf/stubs/substitute.cc', '<(protobuf_source)/src/google/protobuf/text_format.cc', '<(protobuf_source)/src/google/protobuf/timestamp.pb.cc', @@ -193,10 +169,7 @@ '<(protobuf_source)', '<(protobuf_source)/src', ], - 'cflags': ['<@(included_cflags)'], - 'cflags!': ['<@(excluded_cflags)'], - 'cflags_cc': ['<@(included_cflags)'], - 'cflags_cc!': ['<@(excluded_cflags)'], + 'includes': ['disable_warnings.gypi'], 'xcode_settings': { 'OTHER_CFLAGS': ['-w'], 'USE_HEADERMAP': 'NO', @@ -305,10 +278,7 @@ 'dependencies': [ 'protobuf', ], - 'cflags': ['<@(included_cflags)'], - 'cflags!': ['<@(excluded_cflags)'], - 'cflags_cc': ['<@(included_cflags)'], - 'cflags_cc!': ['<@(excluded_cflags)'], + 'includes': ['disable_warnings.gypi'], 'xcode_settings': { 'OTHER_CFLAGS': ['-w'], 'USE_HEADERMAP': 'NO', diff --git a/third_party/protobuf/BUILD b/third_party/protobuf/BUILD index 2fb26050..b32a1f16 100644 --- a/third_party/protobuf/BUILD +++ b/third_party/protobuf/BUILD @@ -1,20 +1,52 @@ # Bazel (https://bazel.build/) BUILD file for Protobuf. +load("@bazel_skylib//rules:common_settings.bzl", "string_flag") +load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test", "objc_library", native_cc_proto_library = "cc_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_lang_toolchain", "proto_library") +load("@rules_proto//proto/private:native.bzl", "native_proto_common") +load("@rules_python//python:defs.bzl", "py_library") +load(":cc_proto_blacklist_test.bzl", "cc_proto_blacklist_test") + licenses(["notice"]) exports_files(["LICENSE"]) ################################################################################ -# Java 9 configuration +# build configuration ################################################################################ +string_flag( + name = "incompatible_use_com_google_googletest", + # TODO(yannic): Flip to `true` for `3.13.0`. + build_setting_default = "false", + values = ["true", "false"] +) + config_setting( - name = "jdk9", - values = { - "java_toolchain": "@bazel_tools//tools/jdk:toolchain_jdk9", + name = "use_com_google_googletest", + flag_values = { + "//:incompatible_use_com_google_googletest": "true" }, ) +GTEST = select({ + "//:use_com_google_googletest": [ + "@com_google_googletest//:gtest", + ], + "//conditions:default": [ + "//external:gtest", + ], +}) + +GTEST_MAIN = select({ + "//:use_com_google_googletest": [ + "@com_google_googletest//:gtest_main", + ], + "//conditions:default": [ + "//external:gtest_main", + ], +}) + ################################################################################ # ZLIB configuration ################################################################################ @@ -27,25 +59,25 @@ ZLIB_DEPS = ["@zlib//:zlib"] MSVC_COPTS = [ "/DHAVE_PTHREAD", - "/wd4018", # -Wno-sign-compare - "/wd4065", # switch statement contains 'default' but no 'case' labels - "/wd4146", # unary minus operator applied to unsigned type, result still unsigned - "/wd4244", # 'conversion' conversion from 'type1' to 'type2', possible loss of data - "/wd4251", # 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2' - "/wd4267", # 'var' : conversion from 'size_t' to 'type', possible loss of data - "/wd4305", # 'identifier' : truncation from 'type1' to 'type2' - "/wd4307", # 'operator' : integral constant overflow - "/wd4309", # 'conversion' : truncation of constant value - "/wd4334", # 'operator' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) - "/wd4355", # 'this' : used in base member initializer list - "/wd4506", # no definition for inline function 'function' - "/wd4514", # -Wno-unused-function - "/wd4800", # 'type' : forcing value to bool 'true' or 'false' (performance warning) - "/wd4996", # The compiler encountered a deprecated declaration. + "/wd4018", # -Wno-sign-compare + "/wd4065", # switch statement contains 'default' but no 'case' labels + "/wd4146", # unary minus operator applied to unsigned type, result still unsigned + "/wd4244", # 'conversion' conversion from 'type1' to 'type2', possible loss of data + "/wd4251", # 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2' + "/wd4267", # 'var' : conversion from 'size_t' to 'type', possible loss of data + "/wd4305", # 'identifier' : truncation from 'type1' to 'type2' + "/wd4307", # 'operator' : integral constant overflow + "/wd4309", # 'conversion' : truncation of constant value + "/wd4334", # 'operator' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) + "/wd4355", # 'this' : used in base member initializer list + "/wd4506", # no definition for inline function 'function' + "/wd4514", # -Wno-unused-function + "/wd4800", # 'type' : forcing value to bool 'true' or 'false' (performance warning) + "/wd4996", # The compiler encountered a deprecated declaration. ] COPTS = select({ - ":msvc" : MSVC_COPTS, + ":msvc": MSVC_COPTS, "//conditions:default": [ "-DHAVE_PTHREAD", "-DHAVE_ZLIB", @@ -54,18 +86,30 @@ COPTS = select({ "-Wno-unused-function", # Prevents ISO C++ const string assignment warnings for pyext sources. "-Wno-write-strings", + "-Wno-deprecated-declarations", ], }) load(":compiler_config_setting.bzl", "create_compiler_config_setting") -create_compiler_config_setting(name = "msvc", value = "msvc-cl") +create_compiler_config_setting( + name = "msvc", + value = "msvc-cl", + visibility = [ + # Public, but Protobuf only visibility. + "//:__subpackages__", + ], +) config_setting( name = "android", values = { "crosstool_top": "//external:android/crosstool", }, + visibility = [ + # Public, but Protobuf only visibility. + "//:__subpackages__", + ], ) config_setting( @@ -73,6 +117,10 @@ config_setting( values = { "crosstool_top": "@androidndk//:toolchain-libcpp", }, + visibility = [ + # Public, but Protobuf only visibility. + "//:__subpackages__", + ], ) config_setting( @@ -80,6 +128,10 @@ config_setting( values = { "crosstool_top": "@androidndk//:toolchain-gnu-libstdcpp", }, + visibility = [ + # Public, but Protobuf only visibility. + "//:__subpackages__", + ], ) # Android and MSVC builds do not need to link in a separate pthread library. @@ -91,16 +143,20 @@ LINK_OPTS = select({ # Suppress linker warnings about files with no symbols defined. "-ignore:4221", ], - "//conditions:default": ["-lpthread", "-lm"], + "//conditions:default": [ + "-lpthread", + "-lm", + ], }) load( ":protobuf.bzl", + "adapt_proto_library", "cc_proto_library", - "py_proto_library", "internal_copied_filegroup", "internal_gen_well_known_protos_java", "internal_protobuf_py_tests", + "py_proto_library", ) cc_library( @@ -110,13 +166,15 @@ cc_library( "src/google/protobuf/any_lite.cc", "src/google/protobuf/arena.cc", "src/google/protobuf/extension_set.cc", + "src/google/protobuf/generated_enum_util.cc", "src/google/protobuf/generated_message_table_driven_lite.cc", "src/google/protobuf/generated_message_util.cc", "src/google/protobuf/implicit_weak_message.cc", "src/google/protobuf/io/coded_stream.cc", - "src/google/protobuf/io/strtod.cc", "src/google/protobuf/io/io_win32.cc", + "src/google/protobuf/io/strtod.cc", "src/google/protobuf/io/zero_copy_stream.cc", + "src/google/protobuf/io/zero_copy_stream_impl.cc", "src/google/protobuf/io/zero_copy_stream_impl_lite.cc", "src/google/protobuf/message_lite.cc", "src/google/protobuf/parse_context.cc", @@ -133,7 +191,10 @@ cc_library( "src/google/protobuf/stubs/time.cc", "src/google/protobuf/wire_format_lite.cc", ], - hdrs = glob(["src/google/protobuf/**/*.h", "src/google/protobuf/**/*.inc"]), + hdrs = glob([ + "src/google/protobuf/**/*.h", + "src/google/protobuf/**/*.inc", + ]), copts = COPTS, includes = ["src/"], linkopts = LINK_OPTS, @@ -167,14 +228,12 @@ cc_library( "src/google/protobuf/io/gzip_stream.cc", "src/google/protobuf/io/printer.cc", "src/google/protobuf/io/tokenizer.cc", - "src/google/protobuf/io/zero_copy_stream_impl.cc", "src/google/protobuf/map_field.cc", "src/google/protobuf/message.cc", "src/google/protobuf/reflection_ops.cc", "src/google/protobuf/service.cc", "src/google/protobuf/source_context.pb.cc", "src/google/protobuf/struct.pb.cc", - "src/google/protobuf/stubs/mathlimits.cc", "src/google/protobuf/stubs/substitute.cc", "src/google/protobuf/text_format.cc", "src/google/protobuf/timestamp.pb.cc", @@ -204,7 +263,10 @@ cc_library( "src/google/protobuf/wire_format.cc", "src/google/protobuf/wrappers.pb.cc", ], - hdrs = glob(["src/**/*.h", "src/**/*.inc"]), + hdrs = glob([ + "src/**/*.h", + "src/**/*.inc", + ]), copts = COPTS, includes = ["src/"], linkopts = LINK_OPTS, @@ -218,7 +280,10 @@ cc_library( # TODO(keveman): Remove this target once the support gets added to Bazel. cc_library( name = "protobuf_headers", - hdrs = glob(["src/**/*.h"]), + hdrs = glob([ + "src/**/*.h", + "src/**/*.inc", + ]), includes = ["src/"], visibility = ["//visibility:public"], ) @@ -226,23 +291,36 @@ cc_library( # Map of all well known protos. # name => (include path, imports) WELL_KNOWN_PROTO_MAP = { - "any" : ("google/protobuf/any.proto", []), - "api" : ("google/protobuf/api.proto", ["source_context", "type"]), - "compiler_plugin" : ("google/protobuf/compiler/plugin.proto", ["descriptor"]), - "descriptor" : ("google/protobuf/descriptor.proto", []), - "duration" : ("google/protobuf/duration.proto", []), - "empty" : ("google/protobuf/empty.proto", []), - "field_mask" : ("google/protobuf/field_mask.proto", []), - "source_context" : ("google/protobuf/source_context.proto", []), - "struct" : ("google/protobuf/struct.proto", []), - "timestamp" : ("google/protobuf/timestamp.proto", []), - "type" : ("google/protobuf/type.proto", ["any", "source_context"]), - "wrappers" : ("google/protobuf/wrappers.proto", []), + "any": ("src/google/protobuf/any.proto", []), + "api": ( + "src/google/protobuf/api.proto", + [ + "source_context", + "type", + ], + ), + "compiler_plugin": ( + "src/google/protobuf/compiler/plugin.proto", + ["descriptor"], + ), + "descriptor": ("src/google/protobuf/descriptor.proto", []), + "duration": ("src/google/protobuf/duration.proto", []), + "empty": ("src/google/protobuf/empty.proto", []), + "field_mask": ("src/google/protobuf/field_mask.proto", []), + "source_context": ("src/google/protobuf/source_context.proto", []), + "struct": ("src/google/protobuf/struct.proto", []), + "timestamp": ("src/google/protobuf/timestamp.proto", []), + "type": ( + "src/google/protobuf/type.proto", + [ + "any", + "source_context", + ], + ), + "wrappers": ("src/google/protobuf/wrappers.proto", []), } -RELATIVE_WELL_KNOWN_PROTOS = [proto[1][0] for proto in WELL_KNOWN_PROTO_MAP.items()] - -WELL_KNOWN_PROTOS = ["src/" + s for s in RELATIVE_WELL_KNOWN_PROTOS] +WELL_KNOWN_PROTOS = [value[0] for value in WELL_KNOWN_PROTO_MAP.values()] filegroup( name = "well_known_protos", @@ -250,13 +328,15 @@ filegroup( visibility = ["//visibility:public"], ) -cc_proto_library( +adapt_proto_library( + name = "cc_wkt_protos_genproto", + deps = [proto + "_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()], + visibility = ["//visibility:public"], +) + +cc_library( name = "cc_wkt_protos", - srcs = WELL_KNOWN_PROTOS, - include = "src", - default_runtime = ":protobuf", - internal_bootstrap_hack = 1, - protoc = ":protoc", + deprecation = "Only for backward compatibility. Do not use.", visibility = ["//visibility:public"], ) @@ -272,20 +352,24 @@ cc_proto_library( # ) ################################################################################ -internal_copied_filegroup( - name = "_internal_wkt_protos", - srcs = WELL_KNOWN_PROTOS, - dest = "", - strip_prefix = "src", - visibility = ["//visibility:private"], -) - [proto_library( name = proto[0] + "_proto", srcs = [proto[1][0]], - deps = [dep + "_proto" for dep in proto[1][1]], + strip_import_prefix = "src", visibility = ["//visibility:public"], - ) for proto in WELL_KNOWN_PROTO_MAP.items()] + deps = [dep + "_proto" for dep in proto[1][1]], +) for proto in WELL_KNOWN_PROTO_MAP.items()] + +[native_cc_proto_library( + name = proto + "_cc_proto", + deps = [proto + "_proto"], + visibility = ["//visibility:private"], +) for proto in WELL_KNOWN_PROTO_MAP.keys()] + +cc_proto_blacklist_test( + name = "cc_proto_blacklist_test", + deps = [proto + "_cc_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()] +) ################################################################################ # Protocol Buffers Compiler @@ -379,25 +463,7 @@ cc_library( ], copts = COPTS, includes = ["src/"], - linkopts = LINK_OPTS + select({ - ":msvc": [ - # Linking to setargv.obj makes the default command line argument - # parser expand wildcards, so the main method's argv will contain the - # expanded list instead of the wildcards. - # - # Adding dummy "-DEFAULTLIB:kernel32.lib", because: - # - Microsoft ships this object file next to default libraries - # - but this file is not a library, just a precompiled object - # - "-WHOLEARCHIVE" and "-DEFAULTLIB" only accept library, - # not precompiled object. - # - Bazel would assume linkopt that does not start with "-" or "$" - # as a label to a target, so we add a harmless "-DEFAULTLIB:kernel32.lib" - # before "setargv.obj". - # See https://msdn.microsoft.com/en-us/library/8bch7bkk.aspx - "-DEFAULTLIB:kernel32.lib setargv.obj", - ], - "//conditions:default": [], - }), + linkopts = LINK_OPTS, visibility = ["//visibility:public"], deps = [":protobuf"], ) @@ -458,6 +524,7 @@ RELATIVE_TEST_PROTOS = [ "google/protobuf/unittest_proto3_arena.proto", "google/protobuf/unittest_proto3_arena_lite.proto", "google/protobuf/unittest_proto3_lite.proto", + "google/protobuf/unittest_proto3_optional.proto", "google/protobuf/unittest_well_known_types.proto", "google/protobuf/util/internal/testdata/anys.proto", "google/protobuf/util/internal/testdata/books.proto", @@ -489,7 +556,7 @@ cc_proto_library( COMMON_TEST_SRCS = [ # AUTOGEN(common_test_srcs) "src/google/protobuf/arena_test_util.cc", - "src/google/protobuf/map_test_util.cc", + "src/google/protobuf/map_test_util.inc", "src/google/protobuf/test_util.cc", "src/google/protobuf/test_util.inc", "src/google/protobuf/testing/file.cc", @@ -507,18 +574,19 @@ cc_binary( deps = [ ":protobuf", ":protoc_lib", - "//external:gtest", - ], + ] + GTEST, ) cc_test( name = "win32_test", srcs = ["src/google/protobuf/io/io_win32_unittest.cc"], + tags = [ + "manual", + "windows", + ], deps = [ ":protobuf_lite", - "//external:gtest_main", - ], - tags = ["manual", "windows"], + ] + GTEST_MAIN, ) cc_test( @@ -598,11 +666,11 @@ cc_test( "src/google/protobuf/well_known_types_unittest.cc", "src/google/protobuf/wire_format_unittest.cc", ] + select({ - "//conditions:default" : [ - # Doesn't pass on Windows with MSVC + "//conditions:default": [ + # AUTOGEN(non_msvc_test_srcs) "src/google/protobuf/compiler/command_line_interface_unittest.cc", ], - ":msvc": [] + ":msvc": [], }), copts = COPTS, data = [ @@ -621,44 +689,49 @@ cc_test( ":cc_test_protos", ":protobuf", ":protoc_lib", - "//external:gtest_main", - ] + PROTOBUF_DEPS, + ] + PROTOBUF_DEPS + GTEST_MAIN, ) ################################################################################ # Java support ################################################################################ + internal_gen_well_known_protos_java( - srcs = WELL_KNOWN_PROTOS, + name = "gen_well_known_protos_java", + deps = [proto + "_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()], + visibility = [ + "//java:__subpackages__", + ], ) -java_library( +alias( name = "protobuf_java", - srcs = glob([ - "java/core/src/main/java/com/google/protobuf/*.java", - ]) + [ - ":gen_well_known_protos_java", - ], - javacopts = select({ - "//:jdk9": ["--add-modules=jdk.unsupported"], - "//conditions:default": ["-source 7", "-target 7"], - }), + actual = "//java/core", visibility = ["//visibility:public"], ) -java_library( - name = "protobuf_java_util", - srcs = glob([ - "java/util/src/main/java/com/google/protobuf/util/*.java", - ]), - javacopts = ["-source 7", "-target 7"], +alias( + name = "protobuf_javalite", + actual = "//java/lite", + visibility = ["//visibility:public"], +) + +alias( + name = "protobuf_java_util", + actual = "//java/util", + visibility = ["//visibility:public"], +) + +alias( + name = "java_toolchain", + actual = "//java/core:toolchain", + visibility = ["//visibility:public"], +) + +alias( + name = "javalite_toolchain", + actual = "//java/lite:toolchain", visibility = ["//visibility:public"], - deps = [ - "protobuf_java", - "//external:error_prone_annotations", - "//external:gson", - "//external:guava", - ], ) ################################################################################ @@ -669,12 +742,9 @@ py_library( name = "python_srcs", srcs = glob( [ - "python/google/__init__.py", - "python/google/protobuf/*.py", - "python/google/protobuf/**/*.py", + "python/google/**/*.py", ], exclude = [ - "python/google/protobuf/__init__.py", "python/google/protobuf/**/__init__.py", "python/google/protobuf/internal/*_test.py", "python/google/protobuf/internal/test_util.py", @@ -730,6 +800,10 @@ config_setting( values = { "define": "use_fast_cpp_protos=true", }, + visibility = [ + # Public, but Protobuf only visibility. + "//:__subpackages__", + ], ) config_setting( @@ -737,6 +811,10 @@ config_setting( values = { "define": "allow_oversize_protos=true", }, + visibility = [ + # Public, but Protobuf only visibility. + "//:__subpackages__", + ], ) # Copy the builtin proto files from src/google/protobuf to @@ -753,7 +831,7 @@ internal_copied_filegroup( # TODO(dzc): Remove this once py_proto_library can have labels in srcs, in # which case we can simply add :protos_python in srcs. -COPIED_WELL_KNOWN_PROTOS = ["python/" + s for s in RELATIVE_WELL_KNOWN_PROTOS] +COPIED_WELL_KNOWN_PROTOS = ["python/" + s[4:] for s in WELL_KNOWN_PROTOS] py_proto_library( name = "protobuf_python", @@ -768,11 +846,11 @@ py_proto_library( }), default_runtime = "", protoc = ":protoc", + py_extra_srcs = glob(["python/**/__init__.py"]), py_libs = [ ":python_srcs", - "//external:six", + "@six//:six", ], - py_extra_srcs = glob(["python/**/__init__.py"]), srcs_version = "PY2AND3", visibility = ["//visibility:public"], ) @@ -864,25 +942,22 @@ internal_protobuf_py_tests( cc_library( name = "proto_api", hdrs = ["python/google/protobuf/proto_api.h"], + visibility = ["//visibility:public"], deps = [ "//external:python_headers", ], - visibility = ["//visibility:public"], ) +# Note: We use `native_proto_common` here because we depend on an implementation-detail of +# `proto_lang_toolchain`, which may not be available on `proto_common`. +reject_blacklisted_files = hasattr(native_proto_common, "proto_lang_toolchain_rejects_files_do_not_use_or_we_will_break_you_without_mercy") +cc_toolchain_blacklisted_protos = [proto + "_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()] if reject_blacklisted_files else [":well_known_protos"] proto_lang_toolchain( name = "cc_toolchain", + blacklisted_protos = cc_toolchain_blacklisted_protos, command_line = "--cpp_out=$(OUT)", runtime = ":protobuf", visibility = ["//visibility:public"], - blacklisted_protos = [":_internal_wkt_protos_genrule"], -) - -proto_lang_toolchain( - name = "java_toolchain", - command_line = "--java_out=$(OUT)", - runtime = ":protobuf_java", - visibility = ["//visibility:public"], ) alias( @@ -894,6 +969,16 @@ alias( objc_library( name = "protobuf_objc", hdrs = [ + "objectivec/GPBAny.pbobjc.h", + "objectivec/GPBApi.pbobjc.h", + "objectivec/GPBDuration.pbobjc.h", + "objectivec/GPBEmpty.pbobjc.h", + "objectivec/GPBFieldMask.pbobjc.h", + "objectivec/GPBSourceContext.pbobjc.h", + "objectivec/GPBStruct.pbobjc.h", + "objectivec/GPBTimestamp.pbobjc.h", + "objectivec/GPBType.pbobjc.h", + "objectivec/GPBWrappers.pbobjc.h", "objectivec/GPBArray.h", "objectivec/GPBBootstrap.h", "objectivec/GPBCodedInputStream.h", @@ -942,6 +1027,16 @@ objc_library( "objectivec", ], non_arc_srcs = [ + "objectivec/GPBAny.pbobjc.m", + "objectivec/GPBApi.pbobjc.m", + "objectivec/GPBDuration.pbobjc.m", + "objectivec/GPBEmpty.pbobjc.m", + "objectivec/GPBFieldMask.pbobjc.m", + "objectivec/GPBSourceContext.pbobjc.m", + "objectivec/GPBStruct.pbobjc.m", + "objectivec/GPBTimestamp.pbobjc.m", + "objectivec/GPBType.pbobjc.m", + "objectivec/GPBWrappers.pbobjc.m", "objectivec/GPBArray.m", "objectivec/GPBCodedInputStream.m", "objectivec/GPBCodedOutputStream.m", @@ -956,16 +1051,6 @@ objc_library( "objectivec/GPBUtilities.m", "objectivec/GPBWellKnownTypes.m", "objectivec/GPBWireFormat.m", - "objectivec/google/protobuf/Any.pbobjc.m", - "objectivec/google/protobuf/Api.pbobjc.m", - "objectivec/google/protobuf/Duration.pbobjc.m", - "objectivec/google/protobuf/Empty.pbobjc.m", - "objectivec/google/protobuf/FieldMask.pbobjc.m", - "objectivec/google/protobuf/SourceContext.pbobjc.m", - "objectivec/google/protobuf/Struct.pbobjc.m", - "objectivec/google/protobuf/Timestamp.pbobjc.m", - "objectivec/google/protobuf/Type.pbobjc.m", - "objectivec/google/protobuf/Wrappers.pbobjc.m", ], visibility = ["//visibility:public"], ) @@ -978,23 +1063,145 @@ genrule( name = "generated_protos", srcs = ["src/google/protobuf/unittest_import.proto"], outs = ["unittest_gen.proto"], - cmd = "cat $(SRCS) | sed 's|google/|src/google/|' > $(OUTS)" + cmd = "cat $(SRCS) | sed 's|google/|src/google/|' > $(OUTS)", ) proto_library( name = "generated_protos_proto", srcs = [ - "unittest_gen.proto", "src/google/protobuf/unittest_import_public.proto", + "unittest_gen.proto", ], ) py_proto_library( name = "generated_protos_py", srcs = [ - "unittest_gen.proto", "src/google/protobuf/unittest_import_public.proto", + "unittest_gen.proto", ], default_runtime = "", protoc = ":protoc", ) + +################################################################################ +# Conformance tests +################################################################################ + +proto_library( + name = "test_messages_proto2_proto", + srcs = ["src/google/protobuf/test_messages_proto2.proto"], + visibility = ["//visibility:public"], +) + +proto_library( + name = "test_messages_proto3_proto", + srcs = ["src/google/protobuf/test_messages_proto3.proto"], + visibility = ["//visibility:public"], + deps = [ + ":any_proto", + ":duration_proto", + ":field_mask_proto", + ":struct_proto", + ":timestamp_proto", + ":wrappers_proto", + ], +) + +cc_proto_library( + name = "test_messages_proto2_proto_cc", + srcs = ["src/google/protobuf/test_messages_proto2.proto"], +) + +cc_proto_library( + name = "test_messages_proto3_proto_cc", + srcs = ["src/google/protobuf/test_messages_proto3.proto"], + deps = [ + ":cc_wkt_protos", + ], +) + +proto_library( + name = "conformance_proto", + srcs = ["conformance/conformance.proto"], + visibility = ["//visibility:public"], +) + +cc_proto_library( + name = "conformance_proto_cc", + srcs = ["conformance/conformance.proto"], +) + +cc_library( + name = "jsoncpp", + srcs = ["conformance/third_party/jsoncpp/jsoncpp.cpp"], + hdrs = ["conformance/third_party/jsoncpp/json.h"], + includes = ["conformance"], +) + +cc_library( + name = "conformance_test", + srcs = [ + "conformance/conformance_test.cc", + "conformance/conformance_test_runner.cc", + ], + hdrs = [ + "conformance/conformance_test.h", + ], + includes = [ + "conformance", + "src", + ], + deps = [":conformance_proto_cc"], +) + +cc_library( + name = "binary_json_conformance_suite", + srcs = ["conformance/binary_json_conformance_suite.cc"], + hdrs = ["conformance/binary_json_conformance_suite.h"], + deps = [ + ":conformance_test", + ":jsoncpp", + ":test_messages_proto2_proto_cc", + ":test_messages_proto3_proto_cc", + ], +) + +cc_library( + name = "text_format_conformance_suite", + srcs = ["conformance/text_format_conformance_suite.cc"], + hdrs = ["conformance/text_format_conformance_suite.h"], + deps = [ + ":conformance_test", + ":test_messages_proto2_proto_cc", + ":test_messages_proto3_proto_cc", + ], +) + +cc_binary( + name = "conformance_test_runner", + srcs = ["conformance/conformance_test_main.cc"], + visibility = ["//visibility:public"], + deps = [ + ":binary_json_conformance_suite", + ":conformance_test", + ":text_format_conformance_suite", + ], +) + +sh_test( + name = "build_files_updated_unittest", + srcs = [ + "build_files_updated_unittest.sh", + ], + data = [ + "BUILD", + "cmake/extract_includes.bat.in", + "cmake/libprotobuf.cmake", + "cmake/libprotobuf-lite.cmake", + "cmake/libprotoc.cmake", + "cmake/tests.cmake", + "src/Makefile.am", + "update_file_lists.sh", + ], +) diff --git a/third_party/protobuf/CHANGES.txt b/third_party/protobuf/CHANGES.txt index 72ee3717..44389d24 100644 --- a/third_party/protobuf/CHANGES.txt +++ b/third_party/protobuf/CHANGES.txt @@ -1,3 +1,350 @@ +2020-07-09 version 3.12.4 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) + + General + * Increment the patch version to ensure that all packages match. + +2020-06-01 version 3.12.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) + + Objective-C + * Tweak the union used for Extensions to support old generated code. #7573 + +2020-05-26 version 3.12.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) + + C++ + * Simplified the template export macros to fix the build for mingw32. (#7539) + + Objective-C + * Fix for the :protobuf_objc target in the Bazel BUILD file. (#7538) + +2020-05-20 version 3.12.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) + + Ruby + * Re-add binary gems for Ruby 2.3 and 2.4. These are EOL upstream, however + many people still use them and dropping support will require more + coordination. + +2020-05-12 version 3.12.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) + + Protocol Compiler + * [experimental] Singular, non-message typed fields in proto3 now support + presence tracking. This is enabled by adding the "optional" field label and + passing the --experimental_allow_proto3_optional flag to protoc. + * For usage info, see docs/field_presence.md. + * During this experimental phase, code generators should update to support + proto3 presence, see docs/implementing_proto3_presence.md for instructions. + * Allow duplicate symbol names when multiple descriptor sets are passed on + the command-line, to match the behavior when multiple .proto files are passed. + * Deterministic `protoc --descriptor_set_out` (#7175) + + C++ + * [experimental] Added proto3 presence support. + * New descriptor APIs to support proto3 presence. + * Enable Arenas by default on all .proto files. + * Documented that users are not allowed to subclass Message or MessageLite. + * Mark generated classes as final; inheriting from protos is strongly discouraged. + * Add stack overflow protection for text format with unknown fields. + * Add accessors for map key and value FieldDescriptors. + * Add FieldMaskUtil::FromFieldNumbers(). + * MessageDifferencer: use ParsePartial() on Any fields so the diff does not + fail when there are missing required fields. + * ReflectionOps::Merge(): lookup messages in the right factory, if it can. + * Added Descriptor::WellKnownTypes enum and Descriptor::well_known_type() + accessor as an easier way of determining if a message is a Well-Known Type. + * Optimized RepeatedField::Add() when it is used in a loop. + * Made proto move/swap more efficient. + * De-virtualize the GetArena() method in MessageLite. + * Improves performance of json_stream_parser.cc by factor 1000 (#7230) + * bug: #7076 undefine Windows OUT and OPTIONAL macros (#7087) + * Fixed a bug in FieldDescriptor::DebugString() that would erroneously print + an "optional" label for a field in a oneof. + * Fix bug in parsing bool extensions that assumed they are always 1 byte. + * Fix off-by-one error in FieldOptions::ByteSize() when extensions are present. + * Clarified the comments to show an example of the difference between + Descriptor::extension and DescriptorPool::FindAllExtensions. + * Add a compiler option 'code_size' to force optimize_for=code_size on all + protos where this is possible. + + Java + * [experimental] Added proto3 presence support. + * Mark java enum _VALUE constants as @Deprecated if the enum field is deprecated + * reduce size for enums with allow_alias set to true. + * Sort map fields alphabetically by the field's key when printing textproto. + * Fixed a bug in map sorting that appeared in -rc1 and -rc2 (#7508). + * TextFormat.merge() handles Any as top level type. + * Throw a descriptive IllegalArgumentException when calling + getValueDescriptor() on enum special value UNRECOGNIZED instead of + ArrayIndexOutOfBoundsException. + * Fixed an issue with JsonFormat.printer() where setting printingEnumsAsInts() + would override the configuration passed into includingDefaultValueFields(). + * Implement overrides of indexOf() and contains() on primitive lists returned + for repeated fields to avoid autoboxing the list contents. + * Add overload to FieldMaskUtil.fromStringList that accepts a descriptor. + * [bazel] Move Java runtime/toolchains into //java (#7190) + + Python + * [experimental] Added proto3 presence support. + * [experimental] fast import protobuf module, only works with cpp generated code linked in. + * Truncate 'float' fields to 4 bytes of precision in setters for pure-Python + implementation (C++ extension was already doing this). + * Fixed a memory leak in C++ bindings. + * Added a deprecation warning when code tries to create Descriptor objects + directly. + * Fix unintended comparison between bytes and string in descriptor.py. + * Avoid printing excess digits for float fields in TextFormat. + * Remove Python 2.5 syntax compatibility from the proto compiler generated _pb2.py module code. + * Drop 3.3, 3.4 and use single version docker images for all python tests (#7396) + + JavaScript + * Fix js message pivot selection (#6813) + + PHP + * Persistent Descriptor Pool (#6899) + * Implement lazy loading of php class for proto messages (#6911) + * Correct @return in Any.unpack docblock (#7089) + * Ignore unknown enum value when ignore_unknown specified (#7455) + + Ruby + * [experimental] Implemented proto3 presence for Ruby. (#7406) + * Stop building binary gems for ruby <2.5 (#7453) + * Fix for wrappers with a zero value (#7195) + * Fix for JSON serialization of 0/empty-valued wrapper types (#7198) + * Call "Class#new" over rb_class_new_instance in decoding (#7352) + * Build extensions for Ruby 2.7 (#7027) + * assigning 'nil' to submessage should clear the field. (#7397) + + C# + * [experimental] Add support for proto3 presence fields in C# (#7382) + * Mark GetOption API as obsolete and expose the "GetOptions()" method on descriptors instead (#7491) + * Remove Has/Clear members for C# message fields in proto2 (#7429) + * Enforce recursion depth checking for unknown fields (#7132) + * Fix conformance test failures for Google.Protobuf (#6910) + * Cleanup various bits of Google.Protobuf (#6674) + * Fix latest ArgumentException for C# extensions (#6938) + * Remove unnecessary branch from ReadTag (#7289) + + Objective-C + * [experimental] ObjC Proto3 optional support (#7421) + * Block subclassing of generated classes (#7124) + * Use references to Obj C classes instead of names in descriptors. (#7026) + * Revisit how the WKTs are bundled with ObjC. (#7173) + + Other + * Add a proto_lang_toolchain for javalite (#6882) + * [bazel] Update gtest and deprecate //external:{gtest,gtest_main} (#7237) + * Add application note for explicit presence tracking. (#7390) + * Howto doc for implementing proto3 presence in a code generator. (#7407) + + +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) + +2020-01-31 version 3.11.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) + + C++ + * Add OUT and OPTIONAL to windows portability files (#7087) + + 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) + + PHP + * Extern declare protobuf_globals (#6946) + + +2019-11-19 version 3.11.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) + + C++ + * Make serialization method naming consistent + * Make proto runtime + generated code free of deprecation warnings + * Moved ShutdownProtobufLibrary() to message_lite.h. For backward compatibility a declaration is still available in stubs/common.h, but users should prefer message_lite.h + * Removed non-namespace macro EXPECT_OK() + * Removed mathlimits.h from stubs in favor of using std::numeric_limits from C++11 + * Fixed bug in parser when ending on a group tag + * Add a helper function to UnknownFieldSet to deal with the changing return value of message::unknown_fields() + * Fix incorrect use of string_view iterators + * Support direct pickling of nested messages + * Skip extension tag validation for MessageSet if unknown dependencies are allowed + * Updated deprecation macros to annotate deprecated code (#6612) + * Remove conversion warning in MapEntryFuncs::ByteSizeLong (#6766) + * Revert "Make shared libraries be able to link to MSVC static runtime libraries, so that VC runtime is not required." (#6914) + + Java + * Remove the usage of MethodHandle, so that Android users prior to API version 26 can use protobuf-java + * Publish ProGuard config for javalite + * Fix for StrictMode disk read violation in ExtensionRegistryLite + * Include part of the ByteString's content in its toString(). + * Include unknown fields when merging proto3 messages in Java lite builders + + Python + * Add float_precision option in json format printer + * Optionally print bytes fields as messages in unknown fields, if possible + * FieldPath: fix testing IsSet on root path '' + * Experimental code gen (fast import protobuf module) which only work with cpp generated code linked in + + JavaScript + * Remove guard for Symbol iterator for jspb.Map + + PHP + * Avoid too much overhead in layout_init (#6716) + * Lazily Create Singular Wrapper Message (#6833) + * Implement lazy loading of php class for proto messages (#6911) + + Ruby + * Ruby lazy wrappers optimization (#6797) + + C# + * (RepeatedField): Capacity property to resize the internal array (#6530) + * Experimental proto2 support is now officially available (#4642, #5183, #5350, #5936) + * Getting started doc: https://github.com/protocolbuffers/protobuf/blob/master/docs/csharp/proto2.md + * Add length checks to ExtensionCollection (#6759) + * Optimize parsing of some primitive and wrapper types (#6843) + * Use 3 parameter Encoding.GetString for default string values (#6828) + * Change _Extensions property to normal body rather than expression (#6856) + + Objective C + * Fixed unaligned reads for 32bit arm with newer Xcode versions (#6678) + + +2019-09-03 version 3.10.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) + + C++ + * Switch the proto parser to the faster MOMI parser. + * Properly escape Struct keys in the proto3 JSON serializer. + * Fix crash on uninitialized map entries. + * Informed the compiler of has-bit invariant to produce better code + * Unused imports of files defining descriptor extensions will now be reported + * Add proto2::util::RemoveSubranges to remove multiple subranges in linear time. + * Added BaseTextGenerator::GetCurrentIndentationSize() + * Made implicit weak fields compatible with the Apple linker + * 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. + * Do not convert unknown field name to snake case to accurately report error. + * Fix a UBSAN warnings. (#6333) + * Add podspec for C++ (#6404) + * protoc: fix source code info location for missing label (#6436) + * C++ Add move constructor for Reflection's SetString (#6477) + + Java + * Call loadDescriptor outside of synchronized block to remove one possible source of deadlock. + * Have oneof enums implement a separate interface (other than EnumLite) for clarity. + * Opensource Android Memory Accessors + * Update TextFormat to make use of the new TypeRegistry. + * Support getFieldBuilder and getRepeatedFieldBuilder in ExtendableBuilder + * Update JsonFormat to make use of the new TypeRegistry. + * Add proguard config generator for GmmBenchmarkSuiteLite. + * Change ProtobufArrayList to use Object[] instead of ArrayList for 5-10% faster parsing + * Implement ProtobufArrayList.add(E) for 20% (5%-40%) faster overall protolite2 parsing + * Make a copy of JsonFormat.TypeRegistry at the protobuf top level package. This will eventually replace JsonFormat.TypeRegistry. + * Fix javadoc warnings in generated files (#6231) + * Java: Add Automatic-Module-Name entries to the Manifest (#6568) + + Python + * Add descriptor methods in descriptor_pool are deprecated. + * Uses explicit imports to prevent multithread test failures in py3. + * Added __delitem__ for Python extension dict + * Update six version to 1.12.0 and fix legacy_create_init issue (#6391) + + JavaScript + * Remove deprecated boolean option to getResultBase64String(). + * Fix sint64 zig-zag encoding. + * Simplify hash64 string conversion to avoid DIGIT array. Should reduce overhead if these functions aren't used, and be more efficient by avoiding linear array searches. + * 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) + + Ruby + * Fix scope resolution for Google namespace (#5878) + * Support hashes for struct initializers (#5716) + * Optimized away the creation of empty string objects. (#6502) + * Roll forward Ruby upb changes now that protobuf Ruby build is fixed (#5866) + * Optimized layout_mark() for Ruby (#6521) + * 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) + + Other + * Override CocoaPods module to lowercase (#6464) + + +2019-06-28 version 3.9.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) + + C++ + * Optimize and simplify implementation of RepeatedPtrFieldBase + * Don't create unnecessary unknown field sets. + * Remove branch from accessors to repeated field element array. + * Added delimited parse and serialize util. + * Reduce size by not emitting constants for fieldnumbers + * Fix a bug when comparing finite and infinite field values with explicit tolerances. + * TextFormat::Parser should use a custom Finder to look up extensions by number if one is provided. + * Add MessageLite::Utf8DebugString() to make MessageLite more compatible with Message. + * Fail fast for better performance in DescriptorPool::FindExtensionByNumber() if descriptor has no defined extensions. + * Adding the file name to help debug colliding extensions + * Added FieldDescriptor::PrintableNameForExtension() and DescriptorPool::FindExtensionByPrintableName(). + The latter will replace Reflection::FindKnownExtensionByName(). + * Replace NULL with nullptr + * Created a new Add method in repeated field that allows adding a range of elements all at once. + * Enabled enum name-to-value mapping functions for C++ lite + * Avoid dynamic initialization in descriptor.proto generated code + * Move stream functions to MessageLite from Message. + * Move all zero_copy_stream functionality to io_lite. + * Do not create array of matched fields for simple repeated fields + * Enabling silent mode by default to reduce make compilation noise. (#6237) + + Java + * Expose TextFormat.Printer and make it configurable. Deprecate the static methods. + * Library for constructing google.protobuf.Struct and google.protobuf.Value + * Make OneofDescriptor extend GenericDescriptor. + * Expose streamingness of service methods from MethodDescriptor. + * Fix a bug where TextFormat fails to parse Any filed with > 1 embedded message sub-fields. + * Establish consistent JsonFormat behavior for nulls in oneofs, regardless of order. + * Update GSON version to 3.8.5. (#6268) + * Add `protobuf_java_lite` Bazel target. (#6177) + + Python + * Change implementation of Name() for enums that allow aliases in proto2 in Python + to be in line with claims in C++ implementation (to return first value). + * Explicitly say what field cannot be set when the new value fails a type check. + * Duplicate register in descriptor pool will raise errors + * Add __slots__ to all well_known_types classes, custom attributes are not allowed anymore. + * text_format only present 8 valid digits for float fields by default + + JavaScript + * Add Oneof enum to the list of goog.provide + + PHP + * Make php message class final to avoid mocking. (#6277) + * Rename get/setXXXValue to get/setXXXWrapper. (#6295) + + Ruby + * Remove to_hash methods. (#6166) + + 2019-04-29 version 3.8.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) C++ @@ -89,7 +436,7 @@ * Introduce Proto C API. * FindFileContainingSymbol in descriptor pool is now able to find field and enum values. * reflection.MakeClass() and reflection.ParseMessage() are deprecated. - * Added DescriptorPool.FindMethodByName() method in pure python (c extension alreay has it) + * Added DescriptorPool.FindMethodByName() method in pure python (c extension already has it) * Flipped proto3 to preserve unknown fields by default. * Added support for memoryview in python3 proto message parsing. * Added MergeFrom for repeated scalar fields in c extension (pure python already has it) @@ -252,7 +599,7 @@ PHP * Fixed memory leak in C-extension implementation. * Added discardUnknokwnFields API. - * Removed duplicatd typedef in C-extension headers. + * Removed duplicated typedef in C-extension headers. * Avoided calling private php methods (timelib_update_ts). * Fixed Any.php to use fully-qualified name for DescriptorPool. diff --git a/third_party/protobuf/Makefile.am b/third_party/protobuf/Makefile.am index 33616c58..0c7476d1 100644 --- a/third_party/protobuf/Makefile.am +++ b/third_party/protobuf/Makefile.am @@ -66,23 +66,35 @@ csharp_EXTRA_DIST= \ csharp/keys/README.md \ csharp/protos/README.md \ csharp/protos/map_unittest_proto3.proto \ + csharp/protos/old_extensions1.proto \ + csharp/protos/old_extensions2.proto \ + csharp/protos/unittest_issue6936_a.proto \ + csharp/protos/unittest_issue6936_b.proto \ + csharp/protos/unittest_issue6936_c.proto \ csharp/protos/unittest_custom_options_proto3.proto \ csharp/protos/unittest_import_public_proto3.proto \ + csharp/protos/unittest_import_public.proto \ csharp/protos/unittest_import_proto3.proto \ + csharp/protos/unittest_import.proto \ csharp/protos/unittest_issues.proto \ csharp/protos/unittest_proto3.proto \ + csharp/protos/unittest.proto \ csharp/src/AddressBook/AddPerson.cs \ csharp/src/AddressBook/Addressbook.cs \ csharp/src/AddressBook/AddressBook.csproj \ csharp/src/AddressBook/ListPeople.cs \ csharp/src/AddressBook/Program.cs \ csharp/src/AddressBook/SampleUsage.cs \ - csharp/src/Google.Protobuf.Benchmarks/SerializationConfig.cs \ - csharp/src/Google.Protobuf.Benchmarks/SerializationBenchmark.cs \ - csharp/src/Google.Protobuf.Benchmarks/Program.cs \ - csharp/src/Google.Protobuf.Benchmarks/Google.Protobuf.Benchmarks.csproj \ - csharp/src/Google.Protobuf.Benchmarks/Benchmarks.cs \ + csharp/src/Google.Protobuf.Benchmarks/BenchmarkDatasetConfig.cs \ csharp/src/Google.Protobuf.Benchmarks/BenchmarkMessage1Proto3.cs \ + csharp/src/Google.Protobuf.Benchmarks/Benchmarks.cs \ + csharp/src/Google.Protobuf.Benchmarks/Google.Protobuf.Benchmarks.csproj \ + csharp/src/Google.Protobuf.Benchmarks/GoogleMessageBenchmark.cs \ + csharp/src/Google.Protobuf.Benchmarks/ParseRawPrimitivesBenchmark.cs \ + csharp/src/Google.Protobuf.Benchmarks/ParseMessagesBenchmark.cs \ + csharp/src/Google.Protobuf.Benchmarks/Program.cs \ + csharp/src/Google.Protobuf.Benchmarks/wrapper_benchmark_messages.proto \ + csharp/src/Google.Protobuf.Benchmarks/WrapperBenchmarkMessages.cs \ csharp/src/Google.Protobuf.Conformance/Conformance.cs \ csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.csproj \ csharp/src/Google.Protobuf.Conformance/Program.cs \ @@ -100,14 +112,17 @@ csharp_EXTRA_DIST= \ csharp/src/Google.Protobuf.Test/Compatibility/TypeExtensionsTest.cs \ csharp/src/Google.Protobuf.Test/DeprecatedMemberTest.cs \ csharp/src/Google.Protobuf.Test/EqualityTester.cs \ + csharp/src/Google.Protobuf.Test/ExtensionSetTest.cs \ csharp/src/Google.Protobuf.Test/FieldCodecTest.cs \ csharp/src/Google.Protobuf.Test/FieldMaskTreeTest.cs \ csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs \ + csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs \ csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj \ csharp/src/Google.Protobuf.Test/IssuesTest.cs \ csharp/src/Google.Protobuf.Test/JsonFormatterTest.cs \ csharp/src/Google.Protobuf.Test/JsonParserTest.cs \ csharp/src/Google.Protobuf.Test/JsonTokenizerTest.cs \ + csharp/src/Google.Protobuf.Test/Proto3OptionalTest.cs \ csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs \ csharp/src/Google.Protobuf.Test/Reflection/DescriptorDeclarationTest.cs \ csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs \ @@ -117,15 +132,26 @@ csharp_EXTRA_DIST= \ csharp/src/Google.Protobuf.Test/SampleMessages.cs \ csharp/src/Google.Protobuf.Test/SampleNaNs.cs \ csharp/src/Google.Protobuf.Test/TestCornerCases.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/ForeignMessagePartial.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/Google.Protobuf.Test.TestProtos.csproj \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936A.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936B.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936C.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/ForeignMessagePartial.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/MapUnittestProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/OldExtensions1.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/OldExtensions2.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto2.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestCustomOptionsProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestImportProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestImportPublicProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestImportPublic.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestImport.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssues.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestProto3Optional.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestWellKnownTypes.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/Unittest.cs \ csharp/src/Google.Protobuf.Test/WellKnownTypes/AnyTest.cs \ csharp/src/Google.Protobuf.Test/WellKnownTypes/DurationTest.cs \ csharp/src/Google.Protobuf.Test/WellKnownTypes/FieldMaskTest.cs \ @@ -148,12 +174,17 @@ csharp_EXTRA_DIST= \ csharp/src/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs \ csharp/src/Google.Protobuf/Compatibility/StreamExtensions.cs \ csharp/src/Google.Protobuf/Compatibility/TypeExtensions.cs \ + csharp/src/Google.Protobuf/Extension.cs \ + csharp/src/Google.Protobuf/ExtensionRegistry.cs \ + csharp/src/Google.Protobuf/ExtensionSet.cs \ + csharp/src/Google.Protobuf/ExtensionValue.cs \ csharp/src/Google.Protobuf/FieldCodec.cs \ csharp/src/Google.Protobuf/FieldMaskTree.cs \ csharp/src/Google.Protobuf/FrameworkPortability.cs \ csharp/src/Google.Protobuf/Google.Protobuf.csproj \ csharp/src/Google.Protobuf/ICustomDiagnosticMessage.cs \ csharp/src/Google.Protobuf/IDeepCloneable.cs \ + csharp/src/Google.Protobuf/IExtendableMessage.cs \ csharp/src/Google.Protobuf/IMessage.cs \ csharp/src/Google.Protobuf/InvalidJsonException.cs \ csharp/src/Google.Protobuf/InvalidProtocolBufferException.cs \ @@ -164,6 +195,7 @@ csharp_EXTRA_DIST= \ csharp/src/Google.Protobuf/LimitedInputStream.cs \ csharp/src/Google.Protobuf/MessageExtensions.cs \ csharp/src/Google.Protobuf/MessageParser.cs \ + csharp/src/Google.Protobuf/ObjectIntPair.cs \ csharp/src/Google.Protobuf/ProtoPreconditions.cs \ csharp/src/Google.Protobuf/Properties/AssemblyInfo.cs \ csharp/src/Google.Protobuf/Reflection/CustomOptions.cs \ @@ -175,6 +207,8 @@ csharp_EXTRA_DIST= \ csharp/src/Google.Protobuf/Reflection/DescriptorValidationException.cs \ csharp/src/Google.Protobuf/Reflection/EnumDescriptor.cs \ csharp/src/Google.Protobuf/Reflection/EnumValueDescriptor.cs \ + csharp/src/Google.Protobuf/Reflection/ExtensionAccessor.cs \ + csharp/src/Google.Protobuf/Reflection/ExtensionCollection.cs \ csharp/src/Google.Protobuf/Reflection/FieldAccessorBase.cs \ csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs \ csharp/src/Google.Protobuf/Reflection/FieldType.cs \ @@ -216,8 +250,10 @@ csharp_EXTRA_DIST= \ csharp/src/Google.Protobuf/UnknownFieldSet.cs java_EXTRA_DIST= \ + java/BUILD \ java/README.md \ java/bom/pom.xml \ + java/core/BUILD \ java/core/generate-sources-build.xml \ java/core/generate-test-sources-build.xml \ java/core/pom.xml \ @@ -331,6 +367,7 @@ java_EXTRA_DIST= java/core/src/main/java/com/google/protobuf/TextFormatEscaper.java \ java/core/src/main/java/com/google/protobuf/TextFormatParseInfoTree.java \ java/core/src/main/java/com/google/protobuf/TextFormatParseLocation.java \ + java/core/src/main/java/com/google/protobuf/TypeRegistry.java \ java/core/src/main/java/com/google/protobuf/UninitializedMessageException.java \ java/core/src/main/java/com/google/protobuf/UnknownFieldSchema.java \ java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java \ @@ -427,6 +464,7 @@ java_EXTRA_DIST= java/core/src/test/java/com/google/protobuf/TextFormatParseInfoTreeTest.java \ java/core/src/test/java/com/google/protobuf/TextFormatParseLocationTest.java \ java/core/src/test/java/com/google/protobuf/TextFormatTest.java \ + java/core/src/test/java/com/google/protobuf/TypeRegistryTest.java \ java/core/src/test/java/com/google/protobuf/UnknownEnumValueTest.java \ java/core/src/test/java/com/google/protobuf/UnknownFieldSetTest.java \ java/core/src/test/java/com/google/protobuf/UnmodifiableLazyStringListTest.java \ @@ -471,6 +509,7 @@ java_EXTRA_DIST= java/core/src/test/proto/com/google/protobuf/test_extra_interfaces.proto \ java/core/src/test/proto/com/google/protobuf/wrappers_test.proto \ java/lite.md \ + java/lite/BUILD \ java/lite/generate-sources-build.xml \ java/lite/generate-test-sources-build.xml \ java/lite/lite.awk \ @@ -479,20 +518,26 @@ java_EXTRA_DIST= java/lite/src/test/java/com/google/protobuf/LiteTest.java \ java/lite/src/test/java/com/google/protobuf/Proto2MessageLiteInfoFactory.java \ java/pom.xml \ + java/util/BUILD \ java/util/pom.xml \ java/util/src/main/java/com/google/protobuf/util/Durations.java \ java/util/src/main/java/com/google/protobuf/util/FieldMaskTree.java \ java/util/src/main/java/com/google/protobuf/util/FieldMaskUtil.java \ java/util/src/main/java/com/google/protobuf/util/JsonFormat.java \ java/util/src/main/java/com/google/protobuf/util/TimeUtil.java \ + java/util/src/main/java/com/google/protobuf/util/Structs.java \ java/util/src/main/java/com/google/protobuf/util/Timestamps.java \ + java/util/src/main/java/com/google/protobuf/util/Values.java \ java/util/src/test/java/com/google/protobuf/util/FieldMaskTreeTest.java \ java/util/src/test/java/com/google/protobuf/util/FieldMaskUtilTest.java \ java/util/src/test/java/com/google/protobuf/util/JsonFormatTest.java \ + java/util/src/test/java/com/google/protobuf/util/StructsTest.java \ java/util/src/test/java/com/google/protobuf/util/TimeUtilTest.java \ + java/util/src/test/java/com/google/protobuf/util/ValuesTest.java \ java/util/src/test/proto/com/google/protobuf/util/json_test.proto objectivec_EXTRA_DIST= \ + objectivec/.clang-format \ objectivec/DevTools/check_version_stamps.sh \ objectivec/DevTools/compile_testing_protos.sh \ objectivec/DevTools/full_mac_build.sh \ @@ -500,25 +545,19 @@ objectivec_EXTRA_DIST= \ objectivec/DevTools/pddm_tests.py \ objectivec/generate_well_known_types.sh \ objectivec/google/protobuf/Any.pbobjc.h \ - objectivec/google/protobuf/Any.pbobjc.m \ objectivec/google/protobuf/Api.pbobjc.h \ - objectivec/google/protobuf/Api.pbobjc.m \ objectivec/google/protobuf/Duration.pbobjc.h \ - objectivec/google/protobuf/Duration.pbobjc.m \ objectivec/google/protobuf/Empty.pbobjc.h \ - objectivec/google/protobuf/Empty.pbobjc.m \ objectivec/google/protobuf/FieldMask.pbobjc.h \ - objectivec/google/protobuf/FieldMask.pbobjc.m \ objectivec/google/protobuf/SourceContext.pbobjc.h \ - objectivec/google/protobuf/SourceContext.pbobjc.m \ objectivec/google/protobuf/Struct.pbobjc.h \ - objectivec/google/protobuf/Struct.pbobjc.m \ objectivec/google/protobuf/Timestamp.pbobjc.h \ - objectivec/google/protobuf/Timestamp.pbobjc.m \ objectivec/google/protobuf/Type.pbobjc.h \ - objectivec/google/protobuf/Type.pbobjc.m \ objectivec/google/protobuf/Wrappers.pbobjc.h \ - objectivec/google/protobuf/Wrappers.pbobjc.m \ + objectivec/GPBAny.pbobjc.h \ + objectivec/GPBAny.pbobjc.m \ + objectivec/GPBApi.pbobjc.h \ + objectivec/GPBApi.pbobjc.m \ objectivec/GPBArray.h \ objectivec/GPBArray.m \ objectivec/GPBArray_PackagePrivate.h \ @@ -535,10 +574,16 @@ objectivec_EXTRA_DIST= \ objectivec/GPBDictionary.h \ objectivec/GPBDictionary.m \ objectivec/GPBDictionary_PackagePrivate.h \ + objectivec/GPBDuration.pbobjc.h \ + objectivec/GPBDuration.pbobjc.m \ + objectivec/GPBEmpty.pbobjc.h \ + objectivec/GPBEmpty.pbobjc.m \ objectivec/GPBExtensionInternals.h \ objectivec/GPBExtensionInternals.m \ objectivec/GPBExtensionRegistry.h \ objectivec/GPBExtensionRegistry.m \ + objectivec/GPBFieldMask.pbobjc.h \ + objectivec/GPBFieldMask.pbobjc.m \ objectivec/GPBMessage.h \ objectivec/GPBMessage.m \ objectivec/GPBMessage_PackagePrivate.h \ @@ -549,6 +594,14 @@ objectivec_EXTRA_DIST= \ objectivec/GPBRootObject.m \ objectivec/GPBRootObject_PackagePrivate.h \ objectivec/GPBRuntimeTypes.h \ + objectivec/GPBSourceContext.pbobjc.h \ + objectivec/GPBSourceContext.pbobjc.m \ + objectivec/GPBStruct.pbobjc.h \ + objectivec/GPBStruct.pbobjc.m \ + objectivec/GPBTimestamp.pbobjc.h \ + objectivec/GPBTimestamp.pbobjc.m \ + objectivec/GPBType.pbobjc.h \ + objectivec/GPBType.pbobjc.m \ objectivec/GPBUnknownField.h \ objectivec/GPBUnknownField.m \ objectivec/GPBUnknownField_PackagePrivate.h \ @@ -562,6 +615,8 @@ objectivec_EXTRA_DIST= \ objectivec/GPBWellKnownTypes.m \ objectivec/GPBWireFormat.h \ objectivec/GPBWireFormat.m \ + objectivec/GPBWrappers.pbobjc.h \ + objectivec/GPBWrappers.pbobjc.m \ objectivec/ProtocolBuffers_iOS.xcodeproj/project.pbxproj \ objectivec/ProtocolBuffers_iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ objectivec/ProtocolBuffers_iOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ @@ -650,6 +705,7 @@ objectivec_EXTRA_DIST= \ objectivec/Tests/GPBDictionaryTests.m \ objectivec/Tests/GPBDictionaryTests.pddm \ objectivec/Tests/GPBExtensionRegistryTest.m \ + objectivec/Tests/GPBMessageTests+ClassNames.m \ objectivec/Tests/GPBMessageTests+Merge.m \ objectivec/Tests/GPBMessageTests+Runtime.m \ objectivec/Tests/GPBMessageTests+Serialization.m \ @@ -846,6 +902,8 @@ php_EXTRA_DIST= \ php/tests/generated_service_test.php \ php/tests/map_field_test.php \ php/tests/memory_leak_test.php \ + php/tests/multirequest.php \ + php/tests/multirequest.sh \ php/tests/php_implementation_test.php \ php/tests/proto/empty/echo.proto \ php/tests/proto/test.proto \ @@ -922,6 +980,7 @@ python_EXTRA_DIST= \ python/google/protobuf/internal/service_reflection_test.py \ python/google/protobuf/internal/symbol_database_test.py \ python/google/protobuf/internal/test_bad_identifiers.proto \ + python/google/protobuf/internal/test_proto3_optional.proto \ python/google/protobuf/internal/test_util.py \ python/google/protobuf/internal/testing_refleaks.py \ python/google/protobuf/internal/text_encoding_test.py \ @@ -1161,7 +1220,79 @@ js_EXTRA_DIST= \ js/test15.proto \ js/test_bootstrap.js \ js/testbinary.proto \ - js/testempty.proto + js/testempty.proto \ + js/testlargenumbers.proto \ + js/experimental/runtime/testing/jasmine_protobuf.js \ + js/experimental/runtime/testing/ensure_custom_equality_test.js \ + js/experimental/runtime/testing/binary/test_message.js \ + js/experimental/runtime/kernel/writer_test.js \ + js/experimental/runtime/kernel/writer.js \ + js/experimental/runtime/kernel/wire_type.js \ + js/experimental/runtime/kernel/uint8arrays_test.js \ + js/experimental/runtime/kernel/uint8arrays.js \ + js/experimental/runtime/kernel/uint32_test_pairs.js \ + js/experimental/runtime/kernel/typed_arrays_test.js \ + js/experimental/runtime/kernel/typed_arrays.js \ + js/experimental/runtime/kernel/textencoding_test.js \ + js/experimental/runtime/kernel/textencoding.js \ + js/experimental/runtime/kernel/storage.js \ + js/experimental/runtime/kernel/sint64_test_pairs.js \ + js/experimental/runtime/kernel/sint32_test_pairs.js \ + js/experimental/runtime/kernel/sfixed64_test_pairs.js \ + js/experimental/runtime/kernel/sfixed32_test_pairs.js \ + js/experimental/runtime/kernel/reader_test.js \ + js/experimental/runtime/kernel/reader.js \ + js/experimental/runtime/kernel/packed_uint32_test_pairs.js \ + js/experimental/runtime/kernel/packed_sint64_test_pairs.js \ + js/experimental/runtime/kernel/packed_sint32_test_pairs.js \ + js/experimental/runtime/kernel/packed_sfixed64_test_pairs.js \ + js/experimental/runtime/kernel/packed_sfixed32_test_pairs.js \ + js/experimental/runtime/kernel/packed_int64_test_pairs.js \ + js/experimental/runtime/kernel/packed_int32_test_pairs.js \ + js/experimental/runtime/kernel/packed_float_test_pairs.js \ + js/experimental/runtime/kernel/packed_fixed32_test_pairs.js \ + js/experimental/runtime/kernel/packed_double_test_pairs.js \ + js/experimental/runtime/kernel/packed_bool_test_pairs.js \ + js/experimental/runtime/kernel/kernel_test.js \ + js/experimental/runtime/kernel/kernel_repeated_test.js \ + js/experimental/runtime/kernel/kernel_compatibility_test.js \ + js/experimental/runtime/kernel/kernel.js \ + js/experimental/runtime/kernel/internal_message.js \ + js/experimental/runtime/kernel/int64_test_pairs.js \ + js/experimental/runtime/kernel/int32_test_pairs.js \ + js/experimental/runtime/kernel/indexer_test.js \ + js/experimental/runtime/kernel/indexer.js \ + js/experimental/runtime/kernel/float_test_pairs.js \ + js/experimental/runtime/kernel/fixed32_test_pairs.js \ + js/experimental/runtime/kernel/field.js \ + js/experimental/runtime/kernel/double_test_pairs.js \ + js/experimental/runtime/kernel/conformance/wire_format.js \ + js/experimental/runtime/kernel/conformance/test_all_types_proto3.js \ + js/experimental/runtime/kernel/conformance/test_all_types_proto2.js \ + js/experimental/runtime/kernel/conformance/conformance_testee_runner_node.js \ + js/experimental/runtime/kernel/conformance/conformance_testee.js \ + js/experimental/runtime/kernel/conformance/conformance_response.js \ + js/experimental/runtime/kernel/conformance/conformance_request.js \ + js/experimental/runtime/kernel/buffer_decoder_test.js \ + js/experimental/runtime/kernel/buffer_decoder_helper.js \ + js/experimental/runtime/kernel/buffer_decoder.js \ + js/experimental/runtime/kernel/bool_test_pairs.js \ + js/experimental/runtime/kernel/binary_storage_test.js \ + js/experimental/runtime/kernel/binary_storage.js \ + js/experimental/runtime/internal/checks_test.js \ + js/experimental/runtime/internal/checks.js \ + js/experimental/runtime/int64_test.js \ + js/experimental/runtime/int64.js \ + js/experimental/runtime/bytestring_test.js \ + js/experimental/runtime/bytestring_internal.js \ + js/experimental/runtime/bytestring.js \ + js/experimental/benchmarks/code_size/kernel/popular_types.js \ + js/experimental/benchmarks/code_size/kernel/all_types.js \ + js/experimental/benchmarks/code_size/code_size_base.js \ + js/experimental/benchmarks/code_size/apps_jspb/popular_types_proto3.js \ + js/experimental/benchmarks/code_size/apps_jspb/popular_types_proto2.js \ + js/experimental/benchmarks/code_size/apps_jspb/all_types_proto3.js \ + js/experimental/benchmarks/code_size/apps_jspb/all_types_proto2.js all_EXTRA_DIST=$(csharp_EXTRA_DIST) $(java_EXTRA_DIST) $(objectivec_EXTRA_DIST) $(php_EXTRA_DIST) $(python_EXTRA_DIST) $(ruby_EXTRA_DIST) $(js_EXTRA_DIST) @@ -1177,7 +1308,7 @@ EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \ WORKSPACE \ cmake/CMakeLists.txt \ cmake/README.md \ - cmake/conformance.cmake \ + cmake/conformance.cmake \ cmake/examples.cmake \ cmake/extract_includes.bat.in \ cmake/install.cmake \ @@ -1194,6 +1325,8 @@ EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \ cmake/tests.cmake \ cmake/version.rc.in \ compiler_config_setting.bzl \ + build_files_updated_unittest.sh \ + cc_proto_blacklist_test.bzl \ editors/README.txt \ editors/proto.vim \ editors/protobuf-mode.el \ @@ -1216,13 +1349,13 @@ EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \ examples/list_people.py \ examples/list_people_test.go \ examples/pubspec.yaml \ - examples/third_party/zlib.BUILD \ protobuf.bzl \ + protobuf_deps.bzl \ python/release/wheel/build_wheel_manylinux.sh \ python/release/wheel/Dockerfile \ python/release/wheel/protobuf_optimized_pip.sh \ python/release/wheel/README.md \ - six.BUILD \ + third_party/six.BUILD \ third_party/zlib.BUILD \ util/python/BUILD diff --git a/third_party/protobuf/Makefile.in b/third_party/protobuf/Makefile.in index afdb780e..f9ccacf9 100644 --- a/third_party/protobuf/Makefile.in +++ b/third_party/protobuf/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -173,9 +173,9 @@ am__recursive_targets = \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir dist dist-all distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in + cscope distdir distdir-am dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -424,23 +424,35 @@ csharp_EXTRA_DIST = \ csharp/keys/README.md \ csharp/protos/README.md \ csharp/protos/map_unittest_proto3.proto \ + csharp/protos/old_extensions1.proto \ + csharp/protos/old_extensions2.proto \ + csharp/protos/unittest_issue6936_a.proto \ + csharp/protos/unittest_issue6936_b.proto \ + csharp/protos/unittest_issue6936_c.proto \ csharp/protos/unittest_custom_options_proto3.proto \ csharp/protos/unittest_import_public_proto3.proto \ + csharp/protos/unittest_import_public.proto \ csharp/protos/unittest_import_proto3.proto \ + csharp/protos/unittest_import.proto \ csharp/protos/unittest_issues.proto \ csharp/protos/unittest_proto3.proto \ + csharp/protos/unittest.proto \ csharp/src/AddressBook/AddPerson.cs \ csharp/src/AddressBook/Addressbook.cs \ csharp/src/AddressBook/AddressBook.csproj \ csharp/src/AddressBook/ListPeople.cs \ csharp/src/AddressBook/Program.cs \ csharp/src/AddressBook/SampleUsage.cs \ - csharp/src/Google.Protobuf.Benchmarks/SerializationConfig.cs \ - csharp/src/Google.Protobuf.Benchmarks/SerializationBenchmark.cs \ - csharp/src/Google.Protobuf.Benchmarks/Program.cs \ - csharp/src/Google.Protobuf.Benchmarks/Google.Protobuf.Benchmarks.csproj \ - csharp/src/Google.Protobuf.Benchmarks/Benchmarks.cs \ + csharp/src/Google.Protobuf.Benchmarks/BenchmarkDatasetConfig.cs \ csharp/src/Google.Protobuf.Benchmarks/BenchmarkMessage1Proto3.cs \ + csharp/src/Google.Protobuf.Benchmarks/Benchmarks.cs \ + csharp/src/Google.Protobuf.Benchmarks/Google.Protobuf.Benchmarks.csproj \ + csharp/src/Google.Protobuf.Benchmarks/GoogleMessageBenchmark.cs \ + csharp/src/Google.Protobuf.Benchmarks/ParseRawPrimitivesBenchmark.cs \ + csharp/src/Google.Protobuf.Benchmarks/ParseMessagesBenchmark.cs \ + csharp/src/Google.Protobuf.Benchmarks/Program.cs \ + csharp/src/Google.Protobuf.Benchmarks/wrapper_benchmark_messages.proto \ + csharp/src/Google.Protobuf.Benchmarks/WrapperBenchmarkMessages.cs \ csharp/src/Google.Protobuf.Conformance/Conformance.cs \ csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.csproj \ csharp/src/Google.Protobuf.Conformance/Program.cs \ @@ -458,14 +470,17 @@ csharp_EXTRA_DIST = \ csharp/src/Google.Protobuf.Test/Compatibility/TypeExtensionsTest.cs \ csharp/src/Google.Protobuf.Test/DeprecatedMemberTest.cs \ csharp/src/Google.Protobuf.Test/EqualityTester.cs \ + csharp/src/Google.Protobuf.Test/ExtensionSetTest.cs \ csharp/src/Google.Protobuf.Test/FieldCodecTest.cs \ csharp/src/Google.Protobuf.Test/FieldMaskTreeTest.cs \ csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs \ + csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs \ csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj \ csharp/src/Google.Protobuf.Test/IssuesTest.cs \ csharp/src/Google.Protobuf.Test/JsonFormatterTest.cs \ csharp/src/Google.Protobuf.Test/JsonParserTest.cs \ csharp/src/Google.Protobuf.Test/JsonTokenizerTest.cs \ + csharp/src/Google.Protobuf.Test/Proto3OptionalTest.cs \ csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs \ csharp/src/Google.Protobuf.Test/Reflection/DescriptorDeclarationTest.cs \ csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs \ @@ -475,15 +490,26 @@ csharp_EXTRA_DIST = \ csharp/src/Google.Protobuf.Test/SampleMessages.cs \ csharp/src/Google.Protobuf.Test/SampleNaNs.cs \ csharp/src/Google.Protobuf.Test/TestCornerCases.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/ForeignMessagePartial.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/Google.Protobuf.Test.TestProtos.csproj \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936A.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936B.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936C.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/ForeignMessagePartial.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/MapUnittestProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/OldExtensions1.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/OldExtensions2.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto2.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestCustomOptionsProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestImportProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestImportPublicProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestImportPublic.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestImport.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssues.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestProto3Optional.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestWellKnownTypes.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/Unittest.cs \ csharp/src/Google.Protobuf.Test/WellKnownTypes/AnyTest.cs \ csharp/src/Google.Protobuf.Test/WellKnownTypes/DurationTest.cs \ csharp/src/Google.Protobuf.Test/WellKnownTypes/FieldMaskTest.cs \ @@ -506,12 +532,17 @@ csharp_EXTRA_DIST = \ csharp/src/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs \ csharp/src/Google.Protobuf/Compatibility/StreamExtensions.cs \ csharp/src/Google.Protobuf/Compatibility/TypeExtensions.cs \ + csharp/src/Google.Protobuf/Extension.cs \ + csharp/src/Google.Protobuf/ExtensionRegistry.cs \ + csharp/src/Google.Protobuf/ExtensionSet.cs \ + csharp/src/Google.Protobuf/ExtensionValue.cs \ csharp/src/Google.Protobuf/FieldCodec.cs \ csharp/src/Google.Protobuf/FieldMaskTree.cs \ csharp/src/Google.Protobuf/FrameworkPortability.cs \ csharp/src/Google.Protobuf/Google.Protobuf.csproj \ csharp/src/Google.Protobuf/ICustomDiagnosticMessage.cs \ csharp/src/Google.Protobuf/IDeepCloneable.cs \ + csharp/src/Google.Protobuf/IExtendableMessage.cs \ csharp/src/Google.Protobuf/IMessage.cs \ csharp/src/Google.Protobuf/InvalidJsonException.cs \ csharp/src/Google.Protobuf/InvalidProtocolBufferException.cs \ @@ -522,6 +553,7 @@ csharp_EXTRA_DIST = \ csharp/src/Google.Protobuf/LimitedInputStream.cs \ csharp/src/Google.Protobuf/MessageExtensions.cs \ csharp/src/Google.Protobuf/MessageParser.cs \ + csharp/src/Google.Protobuf/ObjectIntPair.cs \ csharp/src/Google.Protobuf/ProtoPreconditions.cs \ csharp/src/Google.Protobuf/Properties/AssemblyInfo.cs \ csharp/src/Google.Protobuf/Reflection/CustomOptions.cs \ @@ -533,6 +565,8 @@ csharp_EXTRA_DIST = \ csharp/src/Google.Protobuf/Reflection/DescriptorValidationException.cs \ csharp/src/Google.Protobuf/Reflection/EnumDescriptor.cs \ csharp/src/Google.Protobuf/Reflection/EnumValueDescriptor.cs \ + csharp/src/Google.Protobuf/Reflection/ExtensionAccessor.cs \ + csharp/src/Google.Protobuf/Reflection/ExtensionCollection.cs \ csharp/src/Google.Protobuf/Reflection/FieldAccessorBase.cs \ csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs \ csharp/src/Google.Protobuf/Reflection/FieldType.cs \ @@ -574,8 +608,10 @@ csharp_EXTRA_DIST = \ csharp/src/Google.Protobuf/UnknownFieldSet.cs java_EXTRA_DIST = \ + java/BUILD \ java/README.md \ java/bom/pom.xml \ + java/core/BUILD \ java/core/generate-sources-build.xml \ java/core/generate-test-sources-build.xml \ java/core/pom.xml \ @@ -689,6 +725,7 @@ java_EXTRA_DIST = \ java/core/src/main/java/com/google/protobuf/TextFormatEscaper.java \ java/core/src/main/java/com/google/protobuf/TextFormatParseInfoTree.java \ java/core/src/main/java/com/google/protobuf/TextFormatParseLocation.java \ + java/core/src/main/java/com/google/protobuf/TypeRegistry.java \ java/core/src/main/java/com/google/protobuf/UninitializedMessageException.java \ java/core/src/main/java/com/google/protobuf/UnknownFieldSchema.java \ java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java \ @@ -785,6 +822,7 @@ java_EXTRA_DIST = \ java/core/src/test/java/com/google/protobuf/TextFormatParseInfoTreeTest.java \ java/core/src/test/java/com/google/protobuf/TextFormatParseLocationTest.java \ java/core/src/test/java/com/google/protobuf/TextFormatTest.java \ + java/core/src/test/java/com/google/protobuf/TypeRegistryTest.java \ java/core/src/test/java/com/google/protobuf/UnknownEnumValueTest.java \ java/core/src/test/java/com/google/protobuf/UnknownFieldSetTest.java \ java/core/src/test/java/com/google/protobuf/UnmodifiableLazyStringListTest.java \ @@ -829,6 +867,7 @@ java_EXTRA_DIST = \ java/core/src/test/proto/com/google/protobuf/test_extra_interfaces.proto \ java/core/src/test/proto/com/google/protobuf/wrappers_test.proto \ java/lite.md \ + java/lite/BUILD \ java/lite/generate-sources-build.xml \ java/lite/generate-test-sources-build.xml \ java/lite/lite.awk \ @@ -837,20 +876,26 @@ java_EXTRA_DIST = \ java/lite/src/test/java/com/google/protobuf/LiteTest.java \ java/lite/src/test/java/com/google/protobuf/Proto2MessageLiteInfoFactory.java \ java/pom.xml \ + java/util/BUILD \ java/util/pom.xml \ java/util/src/main/java/com/google/protobuf/util/Durations.java \ java/util/src/main/java/com/google/protobuf/util/FieldMaskTree.java \ java/util/src/main/java/com/google/protobuf/util/FieldMaskUtil.java \ java/util/src/main/java/com/google/protobuf/util/JsonFormat.java \ java/util/src/main/java/com/google/protobuf/util/TimeUtil.java \ + java/util/src/main/java/com/google/protobuf/util/Structs.java \ java/util/src/main/java/com/google/protobuf/util/Timestamps.java \ + java/util/src/main/java/com/google/protobuf/util/Values.java \ java/util/src/test/java/com/google/protobuf/util/FieldMaskTreeTest.java \ java/util/src/test/java/com/google/protobuf/util/FieldMaskUtilTest.java \ java/util/src/test/java/com/google/protobuf/util/JsonFormatTest.java \ + java/util/src/test/java/com/google/protobuf/util/StructsTest.java \ java/util/src/test/java/com/google/protobuf/util/TimeUtilTest.java \ + java/util/src/test/java/com/google/protobuf/util/ValuesTest.java \ java/util/src/test/proto/com/google/protobuf/util/json_test.proto objectivec_EXTRA_DIST = \ + objectivec/.clang-format \ objectivec/DevTools/check_version_stamps.sh \ objectivec/DevTools/compile_testing_protos.sh \ objectivec/DevTools/full_mac_build.sh \ @@ -858,25 +903,19 @@ objectivec_EXTRA_DIST = \ objectivec/DevTools/pddm_tests.py \ objectivec/generate_well_known_types.sh \ objectivec/google/protobuf/Any.pbobjc.h \ - objectivec/google/protobuf/Any.pbobjc.m \ objectivec/google/protobuf/Api.pbobjc.h \ - objectivec/google/protobuf/Api.pbobjc.m \ objectivec/google/protobuf/Duration.pbobjc.h \ - objectivec/google/protobuf/Duration.pbobjc.m \ objectivec/google/protobuf/Empty.pbobjc.h \ - objectivec/google/protobuf/Empty.pbobjc.m \ objectivec/google/protobuf/FieldMask.pbobjc.h \ - objectivec/google/protobuf/FieldMask.pbobjc.m \ objectivec/google/protobuf/SourceContext.pbobjc.h \ - objectivec/google/protobuf/SourceContext.pbobjc.m \ objectivec/google/protobuf/Struct.pbobjc.h \ - objectivec/google/protobuf/Struct.pbobjc.m \ objectivec/google/protobuf/Timestamp.pbobjc.h \ - objectivec/google/protobuf/Timestamp.pbobjc.m \ objectivec/google/protobuf/Type.pbobjc.h \ - objectivec/google/protobuf/Type.pbobjc.m \ objectivec/google/protobuf/Wrappers.pbobjc.h \ - objectivec/google/protobuf/Wrappers.pbobjc.m \ + objectivec/GPBAny.pbobjc.h \ + objectivec/GPBAny.pbobjc.m \ + objectivec/GPBApi.pbobjc.h \ + objectivec/GPBApi.pbobjc.m \ objectivec/GPBArray.h \ objectivec/GPBArray.m \ objectivec/GPBArray_PackagePrivate.h \ @@ -893,10 +932,16 @@ objectivec_EXTRA_DIST = \ objectivec/GPBDictionary.h \ objectivec/GPBDictionary.m \ objectivec/GPBDictionary_PackagePrivate.h \ + objectivec/GPBDuration.pbobjc.h \ + objectivec/GPBDuration.pbobjc.m \ + objectivec/GPBEmpty.pbobjc.h \ + objectivec/GPBEmpty.pbobjc.m \ objectivec/GPBExtensionInternals.h \ objectivec/GPBExtensionInternals.m \ objectivec/GPBExtensionRegistry.h \ objectivec/GPBExtensionRegistry.m \ + objectivec/GPBFieldMask.pbobjc.h \ + objectivec/GPBFieldMask.pbobjc.m \ objectivec/GPBMessage.h \ objectivec/GPBMessage.m \ objectivec/GPBMessage_PackagePrivate.h \ @@ -907,6 +952,14 @@ objectivec_EXTRA_DIST = \ objectivec/GPBRootObject.m \ objectivec/GPBRootObject_PackagePrivate.h \ objectivec/GPBRuntimeTypes.h \ + objectivec/GPBSourceContext.pbobjc.h \ + objectivec/GPBSourceContext.pbobjc.m \ + objectivec/GPBStruct.pbobjc.h \ + objectivec/GPBStruct.pbobjc.m \ + objectivec/GPBTimestamp.pbobjc.h \ + objectivec/GPBTimestamp.pbobjc.m \ + objectivec/GPBType.pbobjc.h \ + objectivec/GPBType.pbobjc.m \ objectivec/GPBUnknownField.h \ objectivec/GPBUnknownField.m \ objectivec/GPBUnknownField_PackagePrivate.h \ @@ -920,6 +973,8 @@ objectivec_EXTRA_DIST = \ objectivec/GPBWellKnownTypes.m \ objectivec/GPBWireFormat.h \ objectivec/GPBWireFormat.m \ + objectivec/GPBWrappers.pbobjc.h \ + objectivec/GPBWrappers.pbobjc.m \ objectivec/ProtocolBuffers_iOS.xcodeproj/project.pbxproj \ objectivec/ProtocolBuffers_iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ objectivec/ProtocolBuffers_iOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ @@ -1008,6 +1063,7 @@ objectivec_EXTRA_DIST = \ objectivec/Tests/GPBDictionaryTests.m \ objectivec/Tests/GPBDictionaryTests.pddm \ objectivec/Tests/GPBExtensionRegistryTest.m \ + objectivec/Tests/GPBMessageTests+ClassNames.m \ objectivec/Tests/GPBMessageTests+Merge.m \ objectivec/Tests/GPBMessageTests+Runtime.m \ objectivec/Tests/GPBMessageTests+Serialization.m \ @@ -1204,6 +1260,8 @@ php_EXTRA_DIST = \ php/tests/generated_service_test.php \ php/tests/map_field_test.php \ php/tests/memory_leak_test.php \ + php/tests/multirequest.php \ + php/tests/multirequest.sh \ php/tests/php_implementation_test.php \ php/tests/proto/empty/echo.proto \ php/tests/proto/test.proto \ @@ -1280,6 +1338,7 @@ python_EXTRA_DIST = \ python/google/protobuf/internal/service_reflection_test.py \ python/google/protobuf/internal/symbol_database_test.py \ python/google/protobuf/internal/test_bad_identifiers.proto \ + python/google/protobuf/internal/test_proto3_optional.proto \ python/google/protobuf/internal/test_util.py \ python/google/protobuf/internal/testing_refleaks.py \ python/google/protobuf/internal/text_encoding_test.py \ @@ -1519,7 +1578,79 @@ js_EXTRA_DIST = \ js/test15.proto \ js/test_bootstrap.js \ js/testbinary.proto \ - js/testempty.proto + js/testempty.proto \ + js/testlargenumbers.proto \ + js/experimental/runtime/testing/jasmine_protobuf.js \ + js/experimental/runtime/testing/ensure_custom_equality_test.js \ + js/experimental/runtime/testing/binary/test_message.js \ + js/experimental/runtime/kernel/writer_test.js \ + js/experimental/runtime/kernel/writer.js \ + js/experimental/runtime/kernel/wire_type.js \ + js/experimental/runtime/kernel/uint8arrays_test.js \ + js/experimental/runtime/kernel/uint8arrays.js \ + js/experimental/runtime/kernel/uint32_test_pairs.js \ + js/experimental/runtime/kernel/typed_arrays_test.js \ + js/experimental/runtime/kernel/typed_arrays.js \ + js/experimental/runtime/kernel/textencoding_test.js \ + js/experimental/runtime/kernel/textencoding.js \ + js/experimental/runtime/kernel/storage.js \ + js/experimental/runtime/kernel/sint64_test_pairs.js \ + js/experimental/runtime/kernel/sint32_test_pairs.js \ + js/experimental/runtime/kernel/sfixed64_test_pairs.js \ + js/experimental/runtime/kernel/sfixed32_test_pairs.js \ + js/experimental/runtime/kernel/reader_test.js \ + js/experimental/runtime/kernel/reader.js \ + js/experimental/runtime/kernel/packed_uint32_test_pairs.js \ + js/experimental/runtime/kernel/packed_sint64_test_pairs.js \ + js/experimental/runtime/kernel/packed_sint32_test_pairs.js \ + js/experimental/runtime/kernel/packed_sfixed64_test_pairs.js \ + js/experimental/runtime/kernel/packed_sfixed32_test_pairs.js \ + js/experimental/runtime/kernel/packed_int64_test_pairs.js \ + js/experimental/runtime/kernel/packed_int32_test_pairs.js \ + js/experimental/runtime/kernel/packed_float_test_pairs.js \ + js/experimental/runtime/kernel/packed_fixed32_test_pairs.js \ + js/experimental/runtime/kernel/packed_double_test_pairs.js \ + js/experimental/runtime/kernel/packed_bool_test_pairs.js \ + js/experimental/runtime/kernel/kernel_test.js \ + js/experimental/runtime/kernel/kernel_repeated_test.js \ + js/experimental/runtime/kernel/kernel_compatibility_test.js \ + js/experimental/runtime/kernel/kernel.js \ + js/experimental/runtime/kernel/internal_message.js \ + js/experimental/runtime/kernel/int64_test_pairs.js \ + js/experimental/runtime/kernel/int32_test_pairs.js \ + js/experimental/runtime/kernel/indexer_test.js \ + js/experimental/runtime/kernel/indexer.js \ + js/experimental/runtime/kernel/float_test_pairs.js \ + js/experimental/runtime/kernel/fixed32_test_pairs.js \ + js/experimental/runtime/kernel/field.js \ + js/experimental/runtime/kernel/double_test_pairs.js \ + js/experimental/runtime/kernel/conformance/wire_format.js \ + js/experimental/runtime/kernel/conformance/test_all_types_proto3.js \ + js/experimental/runtime/kernel/conformance/test_all_types_proto2.js \ + js/experimental/runtime/kernel/conformance/conformance_testee_runner_node.js \ + js/experimental/runtime/kernel/conformance/conformance_testee.js \ + js/experimental/runtime/kernel/conformance/conformance_response.js \ + js/experimental/runtime/kernel/conformance/conformance_request.js \ + js/experimental/runtime/kernel/buffer_decoder_test.js \ + js/experimental/runtime/kernel/buffer_decoder_helper.js \ + js/experimental/runtime/kernel/buffer_decoder.js \ + js/experimental/runtime/kernel/bool_test_pairs.js \ + js/experimental/runtime/kernel/binary_storage_test.js \ + js/experimental/runtime/kernel/binary_storage.js \ + js/experimental/runtime/internal/checks_test.js \ + js/experimental/runtime/internal/checks.js \ + js/experimental/runtime/int64_test.js \ + js/experimental/runtime/int64.js \ + js/experimental/runtime/bytestring_test.js \ + js/experimental/runtime/bytestring_internal.js \ + js/experimental/runtime/bytestring.js \ + js/experimental/benchmarks/code_size/kernel/popular_types.js \ + js/experimental/benchmarks/code_size/kernel/all_types.js \ + js/experimental/benchmarks/code_size/code_size_base.js \ + js/experimental/benchmarks/code_size/apps_jspb/popular_types_proto3.js \ + js/experimental/benchmarks/code_size/apps_jspb/popular_types_proto2.js \ + js/experimental/benchmarks/code_size/apps_jspb/all_types_proto3.js \ + js/experimental/benchmarks/code_size/apps_jspb/all_types_proto2.js all_EXTRA_DIST = $(csharp_EXTRA_DIST) $(java_EXTRA_DIST) $(objectivec_EXTRA_DIST) $(php_EXTRA_DIST) $(python_EXTRA_DIST) $(ruby_EXTRA_DIST) $(js_EXTRA_DIST) EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \ @@ -1534,7 +1665,7 @@ EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \ WORKSPACE \ cmake/CMakeLists.txt \ cmake/README.md \ - cmake/conformance.cmake \ + cmake/conformance.cmake \ cmake/examples.cmake \ cmake/extract_includes.bat.in \ cmake/install.cmake \ @@ -1551,6 +1682,8 @@ EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \ cmake/tests.cmake \ cmake/version.rc.in \ compiler_config_setting.bzl \ + build_files_updated_unittest.sh \ + cc_proto_blacklist_test.bzl \ editors/README.txt \ editors/proto.vim \ editors/protobuf-mode.el \ @@ -1573,13 +1706,13 @@ EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \ examples/list_people.py \ examples/list_people_test.go \ examples/pubspec.yaml \ - examples/third_party/zlib.BUILD \ protobuf.bzl \ + protobuf_deps.bzl \ python/release/wheel/build_wheel_manylinux.sh \ python/release/wheel/Dockerfile \ python/release/wheel/protobuf_optimized_pip.sh \ python/release/wheel/README.md \ - six.BUILD \ + third_party/six.BUILD \ third_party/zlib.BUILD \ util/python/BUILD @@ -1630,8 +1763,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -1798,7 +1931,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -1878,6 +2014,10 @@ dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -1920,6 +2060,8 @@ distcheck: dist eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -2102,8 +2244,8 @@ uninstall-am: uninstall-pkgconfigDATA am--refresh check check-am check-local clean clean-cscope \ clean-generic clean-libtool clean-local cscope cscopelist-am \ ctags ctags-am dist dist-all dist-bzip2 dist-gzip dist-lzip \ - dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ - distclean-generic distclean-hdr distclean-libtool \ + dist-shar dist-tarZ dist-xz dist-zip dist-zstd distcheck \ + distclean distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ diff --git a/third_party/protobuf/README.md b/third_party/protobuf/README.md index 049b8cc9..2f42c6c9 100644 --- a/third_party/protobuf/README.md +++ b/third_party/protobuf/README.md @@ -55,8 +55,8 @@ how to install protobuf runtime for that specific language: | Language | Source | Ubuntu | MacOS | Windows | |--------------------------------------|-------------------------------------------------------------|--------|-------|---------| | C++ (include C++ runtime and protoc) | [src](src) | [![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-cpp_distcheck.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fcpp_distcheck%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-bazel.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fbazel%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-dist_install.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fdist_install%2Fcontinuous) | [![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/macos-cpp.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fmacos%2Fcpp%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/macos-cpp_distcheck.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fmacos%2Fcpp_distcheck%2Fcontinuous) | [![Build status](https://ci.appveyor.com/api/projects/status/73ctee6ua4w2ruin?svg=true)](https://ci.appveyor.com/project/protobuf/protobuf) | -| Java | [java](java) | [![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-java_compatibility.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fjava_compatibility%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-java_jdk7.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fjava_jdk7%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-java_oracle7.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fjava_oracle7%2Fcontinuous) | | | -| Python | [python](python) | [![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python27.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython27%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python33.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython33%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python34.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython34%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python35.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython35%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python36.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython36%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python37.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython37%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python_compatibility.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython_compatibility%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python27_cpp.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython27_cpp%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python33_cpp.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython33_cpp%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python34_cpp.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython34_cpp%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python35_cpp.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython35_cpp%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python36_cpp.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython36_cpp%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python37_cpp.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython37_cpp%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python-release.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython_release%2Fcontinuous) | [![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/macos-python.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fmacos%2Fpython%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/macos-python_cpp.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fmacos%2Fpython_cpp%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/macos-python-release.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fmacos%2Fpython_release%2Fcontinuous) | [![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/windows-python-release.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fwindows%2Fpython_release%2Fcontinuous) | +| Java | [java](java) | [![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-java_compatibility.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fjava_compatibility%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-java_jdk7.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fjava_jdk7%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-java_oracle7.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fjava_oracle7%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-java_linkage_monitor.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fjava_linkage_monitor%2Fcontinuous) | | | +| Python | [python](python) | [![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python27.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython27%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python35.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython35%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python36.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython36%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python37.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython37%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python_compatibility.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython_compatibility%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python27_cpp.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython27_cpp%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python35_cpp.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython35_cpp%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python36_cpp.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython36_cpp%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python37_cpp.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython37_cpp%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-python-release.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fpython_release%2Fcontinuous) | [![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/macos-python.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fmacos%2Fpython%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/macos-python_cpp.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fmacos%2Fpython_cpp%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/macos-python-release.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fmacos%2Fpython_release%2Fcontinuous) | [![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/windows-python-release.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fwindows%2Fpython_release%2Fcontinuous) | | Objective-C | [objectivec](objectivec) | | [![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/macos-objectivec_cocoapods_integration.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fmacos%2Fobjectivec_cocoapods_integration%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/macos-objectivec_ios_debug.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fmacos%2Fobjectivec_ios_debug%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/macos-objectivec_ios_release.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fmacos%2Fobjectivec_ios_release%2Fcontinuous)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/macos-objectivec_osx.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fmacos%2Fobjectivec_osx%2Fcontinuous) | | | C# | [csharp](csharp) | [![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-csharp.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fcsharp%2Fcontinuous) | | [![Build status](https://ci.appveyor.com/api/projects/status/73ctee6ua4w2ruin?svg=true)](https://ci.appveyor.com/project/protobuf/protobuf)
[![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/windows-csharp-release.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fwindows%2Fcsharp_release%2Fcontinuous) | | JavaScript | [js](js) | [![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/linux-javascript.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fubuntu%2Fjavascript%2Fcontinuous) | [![Build status](https://storage.googleapis.com/protobuf-kokoro-results/status-badge/macos-javascript.png)](https://fusion.corp.google.com/projectanalysis/current/KOKORO/prod:protobuf%2Fgithub%2Fmaster%2Fmacos%2Fjavascript%2Fcontinuous) | | diff --git a/third_party/protobuf/WORKSPACE b/third_party/protobuf/WORKSPACE index 36876800..cb16ae88 100644 --- a/third_party/protobuf/WORKSPACE +++ b/third_party/protobuf/WORKSPACE @@ -1,54 +1,54 @@ workspace(name = "com_google_protobuf") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +local_repository( + name = "com_google_protobuf_examples", + path = "examples", +) + +http_archive( + name = "com_google_googletest", + sha256 = "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb", + strip_prefix = "googletest-release-1.10.0", + urls = [ + "https://mirror.bazel.build/github.com/google/googletest/archive/release-1.10.0.tar.gz", + "https://github.com/google/googletest/archive/release-1.10.0.tar.gz", + ], +) + load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("//:protobuf_deps.bzl", "protobuf_deps") # Load common dependencies. protobuf_deps() - -new_local_repository( - name = "submodule_gmock", - build_file = "@//:third_party/googletest/BUILD.bazel", - path = "third_party/googletest", -) - -http_archive( - name = "six_archive", - build_file = "@//:six.BUILD", - sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a", - urls = ["https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55"], -) - -http_archive( - name = "bazel_skylib", - sha256 = "bbccf674aa441c266df9894182d80de104cabd19be98be002f6d478aaa31574d", - strip_prefix = "bazel-skylib-2169ae1c374aab4a09aa90e65efe1a3aad4e279b", - urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"], -) +load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external") bind( name = "python_headers", actual = "//util/python:python_headers", ) +# TODO(yannic): Remove in 3.13.0. bind( name = "gtest", - actual = "@submodule_gmock//:gtest", + actual = "@com_google_googletest//:gtest", ) +# TODO(yannic): Remove in 3.13.0. bind( name = "gtest_main", - actual = "@submodule_gmock//:gtest_main", + actual = "@com_google_googletest//:gtest_main", ) -bind( - name = "six", - actual = "@six_archive//:six", -) - -maven_jar( +jvm_maven_import_external( name = "guava_maven", artifact = "com.google.guava:guava:18.0", + artifact_sha256 = "d664fbfc03d2e5ce9cab2a44fb01f1d0bf9dfebeccc1a473b1f9ea31f79f6f99", + server_urls = [ + "https://jcenter.bintray.com/", + "https://repo1.maven.org/maven2", + ], ) bind( @@ -56,9 +56,14 @@ bind( actual = "@guava_maven//jar", ) -maven_jar( +jvm_maven_import_external( name = "gson_maven", artifact = "com.google.code.gson:gson:2.7", + artifact_sha256 = "2d43eb5ea9e133d2ee2405cc14f5ee08951b8361302fdd93494a3a997b508d32", + server_urls = [ + "https://jcenter.bintray.com/", + "https://repo1.maven.org/maven2", + ], ) bind( @@ -66,12 +71,22 @@ bind( actual = "@gson_maven//jar", ) -maven_jar( +jvm_maven_import_external( name = "error_prone_annotations_maven", artifact = "com.google.errorprone:error_prone_annotations:2.3.2", + artifact_sha256 = "357cd6cfb067c969226c442451502aee13800a24e950fdfde77bcdb4565a668d", + server_urls = [ + "https://jcenter.bintray.com/", + "https://repo1.maven.org/maven2", + ], ) bind( name = "error_prone_annotations", actual = "@error_prone_annotations_maven//jar", ) + +# For `cc_proto_blacklist_test`. +load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") + +bazel_skylib_workspace() diff --git a/third_party/protobuf/aclocal.m4 b/third_party/protobuf/aclocal.m4 index f1382490..391bb38a 100644 --- a/third_party/protobuf/aclocal.m4 +++ b/third_party/protobuf/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' +[am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15.1], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,12 +51,12 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15.1])dnl +[AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -# Copyright (C) 2011-2017 Free Software Foundation, Inc. +# Copyright (C) 2011-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -118,7 +118,7 @@ AC_SUBST([AR])dnl # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -170,7 +170,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -201,7 +201,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -392,13 +392,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. - # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], @@ -406,49 +405,43 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -457,18 +450,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -555,8 +547,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. @@ -623,7 +615,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -665,7 +657,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -686,7 +678,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2017 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -708,7 +700,7 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -743,7 +735,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -751,49 +743,42 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # AM_MAKE_INCLUDE() # ----------------- -# Check to see how make treats includes. +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -832,7 +817,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -861,7 +846,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -908,7 +893,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -927,7 +912,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1008,7 +993,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1068,7 +1053,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1096,7 +1081,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2017 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1115,7 +1100,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2017 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/third_party/protobuf/ar-lib b/third_party/protobuf/ar-lib index 05094d34..1e9388e2 100755 --- a/third_party/protobuf/ar-lib +++ b/third_party/protobuf/ar-lib @@ -2,9 +2,9 @@ # Wrapper for Microsoft lib.exe me=ar-lib -scriptversion=2012-03-01.08; # UTC +scriptversion=2019-07-04.01; # UTC -# Copyright (C) 2010-2017 Free Software Foundation, Inc. +# Copyright (C) 2010-2020 Free Software Foundation, Inc. # Written by Peter Rosin . # # This program is free software; you can redistribute it and/or modify @@ -18,7 +18,7 @@ scriptversion=2012-03-01.08; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -53,7 +53,7 @@ func_file_conv () MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -65,7 +65,7 @@ func_file_conv () mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin) + cygwin | msys) file=`cygpath -m "$file" || echo "$file"` ;; wine) @@ -224,10 +224,11 @@ elif test -n "$extract"; then esac done else - $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member - do - $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $? - done + $AR -NOLOGO -LIST "$archive" | tr -d '\r' | sed -e 's/\\/\\\\/g' \ + | while read member + do + $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $? + done fi elif test -n "$quick$replace"; then diff --git a/third_party/protobuf/benchmarks/Makefile.am b/third_party/protobuf/benchmarks/Makefile.am index 42334972..2b2204d0 100644 --- a/third_party/protobuf/benchmarks/Makefile.am +++ b/third_party/protobuf/benchmarks/Makefile.am @@ -598,6 +598,12 @@ js: js-benchmark ############ JS RULE END ############# +EXTRA_DIST = \ + $(benchmarks_protoc_inputs_benchmark_wrapper) \ + $(benchmarks_protoc_inputs) \ + $(benchmarks_protoc_inputs_proto2) \ + google_size.proto + MAINTAINERCLEANFILES = \ Makefile.in diff --git a/third_party/protobuf/benchmarks/Makefile.in b/third_party/protobuf/benchmarks/Makefile.in index 03525b29..797f6331 100644 --- a/third_party/protobuf/benchmarks/Makefile.in +++ b/third_party/protobuf/benchmarks/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -112,6 +112,8 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" +PROGRAMS = $(bin_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -139,7 +141,6 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" LTLIBRARIES = $(lib_LTLIBRARIES) libbenchmark_messages_la_DEPENDENCIES = \ $(top_srcdir)/src/.libs/libprotobuf.la @@ -177,25 +178,24 @@ libbenchmark_messages_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(libbenchmark_messages_la_LDFLAGS) \ $(LDFLAGS) -o $@ -PROGRAMS = $(bin_PROGRAMS) -am_cpp_benchmark_OBJECTS = cpp/cpp_benchmark-cpp_benchmark.$(OBJEXT) -am__objects_4 = cpp/cpp_benchmark-benchmarks.pb.$(OBJEXT) \ - cpp/datasets/google_message1/proto3/cpp_benchmark-benchmark_message1_proto3.pb.$(OBJEXT) -am__objects_5 = cpp/datasets/google_message1/proto2/cpp_benchmark-benchmark_message1_proto2.pb.$(OBJEXT) \ - cpp/datasets/google_message2/cpp_benchmark-benchmark_message2.pb.$(OBJEXT) \ - cpp/datasets/google_message3/cpp_benchmark-benchmark_message3.pb.$(OBJEXT) \ - cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_1.pb.$(OBJEXT) \ - cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_2.pb.$(OBJEXT) \ - cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_3.pb.$(OBJEXT) \ - cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_4.pb.$(OBJEXT) \ - cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_5.pb.$(OBJEXT) \ - cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_6.pb.$(OBJEXT) \ - cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_7.pb.$(OBJEXT) \ - cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_8.pb.$(OBJEXT) \ - cpp/datasets/google_message4/cpp_benchmark-benchmark_message4.pb.$(OBJEXT) \ - cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_1.pb.$(OBJEXT) \ - cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_2.pb.$(OBJEXT) \ - cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_3.pb.$(OBJEXT) +am_cpp_benchmark_OBJECTS = cpp/benchmark-cpp_benchmark.$(OBJEXT) +am__objects_4 = cpp/benchmark-benchmarks.pb.$(OBJEXT) \ + cpp/datasets/google_message1/proto3/benchmark-benchmark_message1_proto3.pb.$(OBJEXT) +am__objects_5 = cpp/datasets/google_message1/proto2/benchmark-benchmark_message1_proto2.pb.$(OBJEXT) \ + cpp/datasets/google_message2/benchmark-benchmark_message2.pb.$(OBJEXT) \ + cpp/datasets/google_message3/benchmark-benchmark_message3.pb.$(OBJEXT) \ + cpp/datasets/google_message3/benchmark-benchmark_message3_1.pb.$(OBJEXT) \ + cpp/datasets/google_message3/benchmark-benchmark_message3_2.pb.$(OBJEXT) \ + cpp/datasets/google_message3/benchmark-benchmark_message3_3.pb.$(OBJEXT) \ + cpp/datasets/google_message3/benchmark-benchmark_message3_4.pb.$(OBJEXT) \ + cpp/datasets/google_message3/benchmark-benchmark_message3_5.pb.$(OBJEXT) \ + cpp/datasets/google_message3/benchmark-benchmark_message3_6.pb.$(OBJEXT) \ + cpp/datasets/google_message3/benchmark-benchmark_message3_7.pb.$(OBJEXT) \ + cpp/datasets/google_message3/benchmark-benchmark_message3_8.pb.$(OBJEXT) \ + cpp/datasets/google_message4/benchmark-benchmark_message4.pb.$(OBJEXT) \ + cpp/datasets/google_message4/benchmark-benchmark_message4_1.pb.$(OBJEXT) \ + cpp/datasets/google_message4/benchmark-benchmark_message4_2.pb.$(OBJEXT) \ + cpp/datasets/google_message4/benchmark-benchmark_message4_3.pb.$(OBJEXT) nodist_cpp_benchmark_OBJECTS = $(am__objects_4) $(am__objects_5) \ $(am__objects_3) $(am__objects_3) cpp_benchmark_OBJECTS = $(am_cpp_benchmark_OBJECTS) \ @@ -300,7 +300,99 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = cpp/$(DEPDIR)/benchmark-benchmarks.pb.Po \ + cpp/$(DEPDIR)/benchmark-cpp_benchmark.Po \ + cpp/$(DEPDIR)/gogo_data_scrubber-benchmarks.pb.Po \ + cpp/$(DEPDIR)/libbenchmark_messages_la-benchmarks.pb.Plo \ + cpp/$(DEPDIR)/proto3_data_stripper-benchmarks.pb.Po \ + cpp/datasets/google_message1/proto2/$(DEPDIR)/benchmark-benchmark_message1_proto2.pb.Po \ + cpp/datasets/google_message1/proto2/$(DEPDIR)/gogo_data_scrubber-benchmark_message1_proto2.pb.Po \ + cpp/datasets/google_message1/proto2/$(DEPDIR)/libbenchmark_messages_la-benchmark_message1_proto2.pb.Plo \ + cpp/datasets/google_message1/proto2/$(DEPDIR)/proto3_data_stripper-benchmark_message1_proto2.pb.Po \ + cpp/datasets/google_message1/proto3/$(DEPDIR)/benchmark-benchmark_message1_proto3.pb.Po \ + cpp/datasets/google_message1/proto3/$(DEPDIR)/gogo_data_scrubber-benchmark_message1_proto3.pb.Po \ + cpp/datasets/google_message1/proto3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message1_proto3.pb.Plo \ + cpp/datasets/google_message1/proto3/$(DEPDIR)/proto3_data_stripper-benchmark_message1_proto3.pb.Po \ + cpp/datasets/google_message2/$(DEPDIR)/benchmark-benchmark_message2.pb.Po \ + cpp/datasets/google_message2/$(DEPDIR)/gogo_data_scrubber-benchmark_message2.pb.Po \ + cpp/datasets/google_message2/$(DEPDIR)/libbenchmark_messages_la-benchmark_message2.pb.Plo \ + cpp/datasets/google_message2/$(DEPDIR)/proto3_data_stripper-benchmark_message2.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_1.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_2.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_3.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_4.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_5.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_6.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_7.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_8.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_1.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_2.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_3.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_4.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_5.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_6.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_7.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_8.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3.pb.Plo \ + cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_1.pb.Plo \ + cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_2.pb.Plo \ + cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_3.pb.Plo \ + cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_4.pb.Plo \ + cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_5.pb.Plo \ + cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_6.pb.Plo \ + cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_7.pb.Plo \ + cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_8.pb.Plo \ + cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_1.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_2.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_3.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_4.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_5.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_6.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_7.pb.Po \ + cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_8.pb.Po \ + cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4.pb.Po \ + cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_1.pb.Po \ + cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_2.pb.Po \ + cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_3.pb.Po \ + cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4.pb.Po \ + cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4_1.pb.Po \ + cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4_2.pb.Po \ + cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4_3.pb.Po \ + cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4.pb.Plo \ + cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4_1.pb.Plo \ + cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4_2.pb.Plo \ + cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4_3.pb.Plo \ + cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4.pb.Po \ + cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4_1.pb.Po \ + cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4_2.pb.Po \ + cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4_3.pb.Po \ + gogo/cpp_no_group/$(DEPDIR)/cpp_no_group_benchmark-benchmarks.pb.Po \ + gogo/cpp_no_group/$(DEPDIR)/cpp_no_group_benchmark-cpp_benchmark.Po \ + gogo/cpp_no_group/datasets/google_message1/proto2/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message1_proto2.pb.Po \ + gogo/cpp_no_group/datasets/google_message1/proto3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message1_proto3.pb.Po \ + gogo/cpp_no_group/datasets/google_message2/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message2.pb.Po \ + gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3.pb.Po \ + gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_1.pb.Po \ + gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_2.pb.Po \ + gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_3.pb.Po \ + gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_4.pb.Po \ + gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_5.pb.Po \ + gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_6.pb.Po \ + gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_7.pb.Po \ + gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_8.pb.Po \ + gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4.pb.Po \ + gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4_1.pb.Po \ + gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4_2.pb.Po \ + gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4_3.pb.Po \ + python/$(DEPDIR)/libbenchmark_messages_la-python_benchmark_messages.Plo \ + util/$(DEPDIR)/gogo_data_scrubber-gogo_data_scrubber.Po \ + util/$(DEPDIR)/proto3_data_stripper-proto3_data_stripper.Po \ + util/$(DEPDIR)/protoc_gen_gogoproto-protoc-gen-gogoproto.Po \ + util/$(DEPDIR)/protoc_gen_proto2_to_proto3-protoc-gen-proto2_to_proto3.Po am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -743,6 +835,12 @@ full_srcdir = $$(cd $(srcdir) && pwd) proto3_data = $$(for data in $(all_data); do echo $(full_srcdir)"/tmp/proto3_data$${data\#$(full_srcdir)}"; done | xargs) ############ JS RULE END ############# +EXTRA_DIST = \ + $(benchmarks_protoc_inputs_benchmark_wrapper) \ + $(benchmarks_protoc_inputs) \ + $(benchmarks_protoc_inputs_proto2) \ + google_size.proto + MAINTAINERCLEANFILES = \ Makefile.in @@ -819,8 +917,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -831,6 +929,55 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @@ -963,105 +1110,56 @@ cpp/datasets/google_message4/libbenchmark_messages_la-benchmark_message4_3.pb.lo libbenchmark_messages.la: $(libbenchmark_messages_la_OBJECTS) $(libbenchmark_messages_la_DEPENDENCIES) $(EXTRA_libbenchmark_messages_la_DEPENDENCIES) $(AM_V_CXXLD)$(libbenchmark_messages_la_LINK) -rpath $(libdir) $(libbenchmark_messages_la_OBJECTS) $(libbenchmark_messages_la_LIBADD) $(LIBS) -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -cpp/cpp_benchmark-cpp_benchmark.$(OBJEXT): cpp/$(am__dirstamp) \ +cpp/benchmark-cpp_benchmark.$(OBJEXT): cpp/$(am__dirstamp) \ cpp/$(DEPDIR)/$(am__dirstamp) -cpp/cpp_benchmark-benchmarks.pb.$(OBJEXT): cpp/$(am__dirstamp) \ +cpp/benchmark-benchmarks.pb.$(OBJEXT): cpp/$(am__dirstamp) \ cpp/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message1/proto3/cpp_benchmark-benchmark_message1_proto3.pb.$(OBJEXT): \ +cpp/datasets/google_message1/proto3/benchmark-benchmark_message1_proto3.pb.$(OBJEXT): \ cpp/datasets/google_message1/proto3/$(am__dirstamp) \ cpp/datasets/google_message1/proto3/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message1/proto2/cpp_benchmark-benchmark_message1_proto2.pb.$(OBJEXT): \ +cpp/datasets/google_message1/proto2/benchmark-benchmark_message1_proto2.pb.$(OBJEXT): \ cpp/datasets/google_message1/proto2/$(am__dirstamp) \ cpp/datasets/google_message1/proto2/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message2/cpp_benchmark-benchmark_message2.pb.$(OBJEXT): \ +cpp/datasets/google_message2/benchmark-benchmark_message2.pb.$(OBJEXT): \ cpp/datasets/google_message2/$(am__dirstamp) \ cpp/datasets/google_message2/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3.pb.$(OBJEXT): \ +cpp/datasets/google_message3/benchmark-benchmark_message3.pb.$(OBJEXT): \ cpp/datasets/google_message3/$(am__dirstamp) \ cpp/datasets/google_message3/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_1.pb.$(OBJEXT): \ +cpp/datasets/google_message3/benchmark-benchmark_message3_1.pb.$(OBJEXT): \ cpp/datasets/google_message3/$(am__dirstamp) \ cpp/datasets/google_message3/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_2.pb.$(OBJEXT): \ +cpp/datasets/google_message3/benchmark-benchmark_message3_2.pb.$(OBJEXT): \ cpp/datasets/google_message3/$(am__dirstamp) \ cpp/datasets/google_message3/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_3.pb.$(OBJEXT): \ +cpp/datasets/google_message3/benchmark-benchmark_message3_3.pb.$(OBJEXT): \ cpp/datasets/google_message3/$(am__dirstamp) \ cpp/datasets/google_message3/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_4.pb.$(OBJEXT): \ +cpp/datasets/google_message3/benchmark-benchmark_message3_4.pb.$(OBJEXT): \ cpp/datasets/google_message3/$(am__dirstamp) \ cpp/datasets/google_message3/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_5.pb.$(OBJEXT): \ +cpp/datasets/google_message3/benchmark-benchmark_message3_5.pb.$(OBJEXT): \ cpp/datasets/google_message3/$(am__dirstamp) \ cpp/datasets/google_message3/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_6.pb.$(OBJEXT): \ +cpp/datasets/google_message3/benchmark-benchmark_message3_6.pb.$(OBJEXT): \ cpp/datasets/google_message3/$(am__dirstamp) \ cpp/datasets/google_message3/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_7.pb.$(OBJEXT): \ +cpp/datasets/google_message3/benchmark-benchmark_message3_7.pb.$(OBJEXT): \ cpp/datasets/google_message3/$(am__dirstamp) \ cpp/datasets/google_message3/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_8.pb.$(OBJEXT): \ +cpp/datasets/google_message3/benchmark-benchmark_message3_8.pb.$(OBJEXT): \ cpp/datasets/google_message3/$(am__dirstamp) \ cpp/datasets/google_message3/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message4/cpp_benchmark-benchmark_message4.pb.$(OBJEXT): \ +cpp/datasets/google_message4/benchmark-benchmark_message4.pb.$(OBJEXT): \ cpp/datasets/google_message4/$(am__dirstamp) \ cpp/datasets/google_message4/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_1.pb.$(OBJEXT): \ +cpp/datasets/google_message4/benchmark-benchmark_message4_1.pb.$(OBJEXT): \ cpp/datasets/google_message4/$(am__dirstamp) \ cpp/datasets/google_message4/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_2.pb.$(OBJEXT): \ +cpp/datasets/google_message4/benchmark-benchmark_message4_2.pb.$(OBJEXT): \ cpp/datasets/google_message4/$(am__dirstamp) \ cpp/datasets/google_message4/$(DEPDIR)/$(am__dirstamp) -cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_3.pb.$(OBJEXT): \ +cpp/datasets/google_message4/benchmark-benchmark_message4_3.pb.$(OBJEXT): \ cpp/datasets/google_message4/$(am__dirstamp) \ cpp/datasets/google_message4/$(DEPDIR)/$(am__dirstamp) @@ -1318,98 +1416,104 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@cpp/$(DEPDIR)/cpp_benchmark-benchmarks.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/$(DEPDIR)/cpp_benchmark-cpp_benchmark.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/$(DEPDIR)/gogo_data_scrubber-benchmarks.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/$(DEPDIR)/libbenchmark_messages_la-benchmarks.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/$(DEPDIR)/proto3_data_stripper-benchmarks.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto2/$(DEPDIR)/cpp_benchmark-benchmark_message1_proto2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto2/$(DEPDIR)/gogo_data_scrubber-benchmark_message1_proto2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto2/$(DEPDIR)/libbenchmark_messages_la-benchmark_message1_proto2.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto2/$(DEPDIR)/proto3_data_stripper-benchmark_message1_proto2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto3/$(DEPDIR)/cpp_benchmark-benchmark_message1_proto3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto3/$(DEPDIR)/gogo_data_scrubber-benchmark_message1_proto3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message1_proto3.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto3/$(DEPDIR)/proto3_data_stripper-benchmark_message1_proto3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message2/$(DEPDIR)/cpp_benchmark-benchmark_message2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message2/$(DEPDIR)/gogo_data_scrubber-benchmark_message2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message2/$(DEPDIR)/libbenchmark_messages_la-benchmark_message2.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message2/$(DEPDIR)/proto3_data_stripper-benchmark_message2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_1.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_4.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_5.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_6.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_7.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_8.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_1.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_4.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_5.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_6.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_7.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_8.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_1.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_2.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_3.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_4.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_5.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_6.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_7.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_8.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_1.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_4.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_5.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_6.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_7.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_8.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_1.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4_1.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4_2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4_3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4_1.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4_2.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4_3.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4_1.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4_2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4_3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/$(DEPDIR)/cpp_no_group_benchmark-benchmarks.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/$(DEPDIR)/cpp_no_group_benchmark-cpp_benchmark.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message1/proto2/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message1_proto2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message1/proto3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message1_proto3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message2/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_1.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_4.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_5.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_6.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_7.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_8.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4_1.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4_2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4_3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@python/$(DEPDIR)/libbenchmark_messages_la-python_benchmark_messages.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/gogo_data_scrubber-gogo_data_scrubber.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/proto3_data_stripper-proto3_data_stripper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/protoc_gen_gogoproto-protoc-gen-gogoproto.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/protoc_gen_proto2_to_proto3-protoc-gen-proto2_to_proto3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@cpp/$(DEPDIR)/benchmark-benchmarks.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/$(DEPDIR)/benchmark-cpp_benchmark.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/$(DEPDIR)/gogo_data_scrubber-benchmarks.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/$(DEPDIR)/libbenchmark_messages_la-benchmarks.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/$(DEPDIR)/proto3_data_stripper-benchmarks.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto2/$(DEPDIR)/benchmark-benchmark_message1_proto2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto2/$(DEPDIR)/gogo_data_scrubber-benchmark_message1_proto2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto2/$(DEPDIR)/libbenchmark_messages_la-benchmark_message1_proto2.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto2/$(DEPDIR)/proto3_data_stripper-benchmark_message1_proto2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto3/$(DEPDIR)/benchmark-benchmark_message1_proto3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto3/$(DEPDIR)/gogo_data_scrubber-benchmark_message1_proto3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message1_proto3.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message1/proto3/$(DEPDIR)/proto3_data_stripper-benchmark_message1_proto3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message2/$(DEPDIR)/benchmark-benchmark_message2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message2/$(DEPDIR)/gogo_data_scrubber-benchmark_message2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message2/$(DEPDIR)/libbenchmark_messages_la-benchmark_message2.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message2/$(DEPDIR)/proto3_data_stripper-benchmark_message2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_1.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_4.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_5.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_6.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_7.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_8.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_1.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_4.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_5.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_6.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_7.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_8.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_1.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_2.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_3.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_4.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_5.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_6.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_7.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_8.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_1.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_4.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_5.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_6.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_7.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_8.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_1.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4_1.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4_2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4_3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4_1.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4_2.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4_3.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4_1.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4_2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4_3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/$(DEPDIR)/cpp_no_group_benchmark-benchmarks.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/$(DEPDIR)/cpp_no_group_benchmark-cpp_benchmark.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message1/proto2/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message1_proto2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message1/proto3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message1_proto3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message2/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_1.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_4.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_5.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_6.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_7.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_8.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4_1.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4_2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4_3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@python/$(DEPDIR)/libbenchmark_messages_la-python_benchmark_messages.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/gogo_data_scrubber-gogo_data_scrubber.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/proto3_data_stripper-proto3_data_stripper.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/protoc_gen_gogoproto-protoc-gen-gogoproto.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/protoc_gen_proto2_to_proto3-protoc-gen-proto2_to_proto3.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -1561,257 +1665,257 @@ cpp/datasets/google_message4/libbenchmark_messages_la-benchmark_message4_3.pb.lo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbenchmark_messages_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/libbenchmark_messages_la-benchmark_message4_3.pb.lo `test -f 'cpp/datasets/google_message4/benchmark_message4_3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4_3.pb.cc -cpp/cpp_benchmark-cpp_benchmark.o: cpp/cpp_benchmark.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/cpp_benchmark-cpp_benchmark.o -MD -MP -MF cpp/$(DEPDIR)/cpp_benchmark-cpp_benchmark.Tpo -c -o cpp/cpp_benchmark-cpp_benchmark.o `test -f 'cpp/cpp_benchmark.cc' || echo '$(srcdir)/'`cpp/cpp_benchmark.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/$(DEPDIR)/cpp_benchmark-cpp_benchmark.Tpo cpp/$(DEPDIR)/cpp_benchmark-cpp_benchmark.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/cpp_benchmark.cc' object='cpp/cpp_benchmark-cpp_benchmark.o' libtool=no @AMDEPBACKSLASH@ +cpp/benchmark-cpp_benchmark.o: cpp/cpp_benchmark.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/benchmark-cpp_benchmark.o -MD -MP -MF cpp/$(DEPDIR)/benchmark-cpp_benchmark.Tpo -c -o cpp/benchmark-cpp_benchmark.o `test -f 'cpp/cpp_benchmark.cc' || echo '$(srcdir)/'`cpp/cpp_benchmark.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/$(DEPDIR)/benchmark-cpp_benchmark.Tpo cpp/$(DEPDIR)/benchmark-cpp_benchmark.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/cpp_benchmark.cc' object='cpp/benchmark-cpp_benchmark.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/cpp_benchmark-cpp_benchmark.o `test -f 'cpp/cpp_benchmark.cc' || echo '$(srcdir)/'`cpp/cpp_benchmark.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/benchmark-cpp_benchmark.o `test -f 'cpp/cpp_benchmark.cc' || echo '$(srcdir)/'`cpp/cpp_benchmark.cc -cpp/cpp_benchmark-cpp_benchmark.obj: cpp/cpp_benchmark.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/cpp_benchmark-cpp_benchmark.obj -MD -MP -MF cpp/$(DEPDIR)/cpp_benchmark-cpp_benchmark.Tpo -c -o cpp/cpp_benchmark-cpp_benchmark.obj `if test -f 'cpp/cpp_benchmark.cc'; then $(CYGPATH_W) 'cpp/cpp_benchmark.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/cpp_benchmark.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/$(DEPDIR)/cpp_benchmark-cpp_benchmark.Tpo cpp/$(DEPDIR)/cpp_benchmark-cpp_benchmark.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/cpp_benchmark.cc' object='cpp/cpp_benchmark-cpp_benchmark.obj' libtool=no @AMDEPBACKSLASH@ +cpp/benchmark-cpp_benchmark.obj: cpp/cpp_benchmark.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/benchmark-cpp_benchmark.obj -MD -MP -MF cpp/$(DEPDIR)/benchmark-cpp_benchmark.Tpo -c -o cpp/benchmark-cpp_benchmark.obj `if test -f 'cpp/cpp_benchmark.cc'; then $(CYGPATH_W) 'cpp/cpp_benchmark.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/cpp_benchmark.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/$(DEPDIR)/benchmark-cpp_benchmark.Tpo cpp/$(DEPDIR)/benchmark-cpp_benchmark.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/cpp_benchmark.cc' object='cpp/benchmark-cpp_benchmark.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/cpp_benchmark-cpp_benchmark.obj `if test -f 'cpp/cpp_benchmark.cc'; then $(CYGPATH_W) 'cpp/cpp_benchmark.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/cpp_benchmark.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/benchmark-cpp_benchmark.obj `if test -f 'cpp/cpp_benchmark.cc'; then $(CYGPATH_W) 'cpp/cpp_benchmark.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/cpp_benchmark.cc'; fi` -cpp/cpp_benchmark-benchmarks.pb.o: cpp/benchmarks.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/cpp_benchmark-benchmarks.pb.o -MD -MP -MF cpp/$(DEPDIR)/cpp_benchmark-benchmarks.pb.Tpo -c -o cpp/cpp_benchmark-benchmarks.pb.o `test -f 'cpp/benchmarks.pb.cc' || echo '$(srcdir)/'`cpp/benchmarks.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/$(DEPDIR)/cpp_benchmark-benchmarks.pb.Tpo cpp/$(DEPDIR)/cpp_benchmark-benchmarks.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/benchmarks.pb.cc' object='cpp/cpp_benchmark-benchmarks.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/benchmark-benchmarks.pb.o: cpp/benchmarks.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/benchmark-benchmarks.pb.o -MD -MP -MF cpp/$(DEPDIR)/benchmark-benchmarks.pb.Tpo -c -o cpp/benchmark-benchmarks.pb.o `test -f 'cpp/benchmarks.pb.cc' || echo '$(srcdir)/'`cpp/benchmarks.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/$(DEPDIR)/benchmark-benchmarks.pb.Tpo cpp/$(DEPDIR)/benchmark-benchmarks.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/benchmarks.pb.cc' object='cpp/benchmark-benchmarks.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/cpp_benchmark-benchmarks.pb.o `test -f 'cpp/benchmarks.pb.cc' || echo '$(srcdir)/'`cpp/benchmarks.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/benchmark-benchmarks.pb.o `test -f 'cpp/benchmarks.pb.cc' || echo '$(srcdir)/'`cpp/benchmarks.pb.cc -cpp/cpp_benchmark-benchmarks.pb.obj: cpp/benchmarks.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/cpp_benchmark-benchmarks.pb.obj -MD -MP -MF cpp/$(DEPDIR)/cpp_benchmark-benchmarks.pb.Tpo -c -o cpp/cpp_benchmark-benchmarks.pb.obj `if test -f 'cpp/benchmarks.pb.cc'; then $(CYGPATH_W) 'cpp/benchmarks.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/benchmarks.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/$(DEPDIR)/cpp_benchmark-benchmarks.pb.Tpo cpp/$(DEPDIR)/cpp_benchmark-benchmarks.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/benchmarks.pb.cc' object='cpp/cpp_benchmark-benchmarks.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/benchmark-benchmarks.pb.obj: cpp/benchmarks.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/benchmark-benchmarks.pb.obj -MD -MP -MF cpp/$(DEPDIR)/benchmark-benchmarks.pb.Tpo -c -o cpp/benchmark-benchmarks.pb.obj `if test -f 'cpp/benchmarks.pb.cc'; then $(CYGPATH_W) 'cpp/benchmarks.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/benchmarks.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/$(DEPDIR)/benchmark-benchmarks.pb.Tpo cpp/$(DEPDIR)/benchmark-benchmarks.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/benchmarks.pb.cc' object='cpp/benchmark-benchmarks.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/cpp_benchmark-benchmarks.pb.obj `if test -f 'cpp/benchmarks.pb.cc'; then $(CYGPATH_W) 'cpp/benchmarks.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/benchmarks.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/benchmark-benchmarks.pb.obj `if test -f 'cpp/benchmarks.pb.cc'; then $(CYGPATH_W) 'cpp/benchmarks.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/benchmarks.pb.cc'; fi` -cpp/datasets/google_message1/proto3/cpp_benchmark-benchmark_message1_proto3.pb.o: cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message1/proto3/cpp_benchmark-benchmark_message1_proto3.pb.o -MD -MP -MF cpp/datasets/google_message1/proto3/$(DEPDIR)/cpp_benchmark-benchmark_message1_proto3.pb.Tpo -c -o cpp/datasets/google_message1/proto3/cpp_benchmark-benchmark_message1_proto3.pb.o `test -f 'cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message1/proto3/$(DEPDIR)/cpp_benchmark-benchmark_message1_proto3.pb.Tpo cpp/datasets/google_message1/proto3/$(DEPDIR)/cpp_benchmark-benchmark_message1_proto3.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc' object='cpp/datasets/google_message1/proto3/cpp_benchmark-benchmark_message1_proto3.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message1/proto3/benchmark-benchmark_message1_proto3.pb.o: cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message1/proto3/benchmark-benchmark_message1_proto3.pb.o -MD -MP -MF cpp/datasets/google_message1/proto3/$(DEPDIR)/benchmark-benchmark_message1_proto3.pb.Tpo -c -o cpp/datasets/google_message1/proto3/benchmark-benchmark_message1_proto3.pb.o `test -f 'cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message1/proto3/$(DEPDIR)/benchmark-benchmark_message1_proto3.pb.Tpo cpp/datasets/google_message1/proto3/$(DEPDIR)/benchmark-benchmark_message1_proto3.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc' object='cpp/datasets/google_message1/proto3/benchmark-benchmark_message1_proto3.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message1/proto3/cpp_benchmark-benchmark_message1_proto3.pb.o `test -f 'cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message1/proto3/benchmark-benchmark_message1_proto3.pb.o `test -f 'cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc -cpp/datasets/google_message1/proto3/cpp_benchmark-benchmark_message1_proto3.pb.obj: cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message1/proto3/cpp_benchmark-benchmark_message1_proto3.pb.obj -MD -MP -MF cpp/datasets/google_message1/proto3/$(DEPDIR)/cpp_benchmark-benchmark_message1_proto3.pb.Tpo -c -o cpp/datasets/google_message1/proto3/cpp_benchmark-benchmark_message1_proto3.pb.obj `if test -f 'cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message1/proto3/$(DEPDIR)/cpp_benchmark-benchmark_message1_proto3.pb.Tpo cpp/datasets/google_message1/proto3/$(DEPDIR)/cpp_benchmark-benchmark_message1_proto3.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc' object='cpp/datasets/google_message1/proto3/cpp_benchmark-benchmark_message1_proto3.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message1/proto3/benchmark-benchmark_message1_proto3.pb.obj: cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message1/proto3/benchmark-benchmark_message1_proto3.pb.obj -MD -MP -MF cpp/datasets/google_message1/proto3/$(DEPDIR)/benchmark-benchmark_message1_proto3.pb.Tpo -c -o cpp/datasets/google_message1/proto3/benchmark-benchmark_message1_proto3.pb.obj `if test -f 'cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message1/proto3/$(DEPDIR)/benchmark-benchmark_message1_proto3.pb.Tpo cpp/datasets/google_message1/proto3/$(DEPDIR)/benchmark-benchmark_message1_proto3.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc' object='cpp/datasets/google_message1/proto3/benchmark-benchmark_message1_proto3.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message1/proto3/cpp_benchmark-benchmark_message1_proto3.pb.obj `if test -f 'cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message1/proto3/benchmark-benchmark_message1_proto3.pb.obj `if test -f 'cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message1/proto3/benchmark_message1_proto3.pb.cc'; fi` -cpp/datasets/google_message1/proto2/cpp_benchmark-benchmark_message1_proto2.pb.o: cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message1/proto2/cpp_benchmark-benchmark_message1_proto2.pb.o -MD -MP -MF cpp/datasets/google_message1/proto2/$(DEPDIR)/cpp_benchmark-benchmark_message1_proto2.pb.Tpo -c -o cpp/datasets/google_message1/proto2/cpp_benchmark-benchmark_message1_proto2.pb.o `test -f 'cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message1/proto2/$(DEPDIR)/cpp_benchmark-benchmark_message1_proto2.pb.Tpo cpp/datasets/google_message1/proto2/$(DEPDIR)/cpp_benchmark-benchmark_message1_proto2.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc' object='cpp/datasets/google_message1/proto2/cpp_benchmark-benchmark_message1_proto2.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message1/proto2/benchmark-benchmark_message1_proto2.pb.o: cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message1/proto2/benchmark-benchmark_message1_proto2.pb.o -MD -MP -MF cpp/datasets/google_message1/proto2/$(DEPDIR)/benchmark-benchmark_message1_proto2.pb.Tpo -c -o cpp/datasets/google_message1/proto2/benchmark-benchmark_message1_proto2.pb.o `test -f 'cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message1/proto2/$(DEPDIR)/benchmark-benchmark_message1_proto2.pb.Tpo cpp/datasets/google_message1/proto2/$(DEPDIR)/benchmark-benchmark_message1_proto2.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc' object='cpp/datasets/google_message1/proto2/benchmark-benchmark_message1_proto2.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message1/proto2/cpp_benchmark-benchmark_message1_proto2.pb.o `test -f 'cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message1/proto2/benchmark-benchmark_message1_proto2.pb.o `test -f 'cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc -cpp/datasets/google_message1/proto2/cpp_benchmark-benchmark_message1_proto2.pb.obj: cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message1/proto2/cpp_benchmark-benchmark_message1_proto2.pb.obj -MD -MP -MF cpp/datasets/google_message1/proto2/$(DEPDIR)/cpp_benchmark-benchmark_message1_proto2.pb.Tpo -c -o cpp/datasets/google_message1/proto2/cpp_benchmark-benchmark_message1_proto2.pb.obj `if test -f 'cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message1/proto2/$(DEPDIR)/cpp_benchmark-benchmark_message1_proto2.pb.Tpo cpp/datasets/google_message1/proto2/$(DEPDIR)/cpp_benchmark-benchmark_message1_proto2.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc' object='cpp/datasets/google_message1/proto2/cpp_benchmark-benchmark_message1_proto2.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message1/proto2/benchmark-benchmark_message1_proto2.pb.obj: cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message1/proto2/benchmark-benchmark_message1_proto2.pb.obj -MD -MP -MF cpp/datasets/google_message1/proto2/$(DEPDIR)/benchmark-benchmark_message1_proto2.pb.Tpo -c -o cpp/datasets/google_message1/proto2/benchmark-benchmark_message1_proto2.pb.obj `if test -f 'cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message1/proto2/$(DEPDIR)/benchmark-benchmark_message1_proto2.pb.Tpo cpp/datasets/google_message1/proto2/$(DEPDIR)/benchmark-benchmark_message1_proto2.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc' object='cpp/datasets/google_message1/proto2/benchmark-benchmark_message1_proto2.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message1/proto2/cpp_benchmark-benchmark_message1_proto2.pb.obj `if test -f 'cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message1/proto2/benchmark-benchmark_message1_proto2.pb.obj `if test -f 'cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message1/proto2/benchmark_message1_proto2.pb.cc'; fi` -cpp/datasets/google_message2/cpp_benchmark-benchmark_message2.pb.o: cpp/datasets/google_message2/benchmark_message2.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message2/cpp_benchmark-benchmark_message2.pb.o -MD -MP -MF cpp/datasets/google_message2/$(DEPDIR)/cpp_benchmark-benchmark_message2.pb.Tpo -c -o cpp/datasets/google_message2/cpp_benchmark-benchmark_message2.pb.o `test -f 'cpp/datasets/google_message2/benchmark_message2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message2/benchmark_message2.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message2/$(DEPDIR)/cpp_benchmark-benchmark_message2.pb.Tpo cpp/datasets/google_message2/$(DEPDIR)/cpp_benchmark-benchmark_message2.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message2/benchmark_message2.pb.cc' object='cpp/datasets/google_message2/cpp_benchmark-benchmark_message2.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message2/benchmark-benchmark_message2.pb.o: cpp/datasets/google_message2/benchmark_message2.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message2/benchmark-benchmark_message2.pb.o -MD -MP -MF cpp/datasets/google_message2/$(DEPDIR)/benchmark-benchmark_message2.pb.Tpo -c -o cpp/datasets/google_message2/benchmark-benchmark_message2.pb.o `test -f 'cpp/datasets/google_message2/benchmark_message2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message2/benchmark_message2.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message2/$(DEPDIR)/benchmark-benchmark_message2.pb.Tpo cpp/datasets/google_message2/$(DEPDIR)/benchmark-benchmark_message2.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message2/benchmark_message2.pb.cc' object='cpp/datasets/google_message2/benchmark-benchmark_message2.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message2/cpp_benchmark-benchmark_message2.pb.o `test -f 'cpp/datasets/google_message2/benchmark_message2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message2/benchmark_message2.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message2/benchmark-benchmark_message2.pb.o `test -f 'cpp/datasets/google_message2/benchmark_message2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message2/benchmark_message2.pb.cc -cpp/datasets/google_message2/cpp_benchmark-benchmark_message2.pb.obj: cpp/datasets/google_message2/benchmark_message2.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message2/cpp_benchmark-benchmark_message2.pb.obj -MD -MP -MF cpp/datasets/google_message2/$(DEPDIR)/cpp_benchmark-benchmark_message2.pb.Tpo -c -o cpp/datasets/google_message2/cpp_benchmark-benchmark_message2.pb.obj `if test -f 'cpp/datasets/google_message2/benchmark_message2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message2/benchmark_message2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message2/benchmark_message2.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message2/$(DEPDIR)/cpp_benchmark-benchmark_message2.pb.Tpo cpp/datasets/google_message2/$(DEPDIR)/cpp_benchmark-benchmark_message2.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message2/benchmark_message2.pb.cc' object='cpp/datasets/google_message2/cpp_benchmark-benchmark_message2.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message2/benchmark-benchmark_message2.pb.obj: cpp/datasets/google_message2/benchmark_message2.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message2/benchmark-benchmark_message2.pb.obj -MD -MP -MF cpp/datasets/google_message2/$(DEPDIR)/benchmark-benchmark_message2.pb.Tpo -c -o cpp/datasets/google_message2/benchmark-benchmark_message2.pb.obj `if test -f 'cpp/datasets/google_message2/benchmark_message2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message2/benchmark_message2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message2/benchmark_message2.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message2/$(DEPDIR)/benchmark-benchmark_message2.pb.Tpo cpp/datasets/google_message2/$(DEPDIR)/benchmark-benchmark_message2.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message2/benchmark_message2.pb.cc' object='cpp/datasets/google_message2/benchmark-benchmark_message2.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message2/cpp_benchmark-benchmark_message2.pb.obj `if test -f 'cpp/datasets/google_message2/benchmark_message2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message2/benchmark_message2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message2/benchmark_message2.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message2/benchmark-benchmark_message2.pb.obj `if test -f 'cpp/datasets/google_message2/benchmark_message2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message2/benchmark_message2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message2/benchmark_message2.pb.cc'; fi` -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3.pb.o: cpp/datasets/google_message3/benchmark_message3.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3.pb.o: cpp/datasets/google_message3/benchmark_message3.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3.pb.cc -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3.pb.obj: cpp/datasets/google_message3/benchmark_message3.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3.pb.obj: cpp/datasets/google_message3/benchmark_message3.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3.pb.cc'; fi` -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_1.pb.o: cpp/datasets/google_message3/benchmark_message3_1.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_1.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_1.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_1.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_1.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_1.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_1.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_1.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_1.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_1.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_1.pb.o: cpp/datasets/google_message3/benchmark_message3_1.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_1.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_1.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_1.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_1.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_1.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_1.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_1.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_1.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_1.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_1.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_1.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_1.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_1.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_1.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_1.pb.cc -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_1.pb.obj: cpp/datasets/google_message3/benchmark_message3_1.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_1.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_1.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_1.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_1.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_1.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_1.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_1.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_1.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_1.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_1.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_1.pb.obj: cpp/datasets/google_message3/benchmark_message3_1.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_1.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_1.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_1.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_1.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_1.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_1.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_1.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_1.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_1.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_1.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_1.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_1.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_1.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_1.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_1.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_1.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_1.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_1.pb.cc'; fi` -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_2.pb.o: cpp/datasets/google_message3/benchmark_message3_2.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_2.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_2.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_2.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_2.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_2.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_2.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_2.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_2.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_2.pb.o: cpp/datasets/google_message3/benchmark_message3_2.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_2.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_2.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_2.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_2.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_2.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_2.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_2.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_2.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_2.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_2.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_2.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_2.pb.cc -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_2.pb.obj: cpp/datasets/google_message3/benchmark_message3_2.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_2.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_2.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_2.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_2.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_2.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_2.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_2.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_2.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_2.pb.obj: cpp/datasets/google_message3/benchmark_message3_2.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_2.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_2.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_2.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_2.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_2.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_2.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_2.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_2.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_2.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_2.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_2.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_2.pb.cc'; fi` -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_3.pb.o: cpp/datasets/google_message3/benchmark_message3_3.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_3.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_3.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_3.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_3.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_3.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_3.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_3.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_3.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_3.pb.o: cpp/datasets/google_message3/benchmark_message3_3.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_3.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_3.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_3.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_3.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_3.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_3.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_3.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_3.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_3.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_3.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_3.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_3.pb.cc -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_3.pb.obj: cpp/datasets/google_message3/benchmark_message3_3.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_3.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_3.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_3.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_3.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_3.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_3.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_3.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_3.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_3.pb.obj: cpp/datasets/google_message3/benchmark_message3_3.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_3.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_3.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_3.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_3.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_3.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_3.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_3.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_3.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_3.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_3.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_3.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_3.pb.cc'; fi` -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_4.pb.o: cpp/datasets/google_message3/benchmark_message3_4.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_4.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_4.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_4.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_4.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_4.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_4.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_4.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_4.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_4.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_4.pb.o: cpp/datasets/google_message3/benchmark_message3_4.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_4.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_4.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_4.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_4.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_4.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_4.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_4.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_4.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_4.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_4.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_4.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_4.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_4.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_4.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_4.pb.cc -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_4.pb.obj: cpp/datasets/google_message3/benchmark_message3_4.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_4.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_4.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_4.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_4.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_4.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_4.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_4.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_4.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_4.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_4.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_4.pb.obj: cpp/datasets/google_message3/benchmark_message3_4.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_4.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_4.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_4.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_4.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_4.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_4.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_4.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_4.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_4.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_4.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_4.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_4.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_4.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_4.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_4.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_4.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_4.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_4.pb.cc'; fi` -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_5.pb.o: cpp/datasets/google_message3/benchmark_message3_5.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_5.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_5.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_5.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_5.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_5.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_5.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_5.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_5.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_5.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_5.pb.o: cpp/datasets/google_message3/benchmark_message3_5.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_5.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_5.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_5.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_5.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_5.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_5.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_5.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_5.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_5.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_5.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_5.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_5.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_5.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_5.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_5.pb.cc -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_5.pb.obj: cpp/datasets/google_message3/benchmark_message3_5.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_5.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_5.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_5.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_5.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_5.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_5.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_5.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_5.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_5.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_5.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_5.pb.obj: cpp/datasets/google_message3/benchmark_message3_5.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_5.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_5.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_5.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_5.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_5.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_5.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_5.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_5.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_5.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_5.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_5.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_5.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_5.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_5.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_5.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_5.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_5.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_5.pb.cc'; fi` -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_6.pb.o: cpp/datasets/google_message3/benchmark_message3_6.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_6.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_6.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_6.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_6.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_6.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_6.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_6.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_6.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_6.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_6.pb.o: cpp/datasets/google_message3/benchmark_message3_6.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_6.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_6.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_6.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_6.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_6.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_6.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_6.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_6.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_6.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_6.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_6.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_6.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_6.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_6.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_6.pb.cc -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_6.pb.obj: cpp/datasets/google_message3/benchmark_message3_6.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_6.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_6.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_6.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_6.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_6.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_6.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_6.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_6.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_6.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_6.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_6.pb.obj: cpp/datasets/google_message3/benchmark_message3_6.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_6.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_6.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_6.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_6.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_6.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_6.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_6.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_6.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_6.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_6.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_6.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_6.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_6.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_6.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_6.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_6.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_6.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_6.pb.cc'; fi` -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_7.pb.o: cpp/datasets/google_message3/benchmark_message3_7.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_7.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_7.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_7.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_7.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_7.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_7.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_7.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_7.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_7.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_7.pb.o: cpp/datasets/google_message3/benchmark_message3_7.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_7.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_7.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_7.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_7.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_7.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_7.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_7.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_7.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_7.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_7.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_7.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_7.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_7.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_7.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_7.pb.cc -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_7.pb.obj: cpp/datasets/google_message3/benchmark_message3_7.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_7.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_7.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_7.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_7.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_7.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_7.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_7.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_7.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_7.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_7.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_7.pb.obj: cpp/datasets/google_message3/benchmark_message3_7.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_7.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_7.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_7.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_7.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_7.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_7.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_7.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_7.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_7.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_7.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_7.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_7.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_7.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_7.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_7.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_7.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_7.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_7.pb.cc'; fi` -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_8.pb.o: cpp/datasets/google_message3/benchmark_message3_8.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_8.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_8.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_8.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_8.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_8.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_8.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_8.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_8.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_8.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_8.pb.o: cpp/datasets/google_message3/benchmark_message3_8.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_8.pb.o -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_8.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_8.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_8.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_8.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_8.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_8.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_8.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_8.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_8.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_8.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_8.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_8.pb.o `test -f 'cpp/datasets/google_message3/benchmark_message3_8.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message3/benchmark_message3_8.pb.cc -cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_8.pb.obj: cpp/datasets/google_message3/benchmark_message3_8.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_8.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_8.pb.Tpo -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_8.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_8.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_8.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_8.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_8.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/cpp_benchmark-benchmark_message3_8.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_8.pb.cc' object='cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_8.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message3/benchmark-benchmark_message3_8.pb.obj: cpp/datasets/google_message3/benchmark_message3_8.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message3/benchmark-benchmark_message3_8.pb.obj -MD -MP -MF cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_8.pb.Tpo -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_8.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_8.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_8.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_8.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_8.pb.Tpo cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_8.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message3/benchmark_message3_8.pb.cc' object='cpp/datasets/google_message3/benchmark-benchmark_message3_8.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/cpp_benchmark-benchmark_message3_8.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_8.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_8.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_8.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message3/benchmark-benchmark_message3_8.pb.obj `if test -f 'cpp/datasets/google_message3/benchmark_message3_8.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message3/benchmark_message3_8.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message3/benchmark_message3_8.pb.cc'; fi` -cpp/datasets/google_message4/cpp_benchmark-benchmark_message4.pb.o: cpp/datasets/google_message4/benchmark_message4.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/cpp_benchmark-benchmark_message4.pb.o -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4.pb.Tpo -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4.pb.cc' object='cpp/datasets/google_message4/cpp_benchmark-benchmark_message4.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message4/benchmark-benchmark_message4.pb.o: cpp/datasets/google_message4/benchmark_message4.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/benchmark-benchmark_message4.pb.o -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4.pb.Tpo -c -o cpp/datasets/google_message4/benchmark-benchmark_message4.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4.pb.cc' object='cpp/datasets/google_message4/benchmark-benchmark_message4.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/benchmark-benchmark_message4.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4.pb.cc -cpp/datasets/google_message4/cpp_benchmark-benchmark_message4.pb.obj: cpp/datasets/google_message4/benchmark_message4.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/cpp_benchmark-benchmark_message4.pb.obj -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4.pb.Tpo -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4.pb.cc' object='cpp/datasets/google_message4/cpp_benchmark-benchmark_message4.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message4/benchmark-benchmark_message4.pb.obj: cpp/datasets/google_message4/benchmark_message4.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/benchmark-benchmark_message4.pb.obj -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4.pb.Tpo -c -o cpp/datasets/google_message4/benchmark-benchmark_message4.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4.pb.cc' object='cpp/datasets/google_message4/benchmark-benchmark_message4.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/benchmark-benchmark_message4.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4.pb.cc'; fi` -cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_1.pb.o: cpp/datasets/google_message4/benchmark_message4_1.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_1.pb.o -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_1.pb.Tpo -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_1.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4_1.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4_1.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_1.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_1.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4_1.pb.cc' object='cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_1.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message4/benchmark-benchmark_message4_1.pb.o: cpp/datasets/google_message4/benchmark_message4_1.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/benchmark-benchmark_message4_1.pb.o -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_1.pb.Tpo -c -o cpp/datasets/google_message4/benchmark-benchmark_message4_1.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4_1.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4_1.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_1.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_1.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4_1.pb.cc' object='cpp/datasets/google_message4/benchmark-benchmark_message4_1.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_1.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4_1.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4_1.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/benchmark-benchmark_message4_1.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4_1.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4_1.pb.cc -cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_1.pb.obj: cpp/datasets/google_message4/benchmark_message4_1.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_1.pb.obj -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_1.pb.Tpo -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_1.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4_1.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4_1.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4_1.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_1.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_1.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4_1.pb.cc' object='cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_1.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message4/benchmark-benchmark_message4_1.pb.obj: cpp/datasets/google_message4/benchmark_message4_1.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/benchmark-benchmark_message4_1.pb.obj -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_1.pb.Tpo -c -o cpp/datasets/google_message4/benchmark-benchmark_message4_1.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4_1.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4_1.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4_1.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_1.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_1.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4_1.pb.cc' object='cpp/datasets/google_message4/benchmark-benchmark_message4_1.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_1.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4_1.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4_1.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4_1.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/benchmark-benchmark_message4_1.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4_1.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4_1.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4_1.pb.cc'; fi` -cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_2.pb.o: cpp/datasets/google_message4/benchmark_message4_2.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_2.pb.o -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_2.pb.Tpo -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_2.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4_2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4_2.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_2.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_2.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4_2.pb.cc' object='cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_2.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message4/benchmark-benchmark_message4_2.pb.o: cpp/datasets/google_message4/benchmark_message4_2.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/benchmark-benchmark_message4_2.pb.o -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_2.pb.Tpo -c -o cpp/datasets/google_message4/benchmark-benchmark_message4_2.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4_2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4_2.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_2.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_2.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4_2.pb.cc' object='cpp/datasets/google_message4/benchmark-benchmark_message4_2.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_2.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4_2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4_2.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/benchmark-benchmark_message4_2.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4_2.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4_2.pb.cc -cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_2.pb.obj: cpp/datasets/google_message4/benchmark_message4_2.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_2.pb.obj -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_2.pb.Tpo -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_2.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4_2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4_2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4_2.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_2.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_2.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4_2.pb.cc' object='cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_2.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message4/benchmark-benchmark_message4_2.pb.obj: cpp/datasets/google_message4/benchmark_message4_2.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/benchmark-benchmark_message4_2.pb.obj -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_2.pb.Tpo -c -o cpp/datasets/google_message4/benchmark-benchmark_message4_2.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4_2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4_2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4_2.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_2.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_2.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4_2.pb.cc' object='cpp/datasets/google_message4/benchmark-benchmark_message4_2.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_2.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4_2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4_2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4_2.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/benchmark-benchmark_message4_2.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4_2.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4_2.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4_2.pb.cc'; fi` -cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_3.pb.o: cpp/datasets/google_message4/benchmark_message4_3.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_3.pb.o -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_3.pb.Tpo -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_3.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4_3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4_3.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_3.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_3.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4_3.pb.cc' object='cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_3.pb.o' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message4/benchmark-benchmark_message4_3.pb.o: cpp/datasets/google_message4/benchmark_message4_3.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/benchmark-benchmark_message4_3.pb.o -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_3.pb.Tpo -c -o cpp/datasets/google_message4/benchmark-benchmark_message4_3.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4_3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4_3.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_3.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_3.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4_3.pb.cc' object='cpp/datasets/google_message4/benchmark-benchmark_message4_3.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_3.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4_3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4_3.pb.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/benchmark-benchmark_message4_3.pb.o `test -f 'cpp/datasets/google_message4/benchmark_message4_3.pb.cc' || echo '$(srcdir)/'`cpp/datasets/google_message4/benchmark_message4_3.pb.cc -cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_3.pb.obj: cpp/datasets/google_message4/benchmark_message4_3.pb.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_3.pb.obj -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_3.pb.Tpo -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_3.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4_3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4_3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4_3.pb.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_3.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/cpp_benchmark-benchmark_message4_3.pb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4_3.pb.cc' object='cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_3.pb.obj' libtool=no @AMDEPBACKSLASH@ +cpp/datasets/google_message4/benchmark-benchmark_message4_3.pb.obj: cpp/datasets/google_message4/benchmark_message4_3.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cpp/datasets/google_message4/benchmark-benchmark_message4_3.pb.obj -MD -MP -MF cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_3.pb.Tpo -c -o cpp/datasets/google_message4/benchmark-benchmark_message4_3.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4_3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4_3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4_3.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_3.pb.Tpo cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_3.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cpp/datasets/google_message4/benchmark_message4_3.pb.cc' object='cpp/datasets/google_message4/benchmark-benchmark_message4_3.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/cpp_benchmark-benchmark_message4_3.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4_3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4_3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4_3.pb.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cpp/datasets/google_message4/benchmark-benchmark_message4_3.pb.obj `if test -f 'cpp/datasets/google_message4/benchmark_message4_3.pb.cc'; then $(CYGPATH_W) 'cpp/datasets/google_message4/benchmark_message4_3.pb.cc'; else $(CYGPATH_W) '$(srcdir)/cpp/datasets/google_message4/benchmark_message4_3.pb.cc'; fi` gogo/cpp_no_group/cpp_no_group_benchmark-cpp_benchmark.o: gogo/cpp_no_group/cpp_benchmark.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpp_no_group_benchmark_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gogo/cpp_no_group/cpp_no_group_benchmark-cpp_benchmark.o -MD -MP -MF gogo/cpp_no_group/$(DEPDIR)/cpp_no_group_benchmark-cpp_benchmark.Tpo -c -o gogo/cpp_no_group/cpp_no_group_benchmark-cpp_benchmark.o `test -f 'gogo/cpp_no_group/cpp_benchmark.cc' || echo '$(srcdir)/'`gogo/cpp_no_group/cpp_benchmark.cc @@ -2662,7 +2766,10 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -2694,11 +2801,11 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) +all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) install-binPROGRAMS: install-libLTLIBRARIES installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -2767,7 +2874,98 @@ clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool clean-local mostlyclean-am distclean: distclean-am - -rm -rf cpp/$(DEPDIR) cpp/datasets/google_message1/proto2/$(DEPDIR) cpp/datasets/google_message1/proto3/$(DEPDIR) cpp/datasets/google_message2/$(DEPDIR) cpp/datasets/google_message3/$(DEPDIR) cpp/datasets/google_message4/$(DEPDIR) gogo/cpp_no_group/$(DEPDIR) gogo/cpp_no_group/datasets/google_message1/proto2/$(DEPDIR) gogo/cpp_no_group/datasets/google_message1/proto3/$(DEPDIR) gogo/cpp_no_group/datasets/google_message2/$(DEPDIR) gogo/cpp_no_group/datasets/google_message3/$(DEPDIR) gogo/cpp_no_group/datasets/google_message4/$(DEPDIR) python/$(DEPDIR) util/$(DEPDIR) + -rm -f cpp/$(DEPDIR)/benchmark-benchmarks.pb.Po + -rm -f cpp/$(DEPDIR)/benchmark-cpp_benchmark.Po + -rm -f cpp/$(DEPDIR)/gogo_data_scrubber-benchmarks.pb.Po + -rm -f cpp/$(DEPDIR)/libbenchmark_messages_la-benchmarks.pb.Plo + -rm -f cpp/$(DEPDIR)/proto3_data_stripper-benchmarks.pb.Po + -rm -f cpp/datasets/google_message1/proto2/$(DEPDIR)/benchmark-benchmark_message1_proto2.pb.Po + -rm -f cpp/datasets/google_message1/proto2/$(DEPDIR)/gogo_data_scrubber-benchmark_message1_proto2.pb.Po + -rm -f cpp/datasets/google_message1/proto2/$(DEPDIR)/libbenchmark_messages_la-benchmark_message1_proto2.pb.Plo + -rm -f cpp/datasets/google_message1/proto2/$(DEPDIR)/proto3_data_stripper-benchmark_message1_proto2.pb.Po + -rm -f cpp/datasets/google_message1/proto3/$(DEPDIR)/benchmark-benchmark_message1_proto3.pb.Po + -rm -f cpp/datasets/google_message1/proto3/$(DEPDIR)/gogo_data_scrubber-benchmark_message1_proto3.pb.Po + -rm -f cpp/datasets/google_message1/proto3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message1_proto3.pb.Plo + -rm -f cpp/datasets/google_message1/proto3/$(DEPDIR)/proto3_data_stripper-benchmark_message1_proto3.pb.Po + -rm -f cpp/datasets/google_message2/$(DEPDIR)/benchmark-benchmark_message2.pb.Po + -rm -f cpp/datasets/google_message2/$(DEPDIR)/gogo_data_scrubber-benchmark_message2.pb.Po + -rm -f cpp/datasets/google_message2/$(DEPDIR)/libbenchmark_messages_la-benchmark_message2.pb.Plo + -rm -f cpp/datasets/google_message2/$(DEPDIR)/proto3_data_stripper-benchmark_message2.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_1.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_2.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_3.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_4.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_5.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_6.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_7.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_8.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_1.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_2.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_3.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_4.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_5.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_6.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_7.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_8.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_1.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_2.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_3.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_4.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_5.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_6.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_7.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_8.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_1.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_2.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_3.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_4.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_5.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_6.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_7.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_8.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_1.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_2.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_3.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4_1.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4_2.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4_3.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4.pb.Plo + -rm -f cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4_1.pb.Plo + -rm -f cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4_2.pb.Plo + -rm -f cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4_3.pb.Plo + -rm -f cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4_1.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4_2.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4_3.pb.Po + -rm -f gogo/cpp_no_group/$(DEPDIR)/cpp_no_group_benchmark-benchmarks.pb.Po + -rm -f gogo/cpp_no_group/$(DEPDIR)/cpp_no_group_benchmark-cpp_benchmark.Po + -rm -f gogo/cpp_no_group/datasets/google_message1/proto2/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message1_proto2.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message1/proto3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message1_proto3.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message2/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message2.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_1.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_2.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_3.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_4.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_5.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_6.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_7.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_8.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4_1.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4_2.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4_3.pb.Po + -rm -f python/$(DEPDIR)/libbenchmark_messages_la-python_benchmark_messages.Plo + -rm -f util/$(DEPDIR)/gogo_data_scrubber-gogo_data_scrubber.Po + -rm -f util/$(DEPDIR)/proto3_data_stripper-proto3_data_stripper.Po + -rm -f util/$(DEPDIR)/protoc_gen_gogoproto-protoc-gen-gogoproto.Po + -rm -f util/$(DEPDIR)/protoc_gen_proto2_to_proto3-protoc-gen-proto2_to_proto3.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -2813,7 +3011,98 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf cpp/$(DEPDIR) cpp/datasets/google_message1/proto2/$(DEPDIR) cpp/datasets/google_message1/proto3/$(DEPDIR) cpp/datasets/google_message2/$(DEPDIR) cpp/datasets/google_message3/$(DEPDIR) cpp/datasets/google_message4/$(DEPDIR) gogo/cpp_no_group/$(DEPDIR) gogo/cpp_no_group/datasets/google_message1/proto2/$(DEPDIR) gogo/cpp_no_group/datasets/google_message1/proto3/$(DEPDIR) gogo/cpp_no_group/datasets/google_message2/$(DEPDIR) gogo/cpp_no_group/datasets/google_message3/$(DEPDIR) gogo/cpp_no_group/datasets/google_message4/$(DEPDIR) python/$(DEPDIR) util/$(DEPDIR) + -rm -f cpp/$(DEPDIR)/benchmark-benchmarks.pb.Po + -rm -f cpp/$(DEPDIR)/benchmark-cpp_benchmark.Po + -rm -f cpp/$(DEPDIR)/gogo_data_scrubber-benchmarks.pb.Po + -rm -f cpp/$(DEPDIR)/libbenchmark_messages_la-benchmarks.pb.Plo + -rm -f cpp/$(DEPDIR)/proto3_data_stripper-benchmarks.pb.Po + -rm -f cpp/datasets/google_message1/proto2/$(DEPDIR)/benchmark-benchmark_message1_proto2.pb.Po + -rm -f cpp/datasets/google_message1/proto2/$(DEPDIR)/gogo_data_scrubber-benchmark_message1_proto2.pb.Po + -rm -f cpp/datasets/google_message1/proto2/$(DEPDIR)/libbenchmark_messages_la-benchmark_message1_proto2.pb.Plo + -rm -f cpp/datasets/google_message1/proto2/$(DEPDIR)/proto3_data_stripper-benchmark_message1_proto2.pb.Po + -rm -f cpp/datasets/google_message1/proto3/$(DEPDIR)/benchmark-benchmark_message1_proto3.pb.Po + -rm -f cpp/datasets/google_message1/proto3/$(DEPDIR)/gogo_data_scrubber-benchmark_message1_proto3.pb.Po + -rm -f cpp/datasets/google_message1/proto3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message1_proto3.pb.Plo + -rm -f cpp/datasets/google_message1/proto3/$(DEPDIR)/proto3_data_stripper-benchmark_message1_proto3.pb.Po + -rm -f cpp/datasets/google_message2/$(DEPDIR)/benchmark-benchmark_message2.pb.Po + -rm -f cpp/datasets/google_message2/$(DEPDIR)/gogo_data_scrubber-benchmark_message2.pb.Po + -rm -f cpp/datasets/google_message2/$(DEPDIR)/libbenchmark_messages_la-benchmark_message2.pb.Plo + -rm -f cpp/datasets/google_message2/$(DEPDIR)/proto3_data_stripper-benchmark_message2.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_1.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_2.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_3.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_4.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_5.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_6.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_7.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/benchmark-benchmark_message3_8.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_1.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_2.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_3.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_4.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_5.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_6.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_7.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/gogo_data_scrubber-benchmark_message3_8.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_1.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_2.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_3.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_4.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_5.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_6.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_7.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/libbenchmark_messages_la-benchmark_message3_8.pb.Plo + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_1.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_2.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_3.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_4.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_5.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_6.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_7.pb.Po + -rm -f cpp/datasets/google_message3/$(DEPDIR)/proto3_data_stripper-benchmark_message3_8.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_1.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_2.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/benchmark-benchmark_message4_3.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4_1.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4_2.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/gogo_data_scrubber-benchmark_message4_3.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4.pb.Plo + -rm -f cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4_1.pb.Plo + -rm -f cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4_2.pb.Plo + -rm -f cpp/datasets/google_message4/$(DEPDIR)/libbenchmark_messages_la-benchmark_message4_3.pb.Plo + -rm -f cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4_1.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4_2.pb.Po + -rm -f cpp/datasets/google_message4/$(DEPDIR)/proto3_data_stripper-benchmark_message4_3.pb.Po + -rm -f gogo/cpp_no_group/$(DEPDIR)/cpp_no_group_benchmark-benchmarks.pb.Po + -rm -f gogo/cpp_no_group/$(DEPDIR)/cpp_no_group_benchmark-cpp_benchmark.Po + -rm -f gogo/cpp_no_group/datasets/google_message1/proto2/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message1_proto2.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message1/proto3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message1_proto3.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message2/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message2.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_1.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_2.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_3.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_4.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_5.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_6.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_7.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message3/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message3_8.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4_1.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4_2.pb.Po + -rm -f gogo/cpp_no_group/datasets/google_message4/$(DEPDIR)/cpp_no_group_benchmark-benchmark_message4_3.pb.Po + -rm -f python/$(DEPDIR)/libbenchmark_messages_la-python_benchmark_messages.Plo + -rm -f util/$(DEPDIR)/gogo_data_scrubber-gogo_data_scrubber.Po + -rm -f util/$(DEPDIR)/proto3_data_stripper-proto3_data_stripper.Po + -rm -f util/$(DEPDIR)/protoc_gen_gogoproto-protoc-gen-gogoproto.Po + -rm -f util/$(DEPDIR)/protoc_gen_proto2_to_proto3-protoc-gen-proto2_to_proto3.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -2834,7 +3123,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool clean-local cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ diff --git a/third_party/protobuf/benchmarks/benchmarks.proto b/third_party/protobuf/benchmarks/benchmarks.proto new file mode 100644 index 00000000..51c0b548 --- /dev/null +++ b/third_party/protobuf/benchmarks/benchmarks.proto @@ -0,0 +1,63 @@ +// 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. + +syntax = "proto3"; +package benchmarks; +option java_package = "com.google.protobuf.benchmarks"; + +message BenchmarkDataset { + // Name of the benchmark dataset. This should be unique across all datasets. + // Should only contain word characters: [a-zA-Z0-9_] + string name = 1; + + // Fully-qualified name of the protobuf message for this dataset. + // It will be one of the messages defined benchmark_messages_proto2.proto + // or benchmark_messages_proto3.proto. + // + // Implementations that do not support reflection can implement this with + // an explicit "if/else" chain that lists every known message defined + // in those files. + string message_name = 2; + + // The payload(s) for this dataset. They should be parsed or serialized + // in sequence, in a loop, ie. + // + // while (!benchmarkDone) { // Benchmark runner decides when to exit. + // for (i = 0; i < benchmark.payload.length; i++) { + // parse(benchmark.payload[i]) + // } + // } + // + // This is intended to let datasets include a variety of data to provide + // potentially more realistic results than just parsing the same message + // over and over. A single message parsed repeatedly could yield unusually + // good branch prediction performance. + repeated bytes payload = 3; +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message1/proto2/benchmark_message1_proto2.proto b/third_party/protobuf/benchmarks/datasets/google_message1/proto2/benchmark_message1_proto2.proto new file mode 100644 index 00000000..e404b9fe --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message1/proto2/benchmark_message1_proto2.proto @@ -0,0 +1,108 @@ +// 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. + +// Benchmark messages for proto2. + +syntax = "proto2"; + +package benchmarks.proto2; +option java_package = "com.google.protobuf.benchmarks"; + +// This is the default, but we specify it here explicitly. +option optimize_for = SPEED; + +option cc_enable_arenas = true; + +message GoogleMessage1 { + required string field1 = 1; + optional string field9 = 9; + optional string field18 = 18; + optional bool field80 = 80 [default = false]; + optional bool field81 = 81 [default = true]; + required int32 field2 = 2; + required int32 field3 = 3; + optional int32 field280 = 280; + optional int32 field6 = 6 [default = 0]; + optional int64 field22 = 22; + optional string field4 = 4; + repeated fixed64 field5 = 5; + optional bool field59 = 59 [default = false]; + optional string field7 = 7; + optional int32 field16 = 16; + optional int32 field130 = 130 [default = 0]; + optional bool field12 = 12 [default = true]; + optional bool field17 = 17 [default = true]; + optional bool field13 = 13 [default = true]; + optional bool field14 = 14 [default = true]; + optional int32 field104 = 104 [default = 0]; + optional int32 field100 = 100 [default = 0]; + optional int32 field101 = 101 [default = 0]; + optional string field102 = 102; + optional string field103 = 103; + optional int32 field29 = 29 [default = 0]; + optional bool field30 = 30 [default = false]; + optional int32 field60 = 60 [default = -1]; + optional int32 field271 = 271 [default = -1]; + optional int32 field272 = 272 [default = -1]; + optional int32 field150 = 150; + optional int32 field23 = 23 [default = 0]; + optional bool field24 = 24 [default = false]; + optional int32 field25 = 25 [default = 0]; + optional GoogleMessage1SubMessage field15 = 15; + optional bool field78 = 78; + optional int32 field67 = 67 [default = 0]; + optional int32 field68 = 68; + optional int32 field128 = 128 [default = 0]; + optional string field129 = 129 [default = "xxxxxxxxxxxxxxxxxxxxx"]; + optional int32 field131 = 131 [default = 0]; +} + +message GoogleMessage1SubMessage { + optional int32 field1 = 1 [default = 0]; + optional int32 field2 = 2 [default = 0]; + optional int32 field3 = 3 [default = 0]; + optional string field15 = 15; + optional bool field12 = 12 [default = true]; + optional int64 field13 = 13; + optional int64 field14 = 14; + optional int32 field16 = 16; + optional int32 field19 = 19 [default = 2]; + optional bool field20 = 20 [default = true]; + optional bool field28 = 28 [default = true]; + optional fixed64 field21 = 21; + optional int32 field22 = 22; + optional bool field23 = 23 [default = false]; + optional bool field206 = 206 [default = false]; + optional fixed32 field203 = 203; + optional int32 field204 = 204; + optional string field205 = 205; + optional uint64 field207 = 207; + optional uint64 field300 = 300; +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message1/proto3/benchmark_message1_proto3.proto b/third_party/protobuf/benchmarks/datasets/google_message1/proto3/benchmark_message1_proto3.proto new file mode 100644 index 00000000..8aee2f67 --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message1/proto3/benchmark_message1_proto3.proto @@ -0,0 +1,108 @@ +// 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. + +// Benchmark messages for proto3. + +syntax = "proto3"; + +package benchmarks.proto3; +option java_package = "com.google.protobuf.benchmarks"; + +// This is the default, but we specify it here explicitly. +option optimize_for = SPEED; + +option cc_enable_arenas = true; + +message GoogleMessage1 { + string field1 = 1; + string field9 = 9; + string field18 = 18; + bool field80 = 80; + bool field81 = 81; + int32 field2 = 2; + int32 field3 = 3; + int32 field280 = 280; + int32 field6 = 6; + int64 field22 = 22; + string field4 = 4; + repeated fixed64 field5 = 5; + bool field59 = 59; + string field7 = 7; + int32 field16 = 16; + int32 field130 = 130; + bool field12 = 12; + bool field17 = 17; + bool field13 = 13; + bool field14 = 14; + int32 field104 = 104; + int32 field100 = 100; + int32 field101 = 101; + string field102 = 102; + string field103 = 103; + int32 field29 = 29; + bool field30 = 30; + int32 field60 = 60; + int32 field271 = 271; + int32 field272 = 272; + int32 field150 = 150; + int32 field23 = 23; + bool field24 = 24; + int32 field25 = 25; + GoogleMessage1SubMessage field15 = 15; + bool field78 = 78; + int32 field67 = 67; + int32 field68 = 68; + int32 field128 = 128; + string field129 = 129; + int32 field131 = 131; +} + +message GoogleMessage1SubMessage { + int32 field1 = 1; + int32 field2 = 2; + int32 field3 = 3; + string field15 = 15; + bool field12 = 12; + int64 field13 = 13; + int64 field14 = 14; + int32 field16 = 16; + int32 field19 = 19; + bool field20 = 20; + bool field28 = 28; + fixed64 field21 = 21; + int32 field22 = 22; + bool field23 = 23; + bool field206 = 206; + fixed32 field203 = 203; + int32 field204 = 204; + string field205 = 205; + uint64 field207 = 207; + uint64 field300 = 300; +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message2/benchmark_message2.proto b/third_party/protobuf/benchmarks/datasets/google_message2/benchmark_message2.proto new file mode 100644 index 00000000..500c5d69 --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message2/benchmark_message2.proto @@ -0,0 +1,108 @@ +// 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. + +// LINT: ALLOW_GROUPS + +// Benchmark messages for proto2. + +syntax = "proto2"; + +package benchmarks.proto2; +option java_package = "com.google.protobuf.benchmarks"; + +// This is the default, but we specify it here explicitly. +option optimize_for = SPEED; + +option cc_enable_arenas = true; + +message GoogleMessage2 { + optional string field1 = 1; + optional int64 field3 = 3; + optional int64 field4 = 4; + optional int64 field30 = 30; + optional bool field75 = 75 [default = false]; + optional string field6 = 6; + optional bytes field2 = 2; + optional int32 field21 = 21 [default = 0]; + optional int32 field71 = 71; + optional float field25 = 25; + optional int32 field109 = 109 [default = 0]; + optional int32 field210 = 210 [default = 0]; + optional int32 field211 = 211 [default = 0]; + optional int32 field212 = 212 [default = 0]; + optional int32 field213 = 213 [default = 0]; + optional int32 field216 = 216 [default = 0]; + optional int32 field217 = 217 [default = 0]; + optional int32 field218 = 218 [default = 0]; + optional int32 field220 = 220 [default = 0]; + optional int32 field221 = 221 [default = 0]; + optional float field222 = 222 [default = 0.0]; + optional int32 field63 = 63; + + repeated group Group1 = 10 { + required float field11 = 11; + optional float field26 = 26; + optional string field12 = 12; + optional string field13 = 13; + repeated string field14 = 14; + required uint64 field15 = 15; + optional int32 field5 = 5; + optional string field27 = 27; + optional int32 field28 = 28; + optional string field29 = 29; + optional string field16 = 16; + repeated string field22 = 22; + repeated int32 field73 = 73; + optional int32 field20 = 20 [default = 0]; + optional string field24 = 24; + optional GoogleMessage2GroupedMessage field31 = 31; + } + repeated string field128 = 128; + optional int64 field131 = 131; + repeated string field127 = 127; + optional int32 field129 = 129; + repeated int64 field130 = 130; + optional bool field205 = 205 [default = false]; + optional bool field206 = 206 [default = false]; +} + +message GoogleMessage2GroupedMessage { + optional float field1 = 1; + optional float field2 = 2; + optional float field3 = 3 [default = 0.0]; + optional bool field4 = 4; + optional bool field5 = 5; + optional bool field6 = 6 [default = true]; + optional bool field7 = 7 [default = false]; + optional float field8 = 8; + optional bool field9 = 9; + optional float field10 = 10; + optional int64 field11 = 11; +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3.proto b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3.proto new file mode 100644 index 00000000..82422f92 --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3.proto @@ -0,0 +1,566 @@ +// 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. + +// LINT: ALLOW_GROUPS + +syntax = "proto2"; + +package benchmarks.google_message3; + +import "datasets/google_message3/benchmark_message3_1.proto"; +import "datasets/google_message3/benchmark_message3_2.proto"; +import "datasets/google_message3/benchmark_message3_3.proto"; +import "datasets/google_message3/benchmark_message3_4.proto"; +import "datasets/google_message3/benchmark_message3_5.proto"; +import "datasets/google_message3/benchmark_message3_7.proto"; +import "datasets/google_message3/benchmark_message3_8.proto"; + +option cc_enable_arenas = true; +option java_package = "com.google.protobuf.benchmarks"; + +message GoogleMessage3 { + optional .benchmarks.google_message3.Message37487 field37519 = 2; + optional .benchmarks.google_message3.Message36876 field37520 = 3; + optional .benchmarks.google_message3.Message13062 field37521 = 4; + optional .benchmarks.google_message3.Message952 field37522 = 5; + optional .benchmarks.google_message3.UnusedEmptyMessage field37523 = 6; + optional .benchmarks.google_message3.UnusedEmptyMessage field37524 = 7; + optional .benchmarks.google_message3.UnusedEmptyMessage field37525 = 8; + optional .benchmarks.google_message3.UnusedEmptyMessage field37526 = 9; + optional .benchmarks.google_message3.UnusedEmptyMessage field37527 = 10; + optional .benchmarks.google_message3.UnusedEmptyMessage field37528 = 11; + optional .benchmarks.google_message3.UnusedEmptyMessage field37529 = 12; + optional .benchmarks.google_message3.UnusedEmptyMessage field37530 = 13; + optional .benchmarks.google_message3.UnusedEmptyMessage field37531 = 14; + optional .benchmarks.google_message3.UnusedEmptyMessage field37532 = 15; + optional .benchmarks.google_message3.UnusedEmptyMessage field37533 = 16; +} + +message Message1327 { + repeated .benchmarks.google_message3.UnusedEmptyMessage field1369 = 1; + repeated .benchmarks.google_message3.Message1328 field1370 = 3; + repeated .benchmarks.google_message3.UnusedEmptyMessage field1371 = 5; + repeated .benchmarks.google_message3.UnusedEmptyMessage field1372 = 6; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message1327 field1373 = 23104162; + } +} + +message Message3672 { + optional .benchmarks.google_message3.Enum3476 field3727 = 1; + optional int32 field3728 = 11; + optional int32 field3729 = 2; + repeated group Message3673 = 3 { + required .benchmarks.google_message3.Enum3476 field3738 = 4; + required int32 field3739 = 5; + } + repeated group Message3674 = 6 { + required .benchmarks.google_message3.Enum3476 field3740 = 7; + required int32 field3741 = 8; + } + optional bool field3732 = 9; + optional int32 field3733 = 10; + optional .benchmarks.google_message3.Enum3476 field3734 = 20; + optional int32 field3735 = 21; + optional .benchmarks.google_message3.UnusedEmptyMessage field3736 = 50; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message3672 field3737 = 3144435; + } +} + +message Message3804 { + required int64 field3818 = 1; + required bool field3819 = 2; + repeated .benchmarks.google_message3.Enum3805 field3820 = 4; + optional int32 field3821 = 5; + optional bool field3822 = 6; + optional int64 field3823 = 7; + optional .benchmarks.google_message3.Enum3783 field3824 = 8; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message3804 field3825 = 59241828; + } +} + +message Message6849 { + repeated .benchmarks.google_message3.Message6850 field6910 = 1; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message6849 field6911 = 107558455; + } +} + +message Message6866 { + repeated .benchmarks.google_message3.Message6863 field6973 = 1; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message6866 field6974 = 22259060; + } +} + +message Message6870 { + repeated .benchmarks.google_message3.Message6871 field6991 = 1; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message6870 field6992 = 90034652; + } +} + +message Message7651 { + optional string field7685 = 1; + optional int64 field7686 = 2; + optional int64 field7687 = 3; + optional int64 field7688 = 4; + optional int32 field7689 = 5; + optional int32 field7690 = 6; + optional int32 field7691 = 7; + optional int32 field7692 = 8; + optional int32 field7693 = 9; + optional int32 field7694 = 10; + optional int32 field7695 = 11; + optional int32 field7696 = 12; + optional int32 field7697 = 13; + optional int32 field7698 = 14; + optional int32 field7699 = 15; + optional int32 field7700 = 16; + optional int32 field7701 = 17; + optional int32 field7702 = 18; + optional bool field7703 = 19; + repeated int32 field7704 = 20; + repeated int32 field7705 = 21; + repeated string field7706 = 22; + repeated string field7707 = 23; + optional .benchmarks.google_message3.UnusedEmptyMessage field7708 = 24; + optional int32 field7709 = 25; + optional int32 field7710 = 26; + optional int32 field7711 = 27; + optional int32 field7712 = 43; + optional int32 field7713 = 28; + optional int32 field7714 = 29; + repeated .benchmarks.google_message3.Message7547 field7715 = 30; + repeated .benchmarks.google_message3.Message7547 field7716 = 31; + repeated .benchmarks.google_message3.UnusedEmptyMessage field7717 = 32; + repeated string field7718 = 33; + repeated string field7719 = 34; + repeated .benchmarks.google_message3.Message7648 field7720 = 35; + optional bool field7721 = 36; + optional bool field7722 = 37; + optional bool field7723 = 38; + optional bool field7724 = 39; + optional .benchmarks.google_message3.UnusedEmptyMessage field7725 = 40; + optional .benchmarks.google_message3.UnusedEnum field7726 = 41; + optional .benchmarks.google_message3.Enum7654 field7727 = 42; + optional string field7728 = 44; + optional .benchmarks.google_message3.UnusedEmptyMessage field7729 = 45; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message7651 field7730 = 55876009; + } +} + +message Message7864 { + optional string field7866 = 1; + optional string field7867 = 2; + repeated .benchmarks.google_message3.Message7865 field7868 = 5; + repeated .benchmarks.google_message3.Message7865 field7869 = 6; + repeated .benchmarks.google_message3.Message7865 field7870 = 7; + repeated .benchmarks.google_message3.UnusedEmptyMessage field7871 = 8; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message7864 field7872 = 44542730; + } +} + +message Message7929 { + optional int64 field7942 = 1; + optional int64 field7943 = 4; + optional int64 field7944 = 5; + optional int64 field7945 = 12; + optional int64 field7946 = 13; + optional int64 field7947 = 18; + optional int64 field7948 = 6; + optional int64 field7949 = 7; + repeated .benchmarks.google_message3.Message7919 field7950 = 8; + repeated .benchmarks.google_message3.UnusedEmptyMessage field7951 = 20; + repeated .benchmarks.google_message3.Message7920 field7952 = 14; + repeated .benchmarks.google_message3.Message7921 field7953 = 15; + repeated .benchmarks.google_message3.Message7928 field7954 = 17; + optional int64 field7955 = 19; + optional bool field7956 = 2; + optional int64 field7957 = 3; + optional int64 field7958 = 9; + repeated .benchmarks.google_message3.UnusedEmptyMessage field7959 = 10; + repeated bytes field7960 = 11; + optional int64 field7961 = 16; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message7929 field7962 = 53392238; + } +} + +message Message8508 { + repeated .benchmarks.google_message3.Message8511 field8517 = 8; + repeated .benchmarks.google_message3.Message8512 field8518 = 9; + repeated .benchmarks.google_message3.Message8513 field8519 = 11; + optional bool field8520 = 13; + optional .benchmarks.google_message3.Message8514 field8521 = 14; + repeated .benchmarks.google_message3.UnusedEmptyMessage field8522 = 15; + repeated .benchmarks.google_message3.Message8515 field8523 = 16; + repeated .benchmarks.google_message3.UnusedEmptyMessage field8524 = 17; + optional int64 field8525 = 1; + optional float field8526 = 2; + optional int64 field8527 = 3; + optional int64 field8528 = 4; + optional int32 field8529 = 5; + optional bytes field8530 = 6; + repeated bytes field8531 = 7; + optional bool field8532 = 10; + optional bytes field8533 = 12; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message8508 field8534 = 3811804; + } +} + +message Message9122 { + optional float field9132 = 1; + optional float field9133 = 2; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message9122 field9134 = 120398939; + } +} + +message Message10177 { + repeated .benchmarks.google_message3.Message10155 field10270 = 1; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message10177 field10271 = 26801105; + } +} + +message Message10278 { + repeated int32 field10286 = 1 [packed = true]; + repeated int32 field10287 = 2 [packed = true]; + optional int32 field10288 = 3; + extend .benchmarks.google_message3.Message10155 { + optional .benchmarks.google_message3.Message10278 field10289 = 29374161; + } +} + +message Message10323 { + repeated .benchmarks.google_message3.Message10320 field10360 = 1; + extend .benchmarks.google_message3.Message10155 { + optional .benchmarks.google_message3.Message10323 field10361 = 27922524; + } +} + +message Message10324 { + repeated .benchmarks.google_message3.Message10322 field10362 = 1; + optional .benchmarks.google_message3.Message10321 field10363 = 2; + extend .benchmarks.google_message3.Message10155 { + optional .benchmarks.google_message3.Message10324 field10364 = 27832297; + } +} + +message Message11990 { + repeated .benchmarks.google_message3.Message11988 field12030 = 1; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message11990 field12031 = 21265426; + } +} + +message Message12691 { + optional string field12713 = 1; + optional int32 field12714 = 2; + optional .benchmarks.google_message3.Message12668 field12715 = 3; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message12691 field12716 = 28426536; + } +} + +message Message12870 { + required int32 field12879 = 1; + optional int32 field12880 = 7; + required int32 field12881 = 2; + optional uint64 field12882 = 3; + optional string field12883 = 2001; + optional fixed64 field12884 = 4; + repeated fixed64 field12885 = 14; + optional int32 field12886 = 9; + optional int64 field12887 = 18; + repeated .benchmarks.google_message3.Message12870 field12888 = 8; + optional int32 field12889 = 5; + optional uint64 field12890 = 6; + optional int32 field12891 = 10; + optional int32 field12892 = 11; + optional double field12893 = 12; + optional .benchmarks.google_message3.Message12825 field12894 = 13; + optional double field12895 = 15; + optional string field12896 = 16; + optional .benchmarks.google_message3.Enum12871 field12897 = 17; + optional int32 field12898 = 19; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message12870 field12899 = 5447656; + } +} + +message Message13154 { + required float field13164 = 1; + required float field13165 = 2; + extend .benchmarks.google_message3.Message13145 { + optional .benchmarks.google_message3.Message13154 field13166 = 47301086; + } +} + +message Message16507 { + optional bool field16510 = 3; + optional bool field16511 = 4; + optional bool field16512 = 14; + repeated string field16513 = 5; + repeated string field16514 = 6; + optional string field16515 = 8; + repeated int32 field16516 = 9; + repeated int32 field16517 = 10; + optional int32 field16518 = 7; + optional string field16519 = 15; + repeated string field16520 = 11; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16521 = 27; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16522 = 22; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16523 = 28; + optional string field16524 = 18; + optional int32 field16525 = 19; + optional int32 field16526 = 20; + optional .benchmarks.google_message3.UnusedEmptyMessage field16527 = 23; + optional bool field16528 = 24; + repeated string field16529 = 25; + optional double field16530 = 26; + optional .benchmarks.google_message3.Message16478 field16531 = 30; + optional bool field16532 = 31; + optional string field16533 = 32; + optional bool field16534 = 33; + optional bool field16535 = 35; + optional bool field16536 = 36; + optional bool field16537 = 37; + optional bool field16538 = 38; + optional bool field16539 = 39; + optional bool field16540 = 40; + repeated string field16541 = 41; + extensions 21 to 21; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message16507 field16542 = 5569941; + } +} + +message Message16564 { + repeated .benchmarks.google_message3.Message16552 field16568 = 1; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message16564 field16569 = 25830030; + } +} + +message Message16661 { + repeated .benchmarks.google_message3.Message16660 field16671 = 1; + repeated uint64 field16672 = 2; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message16661 field16673 = 31274398; + } +} + +message Message16746 { + repeated .benchmarks.google_message3.Message16727 field16806 = 1; + optional bool field16807 = 2; + optional bool field16808 = 3; + repeated .benchmarks.google_message3.Message16725 field16809 = 4; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message16746 field16810 = 28406765; + } +} + +message Message17786 { + repeated group Message17787 = 1 { + required int32 field18177 = 2; + required int32 field18178 = 3; + optional .benchmarks.google_message3.Message17783 field18179 = 4; + optional .benchmarks.google_message3.UnusedEmptyMessage field18180 = 5; + optional .benchmarks.google_message3.UnusedEmptyMessage field18181 = 6; + repeated .benchmarks.google_message3.UnusedEmptyMessage field18182 = 8; + optional .benchmarks.google_message3.UnusedEmptyMessage field18183 = 9; + optional .benchmarks.google_message3.Message17726 field18184 = 10; + optional .benchmarks.google_message3.UnusedEmptyMessage field18185 = 11; + optional .benchmarks.google_message3.Message16945 field18186 = 102; + optional .benchmarks.google_message3.UnusedEmptyMessage field18187 = 12; + optional .benchmarks.google_message3.UnusedEmptyMessage field18188 = 13; + optional .benchmarks.google_message3.UnusedEmptyMessage field18189 = 7; + optional .benchmarks.google_message3.UnusedEmptyMessage field18190 = 100; + optional .benchmarks.google_message3.UnusedEmptyMessage field18191 = 101; + optional .benchmarks.google_message3.UnusedEmptyMessage field18192 = 14; + optional .benchmarks.google_message3.UnusedEmptyMessage field18193 = 19; + optional .benchmarks.google_message3.UnusedEmptyMessage field18194 = 22; + optional .benchmarks.google_message3.UnusedEmptyMessage field18195 = 24; + optional .benchmarks.google_message3.Enum16925 field18196 = 21; + optional bool field18197 = 18; + repeated .benchmarks.google_message3.UnusedEnum field18198 = 23; + optional .benchmarks.google_message3.UnusedEmptyMessage field18199 = 15; + optional string field18200 = 16; + optional string field18201 = 17; + optional bool field18202 = 99; + } + repeated .benchmarks.google_message3.Message17782 field18175 = 20; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message17786 field18176 = 11823055; + } +} + +message Message22857 { + repeated .benchmarks.google_message3.Message22853 field22874 = 1; + extend .benchmarks.google_message3.Message10155 { + optional .benchmarks.google_message3.Message22857 field22875 = 67799715; + } +} + +message Message24404 { + repeated group Message24405 = 1 { + required int32 field24686 = 2; + required int32 field24687 = 3; + optional .benchmarks.google_message3.Message24317 field24688 = 4; + optional .benchmarks.google_message3.UnusedEmptyMessage field24689 = 5; + optional .benchmarks.google_message3.Message24376 field24690 = 6; + optional .benchmarks.google_message3.Message24345 field24691 = 7; + optional .benchmarks.google_message3.UnusedEmptyMessage field24692 = 8; + optional .benchmarks.google_message3.Message24379 field24693 = 9; + optional .benchmarks.google_message3.UnusedEmptyMessage field24694 = 10; + optional .benchmarks.google_message3.UnusedEmptyMessage field24695 = 11; + optional .benchmarks.google_message3.Message24391 field24696 = 12; + optional .benchmarks.google_message3.UnusedEmptyMessage field24697 = 13; + optional .benchmarks.google_message3.UnusedEmptyMessage field24698 = 14; + optional .benchmarks.google_message3.UnusedEmptyMessage field24699 = 22; + optional .benchmarks.google_message3.UnusedEmptyMessage field24700 = 23; + optional .benchmarks.google_message3.UnusedEmptyMessage field24701 = 25; + optional .benchmarks.google_message3.Enum16925 field24702 = 18; + optional float field24703 = 20; + optional bool field24704 = 19; + repeated .benchmarks.google_message3.Enum16891 field24705 = 24; + optional .benchmarks.google_message3.UnusedEmptyMessage field24706 = 15; + optional string field24707 = 16; + optional string field24708 = 17; + optional float field24709 = 21; + optional bool field24710 = 26; + optional .benchmarks.google_message3.UnusedEnum field24711 = 27; + optional bool field24712 = 28; + optional .benchmarks.google_message3.UnusedEnum field24713 = 29; + optional bool field24714 = 31; + optional bool field24715 = 99; + optional int64 field24716 = 32; + } + optional .benchmarks.google_message3.Message24403 field24684 = 30; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message24404 field24685 = 9129287; + } +} + +message Message27300 { + repeated .benchmarks.google_message3.UnusedEmptyMessage field27302 = 1; + optional string field27303 = 2; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message27300 field27304 = 24956467; + } +} + +message Message27453 { + optional string field27459 = 15; + repeated string field27460 = 1; + repeated float field27461 = 6; + repeated int32 field27462 = 27; + repeated int32 field27463 = 28; + repeated .benchmarks.google_message3.Message27454 field27464 = 24; + repeated string field27465 = 2; + repeated float field27466 = 7; + repeated string field27467 = 22; + repeated string field27468 = 23; + optional string field27469 = 26; + repeated .benchmarks.google_message3.Message27357 field27470 = 8; + optional .benchmarks.google_message3.Message27360 field27471 = 16; + optional string field27472 = 25; + optional string field27473 = 11; + optional bool field27474 = 13; + optional bool field27475 = 14; + optional bool field27476 = 17; + optional .benchmarks.google_message3.UnusedEmptyMessage field27477 = 12; + optional bool field27478 = 34268945; + optional bool field27479 = 20; + optional string field27480 = 21; + optional .benchmarks.google_message3.UnusedEmptyMessage field27481 = 10; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message27453 field27482 = 8086204; + } +} + +extend .benchmarks.google_message3.Message16945 { + optional string field17026 = 472; + repeated string field17027 = 818; + optional .benchmarks.google_message3.Message0 field17031 = 215; + repeated .benchmarks.google_message3.Message0 field17032 = 292; + repeated .benchmarks.google_message3.Message0 field17038 = 234; + repeated .benchmarks.google_message3.Message0 field17039 = 235; + optional .benchmarks.google_message3.Message0 field17042 = 246; + optional string field17043 = 224; + optional string field17044 = 225; + repeated string field17048 = 63; + repeated string field17049 = 64; + repeated .benchmarks.google_message3.Message0 field17052 = 233; + repeated .benchmarks.google_message3.Message0 field17053 = 66; + repeated string field17056 = 275; + optional string field17057 = 226; + repeated .benchmarks.google_message3.Message0 field17060 = 27; + repeated string field17073 = 75; + repeated .benchmarks.google_message3.Message0 field17076 = 77; + repeated string field17078 = 296; + repeated .benchmarks.google_message3.Message0 field17082 = 160; + repeated .benchmarks.google_message3.Message0 field17091 = 585; + repeated .benchmarks.google_message3.Message0 field17098 = 987; + repeated .benchmarks.google_message3.Message0 field17101 = 157; + repeated string field17102 = 158; + repeated string field17107 = 166; + repeated string field17133 = 567; + repeated string field17134 = 572; + repeated string field17160 = 49; + repeated string field17168 = 32; + repeated string field17170 = 34; + repeated .benchmarks.google_message3.Message0 field17172 = 509; + repeated string field17174 = 39; + repeated .benchmarks.google_message3.Message0 field17175 = 40; + repeated .benchmarks.google_message3.Message0 field17178 = 511; + repeated .benchmarks.google_message3.Message0 field17185 = 50; + repeated int32 field17207 = 1081; + repeated .benchmarks.google_message3.Message0 field17238 = 184; + repeated .benchmarks.google_message3.Message0 field17289 = 177; + repeated .benchmarks.google_message3.Message0 field17290 = 178; + repeated .benchmarks.google_message3.Message0 field17296 = 474; + repeated string field17298 = 44; + repeated .benchmarks.google_message3.Message0 field17301 = 47; + optional .benchmarks.google_message3.Message0 field17412 = 21; + repeated .benchmarks.google_message3.Message0 field17438 = 132; + repeated .benchmarks.google_message3.Message0 field17458 = 512; + repeated string field17460 = 560; + repeated string field17466 = 552; + repeated .benchmarks.google_message3.Message0 field17617 = 1080; + repeated int32 field17618 = 1084; +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_1.proto b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_1.proto new file mode 100644 index 00000000..1ee5c9ec --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_1.proto @@ -0,0 +1,1298 @@ +// 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. + +// LINT: ALLOW_GROUPS + +syntax = "proto2"; + +package benchmarks.google_message3; + +import "datasets/google_message3/benchmark_message3_2.proto"; +import "datasets/google_message3/benchmark_message3_3.proto"; +import "datasets/google_message3/benchmark_message3_5.proto"; +import "datasets/google_message3/benchmark_message3_7.proto"; +import "datasets/google_message3/benchmark_message3_8.proto"; + +option cc_enable_arenas = true; +option java_package = "com.google.protobuf.benchmarks"; + +message Message34390 { + repeated .benchmarks.google_message3.Message34387 field34452 = 1; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message34390 field34453 = 92144610; + } +} + +message Message34624 { + optional .benchmarks.google_message3.Message34621 field34683 = 1; + optional .benchmarks.google_message3.Message34621 field34684 = 2; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message34624 field34685 = 18178548; + } +} + +message Message34791 { + optional fixed64 field34793 = 1; + repeated group Message34792 = 2 { + required string field34808 = 3; + optional string field34809 = 4; + } + optional int32 field34795 = 5; + optional int32 field34796 = 6; + optional int32 field34797 = 7; + optional int32 field34798 = 8; + optional int32 field34799 = 9; + optional int32 field34800 = 10; + optional bool field34801 = 11; + optional float field34802 = 12; + optional int32 field34803 = 13; + optional string field34804 = 14; + optional int64 field34805 = 15; + repeated fixed64 field34806 = 17 [packed = true]; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message34791 field34807 = 6330340; + } +} + +message Message35483 { + optional int32 field35499 = 1; + optional string field35500 = 2; + optional string field35501 = 3; + optional string field35502 = 4; + repeated .benchmarks.google_message3.Message35476 field35503 = 5; + optional .benchmarks.google_message3.UnusedEmptyMessage field35504 = 6; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message35483 field35505 = 7913554; + } +} + +message Message35807 { + optional int32 field35810 = 1; + optional int32 field35811 = 2; + optional int32 field35812 = 3; + optional int32 field35813 = 4; + optional int32 field35814 = 5; + optional int32 field35815 = 6; + optional int32 field35816 = 7; + optional int32 field35817 = 8; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message35807 field35818 = 3803299; + } +} + +message Message37487 { + optional bytes field37501 = 2; + optional bool field37502 = 3; +} + +message Message13062 { + optional int64 field13075 = 1; + optional string field13076 = 2; + optional int32 field13077 = 3; + optional string field13078 = 4; + optional int32 field13079 = 5; +} + +message Message952 { + repeated .benchmarks.google_message3.Message949 field963 = 1; +} + +message Message36876 { + optional .benchmarks.google_message3.Message2356 field36980 = 1; + repeated group Message36877 = 111 { + required string field37044 = 112; + optional int32 field37045 = 113; + optional bytes field37046 = 114; + optional int32 field37047 = 115; + optional int32 field37048 = 157; + } + repeated group Message36878 = 168 {} + repeated group Message36879 = 55 { + required string field37050 = 56; + optional int32 field37051 = 69; + } + repeated .benchmarks.google_message3.UnusedEmptyMessage field36984 = 78; + optional group Message36880 = 137 {} + optional uint64 field36986 = 59; + optional bytes field36987 = 121; + optional .benchmarks.google_message3.UnusedEmptyMessage field36988 = 2; + optional .benchmarks.google_message3.Message7029 field36989 = 118; + optional .benchmarks.google_message3.Message35573 field36990 = 11; + optional .benchmarks.google_message3.UnusedEmptyMessage field36991 = 21; + optional .benchmarks.google_message3.UnusedEmptyMessage field36992 = 22; + optional float field36993 = 13; + optional int32 field36994 = 20; + optional bool field36995 = 51; + optional bool field36996 = 57; + repeated .benchmarks.google_message3.UnusedEmptyMessage field36997 = 100; + optional int32 field36998 = 47; + optional int32 field36999 = 48; + optional .benchmarks.google_message3.UnusedEmptyMessage field37000 = 68; + repeated group Message36881 = 23 {} + optional .benchmarks.google_message3.Message4144 field37002 = 125; + repeated group Message36882 = 35 {} + optional .benchmarks.google_message3.UnusedEmptyMessage field37004 = 49; + optional .benchmarks.google_message3.Message18921 field37005 = 52; + optional .benchmarks.google_message3.Message36858 field37006 = 46; + optional .benchmarks.google_message3.Message18831 field37007 = 54; + optional .benchmarks.google_message3.UnusedEmptyMessage field37008 = 58; + optional .benchmarks.google_message3.Message18283 field37009 = 10; + optional string field37010 = 44; + optional string field37011 = 103; + optional .benchmarks.google_message3.Message0 field37012 = 43; + optional .benchmarks.google_message3.Message0 field37013 = 143; + optional .benchmarks.google_message3.UnusedEmptyMessage field37014 = 53; + optional .benchmarks.google_message3.Message36869 field37015 = 15; + optional group Message36883 = 3 {} + repeated group Message36884 = 16 {} + repeated group Message36885 = 27 {} + optional group Message36886 = 32 {} + repeated .benchmarks.google_message3.UnusedEnum field37020 = 71; + repeated int32 field37021 = 70; + optional .benchmarks.google_message3.UnusedEmptyMessage field37022 = 66; + optional .benchmarks.google_message3.Message13090 field37023 = 67; + optional group Message36887 = 62 {} + repeated .benchmarks.google_message3.Message10155 field37025 = 50; + repeated .benchmarks.google_message3.Message11874 field37026 = 151; + optional string field37027 = 12; + optional int64 field37028 = 72; + optional .benchmarks.google_message3.UnusedEmptyMessage field37029 = 73; + optional .benchmarks.google_message3.Message35546 field37030 = 108; + optional group Message36888 = 74 { + optional uint64 field37089 = 75; + optional bool field37090 = 76; + optional uint64 field37091 = 165; + optional double field37092 = 166; + optional uint64 field37093 = 109; + optional bytes field37094 = 122; + } + repeated .benchmarks.google_message3.Message19255 field37032 = 104; + optional .benchmarks.google_message3.Message33968 field37033 = 105; + optional bool field37034 = 106; + repeated .benchmarks.google_message3.UnusedEmptyMessage field37035 = 107; + optional .benchmarks.google_message3.Message6644 field37036 = 110; + optional bytes field37037 = 133; + optional group Message36889 = 116 { + optional int64 field37095 = 117; + optional string field37096 = 145; + optional int32 field37097 = 123; + optional bool field37098 = 163; + optional int32 field37099 = 164; + optional int32 field37100 = 149; + optional .benchmarks.google_message3.UnusedEmptyMessage field37101 = 129; + optional .benchmarks.google_message3.Message13174 field37102 = 124; + optional .benchmarks.google_message3.Message13169 field37103 = 128; + optional uint64 field37104 = 132; + repeated .benchmarks.google_message3.Enum36890 field37105 = 131; + optional bool field37106 = 134; + optional bool field37107 = 140; + optional .benchmarks.google_message3.UnusedEmptyMessage field37108 = 135; + optional float field37109 = 136; + optional float field37110 = 156; + optional bool field37111 = 142; + optional int64 field37112 = 167; + optional .benchmarks.google_message3.UnusedEmptyMessage field37113 = 146; + optional bool field37114 = 148; + optional .benchmarks.google_message3.UnusedEmptyMessage field37115 = 154; + optional .benchmarks.google_message3.UnusedEnum field37116 = 158; + repeated .benchmarks.google_message3.UnusedEnum field37117 = 159; + optional int32 field37118 = 160; + repeated string field37119 = 161; + } + repeated group Message36910 = 119 {} + optional group Message36911 = 126 { + optional .benchmarks.google_message3.UnusedEmptyMessage field37121 = 127; + optional .benchmarks.google_message3.Message35538 field37122 = 130; + optional .benchmarks.google_message3.Message35540 field37123 = 144; + optional .benchmarks.google_message3.Message35542 field37124 = 150; + } + optional group Message36912 = 152 { + optional .benchmarks.google_message3.Message3901 field37125 = 153; + optional .benchmarks.google_message3.Message3901 field37126 = 162; + } + optional .benchmarks.google_message3.UnusedEmptyMessage field37042 = 155; +} + +message Message1328 {} + +message Message6850 {} + +message Message6863 { + optional .benchmarks.google_message3.Enum6858 field6931 = 1; + optional .benchmarks.google_message3.Enum6858 field6932 = 2; + optional .benchmarks.google_message3.UnusedEnum field6933 = 36; + optional bool field6934 = 27; + optional .benchmarks.google_message3.Message6773 field6935 = 26; + optional int32 field6936 = 30; + optional int32 field6937 = 37; + optional .benchmarks.google_message3.Enum6815 field6938 = 31; + optional string field6939 = 3; + optional int32 field6940 = 4; + optional .benchmarks.google_message3.Enum6822 field6941 = 15; + optional bool field6942 = 10; + optional bool field6943 = 17; + optional float field6944 = 18; + optional float field6945 = 19; + optional int32 field6946 = 5; + optional int32 field6947 = 6; + optional bool field6948 = 7; + optional int32 field6949 = 12; + optional .benchmarks.google_message3.UnusedEmptyMessage field6950 = 8; + optional uint64 field6951 = 9; + optional string field6952 = 11; + optional bytes field6953 = 13; + optional int32 field6954 = 14; + optional .benchmarks.google_message3.UnusedEmptyMessage field6955 = 16; + optional .benchmarks.google_message3.UnusedEmptyMessage field6956 = 22; + optional .benchmarks.google_message3.Message3886 field6957 = 38; + optional string field6958 = 20; + optional uint32 field6959 = 21; + optional .benchmarks.google_message3.Message6743 field6960 = 23; + optional .benchmarks.google_message3.UnusedEmptyMessage field6961 = 29; + optional .benchmarks.google_message3.UnusedEmptyMessage field6962 = 33; + optional bool field6963 = 34; +} + +message Message6871 {} + +message Message7547 { + required bytes field7549 = 1; + required int32 field7550 = 2; +} + +message Message7648 { + optional string field7669 = 1; + optional int32 field7670 = 2; + optional int32 field7671 = 3; + optional int32 field7672 = 4; + optional int32 field7673 = 5; + optional int32 field7674 = 6; + optional float field7675 = 7; + optional bool field7676 = 8; + optional bool field7677 = 9; + optional bool field7678 = 10; + optional bool field7679 = 11; + optional bool field7680 = 12; +} + +message Message7865 {} + +message Message7928 { + optional string field7940 = 1; + optional int64 field7941 = 2; +} + +message Message7919 { + optional fixed64 field7931 = 1; + optional int64 field7932 = 2; + optional bytes field7933 = 3; +} + +message Message7920 { + optional int64 field7934 = 1; + optional int64 field7935 = 2; +} + +message Message7921 { + optional int32 field7936 = 1; + optional int64 field7937 = 2; + optional float field7938 = 3; + optional .benchmarks.google_message3.UnusedEnum field7939 = 4; +} + +message Message8511 { + optional .benchmarks.google_message3.Message8224 field8539 = 1; + optional string field8540 = 2; + optional bool field8541 = 3; + optional int64 field8542 = 4; + optional string field8543 = 5; +} + +message Message8512 { + optional .benchmarks.google_message3.Message8301 field8544 = 1; + optional .benchmarks.google_message3.Message8302 field8545 = 2; + optional string field8546 = 3; + optional bool field8547 = 4; + optional int64 field8548 = 5; + optional string field8549 = 6; +} + +message Message8513 { + repeated .benchmarks.google_message3.Message8392 field8550 = 1; + optional string field8551 = 2; + optional bool field8552 = 3; + optional string field8553 = 4; +} + +message Message8514 { + optional string field8554 = 1; + optional int64 field8555 = 2; + optional bool field8556 = 3; + repeated .benchmarks.google_message3.Message8130 field8557 = 4; + optional string field8558 = 5; +} + +message Message8515 { + optional .benchmarks.google_message3.Message8479 field8559 = 1; + optional .benchmarks.google_message3.Message8478 field8560 = 2; + optional string field8561 = 3; +} + +message Message10320 { + optional .benchmarks.google_message3.Enum10335 field10347 = 1; + repeated .benchmarks.google_message3.Message10319 field10348 = 2; + optional int32 field10349 = 3; + optional int32 field10350 = 4; + optional int32 field10351 = 5; + optional int32 field10352 = 6; + optional .benchmarks.google_message3.Enum10337 field10353 = 7; +} + +message Message10321 { + optional int32 field10354 = 1; + optional int32 field10355 = 2; + optional uint64 field10356 = 3; +} + +message Message10322 { + optional .benchmarks.google_message3.Message4016 field10357 = 1; + optional bool field10358 = 2; + optional bool field10359 = 3; +} + +message Message11988 { + optional string field12021 = 1; + optional string field12022 = 2; + optional .benchmarks.google_message3.UnusedEmptyMessage field12023 = 3; + optional .benchmarks.google_message3.Message10155 field12024 = 4; +} + +message Message12668 { + repeated .benchmarks.google_message3.Message12669 field12677 = 1; + optional int32 field12678 = 2; + optional int32 field12679 = 3; + optional int32 field12680 = 4; +} + +message Message12825 { + repeated .benchmarks.google_message3.Message12818 field12862 = 1; + optional int32 field12863 = 2; + optional .benchmarks.google_message3.Message12819 field12864 = 3; + optional .benchmarks.google_message3.Message12820 field12865 = 4; + optional int32 field12866 = 5; + repeated .benchmarks.google_message3.Message12821 field12867 = 6; + repeated .benchmarks.google_message3.UnusedEmptyMessage field12868 = 7; +} + +message Message16478 { + repeated .benchmarks.google_message3.Message16479 field16481 = 1; + optional bool field16482 = 3; + optional int32 field16483 = 2; +} + +message Message16552 { + optional fixed64 field16565 = 1; + optional int32 field16566 = 2; + optional .benchmarks.google_message3.Enum16553 field16567 = 3; +} + +message Message16660 { + optional string field16668 = 1; + optional string field16669 = 2; + optional int32 field16670 = 3; +} + +message Message16727 { + required .benchmarks.google_message3.Enum16728 field16782 = 1; + required string field16783 = 2; + optional string field16784 = 3; + optional int32 field16785 = 23; + required string field16786 = 4; + optional string field16787 = 5; + optional string field16788 = 6; + required .benchmarks.google_message3.Enum16732 field16789 = 7; + optional string field16790 = 8; + optional string field16791 = 9; + optional string field16792 = 10; + optional .benchmarks.google_message3.Enum16738 field16793 = 11; + optional int32 field16794 = 12; + repeated .benchmarks.google_message3.Message16722 field16795 = 13; + optional bool field16796 = 19; + optional bool field16797 = 24; + optional string field16798 = 14; + optional int64 field16799 = 15; + optional bool field16800 = 16; + optional string field16801 = 17; + optional .benchmarks.google_message3.Enum16698 field16802 = 18; + optional .benchmarks.google_message3.Message16724 field16803 = 20; + optional bool field16804 = 22; + optional .benchmarks.google_message3.UnusedEmptyMessage field16805 = 25; + extensions 1000 to 536870911; +} + +message Message16725 { + optional .benchmarks.google_message3.Enum16728 field16774 = 1; + repeated string field16775 = 2; +} + +message Message17726 { + optional string field17801 = 1; + repeated string field17802 = 2; + optional string field17803 = 3; + repeated string field17804 = 4; + optional string field17805 = 5; + repeated string field17806 = 6; + optional string field17807 = 7; + optional string field17808 = 8; + repeated string field17809 = 15; + repeated string field17810 = 16; + repeated string field17811 = 17; + repeated .benchmarks.google_message3.UnusedEmptyMessage field17812 = 18; + optional string field17813 = 9; + optional string field17814 = 10; + optional string field17815 = 11; + optional string field17816 = 12; + optional string field17817 = 13; + optional string field17818 = 14; + optional string field17819 = 19; + repeated .benchmarks.google_message3.Message17728 field17820 = 20; + repeated .benchmarks.google_message3.Message17728 field17821 = 21; + repeated .benchmarks.google_message3.UnusedEmptyMessage field17822 = 30; +} + +message Message17782 { + optional string field18153 = 1; + optional string field18154 = 2; +} + +message Message17783 { + optional string field18155 = 1; + optional string field18156 = 2; + optional string field18157 = 3; + repeated group Message17784 = 4 { + optional string field18162 = 5; + optional string field18163 = 6; + optional string field18164 = 7; + repeated string field18165 = 8; + optional string field18166 = 17; + optional string field18167 = 18; + } + repeated group Message17785 = 9 { + optional string field18168 = 10; + optional string field18169 = 11; + optional .benchmarks.google_message3.Message17783 field18170 = 12; + optional string field18171 = 13; + optional string field18172 = 14; + repeated string field18173 = 15; + } + repeated string field18160 = 16; +} + +message Message16945 { + optional string field16946 = 1; + optional string field16947 = 2; + optional string field16948 = 3; + optional string field16949 = 4; + optional string field16950 = 5; + optional .benchmarks.google_message3.UnusedEmptyMessage field16951 = 872; + repeated .benchmarks.google_message3.Message0 field16952 = 16; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16953 = 54; + repeated .benchmarks.google_message3.Message0 field16954 = 55; + repeated string field16955 = 58; + repeated string field16956 = 59; + repeated string field16957 = 62; + repeated string field16958 = 37; + repeated string field16959 = 18; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16960 = 38; + repeated .benchmarks.google_message3.Message0 field16961 = 67; + repeated .benchmarks.google_message3.Message0 field16962 = 130; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16963 = 136; + repeated string field16964 = 138; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16965 = 156; + repeated string field16966 = 139; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16967 = 126; + repeated string field16968 = 152; + repeated .benchmarks.google_message3.Message0 field16969 = 183; + repeated string field16970 = 168; + repeated string field16971 = 212; + repeated string field16972 = 213; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16973 = 189; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16974 = 190; + repeated string field16975 = 191; + repeated string field16976 = 192; + repeated .benchmarks.google_message3.Message0 field16977 = 193; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16978 = 194; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16979 = 195; + repeated int32 field16980 = 196; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16981 = 95; + repeated string field16982 = 96; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16983 = 97; + repeated string field16984 = 1086; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16985 = 98; + repeated string field16986 = 99; + repeated string field16987 = 100; + repeated string field16988 = 48; + optional string field16989 = 22; + repeated .benchmarks.google_message3.UnusedEmptyMessage field16990 = 51; + repeated string field16991 = 81; + repeated string field16992 = 85; + repeated string field16993 = 169; + optional .benchmarks.google_message3.UnusedEmptyMessage field16994 = 260; + optional int32 field16995 = 198; + optional int32 field16996 = 204; + optional string field16997 = 1087; + repeated string field16998 = 197; + repeated string field16999 = 206; + optional string field17000 = 211; + repeated string field17001 = 205; + repeated .benchmarks.google_message3.UnusedEmptyMessage field17002 = 68; + repeated .benchmarks.google_message3.UnusedEmptyMessage field17003 = 69; + repeated .benchmarks.google_message3.UnusedEmptyMessage field17004 = 70; + repeated .benchmarks.google_message3.UnusedEmptyMessage field17005 = 71; + repeated .benchmarks.google_message3.UnusedEmptyMessage field17006 = 72; + repeated .benchmarks.google_message3.UnusedEmptyMessage field17007 = 19; + repeated .benchmarks.google_message3.UnusedEmptyMessage field17008 = 24; + optional .benchmarks.google_message3.UnusedEmptyMessage field17009 = 23; + repeated .benchmarks.google_message3.Message0 field17010 = 131; + repeated string field17011 = 133; + repeated .benchmarks.google_message3.UnusedEmptyMessage field17012 = 142; + repeated string field17013 = 143; + repeated .benchmarks.google_message3.UnusedEmptyMessage field17014 = 153; + repeated .benchmarks.google_message3.Message0 field17015 = 170; + repeated string field17016 = 171; + repeated string field17017 = 172; + repeated string field17018 = 173; + repeated string field17019 = 174; + repeated string field17020 = 175; + repeated string field17021 = 186; + repeated string field17022 = 101; + repeated .benchmarks.google_message3.Message0 field17023 = 102; + repeated string field17024 = 274; + extensions 17 to 17; + extensions 21 to 21; + extensions 25 to 25; + extensions 27 to 27; + extensions 29 to 29; + extensions 30 to 30; + extensions 31 to 31; + extensions 32 to 32; + extensions 33 to 33; + extensions 34 to 34; + extensions 35 to 35; + extensions 36 to 36; + extensions 39 to 39; + extensions 40 to 40; + extensions 41 to 41; + extensions 42 to 42; + extensions 43 to 43; + extensions 44 to 44; + extensions 45 to 45; + extensions 46 to 46; + extensions 47 to 47; + extensions 49 to 49; + extensions 50 to 50; + extensions 52 to 52; + extensions 53 to 53; + extensions 56 to 56; + extensions 57 to 57; + extensions 60 to 60; + extensions 61 to 61; + extensions 63 to 63; + extensions 64 to 64; + extensions 65 to 65; + extensions 66 to 66; + extensions 73 to 73; + extensions 74 to 74; + extensions 75 to 75; + extensions 76 to 76; + extensions 77 to 77; + extensions 78 to 78; + extensions 79 to 79; + extensions 80 to 80; + extensions 82 to 82; + extensions 83 to 83; + extensions 84 to 84; + extensions 86 to 86; + extensions 87 to 87; + extensions 88 to 88; + extensions 89 to 89; + extensions 90 to 90; + extensions 91 to 91; + extensions 92 to 92; + extensions 93 to 93; + extensions 94 to 94; + extensions 103 to 103; + extensions 104 to 104; + extensions 105 to 105; + extensions 106 to 106; + extensions 107 to 107; + extensions 108 to 108; + extensions 109 to 109; + extensions 110 to 110; + extensions 111 to 111; + extensions 112 to 112; + extensions 113 to 113; + extensions 114 to 114; + extensions 115 to 115; + extensions 116 to 116; + extensions 117 to 117; + extensions 118 to 118; + extensions 119 to 119; + extensions 120 to 120; + extensions 121 to 121; + extensions 122 to 122; + extensions 123 to 123; + extensions 124 to 124; + extensions 125 to 125; + extensions 127 to 127; + extensions 128 to 128; + extensions 129 to 129; + extensions 132 to 132; + extensions 134 to 134; + extensions 135 to 135; + extensions 137 to 137; + extensions 140 to 140; + extensions 141 to 141; + extensions 144 to 144; + extensions 145 to 145; + extensions 146 to 146; + extensions 147 to 147; + extensions 148 to 148; + extensions 149 to 149; + extensions 150 to 150; + extensions 151 to 151; + extensions 154 to 154; + extensions 155 to 155; + extensions 157 to 157; + extensions 158 to 158; + extensions 159 to 159; + extensions 160 to 160; + extensions 161 to 161; + extensions 162 to 162; + extensions 163 to 163; + extensions 164 to 164; + extensions 165 to 165; + extensions 166 to 166; + extensions 167 to 167; + extensions 176 to 176; + extensions 177 to 177; + extensions 178 to 178; + extensions 179 to 179; + extensions 180 to 180; + extensions 181 to 181; + extensions 182 to 182; + extensions 184 to 184; + extensions 185 to 185; + extensions 187 to 187; + extensions 188 to 188; + extensions 199 to 199; + extensions 200 to 200; + extensions 201 to 201; + extensions 202 to 202; + extensions 203 to 203; + extensions 207 to 207; + extensions 208 to 208; + extensions 209 to 209; + extensions 210 to 210; + extensions 214 to 214; + extensions 215 to 215; + extensions 216 to 216; + extensions 217 to 217; + extensions 218 to 218; + extensions 219 to 219; + extensions 220 to 220; + extensions 221 to 221; + extensions 222 to 222; + extensions 223 to 223; + extensions 224 to 224; + extensions 225 to 225; + extensions 226 to 226; + extensions 227 to 227; + extensions 228 to 228; + extensions 229 to 229; + extensions 230 to 230; + extensions 231 to 231; + extensions 232 to 232; + extensions 233 to 233; + extensions 234 to 234; + extensions 235 to 235; + extensions 236 to 236; + extensions 237 to 237; + extensions 238 to 238; + extensions 239 to 239; + extensions 240 to 240; + extensions 241 to 241; + extensions 242 to 242; + extensions 243 to 243; + extensions 244 to 244; + extensions 245 to 245; + extensions 246 to 246; + extensions 247 to 247; + extensions 248 to 248; + extensions 249 to 249; + extensions 250 to 250; + extensions 251 to 251; + extensions 252 to 252; + extensions 253 to 253; + extensions 254 to 254; + extensions 255 to 255; + extensions 256 to 256; + extensions 257 to 257; + extensions 258 to 258; + extensions 259 to 259; + extensions 261 to 261; + extensions 262 to 262; + extensions 263 to 263; + extensions 264 to 264; + extensions 265 to 265; + extensions 266 to 266; + extensions 267 to 267; + extensions 268 to 268; + extensions 269 to 269; + extensions 270 to 270; + extensions 271 to 271; + extensions 272 to 272; + extensions 273 to 273; + extensions 275 to 275; + extensions 276 to 276; + extensions 277 to 277; + extensions 278 to 278; + extensions 279 to 279; + extensions 280 to 280; + extensions 281 to 281; + extensions 282 to 282; + extensions 283 to 283; + extensions 284 to 284; + extensions 285 to 285; + extensions 286 to 286; + extensions 290 to 290; + extensions 291 to 291; + extensions 292 to 292; + extensions 293 to 293; + extensions 294 to 294; + extensions 295 to 295; + extensions 296 to 296; + extensions 297 to 297; + extensions 298 to 298; + extensions 299 to 299; + extensions 300 to 300; + extensions 301 to 301; + extensions 302 to 302; + extensions 303 to 303; + extensions 304 to 304; + extensions 305 to 305; + extensions 306 to 306; + extensions 307 to 307; + extensions 308 to 308; + extensions 309 to 309; + extensions 310 to 310; + extensions 311 to 311; + extensions 312 to 312; + extensions 313 to 313; + extensions 314 to 314; + extensions 315 to 315; + extensions 316 to 316; + extensions 317 to 317; + extensions 318 to 318; + extensions 319 to 319; + extensions 320 to 320; + extensions 321 to 321; + extensions 322 to 322; + extensions 323 to 323; + extensions 324 to 324; + extensions 325 to 325; + extensions 326 to 326; + extensions 327 to 327; + extensions 328 to 328; + extensions 329 to 329; + extensions 330 to 330; + extensions 331 to 331; + extensions 332 to 332; + extensions 333 to 333; + extensions 334 to 334; + extensions 335 to 335; + extensions 336 to 336; + extensions 337 to 337; + extensions 338 to 338; + extensions 339 to 339; + extensions 340 to 340; + extensions 341 to 341; + extensions 342 to 342; + extensions 343 to 343; + extensions 344 to 344; + extensions 345 to 345; + extensions 346 to 346; + extensions 347 to 347; + extensions 348 to 348; + extensions 349 to 349; + extensions 350 to 350; + extensions 351 to 351; + extensions 352 to 352; + extensions 353 to 353; + extensions 354 to 354; + extensions 355 to 355; + extensions 356 to 356; + extensions 357 to 357; + extensions 358 to 358; + extensions 359 to 359; + extensions 360 to 360; + extensions 361 to 361; + extensions 362 to 362; + extensions 363 to 363; + extensions 364 to 364; + extensions 365 to 365; + extensions 366 to 366; + extensions 367 to 367; + extensions 368 to 368; + extensions 369 to 369; + extensions 370 to 370; + extensions 371 to 371; + extensions 372 to 372; + extensions 373 to 373; + extensions 374 to 374; + extensions 375 to 375; + extensions 376 to 376; + extensions 377 to 377; + extensions 378 to 378; + extensions 379 to 379; + extensions 380 to 380; + extensions 381 to 381; + extensions 382 to 382; + extensions 383 to 383; + extensions 384 to 384; + extensions 385 to 385; + extensions 386 to 386; + extensions 387 to 387; + extensions 388 to 388; + extensions 389 to 389; + extensions 390 to 390; + extensions 391 to 391; + extensions 392 to 392; + extensions 393 to 393; + extensions 394 to 394; + extensions 395 to 395; + extensions 396 to 396; + extensions 397 to 397; + extensions 398 to 398; + extensions 399 to 399; + extensions 400 to 400; + extensions 401 to 401; + extensions 402 to 402; + extensions 403 to 403; + extensions 404 to 404; + extensions 405 to 405; + extensions 406 to 406; + extensions 407 to 407; + extensions 408 to 408; + extensions 409 to 409; + extensions 410 to 410; + extensions 411 to 411; + extensions 412 to 412; + extensions 413 to 413; + extensions 414 to 414; + extensions 415 to 415; + extensions 416 to 416; + extensions 417 to 417; + extensions 418 to 418; + extensions 419 to 419; + extensions 420 to 420; + extensions 421 to 421; + extensions 422 to 422; + extensions 423 to 423; + extensions 424 to 424; + extensions 425 to 425; + extensions 426 to 426; + extensions 427 to 427; + extensions 428 to 428; + extensions 429 to 429; + extensions 430 to 430; + extensions 431 to 431; + extensions 432 to 432; + extensions 433 to 433; + extensions 434 to 434; + extensions 435 to 435; + extensions 436 to 436; + extensions 437 to 437; + extensions 438 to 438; + extensions 439 to 439; + extensions 440 to 440; + extensions 441 to 441; + extensions 442 to 442; + extensions 443 to 443; + extensions 444 to 444; + extensions 445 to 445; + extensions 446 to 446; + extensions 447 to 447; + extensions 448 to 448; + extensions 449 to 449; + extensions 450 to 450; + extensions 451 to 451; + extensions 452 to 452; + extensions 453 to 453; + extensions 454 to 454; + extensions 455 to 455; + extensions 456 to 456; + extensions 457 to 457; + extensions 458 to 458; + extensions 459 to 459; + extensions 460 to 460; + extensions 461 to 461; + extensions 462 to 462; + extensions 463 to 463; + extensions 464 to 464; + extensions 465 to 465; + extensions 466 to 466; + extensions 467 to 467; + extensions 468 to 468; + extensions 469 to 469; + extensions 470 to 470; + extensions 471 to 471; + extensions 472 to 472; + extensions 473 to 473; + extensions 474 to 474; + extensions 509 to 509; + extensions 511 to 511; + extensions 512 to 512; + extensions 513 to 513; + extensions 514 to 514; + extensions 515 to 515; + extensions 516 to 516; + extensions 517 to 517; + extensions 518 to 518; + extensions 519 to 519; + extensions 520 to 520; + extensions 521 to 521; + extensions 522 to 522; + extensions 523 to 523; + extensions 524 to 524; + extensions 525 to 525; + extensions 526 to 526; + extensions 527 to 527; + extensions 528 to 528; + extensions 529 to 529; + extensions 530 to 530; + extensions 531 to 531; + extensions 532 to 532; + extensions 533 to 533; + extensions 534 to 534; + extensions 535 to 535; + extensions 536 to 536; + extensions 537 to 537; + extensions 538 to 538; + extensions 539 to 539; + extensions 540 to 540; + extensions 541 to 541; + extensions 542 to 542; + extensions 543 to 543; + extensions 544 to 544; + extensions 545 to 545; + extensions 546 to 546; + extensions 547 to 547; + extensions 548 to 548; + extensions 549 to 549; + extensions 550 to 550; + extensions 551 to 551; + extensions 552 to 552; + extensions 553 to 553; + extensions 554 to 554; + extensions 555 to 555; + extensions 556 to 556; + extensions 557 to 557; + extensions 558 to 558; + extensions 559 to 559; + extensions 560 to 560; + extensions 561 to 561; + extensions 562 to 562; + extensions 563 to 563; + extensions 564 to 564; + extensions 565 to 565; + extensions 566 to 566; + extensions 567 to 567; + extensions 568 to 568; + extensions 569 to 569; + extensions 570 to 570; + extensions 571 to 571; + extensions 572 to 572; + extensions 573 to 573; + extensions 574 to 574; + extensions 575 to 575; + extensions 576 to 576; + extensions 577 to 577; + extensions 578 to 578; + extensions 579 to 579; + extensions 580 to 580; + extensions 581 to 581; + extensions 582 to 582; + extensions 583 to 583; + extensions 584 to 584; + extensions 585 to 585; + extensions 586 to 586; + extensions 587 to 587; + extensions 588 to 588; + extensions 589 to 589; + extensions 590 to 590; + extensions 604 to 604; + extensions 605 to 605; + extensions 606 to 606; + extensions 607 to 607; + extensions 608 to 608; + extensions 609 to 609; + extensions 610 to 610; + extensions 611 to 611; + extensions 612 to 612; + extensions 613 to 613; + extensions 614 to 614; + extensions 615 to 615; + extensions 616 to 616; + extensions 617 to 617; + extensions 618 to 618; + extensions 619 to 619; + extensions 620 to 620; + extensions 621 to 621; + extensions 622 to 622; + extensions 623 to 623; + extensions 624 to 624; + extensions 625 to 625; + extensions 626 to 626; + extensions 627 to 627; + extensions 628 to 628; + extensions 629 to 629; + extensions 813 to 813; + extensions 814 to 814; + extensions 815 to 815; + extensions 816 to 816; + extensions 817 to 817; + extensions 818 to 818; + extensions 819 to 819; + extensions 820 to 820; + extensions 821 to 821; + extensions 822 to 822; + extensions 823 to 823; + extensions 824 to 824; + extensions 827 to 827; + extensions 828 to 828; + extensions 829 to 829; + extensions 830 to 830; + extensions 831 to 831; + extensions 832 to 832; + extensions 833 to 833; + extensions 834 to 834; + extensions 835 to 835; + extensions 836 to 836; + extensions 837 to 837; + extensions 838 to 838; + extensions 839 to 839; + extensions 840 to 840; + extensions 841 to 841; + extensions 842 to 842; + extensions 843 to 843; + extensions 844 to 844; + extensions 845 to 845; + extensions 846 to 846; + extensions 847 to 847; + extensions 848 to 848; + extensions 849 to 849; + extensions 850 to 850; + extensions 851 to 851; + extensions 852 to 852; + extensions 853 to 853; + extensions 854 to 854; + extensions 855 to 855; + extensions 856 to 856; + extensions 857 to 857; + extensions 858 to 858; + extensions 859 to 859; + extensions 860 to 860; + extensions 861 to 861; + extensions 862 to 862; + extensions 863 to 863; + extensions 864 to 864; + extensions 865 to 865; + extensions 866 to 866; + extensions 867 to 867; + extensions 868 to 868; + extensions 869 to 869; + extensions 870 to 870; + extensions 871 to 871; + extensions 880 to 880; + extensions 881 to 881; + extensions 882 to 882; + extensions 883 to 883; + extensions 884 to 884; + extensions 885 to 885; + extensions 886 to 886; + extensions 887 to 887; + extensions 888 to 888; + extensions 890 to 890; + extensions 891 to 891; + extensions 892 to 892; + extensions 912 to 912; + extensions 914 to 914; + extensions 915 to 915; + extensions 916 to 916; + extensions 917 to 917; + extensions 918 to 918; + extensions 919 to 919; + extensions 920 to 920; + extensions 921 to 921; + extensions 922 to 922; + extensions 923 to 923; + extensions 924 to 924; + extensions 925 to 925; + extensions 926 to 926; + extensions 927 to 927; + extensions 928 to 928; + extensions 929 to 929; + extensions 930 to 930; + extensions 931 to 931; + extensions 932 to 932; + extensions 933 to 933; + extensions 934 to 934; + extensions 935 to 935; + extensions 936 to 936; + extensions 937 to 937; + extensions 938 to 938; + extensions 939 to 939; + extensions 940 to 940; + extensions 941 to 941; + extensions 942 to 942; + extensions 943 to 943; + extensions 944 to 944; + extensions 945 to 945; + extensions 946 to 946; + extensions 947 to 947; + extensions 949 to 949; + extensions 950 to 950; + extensions 951 to 951; + extensions 952 to 952; + extensions 954 to 954; + extensions 955 to 955; + extensions 956 to 956; + extensions 957 to 957; + extensions 958 to 958; + extensions 959 to 959; + extensions 960 to 960; + extensions 961 to 961; + extensions 962 to 962; + extensions 963 to 963; + extensions 964 to 964; + extensions 965 to 965; + extensions 966 to 966; + extensions 967 to 967; + extensions 968 to 968; + extensions 969 to 969; + extensions 970 to 970; + extensions 971 to 971; + extensions 972 to 972; + extensions 973 to 973; + extensions 974 to 974; + extensions 975 to 975; + extensions 976 to 976; + extensions 977 to 977; + extensions 978 to 978; + extensions 979 to 979; + extensions 980 to 980; + extensions 981 to 981; + extensions 982 to 982; + extensions 983 to 983; + extensions 984 to 984; + extensions 985 to 985; + extensions 987 to 987; + extensions 988 to 988; + extensions 1000 to 1000; + extensions 1001 to 1001; + extensions 1002 to 1002; + extensions 1003 to 1003; + extensions 1004 to 1004; + extensions 1005 to 1005; + extensions 1006 to 1006; + extensions 1007 to 1007; + extensions 1008 to 1008; + extensions 1009 to 1009; + extensions 1010 to 1010; + extensions 1011 to 1011; + extensions 1012 to 1012; + extensions 1013 to 1013; + extensions 1014 to 1014; + extensions 1015 to 1015; + extensions 1016 to 1016; + extensions 1017 to 1017; + extensions 1018 to 1018; + extensions 1019 to 1019; + extensions 1020 to 1020; + extensions 1021 to 1021; + extensions 1022 to 1022; + extensions 1023 to 1023; + extensions 1024 to 1024; + extensions 1025 to 1025; + extensions 1026 to 1026; + extensions 1027 to 1027; + extensions 1028 to 1028; + extensions 1029 to 1029; + extensions 1030 to 1030; + extensions 1031 to 1031; + extensions 1032 to 1032; + extensions 1033 to 1033; + extensions 1034 to 1034; + extensions 1035 to 1035; + extensions 1036 to 1036; + extensions 1037 to 1037; + extensions 1038 to 1038; + extensions 1039 to 1039; + extensions 1040 to 1040; + extensions 1041 to 1041; + extensions 1042 to 1042; + extensions 1043 to 1043; + extensions 1044 to 1044; + extensions 1045 to 1045; + extensions 1046 to 1046; + extensions 1047 to 1047; + extensions 1048 to 1048; + extensions 1049 to 1049; + extensions 1050 to 1050; + extensions 1051 to 1051; + extensions 1052 to 1052; + extensions 1053 to 1053; + extensions 1054 to 1054; + extensions 1055 to 1055; + extensions 1056 to 1056; + extensions 1057 to 1057; + extensions 1058 to 1058; + extensions 1079 to 1079; + extensions 1080 to 1080; + extensions 1081 to 1081; + extensions 1082 to 1082; + extensions 1083 to 1083; + extensions 1084 to 1084; + extensions 1085 to 1085; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message16945 field17025 = 22068132; + } +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_2.proto b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_2.proto new file mode 100644 index 00000000..d123a720 --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_2.proto @@ -0,0 +1,528 @@ +// 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. + +// LINT: ALLOW_GROUPS + +syntax = "proto2"; + +package benchmarks.google_message3; + +import "datasets/google_message3/benchmark_message3_3.proto"; +import "datasets/google_message3/benchmark_message3_4.proto"; +import "datasets/google_message3/benchmark_message3_5.proto"; +import "datasets/google_message3/benchmark_message3_7.proto"; +import "datasets/google_message3/benchmark_message3_8.proto"; + +option cc_enable_arenas = true; +option java_package = "com.google.protobuf.benchmarks"; + +message Message22853 { + optional .benchmarks.google_message3.Enum22854 field22869 = 1; + repeated uint32 field22870 = 2 [packed = true]; + repeated float field22871 = 3 [packed = true]; + repeated float field22872 = 5 [packed = true]; + optional .benchmarks.google_message3.UnusedEmptyMessage field22873 = 4; +} + +message Message24345 { + optional string field24533 = 1; + optional .benchmarks.google_message3.UnusedEnum field24534 = 22; + optional .benchmarks.google_message3.Message24346 field24535 = 2; + optional string field24536 = 3; + optional string field24537 = 4; + optional .benchmarks.google_message3.UnusedEnum field24538 = 23; + optional string field24539 = 5; + required string field24540 = 6; + optional string field24541 = 7; + optional string field24542 = 8; + optional .benchmarks.google_message3.Message24316 field24543 = 9; + optional .benchmarks.google_message3.Message24376 field24544 = 10; + optional string field24545 = 11; + optional string field24546 = 19; + optional string field24547 = 20; + optional string field24548 = 21; + optional .benchmarks.google_message3.UnusedEmptyMessage field24549 = 12; + optional .benchmarks.google_message3.UnusedEmptyMessage field24550 = 13; + repeated string field24551 = 14; + optional string field24552 = 15; + optional int32 field24553 = 18; + optional .benchmarks.google_message3.Message24379 field24554 = 16; + optional string field24555 = 17; + repeated .benchmarks.google_message3.Message24356 field24556 = 24; + repeated .benchmarks.google_message3.Message24366 field24557 = 25; +} + +message Message24403 { + optional .benchmarks.google_message3.Message24401 field24681 = 1; + optional .benchmarks.google_message3.Message24402 field24682 = 2; +} + +message Message24391 { + optional string field24631 = 1; + optional string field24632 = 2; + repeated string field24633 = 3; + optional string field24634 = 4; + repeated string field24635 = 5; + repeated string field24636 = 16; + optional string field24637 = 17; + optional .benchmarks.google_message3.UnusedEmptyMessage field24638 = 25; + optional string field24639 = 7; + optional string field24640 = 18; + optional string field24641 = 19; + optional string field24642 = 20; + optional int32 field24643 = 24; + optional .benchmarks.google_message3.Message24379 field24644 = 8; + repeated .benchmarks.google_message3.UnusedEmptyMessage field24645 = 9; + optional .benchmarks.google_message3.UnusedEmptyMessage field24646 = 10; + optional .benchmarks.google_message3.UnusedEmptyMessage field24647 = 11; + optional .benchmarks.google_message3.UnusedEmptyMessage field24648 = 12; + repeated .benchmarks.google_message3.UnusedEmptyMessage field24649 = 13; + optional .benchmarks.google_message3.UnusedEmptyMessage field24650 = 14; + optional string field24651 = 21; + optional int32 field24652 = 22; + optional int32 field24653 = 23; + repeated string field24654 = 15; + repeated string field24655 = 6; +} + +message Message27454 {} + +message Message27357 { + optional string field27410 = 1; + optional float field27411 = 2; + optional string field27412 = 3; + optional bool field27413 = 4; + optional bool field27414 = 5; +} + +message Message27360 { + optional .benchmarks.google_message3.Message27358 field27426 = 1; + optional .benchmarks.google_message3.Enum27361 field27427 = 2; + optional .benchmarks.google_message3.Message27358 field27428 = 3; + repeated .benchmarks.google_message3.UnusedEmptyMessage field27429 = 4; +} + +message Message34387 { + optional string field34446 = 1; + repeated .benchmarks.google_message3.Message34381 field34447 = 2; + optional .benchmarks.google_message3.UnusedEnum field34448 = 3; + optional .benchmarks.google_message3.Enum34388 field34449 = 4; + optional int64 field34450 = 5; +} + +message Message34621 { + optional double field34651 = 1; + optional double field34652 = 2; + optional double field34653 = 3; + optional double field34654 = 4; + optional double field34655 = 11; + optional .benchmarks.google_message3.UnusedEmptyMessage field34656 = 13; + optional .benchmarks.google_message3.Message34619 field34657 = 14; + optional string field34658 = 5; + optional string field34659 = 9; + optional double field34660 = 12; + optional bytes field34661 = 19; + optional string field34662 = 15; + optional string field34663 = 16; + optional string field34664 = 17; + optional .benchmarks.google_message3.UnusedEmptyMessage field34665 = 18; + optional .benchmarks.google_message3.Message34621 field34666 = 20; + repeated .benchmarks.google_message3.UnusedEmptyMessage field34667 = 100; + optional .benchmarks.google_message3.UnusedEmptyMessage field34668 = 101; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message34621 field34669 = 17562023; + } +} + +message Message35476 { + optional string field35484 = 1; + optional string field35485 = 2; + optional string field35486 = 3; + optional .benchmarks.google_message3.Enum35477 field35487 = 4; + optional float field35488 = 5; + optional float field35489 = 6; + optional float field35490 = 7; + optional float field35491 = 8; + optional .benchmarks.google_message3.UnusedEmptyMessage field35492 = 9; + optional int32 field35493 = 10; + optional int32 field35494 = 11; + optional int32 field35495 = 12; + optional string field35496 = 13; + optional string field35497 = 14; +} + +message Message949 { + optional string field955 = 1; + optional int64 field956 = 2; + optional int64 field957 = 3; + optional .benchmarks.google_message3.Message730 field958 = 4; + repeated string field959 = 5; + optional string field960 = 6; + optional bool field961 = 7; +} + +message Message36869 { + optional int32 field36970 = 1; + optional int32 field36971 = 2; +} + +message Message33968 { + repeated group Message33969 = 1 {} + repeated .benchmarks.google_message3.Message33958 field33989 = 3; + optional .benchmarks.google_message3.UnusedEmptyMessage field33990 = 106; + optional bool field33991 = 108; + optional .benchmarks.google_message3.UnusedEnum field33992 = 107; +} + +message Message6644 { + optional .benchmarks.google_message3.UnusedEmptyMessage field6701 = 8; + optional string field6702 = 1; + optional double field6703 = 2; + optional .benchmarks.google_message3.UnusedEmptyMessage field6704 = 9; + optional bytes field6705 = 3; + optional bytes field6706 = 19; + optional .benchmarks.google_message3.Message6637 field6707 = 4; + repeated .benchmarks.google_message3.Message6126 field6708 = 18; + optional bool field6709 = 6; + optional .benchmarks.google_message3.Message6643 field6710 = 10; + optional string field6711 = 12; + optional .benchmarks.google_message3.UnusedEmptyMessage field6712 = 14; + optional .benchmarks.google_message3.UnusedEmptyMessage field6713 = 15; + optional .benchmarks.google_message3.UnusedEmptyMessage field6714 = 16; + optional int32 field6715 = 17; + optional .benchmarks.google_message3.UnusedEmptyMessage field6716 = 20; +} + +message Message18831 { + repeated group Message18832 = 1 { + optional int32 field18836 = 2; + optional string field18837 = 5; + optional float field18838 = 3; + optional float field18839 = 9; + optional int32 field18840 = 11; + repeated uint64 field18841 = 4; + repeated group Message18833 = 6 { + required uint64 field18843 = 7; + optional string field18844 = 8; + optional float field18845 = 10; + optional int32 field18846 = 12; + optional bool field18847 = 13; + } + } +} + +message Message13090 { + optional .benchmarks.google_message3.Message13083 field13141 = 1; + optional .benchmarks.google_message3.Message13088 field13142 = 2; +} + +message Message11874 { + optional .benchmarks.google_message3.Message10391 field11888 = 3; + optional string field11889 = 4; + optional .benchmarks.google_message3.Message11873 field11890 = 6; + optional bool field11891 = 7; + extensions 1 to 1; + extensions 2 to 2; + extensions 5 to 5; +} + +message Message4144 { + repeated group Message4145 = 1 { + required .benchmarks.google_message3.Enum4146 field4165 = 2; + required int32 field4166 = 3; + optional .benchmarks.google_message3.Enum4160 field4167 = 9; + optional bytes field4168 = 4; + optional .benchmarks.google_message3.Enum4152 field4169 = 5; + optional string field4170 = 6; + } +} + +message Message35573 { + optional fixed64 field35695 = 16; + optional string field35696 = 1000; + optional string field35697 = 1004; + optional int32 field35698 = 1003; + repeated group Message35574 = 1012 {} + optional int64 field35700 = 1011; + optional int64 field35701 = 1005; + optional int64 field35702 = 1006; + optional int64 field35703 = 1007; + optional int64 field35704 = 1008; + repeated group Message35575 = 1 { + optional int64 field35709 = 2; + optional string field35710 = 3; + optional string field35711 = 19; + optional int32 field35712 = 20; + optional int32 field35713 = 21; + optional int32 field35714 = 22; + optional bool field35715 = 23; + optional int32 field35716 = 47; + optional int32 field35717 = 48; + optional bool field35718 = 24; + optional fixed64 field35719 = 25; + optional bytes field35720 = 52; + optional int32 field35721 = 18; + optional fixed32 field35722 = 43; + optional bool field35723 = 26; + optional int32 field35724 = 27; + optional int32 field35725 = 17; + optional bool field35726 = 45; + repeated int32 field35727 = 33; + repeated int32 field35728 = 58; + optional float field35729 = 34; + optional float field35730 = 1009; + optional int32 field35731 = 28; + repeated fixed64 field35732 = 1001; + repeated fixed64 field35733 = 1002; + optional int32 field35734 = 44; + optional int32 field35735 = 50; + optional int32 field35736 = 36; + optional int32 field35737 = 40; + optional bool field35738 = 1016; + optional bool field35739 = 1010; + optional int32 field35740 = 37; + optional int32 field35741 = 38; + optional string field35742 = 46; + optional uint32 field35743 = 60; + repeated bytes field35744 = 56; + optional .benchmarks.google_message3.Message0 field35745 = 57; + required group Message35576 = 4 { + optional fixed64 field35747 = 5; + optional int32 field35748 = 6; + optional int32 field35749 = 49; + optional int32 field35750 = 7; + optional uint32 field35751 = 59; + optional int32 field35752 = 14; + optional int32 field35753 = 15; + optional int32 field35754 = 35; + optional bytes field35755 = 53; + optional int32 field35756 = 8; + optional string field35757 = 9; + optional fixed64 field35758 = 10; + optional int32 field35759 = 11; + optional int32 field35760 = 12; + optional int32 field35761 = 41; + optional int32 field35762 = 30; + optional int32 field35763 = 31; + optional int32 field35764 = 13; + optional bytes field35765 = 39; + optional string field35766 = 29; + optional int32 field35767 = 42; + repeated int32 field35768 = 32; + repeated int32 field35769 = 51; + optional int64 field35770 = 54; + optional .benchmarks.google_message3.Message0 field35771 = 55; + } + } +} + +message Message36858 { + repeated int32 field36956 = 1; + repeated string field36957 = 2; + repeated string field36958 = 12; + optional int32 field36959 = 3; + optional int32 field36960 = 4; + optional int32 field36961 = 14; + optional string field36962 = 11; + optional bool field36963 = 5; + optional bool field36964 = 13; + optional int64 field36965 = 6; + optional .benchmarks.google_message3.Message35506 field36966 = 7; + repeated group Message36859 = 8 { + required .benchmarks.google_message3.Enum36860 field36968 = 9; + optional float field36969 = 10; + } +} + +message Message13174 { + required int32 field13237 = 6; + optional int32 field13238 = 3; + required int32 field13239 = 4; + optional int32 field13240 = 8; + optional double field13241 = 5; + optional double field13242 = 7; + optional int32 field13243 = 17; + optional int32 field13244 = 19; + optional double field13245 = 20; + optional int32 field13246 = 9; + optional double field13247 = 10; + optional int32 field13248 = 11; + optional .benchmarks.google_message3.Message13151 field13249 = 21; + optional int32 field13250 = 1; + optional double field13251 = 2; + optional double field13252 = 15; + optional double field13253 = 16; + optional double field13254 = 12; + optional double field13255 = 13; + optional double field13256 = 14; + optional int32 field13257 = 18; +} + +message Message18283 { + optional .benchmarks.google_message3.UnusedEmptyMessage field18478 = 1; + optional int32 field18479 = 4; + optional int32 field18480 = 106; + optional int32 field18481 = 107; + optional int32 field18482 = 108; + optional int32 field18483 = 109; + optional int32 field18484 = 105; + optional int32 field18485 = 113; + optional int32 field18486 = 114; + optional int32 field18487 = 124; + optional int32 field18488 = 125; + optional int32 field18489 = 128; + optional int32 field18490 = 135; + optional bool field18491 = 166; + optional bool field18492 = 136; + optional int32 field18493 = 140; + optional int32 field18494 = 171; + optional int32 field18495 = 148; + optional int32 field18496 = 145; + optional float field18497 = 117; + optional int32 field18498 = 146; + optional string field18499 = 3; + optional .benchmarks.google_message3.UnusedEmptyMessage field18500 = 5; + optional .benchmarks.google_message3.UnusedEmptyMessage field18501 = 6; + optional .benchmarks.google_message3.UnusedEmptyMessage field18502 = 9; + optional .benchmarks.google_message3.Message18253 field18503 = 155; + optional .benchmarks.google_message3.UnusedEmptyMessage field18504 = 184; + optional .benchmarks.google_message3.UnusedEmptyMessage field18505 = 163; + optional .benchmarks.google_message3.UnusedEmptyMessage field18506 = 16; + repeated int32 field18507 = 20; + repeated int32 field18508 = 7; + repeated string field18509 = 194; + optional bytes field18510 = 30; + optional int32 field18511 = 31; + optional .benchmarks.google_message3.UnusedEmptyMessage field18512 = 178; + optional string field18513 = 8; + optional float field18514 = 2; + optional float field18515 = 100; + optional float field18516 = 101; + optional float field18517 = 102; + optional int32 field18518 = 103; + repeated .benchmarks.google_message3.UnusedEmptyMessage field18519 = 104; + optional int32 field18520 = 110; + optional int32 field18521 = 112; + optional .benchmarks.google_message3.UnusedEmptyMessage field18522 = 111; + optional .benchmarks.google_message3.UnusedEmptyMessage field18523 = 115; + optional .benchmarks.google_message3.UnusedEmptyMessage field18524 = 119; + optional .benchmarks.google_message3.UnusedEmptyMessage field18525 = 127; + optional .benchmarks.google_message3.UnusedEmptyMessage field18526 = 185; + optional int32 field18527 = 120; + optional int32 field18528 = 132; + optional .benchmarks.google_message3.UnusedEmptyMessage field18529 = 126; + optional .benchmarks.google_message3.UnusedEmptyMessage field18530 = 129; + optional .benchmarks.google_message3.UnusedEmptyMessage field18531 = 131; + optional fixed64 field18532 = 150; + optional int32 field18533 = 133; + optional int32 field18534 = 134; + optional int32 field18535 = 139; + optional fixed64 field18536 = 137; + optional fixed64 field18537 = 138; + optional .benchmarks.google_message3.UnusedEmptyMessage field18538 = 141; + optional int32 field18539 = 142; + optional int32 field18540 = 181; + optional .benchmarks.google_message3.Message16816 field18541 = 143; + optional .benchmarks.google_message3.Message16685 field18542 = 154; + optional int32 field18543 = 144; + optional int64 field18544 = 147; + optional int64 field18545 = 149; + optional int32 field18546 = 151; + optional int32 field18547 = 152; + optional int32 field18548 = 153; + optional float field18549 = 161; + optional .benchmarks.google_message3.Message0 field18550 = 123; + repeated int64 field18551 = 156; + optional int32 field18552 = 157; + repeated fixed64 field18553 = 188; + optional int32 field18554 = 158; + optional .benchmarks.google_message3.UnusedEmptyMessage field18555 = 159; + optional bool field18556 = 160; + optional uint64 field18557 = 162; + optional int32 field18558 = 164; + optional .benchmarks.google_message3.UnusedEmptyMessage field18559 = 10; + optional .benchmarks.google_message3.UnusedEmptyMessage field18560 = 167; + optional int32 field18561 = 168; + repeated fixed64 field18562 = 169; + repeated string field18563 = 170; + optional .benchmarks.google_message3.UnusedEmptyMessage field18564 = 172; + optional int64 field18565 = 173; + optional .benchmarks.google_message3.UnusedEmptyMessage field18566 = 174; + optional int64 field18567 = 175; + optional uint32 field18568 = 189; + optional .benchmarks.google_message3.UnusedEmptyMessage field18569 = 176; + optional .benchmarks.google_message3.UnusedEmptyMessage field18570 = 177; + optional uint32 field18571 = 179; + optional uint32 field18572 = 180; + optional .benchmarks.google_message3.UnusedEmptyMessage field18573 = 182; + optional .benchmarks.google_message3.UnusedEmptyMessage field18574 = 183; + optional .benchmarks.google_message3.UnusedEmptyMessage field18575 = 121; + optional .benchmarks.google_message3.UnusedEmptyMessage field18576 = 186; + optional .benchmarks.google_message3.UnusedEmptyMessage field18577 = 187; + optional .benchmarks.google_message3.UnusedEmptyMessage field18578 = 190; + optional int32 field18579 = 191; + optional float field18580 = 192; + optional bool field18581 = 193; + extensions 116 to 116; + extensions 118 to 118; + extensions 130 to 130; + extensions 165 to 165; +} + +message Message13169 { + repeated .benchmarks.google_message3.Message13168 field13223 = 1; + required .benchmarks.google_message3.Message13167 field13224 = 2; + optional string field13225 = 3; +} + +message Message19255 { + optional string field19257 = 1; +} + +message Message35542 { + optional bool field35543 = 1; + optional bool field35544 = 2; + optional bool field35545 = 3; +} + +message Message3901 { + optional int32 field3990 = 1; + optional int32 field3991 = 2; + optional int32 field3992 = 3; + optional int32 field3993 = 4; + optional int32 field3994 = 7; + optional int32 field3995 = 8; + optional int32 field3996 = 9; + optional int32 field3997 = 10; + optional int32 field3998 = 11; + optional int32 field3999 = 12; + optional .benchmarks.google_message3.UnusedEnum field4000 = 6; + optional int32 field4001 = 5; +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_3.proto b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_3.proto new file mode 100644 index 00000000..2e534a67 --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_3.proto @@ -0,0 +1,496 @@ +// 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. + +// LINT: ALLOW_GROUPS + +syntax = "proto2"; + +package benchmarks.google_message3; + +import "datasets/google_message3/benchmark_message3_4.proto"; +import "datasets/google_message3/benchmark_message3_5.proto"; +import "datasets/google_message3/benchmark_message3_7.proto"; +import "datasets/google_message3/benchmark_message3_8.proto"; + +option cc_enable_arenas = true; +option java_package = "com.google.protobuf.benchmarks"; + +message Message35546 { + optional int64 field35556 = 1; + optional int32 field35557 = 2; + optional bool field35558 = 3; + optional int64 field35559 = 13; + optional group Message35547 = 4 { + required int32 field35569 = 5; + required int32 field35570 = 6; + } + optional group Message35548 = 10 { + required int64 field35571 = 11; + required int64 field35572 = 12; + } + optional bool field35562 = 14; + optional bool field35563 = 15; + optional int32 field35564 = 16; + optional bool field35565 = 17; + optional bool field35566 = 18; + optional string field35567 = 100; +} + +message Message2356 { + optional .benchmarks.google_message3.Message1374 field2368 = 121; + optional uint64 field2369 = 1; + optional int32 field2370 = 2; + optional int32 field2371 = 17; + required string field2372 = 3; + optional int32 field2373 = 7; + optional bytes field2374 = 8; + optional string field2375 = 4; + optional string field2376 = 101; + optional int32 field2377 = 102; + optional int32 field2378 = 103; + optional int32 field2379 = 104; + optional int32 field2380 = 113; + optional int32 field2381 = 114; + optional int32 field2382 = 115; + optional int32 field2383 = 117; + optional int32 field2384 = 118; + optional int32 field2385 = 119; + optional int32 field2386 = 105; + optional bytes field2387 = 5; + optional group Message2357 = 6 { + optional int64 field2399 = 9; + optional int32 field2400 = 10; + optional int32 field2401 = 11; + optional int32 field2402 = 12; + optional int32 field2403 = 13; + optional int32 field2404 = 116; + optional int32 field2405 = 106; + required bytes field2406 = 14; + optional int32 field2407 = 45; + optional int32 field2408 = 112; + optional bool field2409 = 122; + optional bytes field2410 = 124; + } + optional string field2389 = 120; + optional group Message2358 = 107 {} + repeated group Message2359 = 40 { + optional string field2413 = 41; + optional string field2414 = 42; + optional string field2415 = 43; + optional string field2416 = 44; + optional int32 field2417 = 46; + optional string field2418 = 47; + optional float field2419 = 110; + optional float field2420 = 111; + } + optional int32 field2392 = 50; + optional .benchmarks.google_message3.UnusedEmptyMessage field2393 = 60; + optional .benchmarks.google_message3.UnusedEmptyMessage field2394 = 70; + optional .benchmarks.google_message3.UnusedEmptyMessage field2395 = 80; + optional .benchmarks.google_message3.UnusedEmptyMessage field2396 = 90; + optional string field2397 = 100; + optional string field2398 = 123; +} + +message Message7029 { + required int32 field7183 = 1; + optional int32 field7184 = 2; + optional int32 field7185 = 3; + optional int32 field7186 = 4; + optional int32 field7187 = 5; + optional int32 field7188 = 6; + optional int32 field7189 = 17; + optional int32 field7190 = 18; + optional int32 field7191 = 49; + optional int32 field7192 = 28; + optional int32 field7193 = 33; + optional int32 field7194 = 25; + optional int32 field7195 = 26; + optional int32 field7196 = 40; + optional int32 field7197 = 41; + optional int32 field7198 = 42; + optional int32 field7199 = 43; + optional int32 field7200 = 19; + optional int32 field7201 = 7; + optional int32 field7202 = 8; + optional int32 field7203 = 9; + optional int32 field7204 = 10; + optional int32 field7205 = 11; + optional int32 field7206 = 12; + repeated group Message7030 = 13 { + optional string field7226 = 14; + optional string field7227 = 15; + optional int64 field7228 = 16; + } + repeated group Message7031 = 21 { + optional string field7229 = 22; + optional int32 field7230 = 23; + optional int32 field7231 = 24; + optional int32 field7232 = 30; + optional int32 field7233 = 31; + optional int32 field7234 = 35; + } + optional int32 field7209 = 20; + optional float field7210 = 27; + optional int32 field7211 = 29; + optional int32 field7212 = 32; + optional string field7213 = 48; + optional bool field7214 = 34; + optional int32 field7215 = 36; + optional float field7216 = 37; + optional bool field7217 = 38; + optional bool field7218 = 39; + optional .benchmarks.google_message3.UnusedEmptyMessage field7219 = 44; + optional int32 field7220 = 45; + optional int32 field7221 = 46; + optional int32 field7222 = 47; + optional .benchmarks.google_message3.UnusedEmptyMessage field7223 = 50; + optional int32 field7224 = 51; +} + +message Message35538 { + required int64 field35539 = 1; +} + +message Message18921 { + optional string field18946 = 1; + optional fixed64 field18947 = 2; + optional int32 field18948 = 3; + optional double field18949 = 4; + optional bool field18950 = 17; + optional bool field18951 = 23; + optional .benchmarks.google_message3.UnusedEmptyMessage field18952 = 24; + repeated group Message18922 = 5 { + optional uint64 field18959 = 6; + optional string field18960 = 13; + optional bool field18961 = 21; + optional bool field18962 = 33; + optional int32 field18963 = 7; + optional int32 field18964 = 8; + optional string field18965 = 9; + optional .benchmarks.google_message3.Message18856 field18966 = 10; + optional uint64 field18967 = 34; + optional .benchmarks.google_message3.UnusedEmptyMessage field18968 = 11; + optional uint64 field18969 = 35; + optional float field18970 = 12; + repeated string field18971 = 14; + optional bool field18972 = 15; + optional bool field18973 = 16; + optional float field18974 = 22; + optional int32 field18975 = 18; + optional int32 field18976 = 19; + optional int32 field18977 = 20; + optional .benchmarks.google_message3.UnusedEmptyMessage field18978 = 25; + optional .benchmarks.google_message3.UnusedEnum field18979 = 26; + repeated string field18980 = 27; + optional float field18981 = 28; + } + repeated .benchmarks.google_message3.UnusedEmptyMessage field18954 = 29; + repeated .benchmarks.google_message3.Message18943 field18955 = 30; + repeated .benchmarks.google_message3.Message18944 field18956 = 31; + repeated .benchmarks.google_message3.UnusedEmptyMessage field18957 = 32; +} + +message Message35540 { + optional bool field35541 = 1; +} + +message Message3886 { + repeated group Message3887 = 1 { + required string field3932 = 2; + optional string field3933 = 9; + optional .benchmarks.google_message3.Message3850 field3934 = 3; + optional bytes field3935 = 8; + } +} + +message Message6743 { + optional .benchmarks.google_message3.Message6721 field6759 = 1; + optional .benchmarks.google_message3.Message6723 field6760 = 2; + optional .benchmarks.google_message3.Message6723 field6761 = 8; + optional .benchmarks.google_message3.Message6725 field6762 = 3; + optional .benchmarks.google_message3.Message6726 field6763 = 4; + optional .benchmarks.google_message3.Message6733 field6764 = 5; + optional .benchmarks.google_message3.Message6734 field6765 = 6; + optional .benchmarks.google_message3.Message6742 field6766 = 7; +} + +message Message6773 { + optional .benchmarks.google_message3.Enum6769 field6794 = 1; + optional int32 field6795 = 9; + optional .benchmarks.google_message3.UnusedEnum field6796 = 10; + optional int32 field6797 = 11; + optional int32 field6798 = 2; + optional .benchmarks.google_message3.Enum6774 field6799 = 3; + optional double field6800 = 5; + optional double field6801 = 7; + optional double field6802 = 8; + optional .benchmarks.google_message3.Enum6782 field6803 = 6; +} + +message Message8224 { + optional .benchmarks.google_message3.UnusedEmptyMessage field8255 = 1; + optional .benchmarks.google_message3.Message8184 field8256 = 2; + optional .benchmarks.google_message3.Message7966 field8257 = 3; + optional string field8258 = 4; + optional string field8259 = 5; + optional bool field8260 = 6; + optional int64 field8261 = 7; + optional string field8262 = 8; + optional int64 field8263 = 9; + optional double field8264 = 10; + optional int64 field8265 = 11; + repeated string field8266 = 12; + optional int64 field8267 = 13; + optional int32 field8268 = 14; + optional int32 field8269 = 15; + optional int64 field8270 = 16; + optional double field8271 = 17; + optional .benchmarks.google_message3.UnusedEmptyMessage field8272 = 18; + optional .benchmarks.google_message3.UnusedEmptyMessage field8273 = 19; + repeated .benchmarks.google_message3.UnusedEmptyMessage field8274 = 20; + optional bool field8275 = 21; + optional .benchmarks.google_message3.UnusedEmptyMessage field8276 = 22; + optional .benchmarks.google_message3.UnusedEmptyMessage field8277 = 23; + repeated .benchmarks.google_message3.UnusedEmptyMessage field8278 = 24; + optional .benchmarks.google_message3.UnusedEmptyMessage field8279 = 25; + optional bool field8280 = 26; + repeated .benchmarks.google_message3.UnusedEmptyMessage field8281 = 27; +} + +message Message8392 { + optional string field8395 = 1; + optional string field8396 = 2; + optional .benchmarks.google_message3.Message7966 field8397 = 3; + optional string field8398 = 4; + optional string field8399 = 5; + optional string field8400 = 6; + optional string field8401 = 7; + optional string field8402 = 8; + optional string field8403 = 9; +} + +message Message8130 { + optional string field8156 = 1; + optional string field8157 = 2; + optional string field8158 = 4; + optional .benchmarks.google_message3.UnusedEmptyMessage field8159 = 6; + repeated string field8160 = 7; + optional int64 field8161 = 8; + optional .benchmarks.google_message3.UnusedEmptyMessage field8162 = 9; + optional string field8163 = 10; + optional string field8164 = 11; + optional string field8165 = 12; + optional string field8166 = 13; + optional .benchmarks.google_message3.UnusedEmptyMessage field8167 = 14; + optional .benchmarks.google_message3.UnusedEmptyMessage field8168 = 15; + optional string field8169 = 16; + optional .benchmarks.google_message3.UnusedEnum field8170 = 17; + optional .benchmarks.google_message3.UnusedEnum field8171 = 18; + optional bool field8172 = 19; + optional bool field8173 = 20; + optional double field8174 = 21; + optional int32 field8175 = 22; + optional int32 field8176 = 23; + optional .benchmarks.google_message3.UnusedEmptyMessage field8177 = 24; + repeated .benchmarks.google_message3.UnusedEmptyMessage field8178 = 25; + repeated .benchmarks.google_message3.UnusedEmptyMessage field8179 = 26; +} + +message Message8478 { + optional string field8489 = 7; + optional .benchmarks.google_message3.Message7966 field8490 = 1; + optional .benchmarks.google_message3.Message8476 field8491 = 2; + optional int64 field8492 = 3; + optional .benchmarks.google_message3.Message8476 field8493 = 4; + repeated .benchmarks.google_message3.Message8477 field8494 = 5; + optional .benchmarks.google_message3.Message8454 field8495 = 6; + optional .benchmarks.google_message3.UnusedEmptyMessage field8496 = 8; +} + +message Message8479 { + optional .benchmarks.google_message3.Message8475 field8497 = 1; + optional .benchmarks.google_message3.Message7966 field8498 = 2; + optional .benchmarks.google_message3.Message8476 field8499 = 3; + optional .benchmarks.google_message3.Message8476 field8500 = 4; + optional string field8501 = 6; + optional string field8502 = 7; + optional .benchmarks.google_message3.Message7966 field8503 = 8; + optional .benchmarks.google_message3.Message8455 field8504 = 5; + optional .benchmarks.google_message3.UnusedEmptyMessage field8505 = 9; +} + +message Message10319 { + optional .benchmarks.google_message3.Enum10325 field10340 = 1; + optional int32 field10341 = 4; + optional int32 field10342 = 5; + optional bytes field10343 = 3; + optional string field10344 = 2; + optional string field10345 = 6; + optional string field10346 = 7; +} + +message Message4016 { + required int32 field4017 = 1; + required int32 field4018 = 2; + required int32 field4019 = 3; + required int32 field4020 = 4; +} + +message Message12669 { + optional .benchmarks.google_message3.Message12559 field12681 = 1; + optional float field12682 = 2; + optional bool field12683 = 3; + optional .benchmarks.google_message3.Enum12670 field12684 = 4; +} + +message Message12819 { + optional double field12834 = 1; + optional double field12835 = 2; + optional double field12836 = 3; + optional double field12837 = 4; + optional double field12838 = 5; + optional double field12839 = 6; +} + +message Message12820 { + optional int32 field12840 = 1; + optional int32 field12841 = 2; + optional int32 field12842 = 3; + optional int32 field12843 = 8; + optional int32 field12844 = 4; + optional int32 field12845 = 5; + optional int32 field12846 = 6; + optional int32 field12847 = 7; +} + +message Message12821 { + optional int32 field12848 = 1; + optional int32 field12849 = 2; + optional int32 field12850 = 3; + optional int32 field12851 = 4; + optional int32 field12852 = 5; +} + +message Message12818 { + optional uint64 field12829 = 1; + optional int32 field12830 = 2; + optional int32 field12831 = 3; + optional int32 field12832 = 5; + repeated .benchmarks.google_message3.Message12817 field12833 = 4; +} + +message Message16479 { + optional .benchmarks.google_message3.Message16480 field16484 = 1; + optional int32 field16485 = 5; + optional float field16486 = 2; + optional uint32 field16487 = 4; + optional bool field16488 = 3; + optional uint32 field16489 = 6; +} + +message Message16722 { + optional string field16752 = 1; + optional string field16753 = 2; + optional string field16754 = 3; + optional int32 field16755 = 5; + optional string field16756 = 4; +} + +message Message16724 { + optional int64 field16761 = 1; + optional float field16762 = 2; + optional int64 field16763 = 3; + optional int64 field16764 = 4; + optional bool field16765 = 5; + repeated string field16766 = 6; + repeated string field16767 = 7; + optional .benchmarks.google_message3.UnusedEmptyMessage field16768 = 8; + optional bool field16769 = 9; + optional uint32 field16770 = 10; + optional .benchmarks.google_message3.Enum16728 field16771 = 11; + repeated int32 field16772 = 12; + optional bool field16773 = 13; +} + +message Message17728 {} + +message Message24356 { + optional string field24559 = 1; + optional string field24560 = 2; + optional int32 field24561 = 14; + optional string field24562 = 3; + optional string field24563 = 4; + optional string field24564 = 5; + optional .benchmarks.google_message3.UnusedEnum field24565 = 13; + optional string field24566 = 6; + optional .benchmarks.google_message3.Enum24361 field24567 = 12; + optional string field24568 = 7; + optional string field24569 = 8; + optional string field24570 = 9; + repeated .benchmarks.google_message3.UnusedEmptyMessage field24571 = 10; + repeated string field24572 = 11; + repeated string field24573 = 15; +} + +message Message24376 { + optional string field24589 = 1; + optional string field24590 = 2; + optional string field24591 = 3; + required .benchmarks.google_message3.Message24377 field24592 = 4; + optional .benchmarks.google_message3.Message24317 field24593 = 5; + optional string field24594 = 6; + optional .benchmarks.google_message3.Message24378 field24595 = 7; + repeated string field24596 = 8; + repeated .benchmarks.google_message3.UnusedEmptyMessage field24597 = 14; + repeated string field24598 = 9; + repeated string field24599 = 10; + repeated string field24600 = 11; + optional string field24601 = 12; + repeated string field24602 = 13; +} + +message Message24366 { + optional string field24574 = 1; + optional string field24575 = 2; + optional string field24576 = 3; + optional int32 field24577 = 10; + optional string field24578 = 13; + optional string field24579 = 4; + optional string field24580 = 5; + optional .benchmarks.google_message3.UnusedEnum field24581 = 9; + optional string field24582 = 14; + optional .benchmarks.google_message3.UnusedEnum field24583 = 15; + optional string field24584 = 6; + optional string field24585 = 12; + repeated .benchmarks.google_message3.UnusedEmptyMessage field24586 = 7; + repeated string field24587 = 8; + repeated string field24588 = 11; +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_4.proto b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_4.proto new file mode 100644 index 00000000..b3041481 --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_4.proto @@ -0,0 +1,514 @@ +// 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. + +// LINT: ALLOW_GROUPS + +syntax = "proto2"; + +package benchmarks.google_message3; + +import "datasets/google_message3/benchmark_message3_5.proto"; +import "datasets/google_message3/benchmark_message3_6.proto"; +import "datasets/google_message3/benchmark_message3_7.proto"; +import "datasets/google_message3/benchmark_message3_8.proto"; + +option cc_enable_arenas = true; +option java_package = "com.google.protobuf.benchmarks"; + +message Message24346 {} + +message Message24401 { + optional .benchmarks.google_message3.Message24400 field24679 = 1; +} + +message Message24402 { + optional .benchmarks.google_message3.Message24400 field24680 = 1; +} + +message Message24379 { + optional string field24603 = 1; + optional string field24604 = 2; + optional string field24605 = 3; + required .benchmarks.google_message3.Message24380 field24606 = 4; + optional .benchmarks.google_message3.UnusedEmptyMessage field24607 = 5; + optional string field24608 = 6; + optional .benchmarks.google_message3.Message24381 field24609 = 7; + repeated string field24610 = 8; + repeated .benchmarks.google_message3.UnusedEmptyMessage field24611 = 17; + repeated string field24612 = 9; + repeated string field24613 = 10; + repeated string field24614 = 11; + optional string field24615 = 14; + optional string field24616 = 12; + optional string field24617 = 16; + repeated .benchmarks.google_message3.UnusedEmptyMessage field24618 = 13; + repeated string field24619 = 15; + repeated string field24620 = 18; +} + +message Message27358 { + optional int32 field27415 = 1; + optional int32 field27416 = 2; +} + +message Message34381 { + optional string field34398 = 1; + optional .benchmarks.google_message3.UnusedEmptyMessage field34399 = 2; + optional .benchmarks.google_message3.UnusedEmptyMessage field34400 = 3; + optional .benchmarks.google_message3.UnusedEmptyMessage field34401 = 4; + optional .benchmarks.google_message3.UnusedEmptyMessage field34402 = 5; + optional bool field34403 = 6; + optional bool field34404 = 7; + optional .benchmarks.google_message3.UnusedEmptyMessage field34405 = 8; + optional bool field34406 = 9; + optional .benchmarks.google_message3.UnusedEmptyMessage field34407 = 10; +} + +message Message34619 { + optional double field34641 = 1; + optional double field34642 = 2; + optional double field34643 = 3; + optional double field34644 = 4; + optional double field34645 = 11; + optional double field34646 = 5; + optional .benchmarks.google_message3.UnusedEmptyMessage field34647 = 100; +} + +message Message730 { + optional string field897 = 19; + repeated string field898 = 27; + repeated string field899 = 28; + repeated string field900 = 21; + optional string field901 = 30; + repeated uint32 field902 = 20; + repeated uint32 field903 = 32; + repeated string field904 = 16; + repeated .benchmarks.google_message3.Message697 field905 = 6; + repeated .benchmarks.google_message3.Message704 field906 = 7; + repeated string field907 = 18; + repeated .benchmarks.google_message3.Message703 field908 = 8; + repeated string field909 = 9; + optional .benchmarks.google_message3.Message716 field910 = 10; + optional .benchmarks.google_message3.Message718 field911 = 11; + optional bool field912 = 14; + repeated .benchmarks.google_message3.Message715 field913 = 4; + repeated string field914 = 17; + repeated string field915 = 23; + repeated .benchmarks.google_message3.Message719 field916 = 24; + repeated .benchmarks.google_message3.Message728 field917 = 26; + repeated .benchmarks.google_message3.Message702 field918 = 35; + optional string field919 = 36; + repeated string field920 = 37; + optional int64 field921 = 38; + repeated .benchmarks.google_message3.UnusedEmptyMessage field922 = 39; + repeated .benchmarks.google_message3.UnusedEmptyMessage field923 = 1; + optional .benchmarks.google_message3.UnusedEmptyMessage field924 = 2; + optional .benchmarks.google_message3.UnusedEmptyMessage field925 = 3; + optional .benchmarks.google_message3.UnusedEmptyMessage field926 = 5; + optional .benchmarks.google_message3.UnusedEmptyMessage field927 = 13; + repeated string field928 = 22; + optional bytes field929 = 31; + extensions 25 to 25; + extensions 29 to 29; + extensions 34 to 34; + extensions 15 to 15; +} + +message Message33958 { + optional string field33977 = 1; + optional string field33978 = 9; + repeated group Message33959 = 2 { + required string field33982 = 3; + optional string field33983 = 4; + optional string field33984 = 5; + optional fixed64 field33985 = 8; + optional bool field33986 = 10; + optional .benchmarks.google_message3.Message0 field33987 = 6; + } + optional .benchmarks.google_message3.Enum33960 field33980 = 7; + extend .benchmarks.google_message3.Message0 { + optional .benchmarks.google_message3.Message33958 field33981 = 10747482; + } +} + +message Message6637 { + optional .benchmarks.google_message3.UnusedEmptyMessage field6670 = 2; + repeated .benchmarks.google_message3.UnusedEmptyMessage field6671 = 1; + optional int32 field6672 = 3; + repeated string field6673 = 4; + optional .benchmarks.google_message3.UnusedEmptyMessage field6674 = 5; +} + +message Message6643 { + optional .benchmarks.google_message3.UnusedEmptyMessage field6683 = 3; + optional .benchmarks.google_message3.UnusedEmptyMessage field6684 = 4; + optional double field6685 = 5; + optional double field6686 = 6; + optional int32 field6687 = 1; + optional int32 field6688 = 2; + optional double field6689 = 9; + optional bytes field6690 = 10; + optional int32 field6691 = 11; + optional bool field6692 = 12; + optional bool field6693 = 13; + optional .benchmarks.google_message3.Message6578 field6694 = 15; + optional .benchmarks.google_message3.UnusedEnum field6695 = 16; + optional int64 field6696 = 17; + repeated .benchmarks.google_message3.UnusedEmptyMessage field6697 = 22; + optional .benchmarks.google_message3.UnusedEmptyMessage field6698 = 19; + optional .benchmarks.google_message3.UnusedEmptyMessage field6699 = 20; + optional int32 field6700 = 21; +} + +message Message6126 { + required string field6152 = 1; + repeated .benchmarks.google_message3.UnusedEmptyMessage field6153 = 9; + optional int32 field6154 = 14; + optional bytes field6155 = 10; + optional .benchmarks.google_message3.Message6024 field6156 = 12; + optional int32 field6157 = 4; + optional string field6158 = 5; + optional int32 field6159 = 6; + repeated int32 field6160 = 2; + repeated int32 field6161 = 3; + repeated .benchmarks.google_message3.Message6052 field6162 = 7; + repeated .benchmarks.google_message3.UnusedEmptyMessage field6163 = 11; + optional .benchmarks.google_message3.Enum6065 field6164 = 15; + repeated .benchmarks.google_message3.UnusedEmptyMessage field6165 = 8; + optional bool field6166 = 13; + optional bool field6167 = 16; + optional bool field6168 = 18; + repeated .benchmarks.google_message3.Message6054 field6169 = 17; + optional int32 field6170 = 19; +} + +message Message13083 { + optional float field13096 = 1; + repeated group Message13084 = 2 { + required float field13107 = 3; + required int32 field13108 = 4; + optional float field13109 = 5; + repeated .benchmarks.google_message3.Enum13092 field13110 = 6; + } + optional float field13098 = 44; + optional float field13099 = 45; + optional uint64 field13100 = 46; + optional float field13101 = 47; + optional group Message13085 = 16 {} + repeated group Message13086 = 23 {} + repeated group Message13087 = 29 {} + optional .benchmarks.google_message3.UnusedEmptyMessage field13105 = 43; +} + +message Message13088 { + repeated group Message13089 = 1 { + required string field13139 = 2; + optional float field13140 = 3; + } + optional int64 field13136 = 4; + optional bool field13137 = 5; +} + +message Message10391 { + optional .benchmarks.google_message3.Enum10392 field10411 = 1; + optional .benchmarks.google_message3.UnusedEnum field10412 = 2; + optional int64 field10413 = 3; + optional string field10414 = 4; + optional string field10415 = 5; + optional bytes field10416 = 6; + optional bool field10417 = 8; + optional .benchmarks.google_message3.UnusedEmptyMessage field10418 = 9; + optional bool field10419 = 10; +} + +message Message11873 { + optional string field11876 = 1; + optional string field11877 = 4; + optional .benchmarks.google_message3.Message10573 field11878 = 5; + optional .benchmarks.google_message3.Message10582 field11879 = 6; + optional .benchmarks.google_message3.Message10824 field11880 = 7; + optional .benchmarks.google_message3.Message10773 field11881 = 12; + optional .benchmarks.google_message3.Message11866 field11882 = 8; + optional .benchmarks.google_message3.Message10818 field11883 = 13; + optional .benchmarks.google_message3.UnusedEmptyMessage field11884 = 16; + optional .benchmarks.google_message3.Message10155 field11885 = 11; + optional .benchmarks.google_message3.Message10469 field11886 = 14; + optional .benchmarks.google_message3.UnusedEmptyMessage field11887 = 15; + extensions 9 to 9; + extensions 10 to 10; +} + +message Message35506 { + optional int32 field35524 = 1; + optional string field35525 = 2; + optional .benchmarks.google_message3.Enum35507 field35526 = 3; + repeated .benchmarks.google_message3.UnusedEmptyMessage field35527 = 4; +} + +message Message13151 { + repeated .benchmarks.google_message3.Message13145 field13158 = 1; +} + +message Message18253 { + repeated group Message18254 = 1 { + required fixed64 field18362 = 2; + required double field18363 = 3; + } +} + +message Message16685 { + repeated .benchmarks.google_message3.Message16686 field16694 = 2; +} + +message Message16816 { + optional float field16826 = 1; + optional .benchmarks.google_message3.Enum16819 field16827 = 2; + optional float field16828 = 3; + repeated group Message16817 = 4 {} + optional bool field16830 = 7; + optional bool field16831 = 8; + repeated group Message16818 = 12 {} + optional string field16833 = 10; + optional bool field16834 = 13; + optional bool field16835 = 14; +} + +message Message13168 { + required int32 field13212 = 1; + optional fixed64 field13213 = 7; + optional bool field13214 = 8; + optional fixed64 field13215 = 10; + optional bool field13216 = 11; + optional .benchmarks.google_message3.Message12796 field13217 = 9; + required double field13218 = 2; + required bool field13219 = 3; + optional int32 field13220 = 4; + required bool field13221 = 5; + optional int32 field13222 = 6; +} + +message Message13167 { + required int32 field13199 = 1; + optional int32 field13200 = 2; + optional int32 field13201 = 3; + optional bool field13202 = 8; + optional fixed64 field13203 = 12; + optional bool field13204 = 13; + optional .benchmarks.google_message3.Message12796 field13205 = 11; + optional fixed64 field13206 = 9; + optional bool field13207 = 10; + repeated int32 field13208 = 4; + optional int32 field13209 = 5; + optional int32 field13210 = 6; + optional int32 field13211 = 7; +} + +message Message1374 { + required string field1375 = 1; + optional string field1376 = 2; +} + +message Message18943 {} + +message Message18944 {} + +message Message18856 { + optional string field18857 = 1; + optional string field18858 = 2; + optional bool field18859 = 31; + optional string field18860 = 26; + optional string field18861 = 3; + optional string field18862 = 4; + optional string field18863 = 5; + optional string field18864 = 17; + optional string field18865 = 6; + optional string field18866 = 7; + optional string field18867 = 8; + optional string field18868 = 9; + optional string field18869 = 10; + optional string field18870 = 11; + optional string field18871 = 21; + optional string field18872 = 18; + optional string field18873 = 19; + optional string field18874 = 20; + optional string field18875 = 22; + optional string field18876 = 23; + optional string field18877 = 24; + optional string field18878 = 25; + optional string field18879 = 12; + optional string field18880 = 13; + optional string field18881 = 29; + optional string field18882 = 30; + optional string field18883 = 15; + optional string field18884 = 16; + repeated string field18885 = 14; + optional string field18886 = 27; + optional string field18887 = 28; +} + +message Message3850 { + optional .benchmarks.google_message3.Enum3851 field3924 = 2; + optional bool field3925 = 12; + optional int32 field3926 = 4; + optional bool field3927 = 10; + optional bool field3928 = 13; + optional bool field3929 = 14; +} + +message Message6721 { + optional .benchmarks.google_message3.Message6722 field6744 = 1; + optional bool field6745 = 2; + optional bool field6746 = 3; + optional bool field6747 = 4; +} + +message Message6742 { + optional bool field6758 = 1; +} + +message Message6726 { + optional int64 field6752 = 1; + repeated .benchmarks.google_message3.Message6727 field6753 = 2; +} + +message Message6733 { + optional int64 field6754 = 1; + optional int64 field6755 = 2; + optional bool field6756 = 3; +} + +message Message6723 { + optional int64 field6748 = 1; + repeated .benchmarks.google_message3.Message6724 field6749 = 2; +} + +message Message6725 { + optional int32 field6750 = 1; + optional int32 field6751 = 2; +} + +message Message6734 { + repeated .benchmarks.google_message3.Message6735 field6757 = 1; +} + +message Message8184 { + optional .benchmarks.google_message3.Message7966 field8228 = 1; + optional bool field8229 = 2; + repeated .benchmarks.google_message3.Message8183 field8230 = 3; +} + +message Message8477 { + optional .benchmarks.google_message3.Message7966 field8486 = 1; + optional int64 field8487 = 2; + optional string field8488 = 3; +} + +message Message8454 { + optional .benchmarks.google_message3.Message8449 field8465 = 1; + optional int64 field8466 = 3; + optional int32 field8467 = 4; + optional bool field8468 = 5; + extend .benchmarks.google_message3.Message8301 { + optional .benchmarks.google_message3.Message8454 field8469 = 66; + } +} + +message Message8476 { + optional string field8483 = 1; + optional string field8484 = 2; + optional string field8485 = 3; +} + +message Message8455 { + optional .benchmarks.google_message3.Message8449 field8470 = 1; + repeated .benchmarks.google_message3.Message8456 field8471 = 2; + optional .benchmarks.google_message3.Message8457 field8472 = 5; + optional .benchmarks.google_message3.UnusedEmptyMessage field8473 = 6; + extend .benchmarks.google_message3.Message8302 { + optional .benchmarks.google_message3.Message8455 field8474 = 66; + } +} + +message Message8475 { + optional string field8481 = 1; + optional int64 field8482 = 2; +} + +message Message12559 {} + +message Message12817 { + optional int32 field12826 = 1; + optional int32 field12827 = 2; + optional int32 field12828 = 3; +} + +message Message16480 { + optional .benchmarks.google_message3.Message13358 field16490 = 1; + optional .benchmarks.google_message3.Enum16042 field16491 = 2; + optional .benchmarks.google_message3.Message13912 field16492 = 3; + optional string field16493 = 4; + optional string field16494 = 5; + optional string field16495 = 6; + optional string field16496 = 7; + optional .benchmarks.google_message3.Message13358 field16497 = 8; + optional fixed32 field16498 = 9; +} + +message Message24317 { + optional string field24446 = 1; + optional .benchmarks.google_message3.Message24312 field24447 = 2; + repeated .benchmarks.google_message3.Message24315 field24448 = 3; + repeated .benchmarks.google_message3.Message24313 field24449 = 4; + repeated .benchmarks.google_message3.Message24316 field24450 = 5; + repeated .benchmarks.google_message3.UnusedEmptyMessage field24451 = 6; + optional .benchmarks.google_message3.UnusedEmptyMessage field24452 = 7; + repeated string field24453 = 8; + repeated string field24454 = 9; + repeated string field24455 = 10; + repeated string field24456 = 28; + optional string field24457 = 11; + optional string field24458 = 12; + optional string field24459 = 13; + optional string field24460 = 14; + repeated string field24461 = 15; + optional string field24462 = 16; + repeated string field24463 = 17; + repeated string field24464 = 18; + repeated string field24465 = 19; + repeated string field24466 = 20; + repeated string field24467 = 21; + repeated string field24468 = 22; + repeated string field24469 = 23; + repeated string field24470 = 24; + optional string field24471 = 25; + optional string field24472 = 26; + repeated string field24473 = 27; + optional bool field24474 = 40; +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_5.proto b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_5.proto new file mode 100644 index 00000000..e72d7ee8 --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_5.proto @@ -0,0 +1,496 @@ +// 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. + +// LINT: ALLOW_GROUPS + +syntax = "proto2"; + +package benchmarks.google_message3; + +import "datasets/google_message3/benchmark_message3_6.proto"; +import "datasets/google_message3/benchmark_message3_7.proto"; +import "datasets/google_message3/benchmark_message3_8.proto"; + +option cc_enable_arenas = true; +option java_package = "com.google.protobuf.benchmarks"; + +message Message24377 {} + +message Message24378 {} + +message Message24400 { + optional int32 field24674 = 1; + optional int32 field24675 = 2; + optional int32 field24676 = 3; + optional int32 field24677 = 4; + optional int32 field24678 = 5; +} + +message Message24380 {} + +message Message24381 {} + +message Message719 { + repeated string field881 = 1; + repeated string field882 = 2; + repeated string field883 = 3; + optional .benchmarks.google_message3.Enum720 field884 = 4; +} + +message Message728 { + required string field887 = 1; + repeated string field888 = 2; + repeated .benchmarks.google_message3.Message703 field889 = 3; + repeated .benchmarks.google_message3.Message715 field890 = 4; + repeated string field891 = 5; + repeated string field892 = 6; + optional .benchmarks.google_message3.Message718 field893 = 7; + optional .benchmarks.google_message3.Message716 field894 = 8; + repeated string field895 = 9; + extensions 10 to 10; + extensions 11 to 11; + extensions 12 to 12; +} + +message Message704 { + optional string field800 = 1; + optional string field801 = 7; + optional string field802 = 2; + optional string field803 = 3; + optional string field804 = 4; + optional string field805 = 5; + optional .benchmarks.google_message3.UnusedEmptyMessage field806 = 6; +} + +message Message697 { + optional string field743 = 7; + repeated string field744 = 1; + repeated string field745 = 2; + repeated string field746 = 33; + repeated string field747 = 29; + repeated string field748 = 30; + repeated string field749 = 31; + repeated string field750 = 32; + repeated string field751 = 13; + repeated string field752 = 6; + repeated string field753 = 3; + repeated string field754 = 14; + repeated string field755 = 15; + repeated string field756 = 16; + repeated string field757 = 4; + repeated string field758 = 34; + repeated string field759 = 35; + repeated string field760 = 5; + repeated string field761 = 17; + repeated string field762 = 18; + repeated string field763 = 19; + optional bool field764 = 36; + repeated string field765 = 8; + repeated string field766 = 9; + optional string field767 = 27; + optional bool field768 = 25; + optional .benchmarks.google_message3.Message700 field769 = 10; + optional bool field770 = 11; + optional bool field771 = 24; + repeated string field772 = 12; + repeated string field773 = 20; + repeated string field774 = 21; + repeated string field775 = 22; + repeated .benchmarks.google_message3.Message699 field776 = 23; + repeated .benchmarks.google_message3.Message698 field777 = 37; + optional int64 field778 = 38; + extensions 28 to 28; + extensions 26 to 26; +} + +message Message0 { + option message_set_wire_format = true; + + extensions 4 to 2147483646; +} + +message Message6578 { + optional .benchmarks.google_message3.Enum6579 field6632 = 1; + optional .benchmarks.google_message3.Enum6588 field6633 = 2; +} + +message Message6024 { + optional .benchmarks.google_message3.Enum6025 field6048 = 1; + optional string field6049 = 2; + optional .benchmarks.google_message3.UnusedEmptyMessage field6050 = 3; +} + +message Message6052 { + required string field6084 = 1; + required bytes field6085 = 2; +} + +message Message6054 { + required string field6089 = 1; + optional string field6090 = 2; +} + +message Message10573 { + repeated .benchmarks.google_message3.Message10576 field10580 = 1; + optional string field10581 = 2; + extensions 10000 to 536870911; +} + +message Message10824 { + required string field10825 = 1; + optional int32 field10826 = 2; +} + +message Message10582 { + required bool field10583 = 1; + required double field10584 = 2; + optional bool field10585 = 3; + optional double field10586 = 4; + optional double field10587 = 5; + optional bool field10588 = 6; +} + +message Message10155 { + required int32 field10195 = 1; + required int32 field10196 = 2; + optional .benchmarks.google_message3.Enum10157 field10197 = 59; + optional int32 field10198 = 18; + optional int32 field10199 = 19; + optional int32 field10200 = 21; + repeated group Message10156 = 50 { + optional .benchmarks.google_message3.Enum8862 field10266 = 51; + optional int32 field10267 = 52; + optional int32 field10268 = 53; + optional int32 field10269 = 54; + } + optional int32 field10202 = 3; + optional int32 field10203 = 4; + optional int32 field10204 = 5; + optional bool field10205 = 84; + optional bool field10206 = 33; + optional int32 field10207 = 75; + optional float field10208 = 26; + optional int32 field10209 = 27; + optional int32 field10210 = 49; + optional int32 field10211 = 10; + optional float field10212 = 78; + optional .benchmarks.google_message3.Message9151 field10213 = 91; + optional int32 field10214 = 11; + optional int32 field10215 = 12; + optional float field10216 = 41; + optional .benchmarks.google_message3.Message10154 field10217 = 61; + optional int32 field10218 = 23; + optional bytes field10219 = 24; + optional int32 field10220 = 65; + repeated bytes field10221 = 66; + optional int32 field10222 = 70; + optional bytes field10223 = 71; + repeated fixed64 field10224 = 73; + optional float field10225 = 29; + optional int32 field10226 = 30; + optional float field10227 = 31; + optional int32 field10228 = 32; + optional float field10229 = 34; + optional int32 field10230 = 35; + optional string field10231 = 22; + optional fixed64 field10232 = 13; + optional fixed64 field10233 = 20; + optional bool field10234 = 79; + repeated .benchmarks.google_message3.Enum10167 field10235 = 80 + [packed = true]; + optional int32 field10236 = 14; + optional int32 field10237 = 15; + optional int32 field10238 = 28; + repeated string field10239 = 16; + optional .benchmarks.google_message3.Message9182 field10240 = 17; + optional int32 field10241 = 63; + optional float field10242 = 64; + optional float field10243 = 37; + repeated float field10244 = 43; + optional int32 field10245 = 44; + optional .benchmarks.google_message3.Message9242 field10246 = 45; + optional .benchmarks.google_message3.UnusedEmptyMessage field10247 = 46; + optional .benchmarks.google_message3.UnusedEmptyMessage field10248 = 62; + optional .benchmarks.google_message3.Message8944 field10249 = 48; + optional .benchmarks.google_message3.UnusedEmptyMessage field10250 = 87; + optional int32 field10251 = 58; + optional int32 field10252 = 92; + optional .benchmarks.google_message3.Message9123 field10253 = 93; + optional .benchmarks.google_message3.Message9160 field10254 = 60; + optional .benchmarks.google_message3.Message8890 field10255 = 67; + optional string field10256 = 69; + optional int64 field10257 = 74; + optional float field10258 = 82; + optional float field10259 = 85; + optional float field10260 = 86; + optional int64 field10261 = 83; + optional string field10262 = 77; + optional bool field10263 = 88; + repeated .benchmarks.google_message3.Message9628 field10264 = 94; + extensions 57 to 57; + extensions 1000 to 536870911; +} + +message Message11866 { + required .benchmarks.google_message3.Message11014 field11868 = 1; + optional bool field11869 = 2; + optional double field11870 = 3; + optional double field11871 = 4; + repeated .benchmarks.google_message3.UnusedEmptyMessage field11872 = 5; +} + +message Message10469 { + optional string field10473 = 1; + optional float field10474 = 2; + optional int32 field10475 = 3; + optional int32 field10476 = 4; + optional int32 field10477 = 5; + optional bool field10478 = 6; + optional bool field10479 = 7; + optional int32 field10480 = 8; + optional float field10481 = 9; +} + +message Message10818 { + optional .benchmarks.google_message3.Message10800 field10819 = 1; + optional .benchmarks.google_message3.Message10801 field10820 = 2; +} + +message Message10773 { + optional bool field10774 = 9; + optional bool field10775 = 1; + optional bool field10776 = 23; + optional bool field10777 = 2; + optional bool field10778 = 3; + optional int32 field10779 = 4; + optional int32 field10780 = 5; + optional int32 field10781 = 6; + optional int32 field10782 = 7; + optional int32 field10783 = 8; + optional int32 field10784 = 10; + optional .benchmarks.google_message3.Message10749 field10785 = 11; + repeated .benchmarks.google_message3.UnusedEmptyMessage field10786 = 12; + optional bool field10787 = 13; + optional bool field10788 = 15; + optional bool field10789 = 16; + optional int32 field10790 = 17; + optional int32 field10791 = 18; + optional bool field10792 = 19; + optional bool field10793 = 20; + optional bool field10794 = 21; + optional .benchmarks.google_message3.UnusedEnum field10795 = 14; + optional .benchmarks.google_message3.UnusedEnum field10796 = 22; +} + +message Message13145 { + required .benchmarks.google_message3.Enum13146 field13155 = 1; + optional float field13156 = 2; + optional float field13157 = 3; + extensions 1000 to 536870911; +} + +message Message16686 {} + +message Message12796 { + repeated fixed64 field12800 = 1; + optional uint64 field12801 = 2; +} + +message Message6722 {} + +message Message6727 {} + +message Message6724 {} + +message Message6735 {} + +message Message8183 { + optional string field8226 = 1; + optional string field8227 = 2; +} + +message Message8301 { + optional string field8328 = 1; + optional .benchmarks.google_message3.Message7966 field8329 = 2; + optional string field8330 = 3; + optional string field8331 = 4; + repeated .benchmarks.google_message3.Message8290 field8332 = 5; + optional .benchmarks.google_message3.Message7966 field8333 = 6; + repeated .benchmarks.google_message3.Message8298 field8334 = 7; + optional .benchmarks.google_message3.Message8300 field8335 = 8; + optional int64 field8336 = 9; + optional .benchmarks.google_message3.UnusedEmptyMessage field8337 = 10; + optional .benchmarks.google_message3.Message7965 field8338 = 11; + extensions 64 to 536870911; +} + +message Message8456 {} + +message Message8302 { + optional string field8339 = 1; + optional .benchmarks.google_message3.Message7966 field8340 = 2; + optional string field8341 = 3; + optional string field8342 = 4; + optional string field8343 = 5; + optional string field8344 = 6; + optional string field8345 = 7; + optional int64 field8346 = 8; + optional int64 field8347 = 9; + repeated .benchmarks.google_message3.Message8290 field8348 = 10; + optional string field8349 = 11; + optional .benchmarks.google_message3.UnusedEmptyMessage field8350 = 12; + optional .benchmarks.google_message3.Message8291 field8351 = 13; + optional int64 field8352 = 14; + optional .benchmarks.google_message3.Message8296 field8353 = 15; + optional string field8354 = 16; + optional .benchmarks.google_message3.UnusedEmptyMessage field8355 = 17; + repeated int32 field8356 = 18; + repeated int32 field8357 = 19; + repeated .benchmarks.google_message3.UnusedEmptyMessage field8358 = 20; + optional .benchmarks.google_message3.Message7965 field8359 = 21; + extensions 64 to 536870911; +} + +message Message8457 {} + +message Message8449 { + optional string field8458 = 1; + optional bool field8459 = 2; + optional .benchmarks.google_message3.Enum8450 field8460 = 3; + repeated string field8461 = 4; + optional string field8462 = 5; + optional string field8463 = 6; + optional .benchmarks.google_message3.Message7966 field8464 = 7; +} + +message Message13358 { + required fixed64 field13359 = 1; + required fixed64 field13360 = 2; + optional .benchmarks.google_message3.UnusedEmptyMessage field13361 = 3; +} + +message Message13912 { + required fixed32 field13913 = 1; + required fixed32 field13914 = 2; + optional .benchmarks.google_message3.UnusedEmptyMessage field13915 = 500; + optional .benchmarks.google_message3.UnusedEmptyMessage field13916 = 15; +} + +message Message24316 { + repeated string field24443 = 1; + repeated string field24444 = 2; + repeated string field24445 = 3; +} + +message Message24312 { + optional string field24421 = 1; + optional string field24422 = 2; + repeated string field24423 = 3; + repeated string field24424 = 4; + repeated string field24425 = 5; + repeated string field24426 = 6; +} + +message Message24313 { + optional string field24427 = 1; + optional string field24428 = 2; + repeated string field24429 = 3; + optional string field24430 = 4; + optional string field24431 = 5; + optional string field24432 = 6; + optional string field24433 = 7; + repeated string field24434 = 8; + optional string field24435 = 9; + repeated string field24436 = 10; +} + +message Message24315 { + required string field24440 = 1; + repeated string field24441 = 2; + repeated string field24442 = 3; +} + +message Message716 { + required string field872 = 1; + required int32 field873 = 2; + optional bool field874 = 3; + optional .benchmarks.google_message3.Message717 field875 = 4; +} + +message Message718 { + repeated string field878 = 1; + repeated string field879 = 2; + optional string field880 = 3; +} + +message Message703 { + required string field795 = 1; + repeated string field796 = 2; + repeated string field797 = 3; + optional string field798 = 4; + repeated string field799 = 5; +} + +message Message715 { + required string field859 = 1; + optional string field860 = 7; + repeated .benchmarks.google_message3.Message707 field861 = 2; + repeated .benchmarks.google_message3.Message708 field862 = 3; + repeated .benchmarks.google_message3.Message711 field863 = 4; + repeated .benchmarks.google_message3.Message712 field864 = 5; + repeated .benchmarks.google_message3.Message713 field865 = 6; + repeated .benchmarks.google_message3.Message714 field866 = 8; + repeated .benchmarks.google_message3.Message710 field867 = 9; + repeated .benchmarks.google_message3.Message709 field868 = 10; + repeated .benchmarks.google_message3.Message705 field869 = 11; + repeated .benchmarks.google_message3.Message702 field870 = 12; + repeated .benchmarks.google_message3.Message706 field871 = 13; +} + +message Message700 { + repeated string field789 = 1; + repeated string field790 = 2; +} + +message Message699 { + required string field787 = 1; + repeated string field788 = 2; +} + +message Message698 { + optional string field779 = 1; + optional string field780 = 2; + optional string field781 = 3; + optional string field782 = 4; + optional uint64 field783 = 5; + optional uint32 field784 = 6; + optional int64 field785 = 7; + repeated string field786 = 8; +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_6.proto b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_6.proto new file mode 100644 index 00000000..c766f7c2 --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_6.proto @@ -0,0 +1,483 @@ +// 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. + +// LINT: ALLOW_GROUPS + +syntax = "proto2"; + +package benchmarks.google_message3; + +import "datasets/google_message3/benchmark_message3_7.proto"; +import "datasets/google_message3/benchmark_message3_8.proto"; + +option cc_enable_arenas = true; +option java_package = "com.google.protobuf.benchmarks"; + +message Message10576 {} + +message Message10154 { + optional bytes field10192 = 1; + optional int32 field10193 = 2; +} + +message Message8944 { + optional string field9045 = 2; + optional string field9046 = 3; + optional string field9047 = 23; + optional string field9048 = 52; + optional int32 field9049 = 53; + optional int32 field9050 = 54; + optional float field9051 = 55; + optional float field9052 = 56; + optional string field9053 = 57; + optional int64 field9054 = 1; + optional bool field9055 = 4; + optional int32 field9056 = 5; + optional int32 field9057 = 6; + optional int32 field9058 = 7; + optional float field9059 = 8; + optional float field9060 = 11; + optional float field9061 = 9; + optional float field9062 = 10; + optional float field9063 = 13; + optional bool field9064 = 14; + optional float field9065 = 70; + optional int32 field9066 = 71; + optional .benchmarks.google_message3.Enum8945 field9067 = 15; + optional int32 field9068 = 16; + optional int32 field9069 = 17; + optional float field9070 = 18; + optional float field9071 = 19; + optional int32 field9072 = 28; + optional int32 field9073 = 29; + optional float field9074 = 60; + optional float field9075 = 61; + optional int32 field9076 = 72; + optional int32 field9077 = 73; + optional .benchmarks.google_message3.Enum8951 field9078 = 62; + optional string field9079 = 20; + optional string field9080 = 21; + optional string field9081 = 22; + optional double field9082 = 31; + optional double field9083 = 32; + optional double field9084 = 33; + optional double field9085 = 36; + optional .benchmarks.google_message3.UnusedEnum field9086 = 37; + optional double field9087 = 38; + optional double field9088 = 39; + optional double field9089 = 63; + optional double field9090 = 64; + optional double field9091 = 65; + optional double field9092 = 34; + optional .benchmarks.google_message3.UnusedEnum field9093 = 35; + optional .benchmarks.google_message3.UnusedEnum field9094 = 66; + optional string field9095 = 40; + optional string field9096 = 41; + optional string field9097 = 42; + optional string field9098 = 43; + optional string field9099 = 44; + optional string field9100 = 45; + optional string field9101 = 46; + optional string field9102 = 47; + optional string field9103 = 48; + optional string field9104 = 49; + optional .benchmarks.google_message3.Message8939 field9105 = 100; + optional int64 field9106 = 101; +} + +message Message9182 { + optional string field9205 = 1; + optional string field9206 = 2; + optional float field9207 = 16; + optional int32 field9208 = 17; + optional int32 field9209 = 27; + optional int32 field9210 = 7; + optional int32 field9211 = 8; + optional float field9212 = 26; + optional float field9213 = 22; + optional bool field9214 = 28; + repeated .benchmarks.google_message3.UnusedEmptyMessage field9215 = 21; + repeated .benchmarks.google_message3.UnusedEmptyMessage field9216 = 25; + repeated .benchmarks.google_message3.Message9181 field9217 = 29; + optional bool field9218 = 18; + optional bool field9219 = 19; + optional bool field9220 = 20; + optional .benchmarks.google_message3.Message9164 field9221 = 30; + optional .benchmarks.google_message3.Message9165 field9222 = 31; + optional .benchmarks.google_message3.Message9166 field9223 = 32; + optional float field9224 = 33; + optional .benchmarks.google_message3.Message9151 field9225 = 34; + optional float field9226 = 35; + optional float field9227 = 36; + optional float field9228 = 37; + optional float field9229 = 38; + optional float field9230 = 39; + extensions 3 to 6; + extensions 9 to 15; + extensions 23 to 23; + extensions 24 to 24; + extensions 1000 to 536870911; +} + +message Message9160 { + optional int32 field9161 = 1; + optional bytes field9162 = 2; +} + +message Message9242 { + repeated .benchmarks.google_message3.Enum9243 field9327 = 1; +} + +message Message8890 { + repeated .benchmarks.google_message3.Message8888 field8916 = 1; +} + +message Message9123 { + optional float field9135 = 1; +} + +message Message9628 { + optional .benchmarks.google_message3.Message9627 field9673 = 1; + optional string field9674 = 2; + repeated int32 field9675 = 3; + optional int32 field9676 = 4; +} + +message Message11014 { + optional int32 field11780 = 40; + optional string field11781 = 46; + optional bool field11782 = 47; + optional .benchmarks.google_message3.Enum11107 field11783 = 1; + optional int32 field11784 = 2; + optional double field11785 = 4; + optional int32 field11786 = 5; + optional int32 field11787 = 6; + optional double field11788 = 7; + optional double field11789 = 8; + optional int64 field11790 = 9; + optional bool field11791 = 10; + optional int64 field11792 = 28; + optional bool field11793 = 37; + optional .benchmarks.google_message3.Enum11541 field11794 = 44; + optional double field11795 = 49; + optional double field11796 = 51; + optional int64 field11797 = 54; + optional int64 field11798 = 55; + optional .benchmarks.google_message3.UnusedEnum field11799 = 57; + optional .benchmarks.google_message3.Enum11468 field11800 = 58; + optional int32 field11801 = 59; + optional .benchmarks.google_message3.UnusedEnum field11802 = 60; + optional int32 field11803 = 61; + optional int32 field11804 = 62; + optional int32 field11805 = 69; + optional .benchmarks.google_message3.UnusedEmptyMessage field11806 = 68; + repeated .benchmarks.google_message3.Message11018 field11807 = 71; + optional bool field11808 = 50; + optional bool field11809 = 56; + optional bool field11810 = 66; + optional bool field11811 = 63; + optional bool field11812 = 64; + optional bool field11813 = 65; + optional bool field11814 = 67; + optional .benchmarks.google_message3.Enum11107 field11815 = 15; + optional int64 field11816 = 16; + optional double field11817 = 17; + optional int64 field11818 = 18; + optional int32 field11819 = 19; + optional int64 field11820 = 20; + optional int32 field11821 = 42; + optional int64 field11822 = 52; + optional int64 field11823 = 53; + optional int64 field11824 = 41; + optional double field11825 = 48; + repeated .benchmarks.google_message3.Message11020 field11826 = 70; + repeated .benchmarks.google_message3.UnusedEmptyMessage field11827 = 72; + optional double field11828 = 25; + optional string field11829 = 26; + optional int64 field11830 = 27; + optional int64 field11831 = 32; + optional uint64 field11832 = 33; + optional bool field11833 = 29; + optional bool field11834 = 34; + optional string field11835 = 30; + optional int32 field11836 = 3; + optional int32 field11837 = 31; + optional int32 field11838 = 73; + optional int32 field11839 = 35; + optional .benchmarks.google_message3.Enum11022 field11840 = 36; + optional .benchmarks.google_message3.Message11013 field11841 = 38; + optional double field11842 = 39; + optional int32 field11843 = 45; + optional bool field11844 = 74; +} + +message Message10801 { + optional .benchmarks.google_message3.Message10800 field10812 = 1; + repeated .benchmarks.google_message3.Message10802 field10813 = 2; + optional int32 field10814 = 3; +} + +message Message10749 { + repeated .benchmarks.google_message3.Message10748 field10754 = 1; +} + +message Message8298 { + optional .benchmarks.google_message3.Message7966 field8321 = 1; + optional int64 field8322 = 2; + optional string field8323 = 3; +} + +message Message8300 { + optional string field8326 = 1; + optional .benchmarks.google_message3.Message7966 field8327 = 2; +} + +message Message8291 { + optional string field8306 = 1; + optional int32 field8307 = 2; + optional string field8308 = 3; + optional string field8309 = 4; + optional .benchmarks.google_message3.Enum8292 field8310 = 5; +} + +message Message8296 { + optional .benchmarks.google_message3.Message7966 field8311 = 1; + optional string field8312 = 2; + optional .benchmarks.google_message3.Message7966 field8313 = 3; + optional int32 field8314 = 4; + optional int32 field8315 = 5; + optional string field8316 = 6; +} + +message Message7965 { + optional int32 field7967 = 1; + optional int32 field7968 = 2; +} + +message Message8290 { + optional string field8304 = 1; + optional string field8305 = 2; +} + +message Message717 { + repeated string field876 = 1; + optional double field877 = 2; +} + +message Message713 { + required .benchmarks.google_message3.Message708 field852 = 1; + repeated string field853 = 2; +} + +message Message705 { + required string field807 = 1; + optional string field808 = 2; + optional string field809 = 3; + optional bool field810 = 4; + optional string field811 = 5; + optional string field812 = 6; + repeated string field813 = 7; +} + +message Message709 { + repeated string field829 = 1; + repeated string field830 = 2; + repeated string field831 = 3; + repeated string field832 = 4; + repeated string field833 = 5; +} + +message Message702 { + optional string field793 = 1; + optional string field794 = 2; +} + +message Message714 { + optional string field854 = 1; + optional string field855 = 2; + optional string field856 = 3; + optional string field857 = 4; + optional uint32 field858 = 5; +} + +message Message710 { + repeated string field834 = 1; + optional string field835 = 2; + optional string field836 = 3; + repeated string field837 = 4; + repeated string field838 = 5; +} + +message Message706 { + repeated string field814 = 1; + optional string field815 = 2; + repeated string field816 = 3; + repeated string field817 = 4; +} + +message Message707 { + required string field818 = 1; + required string field819 = 2; + required string field820 = 3; + optional bool field821 = 4; + repeated string field822 = 5; +} + +message Message711 { + optional .benchmarks.google_message3.UnusedEmptyMessage field839 = 1; + repeated string field840 = 4; + repeated string field841 = 2; + repeated string field842 = 3; +} + +message Message712 { + repeated string field843 = 1; + required string field844 = 2; + optional string field845 = 3; + repeated string field846 = 4; + repeated string field847 = 5; + optional string field848 = 6; + repeated string field849 = 7; + optional string field850 = 8; + optional string field851 = 9; +} + +message Message8939 { + optional string field9010 = 1; + optional string field9011 = 2; + optional string field9012 = 3; + repeated string field9013 = 4; + optional string field9014 = 5; + repeated group Message8940 = 11 {} + optional int64 field9016 = 21; + optional int64 field9017 = 22; + optional int64 field9018 = 23; + optional group Message8941 = 31 { + optional string field9033 = 32; + optional string field9034 = 33; + optional string field9035 = 34; + optional string field9036 = 35; + optional string field9037 = 36; + optional string field9038 = 37; + } + optional .benchmarks.google_message3.Message8942 field9020 = 38; + repeated .benchmarks.google_message3.UnusedEmptyMessage field9021 = 39; + repeated string field9022 = 41; + optional string field9023 = 42; + optional string field9024 = 43; + optional string field9025 = 44; + optional string field9026 = 45; + optional string field9027 = 46; + optional string field9028 = 47; + optional .benchmarks.google_message3.UnusedEnum field9029 = 48; + optional .benchmarks.google_message3.UnusedEnum field9030 = 49; + optional group Message8943 = 51 { + optional string field9039 = 1; + optional string field9040 = 2; + optional string field9041 = 3; + optional string field9042 = 4; + optional string field9043 = 5; + optional string field9044 = 6; + } +} + +message Message9181 { + optional string field9204 = 1; +} + +message Message9164 { + optional int32 field9168 = 1; + optional int32 field9169 = 2; + optional int32 field9170 = 3; +} + +message Message9165 { + optional float field9171 = 1; + optional float field9172 = 2; +} + +message Message9166 { + optional float field9173 = 1; + optional int32 field9174 = 2; +} + +message Message9151 { + optional double field9152 = 1; + optional double field9153 = 2; + optional float field9154 = 3; + optional float field9155 = 4; + optional float field9156 = 5; + optional float field9157 = 6; + optional float field9158 = 7; + optional float field9159 = 8; +} + +message Message8888 { + optional int32 field8908 = 1; + optional .benchmarks.google_message3.Enum8900 field8909 = 4; + repeated int32 field8910 = 2 [packed = true]; + optional bytes field8911 = 3; +} + +message Message9627 { + required int32 field9668 = 1; + required int32 field9669 = 2; + required int32 field9670 = 3; + required int32 field9671 = 4; + optional float field9672 = 5; +} + +message Message11020 {} + +message Message11013 { + optional bytes field11757 = 19; + optional bytes field11758 = 1; + optional bytes field11759 = 2; + optional bytes field11760 = 3; + optional bytes field11761 = 4; + optional bytes field11762 = 5; + optional bytes field11763 = 6; + optional bytes field11764 = 7; + optional bytes field11765 = 8; + optional bytes field11766 = 9; + optional bytes field11767 = 10; + optional bytes field11768 = 11; + optional bytes field11769 = 12; + optional bytes field11770 = 13; + optional bytes field11771 = 14; + optional bytes field11772 = 15; + optional bytes field11773 = 16; + optional bytes field11774 = 17; + optional bytes field11775 = 18; + optional bytes field11776 = 20; + optional bytes field11777 = 21; + optional .benchmarks.google_message3.UnusedEmptyMessage field11778 = 23; + repeated .benchmarks.google_message3.Message11011 field11779 = 22; +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_7.proto b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_7.proto new file mode 100644 index 00000000..0f8f10cd --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_7.proto @@ -0,0 +1,81 @@ +// 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. + +syntax = "proto2"; + +package benchmarks.google_message3; + +option cc_enable_arenas = true; +option java_package = "com.google.protobuf.benchmarks"; + +message Message11018 {} + +message Message10800 { + optional string field10808 = 1; + optional int64 field10809 = 2; + optional bool field10810 = 3; + optional float field10811 = 4; +} + +message Message10802 {} + +message Message10748 { + optional string field10750 = 1; + optional int32 field10751 = 2; + optional int32 field10752 = 3; + optional int32 field10753 = 4; +} + +message Message7966 { + optional string field7969 = 1; + optional bool field7970 = 2; +} + +message Message708 { + optional .benchmarks.google_message3.Message741 field823 = 1; + repeated string field824 = 6; + optional string field825 = 2; + optional string field826 = 3; + repeated string field827 = 4; + repeated string field828 = 5; +} + +message Message8942 {} + +message Message11011 { + required bytes field11752 = 1; + required bytes field11753 = 2; +} + +message UnusedEmptyMessage {} + +message Message741 { + repeated string field936 = 1; +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_8.proto b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_8.proto new file mode 100644 index 00000000..68fe8e90 --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message3/benchmark_message3_8.proto @@ -0,0 +1,1925 @@ +// 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. + +syntax = "proto2"; + +package benchmarks.google_message3; + +option cc_enable_arenas = true; +option java_package = "com.google.protobuf.benchmarks"; + +enum Enum720 { + ENUM_VALUE721 = 1; + ENUM_VALUE722 = 2; +} + +enum Enum3476 { + ENUM_VALUE3477 = 0; + ENUM_VALUE3478 = 1; + ENUM_VALUE3479 = 2; + ENUM_VALUE3480 = 3; + ENUM_VALUE3481 = 4; + ENUM_VALUE3482 = 5; + ENUM_VALUE3483 = 6; + ENUM_VALUE3484 = 7; + ENUM_VALUE3485 = 8; + ENUM_VALUE3486 = 9; + ENUM_VALUE3487 = 10; + ENUM_VALUE3488 = 11; + ENUM_VALUE3489 = 12; + ENUM_VALUE3490 = 13; + ENUM_VALUE3491 = 14; + ENUM_VALUE3492 = 15; + ENUM_VALUE3493 = 16; + ENUM_VALUE3494 = 17; + ENUM_VALUE3495 = 18; + ENUM_VALUE3496 = 19; + ENUM_VALUE3497 = 20; + ENUM_VALUE3498 = 21; + ENUM_VALUE3499 = 22; + ENUM_VALUE3500 = 23; + ENUM_VALUE3501 = 24; + ENUM_VALUE3502 = 25; + ENUM_VALUE3503 = 26; + ENUM_VALUE3504 = 27; + ENUM_VALUE3505 = 28; + ENUM_VALUE3506 = 29; + ENUM_VALUE3507 = 30; + ENUM_VALUE3508 = 31; + ENUM_VALUE3509 = 32; + ENUM_VALUE3510 = 33; + ENUM_VALUE3511 = 34; + ENUM_VALUE3512 = 35; + ENUM_VALUE3513 = 36; + ENUM_VALUE3514 = 37; + ENUM_VALUE3515 = 38; + ENUM_VALUE3516 = 39; + ENUM_VALUE3517 = 40; + ENUM_VALUE3518 = 41; + ENUM_VALUE3519 = 42; + ENUM_VALUE3520 = 43; + ENUM_VALUE3521 = 44; + ENUM_VALUE3522 = 45; + ENUM_VALUE3523 = 46; + ENUM_VALUE3524 = 47; + ENUM_VALUE3525 = 48; + ENUM_VALUE3526 = 49; + ENUM_VALUE3527 = 50; + ENUM_VALUE3528 = 51; + ENUM_VALUE3529 = 52; + ENUM_VALUE3530 = 53; + ENUM_VALUE3531 = 54; + ENUM_VALUE3532 = 55; + ENUM_VALUE3533 = 56; + ENUM_VALUE3534 = 57; + ENUM_VALUE3535 = 58; + ENUM_VALUE3536 = 59; + ENUM_VALUE3537 = 60; + ENUM_VALUE3538 = 61; + ENUM_VALUE3539 = 62; + ENUM_VALUE3540 = 63; + ENUM_VALUE3541 = 64; + ENUM_VALUE3542 = 65; + ENUM_VALUE3543 = 66; + ENUM_VALUE3544 = 67; + ENUM_VALUE3545 = 68; + ENUM_VALUE3546 = 69; + ENUM_VALUE3547 = 70; + ENUM_VALUE3548 = 71; + ENUM_VALUE3549 = 72; + ENUM_VALUE3550 = 73; + ENUM_VALUE3551 = 74; + ENUM_VALUE3552 = 75; + ENUM_VALUE3553 = 76; + ENUM_VALUE3554 = 77; + ENUM_VALUE3555 = 78; + ENUM_VALUE3556 = 79; + ENUM_VALUE3557 = 80; + ENUM_VALUE3558 = 81; + ENUM_VALUE3559 = 82; + ENUM_VALUE3560 = 83; + ENUM_VALUE3561 = 84; + ENUM_VALUE3562 = 85; + ENUM_VALUE3563 = 86; + ENUM_VALUE3564 = 87; + ENUM_VALUE3565 = 88; + ENUM_VALUE3566 = 89; + ENUM_VALUE3567 = 90; + ENUM_VALUE3568 = 91; + ENUM_VALUE3569 = 92; + ENUM_VALUE3570 = 93; + ENUM_VALUE3571 = 94; + ENUM_VALUE3572 = 95; + ENUM_VALUE3573 = 96; + ENUM_VALUE3574 = 97; + ENUM_VALUE3575 = 98; + ENUM_VALUE3576 = 99; + ENUM_VALUE3577 = 100; + ENUM_VALUE3578 = 101; + ENUM_VALUE3579 = 102; + ENUM_VALUE3580 = 103; + ENUM_VALUE3581 = 104; + ENUM_VALUE3582 = 105; + ENUM_VALUE3583 = 106; + ENUM_VALUE3584 = 107; + ENUM_VALUE3585 = 108; + ENUM_VALUE3586 = 109; + ENUM_VALUE3587 = 110; + ENUM_VALUE3588 = 111; + ENUM_VALUE3589 = 112; + ENUM_VALUE3590 = 113; + ENUM_VALUE3591 = 114; + ENUM_VALUE3592 = 115; + ENUM_VALUE3593 = 116; + ENUM_VALUE3594 = 117; + ENUM_VALUE3595 = 118; + ENUM_VALUE3596 = 119; + ENUM_VALUE3597 = 120; + ENUM_VALUE3598 = 121; + ENUM_VALUE3599 = 122; + ENUM_VALUE3600 = 123; + ENUM_VALUE3601 = 124; + ENUM_VALUE3602 = 125; + ENUM_VALUE3603 = 126; + ENUM_VALUE3604 = 127; + ENUM_VALUE3605 = 128; + ENUM_VALUE3606 = 129; + ENUM_VALUE3607 = 130; + ENUM_VALUE3608 = 131; + ENUM_VALUE3609 = 132; + ENUM_VALUE3610 = 133; + ENUM_VALUE3611 = 134; + ENUM_VALUE3612 = 135; + ENUM_VALUE3613 = 136; + ENUM_VALUE3614 = 137; + ENUM_VALUE3615 = 138; + ENUM_VALUE3616 = 139; + ENUM_VALUE3617 = 140; + ENUM_VALUE3618 = 141; + ENUM_VALUE3619 = 142; + ENUM_VALUE3620 = 143; + ENUM_VALUE3621 = 144; + ENUM_VALUE3622 = 145; + ENUM_VALUE3623 = 146; + ENUM_VALUE3624 = 147; + ENUM_VALUE3625 = 148; + ENUM_VALUE3626 = 149; + ENUM_VALUE3627 = 150; + ENUM_VALUE3628 = 151; + ENUM_VALUE3629 = 152; + ENUM_VALUE3630 = 153; + ENUM_VALUE3631 = 154; + ENUM_VALUE3632 = 155; + ENUM_VALUE3633 = 156; + ENUM_VALUE3634 = 157; + ENUM_VALUE3635 = 158; + ENUM_VALUE3636 = 159; + ENUM_VALUE3637 = 160; + ENUM_VALUE3638 = 161; + ENUM_VALUE3639 = 162; + ENUM_VALUE3640 = 163; + ENUM_VALUE3641 = 164; + ENUM_VALUE3642 = 165; + ENUM_VALUE3643 = 166; + ENUM_VALUE3644 = 167; + ENUM_VALUE3645 = 168; + ENUM_VALUE3646 = 169; + ENUM_VALUE3647 = 170; + ENUM_VALUE3648 = 171; + ENUM_VALUE3649 = 172; + ENUM_VALUE3650 = 173; + ENUM_VALUE3651 = 174; + ENUM_VALUE3652 = 175; + ENUM_VALUE3653 = 176; + ENUM_VALUE3654 = 177; + ENUM_VALUE3655 = 178; + ENUM_VALUE3656 = 179; + ENUM_VALUE3657 = 180; + ENUM_VALUE3658 = 181; + ENUM_VALUE3659 = 182; + ENUM_VALUE3660 = 183; +} + +enum Enum3805 { + ENUM_VALUE3806 = 0; + ENUM_VALUE3807 = 1; + ENUM_VALUE3808 = 2; + ENUM_VALUE3809 = 3; + ENUM_VALUE3810 = 4; + ENUM_VALUE3811 = 5; + ENUM_VALUE3812 = 6; + ENUM_VALUE3813 = 7; + ENUM_VALUE3814 = 8; + ENUM_VALUE3815 = 9; + ENUM_VALUE3816 = 11; + ENUM_VALUE3817 = 10; +} + +enum Enum3783 { + ENUM_VALUE3784 = 0; + ENUM_VALUE3785 = 1; + ENUM_VALUE3786 = 2; + ENUM_VALUE3787 = 3; + ENUM_VALUE3788 = 4; + ENUM_VALUE3789 = 5; + ENUM_VALUE3790 = 6; + ENUM_VALUE3791 = 7; + ENUM_VALUE3792 = 8; + ENUM_VALUE3793 = 9; + ENUM_VALUE3794 = 10; + ENUM_VALUE3795 = 11; + ENUM_VALUE3796 = 12; + ENUM_VALUE3797 = 13; + ENUM_VALUE3798 = 14; + ENUM_VALUE3799 = 15; + ENUM_VALUE3800 = 16; + ENUM_VALUE3801 = 20; + ENUM_VALUE3802 = 21; + ENUM_VALUE3803 = 50; +} + +enum Enum3851 { + ENUM_VALUE3852 = 0; + ENUM_VALUE3853 = 1; + ENUM_VALUE3854 = 2; + ENUM_VALUE3855 = 3; + ENUM_VALUE3856 = 4; + ENUM_VALUE3857 = 5; + ENUM_VALUE3858 = 6; + ENUM_VALUE3859 = 7; + ENUM_VALUE3860 = 8; + ENUM_VALUE3861 = 9; + ENUM_VALUE3862 = 10; + ENUM_VALUE3863 = 11; + ENUM_VALUE3864 = 12; + ENUM_VALUE3865 = 13; + ENUM_VALUE3866 = 14; + ENUM_VALUE3867 = 15; + ENUM_VALUE3868 = 16; + ENUM_VALUE3869 = 17; +} + +enum UnusedEnum { + UNUSED_ENUM_VALUE1 = 0; + UNUSED_ENUM_VALUE2 = 1; +} + +enum Enum4146 { + ENUM_VALUE4147 = 0; + ENUM_VALUE4148 = 1; + ENUM_VALUE4149 = 2; + ENUM_VALUE4150 = 3; + ENUM_VALUE4151 = 4; +} + +enum Enum4160 { + ENUM_VALUE4161 = 0; + ENUM_VALUE4162 = 1; +} + +enum Enum4152 { + ENUM_VALUE4153 = 0; + ENUM_VALUE4154 = 1; + ENUM_VALUE4155 = 2; + ENUM_VALUE4156 = 3; + ENUM_VALUE4157 = 4; + ENUM_VALUE4158 = 5; + ENUM_VALUE4159 = 6; +} + +enum Enum6025 { + ENUM_VALUE6026 = 0; + ENUM_VALUE6027 = 1; + ENUM_VALUE6028 = 2; + ENUM_VALUE6029 = 3; + ENUM_VALUE6030 = 4; + ENUM_VALUE6031 = 5; + ENUM_VALUE6032 = 6; + ENUM_VALUE6033 = 7; + ENUM_VALUE6034 = 8; + ENUM_VALUE6035 = 9; + ENUM_VALUE6036 = 10; + ENUM_VALUE6037 = 11; + ENUM_VALUE6038 = 12; + ENUM_VALUE6039 = 13; + ENUM_VALUE6040 = 14; + ENUM_VALUE6041 = 15; + ENUM_VALUE6042 = 16; + ENUM_VALUE6043 = 17; + ENUM_VALUE6044 = 18; + ENUM_VALUE6045 = 19; + ENUM_VALUE6046 = 20; + ENUM_VALUE6047 = 21; +} + +enum Enum6065 { + ENUM_VALUE6066 = 0; + ENUM_VALUE6067 = 1; + ENUM_VALUE6068 = 2; + ENUM_VALUE6069 = 3; + ENUM_VALUE6070 = 4; + ENUM_VALUE6071 = 5; + ENUM_VALUE6072 = 6; + ENUM_VALUE6073 = 7; + ENUM_VALUE6074 = 8; + ENUM_VALUE6075 = 9; + ENUM_VALUE6076 = 10; + ENUM_VALUE6077 = 11; + ENUM_VALUE6078 = 12; + ENUM_VALUE6079 = 13; + ENUM_VALUE6080 = 14; +} + +enum Enum6579 { + ENUM_VALUE6580 = 0; + ENUM_VALUE6581 = 2; + ENUM_VALUE6582 = 3; + ENUM_VALUE6583 = 5; + ENUM_VALUE6584 = 10; + ENUM_VALUE6585 = 15; + ENUM_VALUE6586 = 25; + ENUM_VALUE6587 = 30; +} + +enum Enum6588 { + ENUM_VALUE6589 = 0; + ENUM_VALUE6590 = 1; + ENUM_VALUE6591 = 2; + ENUM_VALUE6592 = 3; + ENUM_VALUE6593 = 4; + ENUM_VALUE6594 = 5; + ENUM_VALUE6595 = 6; + ENUM_VALUE6596 = 7; + ENUM_VALUE6597 = 8; + ENUM_VALUE6598 = 9; + ENUM_VALUE6599 = 10; + ENUM_VALUE6600 = 11; + ENUM_VALUE6601 = 12; + ENUM_VALUE6602 = 13; + ENUM_VALUE6603 = 14; + ENUM_VALUE6604 = 15; + ENUM_VALUE6605 = 16; + ENUM_VALUE6606 = 17; + ENUM_VALUE6607 = 19; + ENUM_VALUE6608 = 20; + ENUM_VALUE6609 = 21; + ENUM_VALUE6610 = 22; + ENUM_VALUE6611 = 23; + ENUM_VALUE6612 = 24; + ENUM_VALUE6613 = 25; + ENUM_VALUE6614 = 26; + ENUM_VALUE6615 = 27; + ENUM_VALUE6616 = 28; + ENUM_VALUE6617 = 29; + ENUM_VALUE6618 = 30; + ENUM_VALUE6619 = 31; + ENUM_VALUE6620 = 32; + ENUM_VALUE6621 = 33; + ENUM_VALUE6622 = 34; +} + +enum Enum6769 { + ENUM_VALUE6770 = 0; + ENUM_VALUE6771 = 1; + ENUM_VALUE6772 = 2; +} + +enum Enum6774 { + ENUM_VALUE6775 = 0; + ENUM_VALUE6776 = 1; + ENUM_VALUE6777 = 2; + ENUM_VALUE6778 = 3; + ENUM_VALUE6779 = 4; + ENUM_VALUE6780 = 5; + ENUM_VALUE6781 = 6; +} + +enum Enum6782 { + ENUM_VALUE6783 = 0; + ENUM_VALUE6784 = 1; + ENUM_VALUE6785 = 2; + ENUM_VALUE6786 = 3; + ENUM_VALUE6787 = 4; + ENUM_VALUE6788 = 5; +} + +enum Enum6858 { + ENUM_VALUE6859 = 1; + ENUM_VALUE6860 = 2; + ENUM_VALUE6861 = 3; + ENUM_VALUE6862 = 4; +} + +enum Enum6815 { + ENUM_VALUE6816 = 0; + ENUM_VALUE6817 = 1; + ENUM_VALUE6818 = 2; + ENUM_VALUE6819 = 3; + ENUM_VALUE6820 = 4; + ENUM_VALUE6821 = 5; +} + +enum Enum6822 { + ENUM_VALUE6823 = 0; + ENUM_VALUE6824 = 1; + ENUM_VALUE6825 = 2; + ENUM_VALUE6826 = 3; +} + +enum Enum7654 { + ENUM_VALUE7655 = 1; + ENUM_VALUE7656 = 2; + ENUM_VALUE7657 = 3; +} + +enum Enum8292 { + ENUM_VALUE8293 = 0; + ENUM_VALUE8294 = 1; + ENUM_VALUE8295 = 2; +} + +enum Enum8450 { + ENUM_VALUE8451 = 0; + ENUM_VALUE8452 = 1; + ENUM_VALUE8453 = 2; +} + +enum Enum8900 { + ENUM_VALUE8901 = 0; + ENUM_VALUE8902 = 1; + ENUM_VALUE8903 = 2; + ENUM_VALUE8904 = 3; + ENUM_VALUE8905 = 4; +} + +enum Enum8945 { + ENUM_VALUE8946 = 0; + ENUM_VALUE8947 = 1; + ENUM_VALUE8948 = 2; + ENUM_VALUE8949 = 3; + ENUM_VALUE8950 = 4; +} + +enum Enum8951 { + ENUM_VALUE8952 = 1; + ENUM_VALUE8953 = 2; + ENUM_VALUE8954 = 3; + ENUM_VALUE8955 = 4; + ENUM_VALUE8956 = 5; + ENUM_VALUE8957 = 6; + ENUM_VALUE8958 = 7; + ENUM_VALUE8959 = 8; +} + +enum Enum9243 { + ENUM_VALUE9244 = -1; + ENUM_VALUE9245 = 0; + ENUM_VALUE9246 = 1; + ENUM_VALUE9247 = 2; + ENUM_VALUE9248 = 3; + ENUM_VALUE9249 = 4; + ENUM_VALUE9250 = 5; + ENUM_VALUE9251 = 6; + ENUM_VALUE9252 = 7; + ENUM_VALUE9253 = 8; + ENUM_VALUE9254 = 9; + ENUM_VALUE9255 = 10; + ENUM_VALUE9256 = 11; + ENUM_VALUE9257 = 12; + ENUM_VALUE9258 = 13; + ENUM_VALUE9259 = 14; + ENUM_VALUE9260 = 15; + ENUM_VALUE9261 = 16; + ENUM_VALUE9262 = 17; + ENUM_VALUE9263 = 71; + ENUM_VALUE9264 = 72; + ENUM_VALUE9265 = 73; + ENUM_VALUE9266 = 74; + ENUM_VALUE9267 = 18; + ENUM_VALUE9268 = 20; + ENUM_VALUE9269 = 21; + ENUM_VALUE9270 = 22; + ENUM_VALUE9271 = 23; + ENUM_VALUE9272 = 61; + ENUM_VALUE9273 = 62; + ENUM_VALUE9274 = 63; + ENUM_VALUE9275 = 64; + ENUM_VALUE9276 = 66; + ENUM_VALUE9277 = 67; + ENUM_VALUE9278 = 24; + ENUM_VALUE9279 = 25; + ENUM_VALUE9280 = 26; + ENUM_VALUE9281 = 27; + ENUM_VALUE9282 = 28; + ENUM_VALUE9283 = 29; + ENUM_VALUE9284 = 30; + ENUM_VALUE9285 = 31; + ENUM_VALUE9286 = 32; + ENUM_VALUE9287 = 33; + ENUM_VALUE9288 = 34; + ENUM_VALUE9289 = 35; + ENUM_VALUE9290 = 36; + ENUM_VALUE9291 = 37; + ENUM_VALUE9292 = 38; + ENUM_VALUE9293 = 39; + ENUM_VALUE9294 = 40; + ENUM_VALUE9295 = 41; + ENUM_VALUE9296 = 42; + ENUM_VALUE9297 = 43; + ENUM_VALUE9298 = 44; + ENUM_VALUE9299 = 45; + ENUM_VALUE9300 = 46; + ENUM_VALUE9301 = 47; + ENUM_VALUE9302 = 48; + ENUM_VALUE9303 = 49; + ENUM_VALUE9304 = 50; + ENUM_VALUE9305 = 51; + ENUM_VALUE9306 = 52; + ENUM_VALUE9307 = 53; + ENUM_VALUE9308 = 54; + ENUM_VALUE9309 = 55; + ENUM_VALUE9310 = 56; + ENUM_VALUE9311 = 57; + ENUM_VALUE9312 = 58; + ENUM_VALUE9313 = 59; + ENUM_VALUE9314 = 60; + ENUM_VALUE9315 = 68; + ENUM_VALUE9316 = 69; + ENUM_VALUE9317 = 70; + ENUM_VALUE9318 = 1000; + ENUM_VALUE9319 = 1001; + ENUM_VALUE9320 = 1002; + ENUM_VALUE9321 = 1003; + ENUM_VALUE9322 = 1004; + ENUM_VALUE9323 = 1005; + ENUM_VALUE9324 = 1006; + ENUM_VALUE9325 = 1007; + ENUM_VALUE9326 = 65; +} + +enum Enum10157 { + ENUM_VALUE10158 = 0; + ENUM_VALUE10159 = 1; + ENUM_VALUE10160 = 2; + ENUM_VALUE10161 = 3; + ENUM_VALUE10162 = 4; + ENUM_VALUE10163 = 5; + ENUM_VALUE10164 = 6; + ENUM_VALUE10165 = 7; + ENUM_VALUE10166 = 8; +} + +enum Enum10167 { + ENUM_VALUE10168 = 0; + ENUM_VALUE10169 = 1; + ENUM_VALUE10170 = 2; + ENUM_VALUE10171 = 3; + ENUM_VALUE10172 = 4; + ENUM_VALUE10173 = 5; + ENUM_VALUE10174 = 6; + ENUM_VALUE10175 = 7; + ENUM_VALUE10176 = 8; +} + +enum Enum8862 { + ENUM_VALUE8863 = 0; + ENUM_VALUE8864 = 1; + ENUM_VALUE8865 = 2; + ENUM_VALUE8866 = 3; + ENUM_VALUE8867 = 4; + ENUM_VALUE8868 = 5; + ENUM_VALUE8869 = 6; + ENUM_VALUE8870 = 7; + ENUM_VALUE8871 = 13; + ENUM_VALUE8872 = 14; + ENUM_VALUE8873 = 8; + ENUM_VALUE8874 = 9; + ENUM_VALUE8875 = 10; + ENUM_VALUE8876 = 11; + ENUM_VALUE8877 = 12; + ENUM_VALUE8878 = 15; +} + +enum Enum10325 { + ENUM_VALUE10326 = 0; + ENUM_VALUE10327 = 1; + ENUM_VALUE10328 = 2; + ENUM_VALUE10329 = 3; + ENUM_VALUE10330 = 4; + ENUM_VALUE10331 = 5; + ENUM_VALUE10332 = 6; + ENUM_VALUE10333 = 7; + ENUM_VALUE10334 = 8; +} + +enum Enum10335 { ENUM_VALUE10336 = 0; } + +enum Enum10337 { + ENUM_VALUE10338 = 0; + ENUM_VALUE10339 = 1; +} + +enum Enum10392 { + ENUM_VALUE10393 = 0; + ENUM_VALUE10394 = 1; + ENUM_VALUE10395 = 2; + ENUM_VALUE10396 = 3; + ENUM_VALUE10397 = 4; + ENUM_VALUE10398 = 5; + ENUM_VALUE10399 = 6; + ENUM_VALUE10400 = 7; + ENUM_VALUE10401 = 8; + ENUM_VALUE10402 = 15; + ENUM_VALUE10403 = 9; + ENUM_VALUE10404 = 10; + ENUM_VALUE10405 = 11; + ENUM_VALUE10406 = 12; + ENUM_VALUE10407 = 13; + ENUM_VALUE10408 = 14; + ENUM_VALUE10409 = 101; + ENUM_VALUE10410 = 102; +} + +enum Enum11107 { + ENUM_VALUE11108 = 0; + ENUM_VALUE11109 = 1; + ENUM_VALUE11110 = 2; + ENUM_VALUE11111 = 3; + ENUM_VALUE11112 = 4; + ENUM_VALUE11113 = 5; + ENUM_VALUE11114 = 6; + ENUM_VALUE11115 = 7; + ENUM_VALUE11116 = 8; + ENUM_VALUE11117 = 9; + ENUM_VALUE11118 = 10; + ENUM_VALUE11119 = 11; + ENUM_VALUE11120 = 12; + ENUM_VALUE11121 = 13; + ENUM_VALUE11122 = 14; + ENUM_VALUE11123 = 15; + ENUM_VALUE11124 = 16; + ENUM_VALUE11125 = 17; + ENUM_VALUE11126 = 18; + ENUM_VALUE11127 = 19; + ENUM_VALUE11128 = 20; + ENUM_VALUE11129 = 21; + ENUM_VALUE11130 = 22; + ENUM_VALUE11131 = 23; + ENUM_VALUE11132 = 24; + ENUM_VALUE11133 = 25; + ENUM_VALUE11134 = 26; + ENUM_VALUE11135 = 27; + ENUM_VALUE11136 = 28; + ENUM_VALUE11137 = 29; + ENUM_VALUE11138 = 30; + ENUM_VALUE11139 = 31; + ENUM_VALUE11140 = 32; + ENUM_VALUE11141 = 33; + ENUM_VALUE11142 = 34; + ENUM_VALUE11143 = 35; + ENUM_VALUE11144 = 36; + ENUM_VALUE11145 = 37; + ENUM_VALUE11146 = 38; + ENUM_VALUE11147 = 39; + ENUM_VALUE11148 = 40; + ENUM_VALUE11149 = 41; + ENUM_VALUE11150 = 42; + ENUM_VALUE11151 = 43; + ENUM_VALUE11152 = 44; + ENUM_VALUE11153 = 45; + ENUM_VALUE11154 = 46; + ENUM_VALUE11155 = 47; + ENUM_VALUE11156 = 48; + ENUM_VALUE11157 = 49; + ENUM_VALUE11158 = 50; + ENUM_VALUE11159 = 51; + ENUM_VALUE11160 = 52; + ENUM_VALUE11161 = 53; + ENUM_VALUE11162 = 54; + ENUM_VALUE11163 = 55; + ENUM_VALUE11164 = 56; + ENUM_VALUE11165 = 57; + ENUM_VALUE11166 = 58; + ENUM_VALUE11167 = 59; + ENUM_VALUE11168 = 60; + ENUM_VALUE11169 = 61; + ENUM_VALUE11170 = 62; + ENUM_VALUE11171 = 63; + ENUM_VALUE11172 = 64; + ENUM_VALUE11173 = 65; + ENUM_VALUE11174 = 66; + ENUM_VALUE11175 = 67; + ENUM_VALUE11176 = 68; + ENUM_VALUE11177 = 69; + ENUM_VALUE11178 = 70; + ENUM_VALUE11179 = 71; + ENUM_VALUE11180 = 72; + ENUM_VALUE11181 = 73; + ENUM_VALUE11182 = 74; + ENUM_VALUE11183 = 75; + ENUM_VALUE11184 = 76; + ENUM_VALUE11185 = 77; + ENUM_VALUE11186 = 78; + ENUM_VALUE11187 = 79; + ENUM_VALUE11188 = 80; + ENUM_VALUE11189 = 81; + ENUM_VALUE11190 = 82; + ENUM_VALUE11191 = 83; + ENUM_VALUE11192 = 84; + ENUM_VALUE11193 = 85; + ENUM_VALUE11194 = 86; + ENUM_VALUE11195 = 87; + ENUM_VALUE11196 = 88; + ENUM_VALUE11197 = 89; + ENUM_VALUE11198 = 90; + ENUM_VALUE11199 = 91; + ENUM_VALUE11200 = 92; + ENUM_VALUE11201 = 93; + ENUM_VALUE11202 = 94; + ENUM_VALUE11203 = 95; + ENUM_VALUE11204 = 96; + ENUM_VALUE11205 = 97; + ENUM_VALUE11206 = 98; + ENUM_VALUE11207 = 99; + ENUM_VALUE11208 = 100; + ENUM_VALUE11209 = 101; + ENUM_VALUE11210 = 102; + ENUM_VALUE11211 = 103; + ENUM_VALUE11212 = 104; + ENUM_VALUE11213 = 105; + ENUM_VALUE11214 = 106; + ENUM_VALUE11215 = 107; + ENUM_VALUE11216 = 108; + ENUM_VALUE11217 = 109; + ENUM_VALUE11218 = 110; + ENUM_VALUE11219 = 111; + ENUM_VALUE11220 = 112; + ENUM_VALUE11221 = 113; + ENUM_VALUE11222 = 114; + ENUM_VALUE11223 = 115; + ENUM_VALUE11224 = 116; + ENUM_VALUE11225 = 117; + ENUM_VALUE11226 = 118; + ENUM_VALUE11227 = 119; + ENUM_VALUE11228 = 120; + ENUM_VALUE11229 = 121; + ENUM_VALUE11230 = 122; + ENUM_VALUE11231 = 123; + ENUM_VALUE11232 = 124; + ENUM_VALUE11233 = 125; + ENUM_VALUE11234 = 126; + ENUM_VALUE11235 = 127; + ENUM_VALUE11236 = 128; + ENUM_VALUE11237 = 129; + ENUM_VALUE11238 = 130; + ENUM_VALUE11239 = 131; + ENUM_VALUE11240 = 132; + ENUM_VALUE11241 = 133; + ENUM_VALUE11242 = 134; + ENUM_VALUE11243 = 135; + ENUM_VALUE11244 = 136; + ENUM_VALUE11245 = 137; + ENUM_VALUE11246 = 138; + ENUM_VALUE11247 = 139; + ENUM_VALUE11248 = 140; + ENUM_VALUE11249 = 141; + ENUM_VALUE11250 = 142; + ENUM_VALUE11251 = 143; + ENUM_VALUE11252 = 144; + ENUM_VALUE11253 = 145; + ENUM_VALUE11254 = 146; + ENUM_VALUE11255 = 147; + ENUM_VALUE11256 = 148; + ENUM_VALUE11257 = 149; + ENUM_VALUE11258 = 150; + ENUM_VALUE11259 = 151; + ENUM_VALUE11260 = 152; + ENUM_VALUE11261 = 153; + ENUM_VALUE11262 = 154; + ENUM_VALUE11263 = 155; + ENUM_VALUE11264 = 156; + ENUM_VALUE11265 = 157; + ENUM_VALUE11266 = 158; + ENUM_VALUE11267 = 159; + ENUM_VALUE11268 = 160; + ENUM_VALUE11269 = 161; + ENUM_VALUE11270 = 163; + ENUM_VALUE11271 = 164; + ENUM_VALUE11272 = 165; + ENUM_VALUE11273 = 166; + ENUM_VALUE11274 = 167; + ENUM_VALUE11275 = 168; + ENUM_VALUE11276 = 169; + ENUM_VALUE11277 = 170; + ENUM_VALUE11278 = 171; + ENUM_VALUE11279 = 172; + ENUM_VALUE11280 = 173; + ENUM_VALUE11281 = 174; + ENUM_VALUE11282 = 175; + ENUM_VALUE11283 = 176; + ENUM_VALUE11284 = 177; + ENUM_VALUE11285 = 178; + ENUM_VALUE11286 = 179; + ENUM_VALUE11287 = 180; + ENUM_VALUE11288 = 181; + ENUM_VALUE11289 = 182; + ENUM_VALUE11290 = 183; + ENUM_VALUE11291 = 184; + ENUM_VALUE11292 = 185; + ENUM_VALUE11293 = 187; + ENUM_VALUE11294 = 188; + ENUM_VALUE11295 = 189; + ENUM_VALUE11296 = 190; + ENUM_VALUE11297 = 191; + ENUM_VALUE11298 = 192; + ENUM_VALUE11299 = 193; + ENUM_VALUE11300 = 194; + ENUM_VALUE11301 = 195; + ENUM_VALUE11302 = 196; + ENUM_VALUE11303 = 197; + ENUM_VALUE11304 = 198; + ENUM_VALUE11305 = 65535; + ENUM_VALUE11306 = 65536; + ENUM_VALUE11307 = 65537; + ENUM_VALUE11308 = 65538; + ENUM_VALUE11309 = 65539; + ENUM_VALUE11310 = 65540; + ENUM_VALUE11311 = 65541; + ENUM_VALUE11312 = 65542; + ENUM_VALUE11313 = 65543; + ENUM_VALUE11314 = 65544; + ENUM_VALUE11315 = 65545; + ENUM_VALUE11316 = 65546; + ENUM_VALUE11317 = 65547; + ENUM_VALUE11318 = 65548; + ENUM_VALUE11319 = 65549; + ENUM_VALUE11320 = 65550; + ENUM_VALUE11321 = 65551; + ENUM_VALUE11322 = 65552; + ENUM_VALUE11323 = 65553; + ENUM_VALUE11324 = 65554; + ENUM_VALUE11325 = 65555; + ENUM_VALUE11326 = 65556; + ENUM_VALUE11327 = 65557; + ENUM_VALUE11328 = 65558; + ENUM_VALUE11329 = 65559; + ENUM_VALUE11330 = 65560; + ENUM_VALUE11331 = 65561; + ENUM_VALUE11332 = 65562; + ENUM_VALUE11333 = 65563; + ENUM_VALUE11334 = 69632; + ENUM_VALUE11335 = 69633; + ENUM_VALUE11336 = 69634; + ENUM_VALUE11337 = 69635; + ENUM_VALUE11338 = 69636; + ENUM_VALUE11339 = 69637; + ENUM_VALUE11340 = 69638; + ENUM_VALUE11341 = 69639; + ENUM_VALUE11342 = 69640; + ENUM_VALUE11343 = 69641; + ENUM_VALUE11344 = 69642; + ENUM_VALUE11345 = 69643; + ENUM_VALUE11346 = 69644; + ENUM_VALUE11347 = 69645; + ENUM_VALUE11348 = 69646; + ENUM_VALUE11349 = 69647; + ENUM_VALUE11350 = 69648; + ENUM_VALUE11351 = 69649; + ENUM_VALUE11352 = 69650; + ENUM_VALUE11353 = 69651; + ENUM_VALUE11354 = 69652; + ENUM_VALUE11355 = 69653; + ENUM_VALUE11356 = 69654; + ENUM_VALUE11357 = 69655; + ENUM_VALUE11358 = 69656; + ENUM_VALUE11359 = 69657; + ENUM_VALUE11360 = 69658; + ENUM_VALUE11361 = 69659; + ENUM_VALUE11362 = 69660; + ENUM_VALUE11363 = 69661; + ENUM_VALUE11364 = 69662; + ENUM_VALUE11365 = 73728; + ENUM_VALUE11366 = 73729; + ENUM_VALUE11367 = 77824; + ENUM_VALUE11368 = 77825; + ENUM_VALUE11369 = 81920; + ENUM_VALUE11370 = 81921; + ENUM_VALUE11371 = 81922; + ENUM_VALUE11372 = 81923; + ENUM_VALUE11373 = 86016; + ENUM_VALUE11374 = 86017; + ENUM_VALUE11375 = 86018; + ENUM_VALUE11376 = 86019; + ENUM_VALUE11377 = 86020; + ENUM_VALUE11378 = 86021; + ENUM_VALUE11379 = 86022; + ENUM_VALUE11380 = 86023; + ENUM_VALUE11381 = 86024; + ENUM_VALUE11382 = 86025; + ENUM_VALUE11383 = 86026; + ENUM_VALUE11384 = 86027; + ENUM_VALUE11385 = 86028; + ENUM_VALUE11386 = 86029; + ENUM_VALUE11387 = 86030; + ENUM_VALUE11388 = 86031; + ENUM_VALUE11389 = 86032; + ENUM_VALUE11390 = 86033; + ENUM_VALUE11391 = 86034; + ENUM_VALUE11392 = 86035; + ENUM_VALUE11393 = 86036; + ENUM_VALUE11394 = 86037; + ENUM_VALUE11395 = 86038; + ENUM_VALUE11396 = 86039; + ENUM_VALUE11397 = 86040; + ENUM_VALUE11398 = 86041; + ENUM_VALUE11399 = 86042; + ENUM_VALUE11400 = 86043; + ENUM_VALUE11401 = 86044; + ENUM_VALUE11402 = 86045; + ENUM_VALUE11403 = 86046; + ENUM_VALUE11404 = 86047; + ENUM_VALUE11405 = 86048; + ENUM_VALUE11406 = 86049; + ENUM_VALUE11407 = 86050; + ENUM_VALUE11408 = 86051; + ENUM_VALUE11409 = 86052; + ENUM_VALUE11410 = 86053; + ENUM_VALUE11411 = 86054; + ENUM_VALUE11412 = 86055; + ENUM_VALUE11413 = 86056; + ENUM_VALUE11414 = 86057; + ENUM_VALUE11415 = 86058; + ENUM_VALUE11416 = 86059; + ENUM_VALUE11417 = 86060; + ENUM_VALUE11418 = 86061; + ENUM_VALUE11419 = 86062; + ENUM_VALUE11420 = 86063; + ENUM_VALUE11421 = 86064; + ENUM_VALUE11422 = 86065; + ENUM_VALUE11423 = 86066; + ENUM_VALUE11424 = 86067; + ENUM_VALUE11425 = 86068; + ENUM_VALUE11426 = 86069; + ENUM_VALUE11427 = 86070; + ENUM_VALUE11428 = 86071; + ENUM_VALUE11429 = 86072; + ENUM_VALUE11430 = 86073; + ENUM_VALUE11431 = 86074; + ENUM_VALUE11432 = 86077; + ENUM_VALUE11433 = 86078; + ENUM_VALUE11434 = 86079; + ENUM_VALUE11435 = 86080; + ENUM_VALUE11436 = 86081; + ENUM_VALUE11437 = 86082; + ENUM_VALUE11438 = 86083; + ENUM_VALUE11439 = 86084; + ENUM_VALUE11440 = 90112; + ENUM_VALUE11441 = 94208; + ENUM_VALUE11442 = 94209; + ENUM_VALUE11443 = 94210; + ENUM_VALUE11444 = 94211; + ENUM_VALUE11445 = 94212; + ENUM_VALUE11446 = 94213; + ENUM_VALUE11447 = 94214; + ENUM_VALUE11448 = 94215; + ENUM_VALUE11449 = 94216; + ENUM_VALUE11450 = 94217; + ENUM_VALUE11451 = 94218; + ENUM_VALUE11452 = 94219; + ENUM_VALUE11453 = 94220; + ENUM_VALUE11454 = 94221; + ENUM_VALUE11455 = 94222; + ENUM_VALUE11456 = 94223; + ENUM_VALUE11457 = 94224; + ENUM_VALUE11458 = 98304; + ENUM_VALUE11459 = 98305; + ENUM_VALUE11460 = 98306; + ENUM_VALUE11461 = 98307; + ENUM_VALUE11462 = 98308; + ENUM_VALUE11463 = 102400; + ENUM_VALUE11464 = 131072; + ENUM_VALUE11465 = 131073; + ENUM_VALUE11466 = 135168; + ENUM_VALUE11467 = 9439507; +} + +enum Enum11541 { + ENUM_VALUE11542 = -1; + ENUM_VALUE11543 = 0; + ENUM_VALUE11544 = 1; + ENUM_VALUE11545 = 2; + ENUM_VALUE11546 = 3; + ENUM_VALUE11547 = 4; + ENUM_VALUE11548 = 5; + ENUM_VALUE11549 = 6; + ENUM_VALUE11550 = 7; + ENUM_VALUE11551 = 8; + ENUM_VALUE11552 = 9; + ENUM_VALUE11553 = 10; + ENUM_VALUE11554 = 11; + ENUM_VALUE11555 = 12; + ENUM_VALUE11556 = 13; + ENUM_VALUE11557 = 14; + ENUM_VALUE11558 = 15; + ENUM_VALUE11559 = 16; + ENUM_VALUE11560 = 17; + ENUM_VALUE11561 = 18; + ENUM_VALUE11562 = 19; + ENUM_VALUE11563 = 20; + ENUM_VALUE11564 = 21; + ENUM_VALUE11565 = 22; + ENUM_VALUE11566 = 23; + ENUM_VALUE11567 = 24; + ENUM_VALUE11568 = 25; + ENUM_VALUE11569 = 26; + ENUM_VALUE11570 = 27; + ENUM_VALUE11571 = 28; + ENUM_VALUE11572 = 29; + ENUM_VALUE11573 = 30; + ENUM_VALUE11574 = 31; + ENUM_VALUE11575 = 32; + ENUM_VALUE11576 = 33; + ENUM_VALUE11577 = 34; + ENUM_VALUE11578 = 35; + ENUM_VALUE11579 = 36; + ENUM_VALUE11580 = 37; + ENUM_VALUE11581 = 38; + ENUM_VALUE11582 = 39; + ENUM_VALUE11583 = 40; + ENUM_VALUE11584 = 41; + ENUM_VALUE11585 = 42; + ENUM_VALUE11586 = 43; + ENUM_VALUE11587 = 44; + ENUM_VALUE11588 = 45; + ENUM_VALUE11589 = 46; + ENUM_VALUE11590 = 47; + ENUM_VALUE11591 = 48; + ENUM_VALUE11592 = 49; + ENUM_VALUE11593 = 50; + ENUM_VALUE11594 = 51; + ENUM_VALUE11595 = 52; + ENUM_VALUE11596 = 53; + ENUM_VALUE11597 = 54; + ENUM_VALUE11598 = 55; + ENUM_VALUE11599 = 56; + ENUM_VALUE11600 = 57; + ENUM_VALUE11601 = 58; + ENUM_VALUE11602 = 59; + ENUM_VALUE11603 = 60; + ENUM_VALUE11604 = 61; + ENUM_VALUE11605 = 62; + ENUM_VALUE11606 = 63; + ENUM_VALUE11607 = 64; + ENUM_VALUE11608 = 65; + ENUM_VALUE11609 = 66; + ENUM_VALUE11610 = 67; + ENUM_VALUE11611 = 68; + ENUM_VALUE11612 = 69; + ENUM_VALUE11613 = 70; + ENUM_VALUE11614 = 71; + ENUM_VALUE11615 = 72; + ENUM_VALUE11616 = 73; + ENUM_VALUE11617 = 74; + ENUM_VALUE11618 = 75; + ENUM_VALUE11619 = 76; + ENUM_VALUE11620 = 77; + ENUM_VALUE11621 = 78; + ENUM_VALUE11622 = 79; + ENUM_VALUE11623 = 80; + ENUM_VALUE11624 = 81; + ENUM_VALUE11625 = 82; + ENUM_VALUE11626 = 83; + ENUM_VALUE11627 = 84; + ENUM_VALUE11628 = 85; + ENUM_VALUE11629 = 86; + ENUM_VALUE11630 = 87; + ENUM_VALUE11631 = 88; + ENUM_VALUE11632 = 89; + ENUM_VALUE11633 = 90; + ENUM_VALUE11634 = 91; + ENUM_VALUE11635 = 92; + ENUM_VALUE11636 = 93; + ENUM_VALUE11637 = 94; + ENUM_VALUE11638 = 95; + ENUM_VALUE11639 = 96; + ENUM_VALUE11640 = 97; + ENUM_VALUE11641 = 98; + ENUM_VALUE11642 = 99; + ENUM_VALUE11643 = 100; + ENUM_VALUE11644 = 101; + ENUM_VALUE11645 = 102; + ENUM_VALUE11646 = 103; + ENUM_VALUE11647 = 104; + ENUM_VALUE11648 = 105; + ENUM_VALUE11649 = 106; + ENUM_VALUE11650 = 107; + ENUM_VALUE11651 = 108; + ENUM_VALUE11652 = 109; + ENUM_VALUE11653 = 110; + ENUM_VALUE11654 = 111; + ENUM_VALUE11655 = 112; + ENUM_VALUE11656 = 113; + ENUM_VALUE11657 = 114; + ENUM_VALUE11658 = 115; + ENUM_VALUE11659 = 116; + ENUM_VALUE11660 = 117; + ENUM_VALUE11661 = 118; + ENUM_VALUE11662 = 119; + ENUM_VALUE11663 = 120; + ENUM_VALUE11664 = 121; + ENUM_VALUE11665 = 122; + ENUM_VALUE11666 = 123; + ENUM_VALUE11667 = 124; + ENUM_VALUE11668 = 125; + ENUM_VALUE11669 = 126; + ENUM_VALUE11670 = 127; + ENUM_VALUE11671 = 128; + ENUM_VALUE11672 = 129; + ENUM_VALUE11673 = 130; + ENUM_VALUE11674 = 131; + ENUM_VALUE11675 = 132; + ENUM_VALUE11676 = 133; + ENUM_VALUE11677 = 134; + ENUM_VALUE11678 = 135; + ENUM_VALUE11679 = 136; + ENUM_VALUE11680 = 137; + ENUM_VALUE11681 = 138; + ENUM_VALUE11682 = 139; + ENUM_VALUE11683 = 140; + ENUM_VALUE11684 = 141; + ENUM_VALUE11685 = 142; + ENUM_VALUE11686 = 143; + ENUM_VALUE11687 = 144; + ENUM_VALUE11688 = 145; + ENUM_VALUE11689 = 146; + ENUM_VALUE11690 = 147; + ENUM_VALUE11691 = 148; + ENUM_VALUE11692 = 149; + ENUM_VALUE11693 = 150; + ENUM_VALUE11694 = 151; + ENUM_VALUE11695 = 152; + ENUM_VALUE11696 = 153; + ENUM_VALUE11697 = 154; + ENUM_VALUE11698 = 155; + ENUM_VALUE11699 = 156; + ENUM_VALUE11700 = 157; + ENUM_VALUE11701 = 158; + ENUM_VALUE11702 = 159; + ENUM_VALUE11703 = 160; + ENUM_VALUE11704 = 161; + ENUM_VALUE11705 = 162; + ENUM_VALUE11706 = 163; + ENUM_VALUE11707 = 164; + ENUM_VALUE11708 = 165; + ENUM_VALUE11709 = 166; + ENUM_VALUE11710 = 167; + ENUM_VALUE11711 = 168; + ENUM_VALUE11712 = 169; + ENUM_VALUE11713 = 170; + ENUM_VALUE11714 = 171; + ENUM_VALUE11715 = 172; + ENUM_VALUE11716 = 173; + ENUM_VALUE11717 = 174; + ENUM_VALUE11718 = 175; + ENUM_VALUE11719 = 176; + ENUM_VALUE11720 = 177; + ENUM_VALUE11721 = 178; + ENUM_VALUE11722 = 179; + ENUM_VALUE11723 = 180; + ENUM_VALUE11724 = 181; + ENUM_VALUE11725 = 182; + ENUM_VALUE11726 = 183; + ENUM_VALUE11727 = 184; + ENUM_VALUE11728 = 185; + ENUM_VALUE11729 = 186; + ENUM_VALUE11730 = 187; + ENUM_VALUE11731 = 188; + ENUM_VALUE11732 = 16777215; +} + +enum Enum11468 { + ENUM_VALUE11469 = -99; + ENUM_VALUE11470 = 0; + ENUM_VALUE11471 = 1; + ENUM_VALUE11472 = 2; + ENUM_VALUE11473 = 3; + ENUM_VALUE11474 = 4; + ENUM_VALUE11475 = 28; + ENUM_VALUE11476 = 22; + ENUM_VALUE11477 = 38; + ENUM_VALUE11478 = 512; + ENUM_VALUE11479 = 2048; + ENUM_VALUE11480 = 66; + ENUM_VALUE11481 = 578; + ENUM_VALUE11482 = 77; + ENUM_VALUE11483 = 88; + ENUM_VALUE11484 = 100; + ENUM_VALUE11485 = 110; + ENUM_VALUE11486 = 2158; + ENUM_VALUE11487 = 122; + ENUM_VALUE11488 = 2170; + ENUM_VALUE11489 = 144; + ENUM_VALUE11490 = 244; + ENUM_VALUE11491 = 2292; + ENUM_VALUE11492 = 44; +} + +enum Enum11022 { + ENUM_VALUE11023 = 0; + ENUM_VALUE11024 = 1; + ENUM_VALUE11025 = 2; + ENUM_VALUE11026 = 3; + ENUM_VALUE11027 = 4; + ENUM_VALUE11028 = 5; + ENUM_VALUE11029 = 6; + ENUM_VALUE11030 = 7; + ENUM_VALUE11031 = 8; + ENUM_VALUE11032 = 9; + ENUM_VALUE11033 = 10; + ENUM_VALUE11034 = 11; + ENUM_VALUE11035 = 12; + ENUM_VALUE11036 = 13; + ENUM_VALUE11037 = 14; + ENUM_VALUE11038 = 15; + ENUM_VALUE11039 = 16; + ENUM_VALUE11040 = 17; + ENUM_VALUE11041 = 18; + ENUM_VALUE11042 = 19; + ENUM_VALUE11043 = 20; + ENUM_VALUE11044 = 21; + ENUM_VALUE11045 = 22; + ENUM_VALUE11046 = 23; + ENUM_VALUE11047 = 24; + ENUM_VALUE11048 = 25; + ENUM_VALUE11049 = 26; + ENUM_VALUE11050 = 27; + ENUM_VALUE11051 = 28; + ENUM_VALUE11052 = 29; + ENUM_VALUE11053 = 30; + ENUM_VALUE11054 = 31; + ENUM_VALUE11055 = 32; + ENUM_VALUE11056 = 33; + ENUM_VALUE11057 = 34; + ENUM_VALUE11058 = 35; + ENUM_VALUE11059 = 36; + ENUM_VALUE11060 = 37; + ENUM_VALUE11061 = 38; + ENUM_VALUE11062 = 39; + ENUM_VALUE11063 = 40; + ENUM_VALUE11064 = 41; + ENUM_VALUE11065 = 42; + ENUM_VALUE11066 = 43; + ENUM_VALUE11067 = 44; + ENUM_VALUE11068 = 45; + ENUM_VALUE11069 = 46; + ENUM_VALUE11070 = 47; + ENUM_VALUE11071 = 48; + ENUM_VALUE11072 = 49; + ENUM_VALUE11073 = 50; + ENUM_VALUE11074 = 51; + ENUM_VALUE11075 = 52; + ENUM_VALUE11076 = 53; + ENUM_VALUE11077 = 54; + ENUM_VALUE11078 = 55; + ENUM_VALUE11079 = 56; + ENUM_VALUE11080 = 57; + ENUM_VALUE11081 = 58; + ENUM_VALUE11082 = 59; + ENUM_VALUE11083 = 60; + ENUM_VALUE11084 = 61; + ENUM_VALUE11085 = 62; + ENUM_VALUE11086 = 63; + ENUM_VALUE11087 = 64; + ENUM_VALUE11088 = 65; + ENUM_VALUE11089 = 66; + ENUM_VALUE11090 = 67; + ENUM_VALUE11091 = 68; + ENUM_VALUE11092 = 69; + ENUM_VALUE11093 = 70; + ENUM_VALUE11094 = 71; + ENUM_VALUE11095 = 72; + ENUM_VALUE11096 = 73; + ENUM_VALUE11097 = 74; + ENUM_VALUE11098 = 75; + ENUM_VALUE11099 = 76; + ENUM_VALUE11100 = 77; + ENUM_VALUE11101 = 78; + ENUM_VALUE11102 = 79; + ENUM_VALUE11103 = 80; + ENUM_VALUE11104 = 81; + ENUM_VALUE11105 = 82; + ENUM_VALUE11106 = 83; +} + +enum Enum12670 { + ENUM_VALUE12671 = 0; + ENUM_VALUE12672 = 1; + ENUM_VALUE12673 = 2; +} + +enum Enum12871 { + ENUM_VALUE12872 = 1; + ENUM_VALUE12873 = 2; + ENUM_VALUE12874 = 3; + ENUM_VALUE12875 = 4; + ENUM_VALUE12876 = 5; + ENUM_VALUE12877 = 6; +} + +enum Enum13092 { + ENUM_VALUE13093 = 1; + ENUM_VALUE13094 = 2; + ENUM_VALUE13095 = 3; +} + +enum Enum13146 { + ENUM_VALUE13147 = 0; + ENUM_VALUE13148 = 1; + ENUM_VALUE13149 = 2; + ENUM_VALUE13150 = 3; +} + +enum Enum16042 { + ENUM_VALUE16043 = 0; + ENUM_VALUE16044 = 1; + ENUM_VALUE16045 = 17; + ENUM_VALUE16046 = 273; + ENUM_VALUE16047 = 274; + ENUM_VALUE16048 = 4385; + ENUM_VALUE16049 = 4386; + ENUM_VALUE16050 = 4387; + ENUM_VALUE16051 = 4388; + ENUM_VALUE16052 = 4389; + ENUM_VALUE16053 = 4390; + ENUM_VALUE16054 = 4391; + ENUM_VALUE16055 = 4392; + ENUM_VALUE16056 = 4393; + ENUM_VALUE16057 = 276; + ENUM_VALUE16058 = 277; + ENUM_VALUE16059 = 18; + ENUM_VALUE16060 = 289; + ENUM_VALUE16061 = 291; + ENUM_VALUE16062 = 4657; + ENUM_VALUE16063 = 74513; + ENUM_VALUE16064 = 4658; + ENUM_VALUE16065 = 4659; + ENUM_VALUE16066 = 4660; + ENUM_VALUE16067 = 4661; + ENUM_VALUE16068 = 4662; + ENUM_VALUE16069 = 4663; + ENUM_VALUE16070 = 4664; + ENUM_VALUE16071 = 292; + ENUM_VALUE16072 = 4673; + ENUM_VALUE16073 = 4674; + ENUM_VALUE16074 = 293; + ENUM_VALUE16075 = 19; + ENUM_VALUE16076 = 20; + ENUM_VALUE16077 = 321; + ENUM_VALUE16078 = 5137; + ENUM_VALUE16079 = 5138; + ENUM_VALUE16080 = 5139; + ENUM_VALUE16081 = 5140; + ENUM_VALUE16082 = 5141; + ENUM_VALUE16083 = 5142; + ENUM_VALUE16084 = 82273; + ENUM_VALUE16085 = 82274; + ENUM_VALUE16086 = 82275; + ENUM_VALUE16087 = 82276; + ENUM_VALUE16088 = 82277; + ENUM_VALUE16089 = 82278; + ENUM_VALUE16090 = 5143; + ENUM_VALUE16091 = 5144; + ENUM_VALUE16092 = 5145; + ENUM_VALUE16093 = 5146; + ENUM_VALUE16094 = 82337; + ENUM_VALUE16095 = 5147; + ENUM_VALUE16096 = 5148; + ENUM_VALUE16097 = 322; + ENUM_VALUE16098 = 323; + ENUM_VALUE16099 = 324; + ENUM_VALUE16100 = 325; + ENUM_VALUE16101 = 326; + ENUM_VALUE16102 = 327; + ENUM_VALUE16103 = 328; + ENUM_VALUE16104 = 21; + ENUM_VALUE16105 = 337; + ENUM_VALUE16106 = 22; + ENUM_VALUE16107 = 23; + ENUM_VALUE16108 = 24; + ENUM_VALUE16109 = 2; + ENUM_VALUE16110 = 33; + ENUM_VALUE16111 = 34; + ENUM_VALUE16112 = 545; + ENUM_VALUE16113 = 8721; + ENUM_VALUE16114 = 8723; + ENUM_VALUE16115 = 8724; + ENUM_VALUE16116 = 546; + ENUM_VALUE16117 = 8739; + ENUM_VALUE16118 = 8740; + ENUM_VALUE16119 = 547; + ENUM_VALUE16120 = 548; + ENUM_VALUE16121 = 549; + ENUM_VALUE16122 = 550; + ENUM_VALUE16123 = 551; + ENUM_VALUE16124 = 552; + ENUM_VALUE16125 = 553; + ENUM_VALUE16126 = 35; + ENUM_VALUE16127 = 36; + ENUM_VALUE16128 = 37; + ENUM_VALUE16129 = 593; + ENUM_VALUE16130 = 594; + ENUM_VALUE16131 = 595; + ENUM_VALUE16132 = 596; + ENUM_VALUE16133 = 597; + ENUM_VALUE16134 = 38; + ENUM_VALUE16135 = 609; + ENUM_VALUE16136 = 610; + ENUM_VALUE16137 = 617; + ENUM_VALUE16138 = 614; + ENUM_VALUE16139 = 615; + ENUM_VALUE16140 = 616; + ENUM_VALUE16141 = 618; + ENUM_VALUE16142 = 620; + ENUM_VALUE16143 = 9937; + ENUM_VALUE16144 = 9938; + ENUM_VALUE16145 = 9939; + ENUM_VALUE16146 = 9940; + ENUM_VALUE16147 = 9941; + ENUM_VALUE16148 = 39; + ENUM_VALUE16149 = 40; + ENUM_VALUE16150 = 41; + ENUM_VALUE16151 = 42; + ENUM_VALUE16152 = 43; + ENUM_VALUE16153 = 44; + ENUM_VALUE16154 = 45; + ENUM_VALUE16155 = 11793; + ENUM_VALUE16156 = 3; + ENUM_VALUE16157 = 49; + ENUM_VALUE16158 = 50; + ENUM_VALUE16159 = 51; + ENUM_VALUE16160 = 817; + ENUM_VALUE16161 = 818; + ENUM_VALUE16162 = 819; + ENUM_VALUE16163 = 52; + ENUM_VALUE16164 = 833; + ENUM_VALUE16165 = 53; + ENUM_VALUE16166 = 54; + ENUM_VALUE16167 = 4; + ENUM_VALUE16168 = 1041; + ENUM_VALUE16169 = 16657; + ENUM_VALUE16170 = 16658; + ENUM_VALUE16171 = 16659; + ENUM_VALUE16172 = 16660; + ENUM_VALUE16173 = 16661; + ENUM_VALUE16174 = 1042; + ENUM_VALUE16175 = 16673; + ENUM_VALUE16176 = 1043; + ENUM_VALUE16177 = 16689; + ENUM_VALUE16178 = 16690; + ENUM_VALUE16179 = 16691; + ENUM_VALUE16180 = 16692; + ENUM_VALUE16181 = 16693; + ENUM_VALUE16182 = 16694; + ENUM_VALUE16183 = 16695; + ENUM_VALUE16184 = 1044; + ENUM_VALUE16185 = 16705; + ENUM_VALUE16186 = 16706; + ENUM_VALUE16187 = 16707; + ENUM_VALUE16188 = 16708; + ENUM_VALUE16189 = 16709; + ENUM_VALUE16190 = 16710; + ENUM_VALUE16191 = 16711; + ENUM_VALUE16192 = 16712; + ENUM_VALUE16193 = 16713; + ENUM_VALUE16194 = 1046; + ENUM_VALUE16195 = 16737; + ENUM_VALUE16196 = 1047; + ENUM_VALUE16197 = 16753; + ENUM_VALUE16198 = 268049; + ENUM_VALUE16199 = 268050; + ENUM_VALUE16200 = 268051; + ENUM_VALUE16201 = 268052; + ENUM_VALUE16202 = 1048; + ENUM_VALUE16203 = 16769; + ENUM_VALUE16204 = 16770; + ENUM_VALUE16205 = 16771; + ENUM_VALUE16206 = 16772; + ENUM_VALUE16207 = 16773; + ENUM_VALUE16208 = 1049; + ENUM_VALUE16209 = 1056; + ENUM_VALUE16210 = 1058; + ENUM_VALUE16211 = 1059; + ENUM_VALUE16212 = 1060; + ENUM_VALUE16213 = 1061; + ENUM_VALUE16214 = 5; + ENUM_VALUE16215 = 6; + ENUM_VALUE16216 = 97; + ENUM_VALUE16217 = 98; + ENUM_VALUE16218 = 99; + ENUM_VALUE16219 = 100; + ENUM_VALUE16220 = 101; + ENUM_VALUE16221 = 102; + ENUM_VALUE16222 = 103; + ENUM_VALUE16223 = 104; + ENUM_VALUE16224 = 105; + ENUM_VALUE16225 = 106; + ENUM_VALUE16226 = 108; + ENUM_VALUE16227 = 1729; + ENUM_VALUE16228 = 1730; + ENUM_VALUE16229 = 1731; + ENUM_VALUE16230 = 7; + ENUM_VALUE16231 = 8; + ENUM_VALUE16232 = 9; + ENUM_VALUE16233 = 10; + ENUM_VALUE16234 = 161; + ENUM_VALUE16235 = 2577; + ENUM_VALUE16236 = 41233; + ENUM_VALUE16237 = 41234; + ENUM_VALUE16238 = 2578; + ENUM_VALUE16239 = 2579; + ENUM_VALUE16240 = 41265; + ENUM_VALUE16241 = 2580; + ENUM_VALUE16242 = 2581; + ENUM_VALUE16243 = 41297; + ENUM_VALUE16244 = 41298; + ENUM_VALUE16245 = 41299; + ENUM_VALUE16246 = 41300; + ENUM_VALUE16247 = 2582; + ENUM_VALUE16248 = 2583; + ENUM_VALUE16249 = 2584; + ENUM_VALUE16250 = 162; + ENUM_VALUE16251 = 2593; + ENUM_VALUE16252 = 41489; + ENUM_VALUE16253 = 663825; + ENUM_VALUE16254 = 663826; + ENUM_VALUE16255 = 41490; + ENUM_VALUE16256 = 41491; + ENUM_VALUE16257 = 41492; + ENUM_VALUE16258 = 663873; + ENUM_VALUE16259 = 2594; + ENUM_VALUE16260 = 41505; + ENUM_VALUE16261 = 41506; + ENUM_VALUE16262 = 41507; + ENUM_VALUE16263 = 2595; + ENUM_VALUE16264 = 41521; + ENUM_VALUE16265 = 41522; + ENUM_VALUE16266 = 41523; + ENUM_VALUE16267 = 41524; + ENUM_VALUE16268 = 41525; + ENUM_VALUE16269 = 664401; + ENUM_VALUE16270 = 664402; + ENUM_VALUE16271 = 41526; + ENUM_VALUE16272 = 41527; + ENUM_VALUE16273 = 2596; + ENUM_VALUE16274 = 2597; + ENUM_VALUE16275 = 2598; + ENUM_VALUE16276 = 41569; + ENUM_VALUE16277 = 41570; + ENUM_VALUE16278 = 41571; + ENUM_VALUE16279 = 41572; + ENUM_VALUE16280 = 41573; + ENUM_VALUE16281 = 665169; + ENUM_VALUE16282 = 665170; + ENUM_VALUE16283 = 665171; + ENUM_VALUE16284 = 665172; + ENUM_VALUE16285 = 2599; + ENUM_VALUE16286 = 2600; + ENUM_VALUE16287 = 2601; + ENUM_VALUE16288 = 2603; + ENUM_VALUE16289 = 2604; + ENUM_VALUE16290 = 163; + ENUM_VALUE16291 = 2608; + ENUM_VALUE16292 = 2609; + ENUM_VALUE16293 = 2610; + ENUM_VALUE16294 = 2611; + ENUM_VALUE16295 = 2612; + ENUM_VALUE16296 = 164; + ENUM_VALUE16297 = 2625; + ENUM_VALUE16298 = 2626; + ENUM_VALUE16299 = 42017; + ENUM_VALUE16300 = 42018; + ENUM_VALUE16301 = 42019; + ENUM_VALUE16302 = 2627; + ENUM_VALUE16303 = 2628; + ENUM_VALUE16304 = 165; + ENUM_VALUE16305 = 2641; + ENUM_VALUE16306 = 42257; + ENUM_VALUE16307 = 42258; + ENUM_VALUE16308 = 2642; + ENUM_VALUE16309 = 2643; + ENUM_VALUE16310 = 2644; + ENUM_VALUE16311 = 2646; + ENUM_VALUE16312 = 2647; + ENUM_VALUE16313 = 42353; + ENUM_VALUE16314 = 2648; + ENUM_VALUE16315 = 2649; + ENUM_VALUE16316 = 2650; + ENUM_VALUE16317 = 2651; + ENUM_VALUE16318 = 2652; + ENUM_VALUE16319 = 2653; + ENUM_VALUE16320 = 2654; + ENUM_VALUE16321 = 42481; + ENUM_VALUE16322 = 42482; + ENUM_VALUE16323 = 42483; + ENUM_VALUE16324 = 166; + ENUM_VALUE16325 = 2657; + ENUM_VALUE16326 = 2658; + ENUM_VALUE16327 = 42529; + ENUM_VALUE16328 = 2659; + ENUM_VALUE16329 = 2660; + ENUM_VALUE16330 = 2661; + ENUM_VALUE16331 = 2662; + ENUM_VALUE16332 = 2663; + ENUM_VALUE16333 = 42609; + ENUM_VALUE16334 = 2664; + ENUM_VALUE16335 = 2665; + ENUM_VALUE16336 = 42753; + ENUM_VALUE16337 = 42754; + ENUM_VALUE16338 = 42755; + ENUM_VALUE16339 = 11; + ENUM_VALUE16340 = 177; + ENUM_VALUE16341 = 2833; + ENUM_VALUE16342 = 179; + ENUM_VALUE16343 = 180; + ENUM_VALUE16344 = 2881; + ENUM_VALUE16345 = 182; + ENUM_VALUE16346 = 183; + ENUM_VALUE16347 = 12; + ENUM_VALUE16348 = 3089; + ENUM_VALUE16349 = 194; + ENUM_VALUE16350 = 195; + ENUM_VALUE16351 = 196; + ENUM_VALUE16352 = 198; + ENUM_VALUE16353 = 3169; + ENUM_VALUE16354 = 199; + ENUM_VALUE16355 = 200; + ENUM_VALUE16356 = 208; + ENUM_VALUE16357 = 3329; + ENUM_VALUE16358 = 3330; + ENUM_VALUE16359 = 3331; + ENUM_VALUE16360 = 209; + ENUM_VALUE16361 = 210; + ENUM_VALUE16362 = 211; + ENUM_VALUE16363 = 3377; + ENUM_VALUE16364 = 3378; + ENUM_VALUE16365 = 3379; + ENUM_VALUE16366 = 3380; + ENUM_VALUE16367 = 3381; + ENUM_VALUE16368 = 865809; + ENUM_VALUE16369 = 865810; + ENUM_VALUE16370 = 865811; + ENUM_VALUE16371 = 865812; + ENUM_VALUE16372 = 865813; + ENUM_VALUE16373 = 865814; + ENUM_VALUE16374 = 865815; + ENUM_VALUE16375 = 865816; + ENUM_VALUE16376 = 865817; + ENUM_VALUE16377 = 865818; + ENUM_VALUE16378 = 865819; + ENUM_VALUE16379 = 865820; + ENUM_VALUE16380 = 865821; + ENUM_VALUE16381 = 865822; + ENUM_VALUE16382 = 865823; + ENUM_VALUE16383 = 865824; + ENUM_VALUE16384 = 865825; + ENUM_VALUE16385 = 865826; + ENUM_VALUE16386 = 865827; + ENUM_VALUE16387 = 865828; + ENUM_VALUE16388 = 865829; + ENUM_VALUE16389 = 212; + ENUM_VALUE16390 = 3393; + ENUM_VALUE16391 = 3394; + ENUM_VALUE16392 = 3395; + ENUM_VALUE16393 = 213; + ENUM_VALUE16394 = 214; + ENUM_VALUE16395 = 215; + ENUM_VALUE16396 = 3441; + ENUM_VALUE16397 = 3442; + ENUM_VALUE16398 = 216; + ENUM_VALUE16399 = 217; + ENUM_VALUE16400 = 3473; + ENUM_VALUE16401 = 3474; + ENUM_VALUE16402 = 3475; + ENUM_VALUE16403 = 254; + ENUM_VALUE16404 = 255; +} + +enum Enum16553 { + ENUM_VALUE16554 = 0; + ENUM_VALUE16555 = 1; + ENUM_VALUE16556 = 2; + ENUM_VALUE16557 = 3; + ENUM_VALUE16558 = 4; + ENUM_VALUE16559 = 5; + ENUM_VALUE16560 = 6; + ENUM_VALUE16561 = 7; + ENUM_VALUE16562 = 8; + ENUM_VALUE16563 = 9; +} + +enum Enum16728 { + ENUM_VALUE16729 = 1; + ENUM_VALUE16730 = 2; + ENUM_VALUE16731 = 3; +} + +enum Enum16732 { + ENUM_VALUE16733 = 1; + ENUM_VALUE16734 = 2; + ENUM_VALUE16735 = 3; + ENUM_VALUE16736 = 4; + ENUM_VALUE16737 = 5; +} + +enum Enum16738 { + ENUM_VALUE16739 = 1; + ENUM_VALUE16740 = 2; + ENUM_VALUE16741 = 3; + ENUM_VALUE16742 = 4; + ENUM_VALUE16743 = 5; + ENUM_VALUE16744 = 6; + ENUM_VALUE16745 = 7; +} + +enum Enum16698 { + ENUM_VALUE16699 = -1; + ENUM_VALUE16700 = 100; + ENUM_VALUE16701 = 2; + ENUM_VALUE16702 = 0; + ENUM_VALUE16703 = 1; + ENUM_VALUE16704 = 4; + ENUM_VALUE16705 = 11; + ENUM_VALUE16706 = 12; + ENUM_VALUE16707 = 3; + ENUM_VALUE16708 = 5; + ENUM_VALUE16709 = 6; + ENUM_VALUE16710 = 7; + ENUM_VALUE16711 = 8; + ENUM_VALUE16712 = 9; + ENUM_VALUE16713 = 10; + ENUM_VALUE16714 = 13; + ENUM_VALUE16715 = 14; + ENUM_VALUE16716 = 15; + ENUM_VALUE16717 = 16; + ENUM_VALUE16718 = 18; + ENUM_VALUE16719 = 17; + ENUM_VALUE16720 = 19; + ENUM_VALUE16721 = 20; +} + +enum Enum16819 { + ENUM_VALUE16820 = 0; + ENUM_VALUE16821 = 1; + ENUM_VALUE16822 = 2; + ENUM_VALUE16823 = 3; + ENUM_VALUE16824 = 4; + ENUM_VALUE16825 = 5; +} + +enum Enum16925 { + ENUM_VALUE16926 = 0; + ENUM_VALUE16927 = 1; + ENUM_VALUE16928 = 2; + ENUM_VALUE16929 = 3; + ENUM_VALUE16930 = 4; + ENUM_VALUE16931 = 5; + ENUM_VALUE16932 = 6; + ENUM_VALUE16933 = 7; + ENUM_VALUE16934 = 8; + ENUM_VALUE16935 = 9; + ENUM_VALUE16936 = 10; + ENUM_VALUE16937 = 11; + ENUM_VALUE16938 = 12; + ENUM_VALUE16939 = 13; +} + +enum Enum22854 { + ENUM_VALUE22855 = 0; + ENUM_VALUE22856 = 1; +} + +enum Enum24361 { + ENUM_VALUE24362 = 0; + ENUM_VALUE24363 = 1; + ENUM_VALUE24364 = 2; + ENUM_VALUE24365 = 3; +} + +enum Enum16891 { + ENUM_VALUE16892 = 0; + ENUM_VALUE16893 = 1; + ENUM_VALUE16894 = 2; + ENUM_VALUE16895 = 3; + ENUM_VALUE16896 = 4; + ENUM_VALUE16897 = 5; + ENUM_VALUE16898 = 6; + ENUM_VALUE16899 = 7; + ENUM_VALUE16900 = 8; + ENUM_VALUE16901 = 9; + ENUM_VALUE16902 = 10; + ENUM_VALUE16903 = 11; + ENUM_VALUE16904 = 12; + ENUM_VALUE16905 = 13; + ENUM_VALUE16906 = 14; + ENUM_VALUE16907 = 15; + ENUM_VALUE16908 = 16; + ENUM_VALUE16909 = 17; + ENUM_VALUE16910 = 18; + ENUM_VALUE16911 = 19; + ENUM_VALUE16912 = 20; + ENUM_VALUE16913 = 21; + ENUM_VALUE16914 = 22; + ENUM_VALUE16915 = 23; + ENUM_VALUE16916 = 24; + ENUM_VALUE16917 = 25; + ENUM_VALUE16918 = 26; + ENUM_VALUE16919 = 27; + ENUM_VALUE16920 = 28; + ENUM_VALUE16921 = 29; + ENUM_VALUE16922 = 30; + ENUM_VALUE16923 = 31; +} + +enum Enum27361 { + ENUM_VALUE27362 = 0; + ENUM_VALUE27363 = 1; + ENUM_VALUE27364 = 2; + ENUM_VALUE27365 = 3; + ENUM_VALUE27366 = 4; +} + +enum Enum33960 { + ENUM_VALUE33961 = 0; + ENUM_VALUE33962 = 1; + ENUM_VALUE33963 = 2; + ENUM_VALUE33964 = 3; + ENUM_VALUE33965 = 4; + ENUM_VALUE33966 = 5; + ENUM_VALUE33967 = 6; +} + +enum Enum34388 { ENUM_VALUE34389 = 1; } + +enum Enum35477 { + ENUM_VALUE35478 = 4; + ENUM_VALUE35479 = 3; + ENUM_VALUE35480 = 2; + ENUM_VALUE35481 = 1; + ENUM_VALUE35482 = 0; +} + +enum Enum35507 { + ENUM_VALUE35508 = 0; + ENUM_VALUE35509 = 1; + ENUM_VALUE35510 = 2; + ENUM_VALUE35511 = 3; + ENUM_VALUE35512 = 4; + ENUM_VALUE35513 = 5; + ENUM_VALUE35514 = 6; + ENUM_VALUE35515 = 7; + ENUM_VALUE35516 = 8; + ENUM_VALUE35517 = 9; +} + +enum Enum36860 { + ENUM_VALUE36861 = 0; + ENUM_VALUE36862 = 1; + ENUM_VALUE36863 = 2; + ENUM_VALUE36864 = 3; + ENUM_VALUE36865 = 4; + ENUM_VALUE36866 = 5; + ENUM_VALUE36867 = 6; + ENUM_VALUE36868 = 7; +} + +enum Enum36890 { + ENUM_VALUE36891 = 0; + ENUM_VALUE36892 = 1; +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4.proto b/third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4.proto new file mode 100644 index 00000000..424ed108 --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4.proto @@ -0,0 +1,484 @@ +// 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. + +// LINT: ALLOW_GROUPS + +syntax = "proto2"; + +package benchmarks.google_message4; + +import "datasets/google_message4/benchmark_message4_1.proto"; +import "datasets/google_message4/benchmark_message4_2.proto"; +import "datasets/google_message4/benchmark_message4_3.proto"; + +option cc_enable_arenas = true; +option java_package = "com.google.protobuf.benchmarks"; + +message GoogleMessage4 { + optional int32 field37503 = 1; + optional .benchmarks.google_message4.UnusedEmptyMessage field37504 = 2; + optional .benchmarks.google_message4.UnusedEmptyMessage field37505 = 3; + optional .benchmarks.google_message4.UnusedEmptyMessage field37506 = 4; + optional .benchmarks.google_message4.UnusedEmptyMessage field37507 = 5; + optional .benchmarks.google_message4.Message37489 field37508 = 6; + optional .benchmarks.google_message4.UnusedEmptyMessage field37509 = 7; + optional .benchmarks.google_message4.UnusedEmptyMessage field37510 = 8; + optional .benchmarks.google_message4.UnusedEmptyMessage field37511 = 9; + optional .benchmarks.google_message4.UnusedEmptyMessage field37512 = 10; + optional .benchmarks.google_message4.UnusedEmptyMessage field37513 = 11; + optional .benchmarks.google_message4.UnusedEmptyMessage field37514 = 12; + optional .benchmarks.google_message4.UnusedEmptyMessage field37515 = 13; + optional .benchmarks.google_message4.UnusedEmptyMessage field37516 = 14; + optional .benchmarks.google_message4.UnusedEmptyMessage field37517 = 15; + optional .benchmarks.google_message4.UnusedEmptyMessage field37518 = 16; +} + +message Message37489 { + optional .benchmarks.google_message4.Message2517 field37534 = 3; + optional .benchmarks.google_message4.Message7330 field37535 = 4; + optional .benchmarks.google_message4.Message8815 field37536 = 6; + optional .benchmarks.google_message4.Message8817 field37537 = 7; + optional .benchmarks.google_message4.Message8835 field37538 = 8; + optional .benchmarks.google_message4.Message8848 field37539 = 9; + optional .benchmarks.google_message4.Message8856 field37540 = 11; + optional .benchmarks.google_message4.Message12717 field37541 = 15; + optional .benchmarks.google_message4.Message12748 field37542 = 20; + optional .benchmarks.google_message4.Message7319 field37543 = 22; + optional .benchmarks.google_message4.Message12908 field37544 = 24; + optional .benchmarks.google_message4.Message12910 field37545 = 25; + optional .benchmarks.google_message4.Message12960 field37546 = 30; + optional .benchmarks.google_message4.Message176 field37547 = 33; + optional .benchmarks.google_message4.Message13000 field37548 = 34; + optional .benchmarks.google_message4.Message13035 field37549 = 35; + optional .benchmarks.google_message4.Message37331 field37550 = 36; + optional .benchmarks.google_message4.Message37329 field37551 = 37; + optional .benchmarks.google_message4.Message37327 field37552 = 38; + optional .benchmarks.google_message4.Message37333 field37553 = 39; + optional .benchmarks.google_message4.Message37335 field37554 = 40; +} + +message Message7319 { + optional .benchmarks.google_message4.UnusedEmptyMessage field7321 = 1; + optional .benchmarks.google_message4.UnusedEmptyMessage field7322 = 7; +} + +message Message12717 { + optional .benchmarks.google_message4.UnusedEmptyMessage field12719 = 1; + optional string field12720 = 2; + optional uint32 field12721 = 3; + optional .benchmarks.google_message4.Message11976 field12722 = 4; + repeated .benchmarks.google_message4.Message11948 field12723 = 5; + optional .benchmarks.google_message4.Message11947 field12724 = 6; + optional .benchmarks.google_message4.Message12687 field12725 = 7; + repeated .benchmarks.google_message4.Message11948 field12726 = 8; + optional int64 field12727 = 9; +} + +message Message37331 { + optional .benchmarks.google_message4.UnusedEmptyMessage field37367 = 4; + required .benchmarks.google_message4.Message37326 field37368 = 1; + required int64 field37369 = 2; + required bytes field37370 = 3; +} + +message Message8815 { + optional .benchmarks.google_message4.UnusedEmptyMessage field8819 = 1; + repeated .benchmarks.google_message4.Message8768 field8820 = 2; + optional bool field8821 = 3; +} + +message Message7330 { + optional .benchmarks.google_message4.UnusedEmptyMessage field7332 = 1; + optional .benchmarks.google_message4.Message3069 field7333 = 2; + optional .benchmarks.google_message4.Message7320 field7334 = 3; + optional .benchmarks.google_message4.UnusedEmptyMessage field7335 = 4; + optional bool field7336 = 5; + optional int64 field7337 = 6; +} + +message Message12960 { + optional .benchmarks.google_message4.UnusedEmptyMessage field12962 = 1; + optional .benchmarks.google_message4.Message12948 field12963 = 2; +} + +message Message176 { + required string field408 = 1; + optional int32 field409 = 4; + optional string field410 = 50; + optional int32 field411 = 2; + optional uint64 field412 = 47; + optional string field413 = 56; + optional int32 field414 = 24; + optional string field415 = 21; + optional bytes field416 = 3; + optional string field417 = 57; + optional int32 field418 = 51; + optional float field419 = 7; + optional bool field420 = 5; + optional bool field421 = 28; + optional int32 field422 = 6; + repeated int32 field423 = 40; + optional .benchmarks.google_message4.UnusedEmptyMessage field424 = 41; + optional bool field425 = 25; + optional uint64 field426 = 26; + optional int32 field427 = 38; + optional bytes field428 = 15; + optional bytes field429 = 55; + optional bytes field430 = 16; + optional bytes field431 = 23; + optional bool field432 = 33; + optional bytes field433 = 31; + optional bytes field434 = 32; + optional int32 field435 = 36; + optional uint64 field436 = 17; + optional int32 field437 = 45; + optional uint64 field438 = 18; + optional string field439 = 46; + optional .benchmarks.google_message4.UnusedEmptyMessage field440 = 64; + optional int32 field441 = 39; + optional uint64 field442 = 48; + optional bytes field443 = 19; + optional bytes field444 = 42; + optional bytes field445 = 43; + optional string field446 = 44; + optional string field447 = 49; + optional int64 field448 = 20; + optional bool field449 = 53; + optional .benchmarks.google_message4.UnusedEmptyMessage field450 = 54; + repeated .benchmarks.google_message4.UnusedEmptyMessage field451 = 22; + optional .benchmarks.google_message4.UnusedEnum field452 = 27; + optional int32 field453 = 29; + optional int32 field454 = 30; + optional .benchmarks.google_message4.UnusedEnum field455 = 37; + optional .benchmarks.google_message4.UnusedEnum field456 = 34; + optional int32 field457 = 35; + repeated group Message178 = 101 {} + optional bool field459 = 52; + optional uint64 field460 = 58; + optional uint64 field461 = 59; + optional .benchmarks.google_message4.UnusedEmptyMessage field462 = 60; + optional .benchmarks.google_message4.UnusedEmptyMessage field463 = 61; + optional .benchmarks.google_message4.UnusedEnum field464 = 62; + repeated string field465 = 63; + optional .benchmarks.google_message4.UnusedEmptyMessage field466 = 65; +} + +message Message8817 { + optional .benchmarks.google_message4.UnusedEmptyMessage field8825 = 1; + repeated .benchmarks.google_message4.Message8768 field8826 = 2; + optional string field8827 = 3; +} + +message Message8835 { + optional .benchmarks.google_message4.UnusedEmptyMessage field8837 = 1; + repeated string field8838 = 2; + optional .benchmarks.google_message4.UnusedEnum field8839 = 3; +} + +message Message37333 { + optional .benchmarks.google_message4.UnusedEmptyMessage field37372 = 3; + required .benchmarks.google_message4.Message37326 field37373 = 1; + optional uint64 field37374 = 2; +} + +message Message13000 { + optional int64 field13015 = 1; + repeated .benchmarks.google_message4.Message12979 field13016 = 2; +} + +message Message37335 { + optional .benchmarks.google_message4.UnusedEmptyMessage field37376 = 4; + required .benchmarks.google_message4.Message37326 field37377 = 1; + required .benchmarks.google_message4.Message37173 field37378 = 2; + optional uint64 field37379 = 3; +} + +message Message8848 { + optional .benchmarks.google_message4.UnusedEmptyMessage field8850 = 1; + optional string field8851 = 2; + optional bytes field8852 = 3; +} + +message Message13035 { + optional int64 field13058 = 1; + repeated int64 field13059 = 2; +} + +message Message8856 { + optional .benchmarks.google_message4.UnusedEmptyMessage field8858 = 1; + optional string field8859 = 2; +} + +message Message12908 { + optional .benchmarks.google_message4.UnusedEmptyMessage field12912 = 1; + optional string field12913 = 2; + optional .benchmarks.google_message4.Message12799 field12914 = 3; + optional int64 field12915 = 4; + optional .benchmarks.google_message4.Message3804 field12916 = 5; + optional .benchmarks.google_message4.Message12870 field12917 = 6; +} + +message Message12910 { + optional .benchmarks.google_message4.UnusedEmptyMessage field12920 = 1; + optional .benchmarks.google_message4.Message12818 field12921 = 2; + repeated .benchmarks.google_message4.Message12903 field12922 = 3; +} + +message Message37327 { + optional .benchmarks.google_message4.UnusedEmptyMessage field37347 = 11; + required .benchmarks.google_message4.Message37326 field37348 = 1; + optional bool field37349 = 2; + optional bool field37350 = 3; + optional bool field37351 = 4; + optional bool field37352 = 5; + optional bool field37353 = 6; + optional .benchmarks.google_message4.UnusedEmptyMessage field37354 = 7; + optional uint64 field37355 = 8; + optional bool field37356 = 9; + optional bool field37357 = 10; +} + +message Message37329 { + optional .benchmarks.google_message4.UnusedEmptyMessage field37359 = 6; + required .benchmarks.google_message4.Message37326 field37360 = 1; + required int64 field37361 = 2; + required int64 field37362 = 3; + optional bool field37363 = 4; +} + +message Message2517 { + optional .benchmarks.google_message4.UnusedEmptyMessage field2519 = 1; + optional .benchmarks.google_message4.Message2356 field2520 = 2; + optional .benchmarks.google_message4.Message0 field2521 = 3; + optional .benchmarks.google_message4.Message2463 field2522 = 4; + repeated .benchmarks.google_message4.Message971 field2523 = 5; +} + +message Message12748 { + optional .benchmarks.google_message4.UnusedEmptyMessage field12754 = 1; + optional string field12755 = 2; + optional string field12756 = 3; + optional .benchmarks.google_message4.Enum12735 field12757 = 4; +} + +message Message12687 { + repeated .benchmarks.google_message4.Message12686 field12701 = 1; +} + +message Message11948 { + optional string field11954 = 1; + repeated .benchmarks.google_message4.Message11949 field11955 = 2; + optional bool field11956 = 3; +} + +message Message11976 { + repeated .benchmarks.google_message4.Message11975 field12002 = 1; +} + +message Message7320 { + optional .benchmarks.google_message4.UnusedEmptyMessage field7323 = 1; + optional .benchmarks.google_message4.Message7287 field7324 = 8; +} + +message Message3069 { + optional .benchmarks.google_message4.Message3061 field3374 = 1; + optional bytes field3375 = 2; + repeated group Message3070 = 3 { + required .benchmarks.google_message4.Enum3071 field3378 = 4; + required bytes field3379 = 5; + } + extensions 10000 to 536870911; +} + +message Message12948 { + repeated .benchmarks.google_message4.Message12949 field12958 = 1; +} + +message Message8768 { + optional string field8782 = 1; + optional .benchmarks.google_message4.Message8572 field8783 = 2; + optional bool field8784 = 3; + repeated .benchmarks.google_message4.Message8774 field8785 = 4; + optional int64 field8786 = 5; + optional .benchmarks.google_message4.UnusedEmptyMessage field8787 = 6; + optional string field8788 = 7; +} + +message Message12979 { + required bytes field12981 = 1; + repeated string field12982 = 2; + optional .benchmarks.google_message4.UnusedEmptyMessage field12983 = 3; + optional int64 field12984 = 4; + optional string field12985 = 5; + optional int32 field12986 = 6; + optional .benchmarks.google_message4.UnusedEmptyMessage field12987 = 7; +} + +message Message37173 { + optional string field37252 = 1; + optional int64 field37253 = 2; + optional .benchmarks.google_message4.UnusedEnum field37254 = 4; + optional bool field37255 = 5; + optional bool field37256 = 6; + optional bool field37257 = 7; + optional string field37258 = 8; + optional string field37259 = 9; + optional uint32 field37260 = 10; + optional fixed32 field37261 = 11; + optional string field37262 = 12; + optional string field37263 = 13; + optional string field37264 = 14; + optional int32 field37265 = 15; + optional int64 field37266 = 16; + optional int64 field37267 = 17; + optional int32 field37268 = 18; + optional int32 field37269 = 19; + optional .benchmarks.google_message4.UnusedEmptyMessage field37270 = 20; + optional .benchmarks.google_message4.UnusedEmptyMessage field37271 = 21; + optional .benchmarks.google_message4.UnusedEmptyMessage field37272 = 22; + optional .benchmarks.google_message4.UnusedEmptyMessage field37273 = 23; + optional .benchmarks.google_message4.UnusedEmptyMessage field37274 = 24; + optional string field37275 = 25; + optional bool field37276 = 26; +} + +message Message12799 { + required string field12809 = 1; + repeated fixed64 field12810 = 2; + repeated .benchmarks.google_message4.Message12776 field12811 = 8; + repeated int32 field12812 = 4; + repeated .benchmarks.google_message4.Message12798 field12813 = 5; + required int32 field12814 = 3; + optional int32 field12815 = 6; + optional .benchmarks.google_message4.Message12797 field12816 = 7; +} + +message Message12870 { + required int32 field12879 = 1; + optional int32 field12880 = 7; + required int32 field12881 = 2; + optional uint64 field12882 = 3; + optional string field12883 = 2001; + optional fixed64 field12884 = 4; + repeated fixed64 field12885 = 14; + optional int32 field12886 = 9; + optional int64 field12887 = 18; + repeated .benchmarks.google_message4.Message12870 field12888 = 8; + optional int32 field12889 = 5; + optional uint64 field12890 = 6; + optional int32 field12891 = 10; + optional int32 field12892 = 11; + optional double field12893 = 12; + optional .benchmarks.google_message4.Message12825 field12894 = 13; + optional double field12895 = 15; + optional string field12896 = 16; + optional .benchmarks.google_message4.Enum12871 field12897 = 17; + optional int32 field12898 = 19; +} + +message Message3804 { + required int64 field3818 = 1; + required bool field3819 = 2; + repeated .benchmarks.google_message4.Enum3805 field3820 = 4; + optional int32 field3821 = 5; + optional bool field3822 = 6; + optional int64 field3823 = 7; + optional .benchmarks.google_message4.Enum3783 field3824 = 8; +} + +message Message12903 { + optional string field12905 = 1; + optional .benchmarks.google_message4.Message8587 field12906 = 2; + repeated .benchmarks.google_message4.Message8590 field12907 = 3; +} + +message Message37326 { + required string field37345 = 1; + optional string field37346 = 2; +} + +message Message2356 { + optional .benchmarks.google_message4.Message1374 field2368 = 121; + optional uint64 field2369 = 1; + optional int32 field2370 = 2; + optional int32 field2371 = 17; + required string field2372 = 3; + optional int32 field2373 = 7; + optional bytes field2374 = 8; + optional string field2375 = 4; + optional string field2376 = 101; + optional int32 field2377 = 102; + optional int32 field2378 = 103; + optional int32 field2379 = 104; + optional int32 field2380 = 113; + optional int32 field2381 = 114; + optional int32 field2382 = 115; + optional int32 field2383 = 117; + optional int32 field2384 = 118; + optional int32 field2385 = 119; + optional int32 field2386 = 105; + optional bytes field2387 = 5; + optional group Message2357 = 6 { + optional int64 field2399 = 9; + optional int32 field2400 = 10; + optional int32 field2401 = 11; + optional int32 field2402 = 12; + optional int32 field2403 = 13; + optional int32 field2404 = 116; + optional int32 field2405 = 106; + required bytes field2406 = 14; + optional int32 field2407 = 45; + optional int32 field2408 = 112; + optional bool field2409 = 122; + optional bytes field2410 = 124; + } + optional string field2389 = 120; + optional group Message2358 = 107 {} + repeated group Message2359 = 40 {} + optional int32 field2392 = 50; + optional .benchmarks.google_message4.UnusedEmptyMessage field2393 = 60; + optional .benchmarks.google_message4.UnusedEmptyMessage field2394 = 70; + optional .benchmarks.google_message4.UnusedEmptyMessage field2395 = 80; + optional .benchmarks.google_message4.UnusedEmptyMessage field2396 = 90; + optional string field2397 = 100; + optional string field2398 = 123; +} + +message Message0 { + option message_set_wire_format = true; + + extensions 4 to 2147483646; +} + +message Message971 { + optional string field972 = 1; + optional int32 field973 = 2; + optional bool field974 = 3; +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4_1.proto b/third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4_1.proto new file mode 100644 index 00000000..c5deecd0 --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4_1.proto @@ -0,0 +1,500 @@ +// 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. + +// LINT: ALLOW_GROUPS + +syntax = "proto2"; + +package benchmarks.google_message4; + +import "datasets/google_message4/benchmark_message4_2.proto"; +import "datasets/google_message4/benchmark_message4_3.proto"; + +option cc_enable_arenas = true; +option java_package = "com.google.protobuf.benchmarks"; + +message Message2463 { + repeated .benchmarks.google_message4.Message2462 field2498 = 1; +} + +message Message12686 { + optional string field12699 = 1; + optional .benchmarks.google_message4.Message12685 field12700 = 2; +} + +message Message11949 {} + +message Message11975 { + optional string field11992 = 1; + optional int32 field11993 = 2; + repeated .benchmarks.google_message4.Message10320 field11994 = 3; + optional .benchmarks.google_message4.Message11947 field11995 = 4; + optional .benchmarks.google_message4.Message11920 field11996 = 5; + optional bool field11997 = 6; + repeated string field11998 = 7; + optional float field11999 = 8; + repeated .benchmarks.google_message4.UnusedEnum field12000 = 9; + optional int32 field12001 = 11; +} + +message Message7287 { + optional .benchmarks.google_message4.Message6133 field7311 = 1; + optional .benchmarks.google_message4.UnusedEmptyMessage field7312 = 8; + optional string field7313 = 3; + optional .benchmarks.google_message4.Message6643 field7314 = 4; + optional .benchmarks.google_message4.Enum7288 field7315 = 5; + optional bytes field7316 = 6; + optional .benchmarks.google_message4.UnusedEmptyMessage field7317 = 7; + optional .benchmarks.google_message4.UnusedEmptyMessage field7318 = 9; +} + +message Message3061 { + optional string field3286 = 2; + optional int32 field3287 = 77; + optional string field3288 = 49; + required .benchmarks.google_message4.Message3046 field3289 = 3; + optional .benchmarks.google_message4.Message3046 field3290 = 58; + optional group Message3062 = 4 { + required int32 field3335 = 5; + optional int32 field3336 = 6; + optional int32 field3337 = 7; + } + optional .benchmarks.google_message4.Message3060 field3292 = 104; + optional int64 field3293 = 32; + optional int32 field3294 = 41; + optional group Message3063 = 13 { + required int32 field3338 = 14; + optional .benchmarks.google_message4.Enum2851 field3339 = 18; + optional int64 field3340 = 15; + optional int64 field3341 = 23; + } + optional .benchmarks.google_message4.Enum2834 field3296 = 94; + optional bool field3297 = 25; + optional bool field3298 = 50; + optional string field3299 = 89; + optional string field3300 = 91; + optional string field3301 = 105; + optional .benchmarks.google_message4.Message3050 field3302 = 53; + optional fixed64 field3303 = 51; + optional fixed64 field3304 = 106; + optional int32 field3305 = 60; + optional string field3306 = 44; + optional bytes field3307 = 81; + optional string field3308 = 70; + optional bytes field3309 = 45; + optional .benchmarks.google_message4.Enum2806 field3310 = 71; + optional int32 field3311 = 72; + optional bytes field3312 = 78; + optional int32 field3313 = 20; + repeated group Message3064 = 8 { + required .benchmarks.google_message4.Enum2602 field3342 = 9; + optional int32 field3343 = 92; + optional string field3344 = 10; + optional bytes field3345 = 11; + optional int32 field3346 = 12; + optional .benchmarks.google_message4.Message3060 field3347 = 98; + optional .benchmarks.google_message4.UnusedEmptyMessage field3348 = 82; + optional .benchmarks.google_message4.Message3050 field3349 = 80; + optional fixed64 field3350 = 52; + optional int32 field3351 = 33; + optional string field3352 = 42; + optional string field3353 = 69; + optional bytes field3354 = 43; + optional .benchmarks.google_message4.Enum2806 field3355 = 73; + optional int32 field3356 = 74; + optional int32 field3357 = 90; + optional bytes field3358 = 79; + optional int32 field3359 = 19; + optional .benchmarks.google_message4.Enum2834 field3360 = 95; + } + optional .benchmarks.google_message4.UnusedEmptyMessage field3315 = 39; + optional int32 field3316 = 76; + optional group Message3065 = 63 {} + optional .benchmarks.google_message4.Enum2806 field3318 = 54; + optional int32 field3319 = 46; + repeated string field3320 = 24; + optional fixed32 field3321 = 38; + optional bytes field3322 = 99; + optional fixed64 field3323 = 1; + optional fixed64 field3324 = 97; + repeated .benchmarks.google_message4.Message3040 field3325 = 16; + repeated .benchmarks.google_message4.Message3041 field3326 = 61; + optional group Message3066 = 21 { + optional int32 field3366 = 22; + optional int32 field3367 = 55; + optional int32 field3368 = 88; + optional int32 field3369 = 56; + optional int32 field3370 = 75; + optional int32 field3371 = 57; + optional .benchmarks.google_message4.UnusedEmptyMessage field3372 = 85; + optional .benchmarks.google_message4.UnusedEmptyMessage field3373 = 96; + } + optional .benchmarks.google_message4.UnusedEmptyMessage field3328 = 47; + optional .benchmarks.google_message4.UnusedEmptyMessage field3329 = 48; + optional fixed64 field3330 = 40; + optional .benchmarks.google_message4.UnusedEmptyMessage field3331 = 86; + optional .benchmarks.google_message4.UnusedEmptyMessage field3332 = 59; + optional int32 field3333 = 17; +} + +message Message12949 {} + +message Message8572 { + optional bytes field8647 = 1; + optional bytes field8648 = 3; + optional .benchmarks.google_message4.Message3886 field8649 = 4; + optional .benchmarks.google_message4.Message3919 field8650 = 57; + optional bool field8651 = 5; + optional int32 field8652 = 6; + optional int32 field8653 = 49; + optional .benchmarks.google_message4.Message7905 field8654 = 7; + optional int32 field8655 = 10; + optional .benchmarks.google_message4.UnusedEmptyMessage field8656 = 11; + optional bool field8657 = 35; + optional bytes field8658 = 12; + optional string field8659 = 14; + optional .benchmarks.google_message4.UnusedEmptyMessage field8660 = 13; + optional bytes field8661 = 15; + optional .benchmarks.google_message4.UnusedEmptyMessage field8662 = 17; + optional int32 field8663 = 18; + optional int32 field8664 = 19; + optional bool field8665 = 20; + optional .benchmarks.google_message4.Enum3476 field8666 = 31; + optional bool field8667 = 36; + optional .benchmarks.google_message4.UnusedEmptyMessage field8668 = 39; + optional bytes field8669 = 22; + optional int32 field8670 = 24; + optional .benchmarks.google_message4.Message3052 field8671 = 25; + optional bytes field8672 = 26; + optional bytes field8673 = 28; + optional int32 field8674 = 29; + optional bytes field8675 = 30; + optional bytes field8676 = 32; + optional string field8677 = 33; + optional int32 field8678 = 34; + optional int32 field8679 = 37; + optional double field8680 = 38; + optional double field8681 = 42; + optional .benchmarks.google_message4.Message3922 field8682 = 40; + optional .benchmarks.google_message4.UnusedEmptyMessage field8683 = 43; + optional int64 field8684 = 44; + optional .benchmarks.google_message4.Message7929 field8685 = 45; + optional uint64 field8686 = 46; + optional uint32 field8687 = 48; + optional .benchmarks.google_message4.Message7843 field8688 = 47; + optional .benchmarks.google_message4.Message7864 field8689 = 50; + optional .benchmarks.google_message4.UnusedEmptyMessage field8690 = 52; + optional bool field8691 = 58; + optional bool field8692 = 54; + optional string field8693 = 55; + optional .benchmarks.google_message4.UnusedEmptyMessage field8694 = 41; + optional .benchmarks.google_message4.UnusedEmptyMessage field8695 = 53; + optional .benchmarks.google_message4.Message8575 field8696 = 61; +} + +message Message8774 { + optional string field8810 = 1; + optional string field8811 = 2; + optional string field8812 = 3; + optional string field8813 = 4; + optional string field8814 = 5; +} + +message Message12776 { + optional string field12786 = 1; + optional fixed64 field12787 = 11; + optional int32 field12788 = 6; + optional int32 field12789 = 13; + optional int32 field12790 = 14; + optional int32 field12791 = 15; + optional int32 field12792 = 16; + optional .benchmarks.google_message4.UnusedEmptyMessage field12793 = 8; + optional .benchmarks.google_message4.Message12774 field12794 = 10; + optional .benchmarks.google_message4.UnusedEmptyMessage field12795 = 12; + extensions 2 to 2; + extensions 3 to 3; + extensions 4 to 4; + extensions 5 to 5; + extensions 7 to 7; + extensions 9 to 9; +} + +message Message12798 { + optional int32 field12805 = 1; + optional int32 field12806 = 2; + optional .benchmarks.google_message4.Message12774 field12807 = 6; + optional bool field12808 = 7; +} + +message Message12797 { + optional .benchmarks.google_message4.Message12796 field12802 = 1; + repeated .benchmarks.google_message4.Message12796 field12803 = 2; + optional string field12804 = 3; +} + +message Message12825 { + repeated .benchmarks.google_message4.Message12818 field12862 = 1; + optional int32 field12863 = 2; + optional .benchmarks.google_message4.Message12819 field12864 = 3; + optional .benchmarks.google_message4.Message12820 field12865 = 4; + optional int32 field12866 = 5; + repeated .benchmarks.google_message4.Message12821 field12867 = 6; + repeated .benchmarks.google_message4.UnusedEmptyMessage field12868 = 7; +} + +message Message8590 {} + +message Message8587 {} + +message Message1374 { + required string field1375 = 1; + optional string field1376 = 2; +} + +message Message2462 { + required bytes field2496 = 1; + required double field2497 = 2; +} + +message Message12685 { + repeated string field12692 = 1; + repeated string field12693 = 2; + optional int64 field12694 = 3; + optional uint32 field12695 = 4; + repeated string field12696 = 5; + optional string field12697 = 6; + optional string field12698 = 7; +} + +message Message10320 { + optional .benchmarks.google_message4.Enum10335 field10347 = 1; + repeated .benchmarks.google_message4.Message10319 field10348 = 2; + optional int32 field10349 = 3; + optional int32 field10350 = 4; + optional int32 field10351 = 5; + optional int32 field10352 = 6; + optional .benchmarks.google_message4.Enum10337 field10353 = 7; +} + +message Message11947 { + optional uint32 field11951 = 1; + optional bool field11952 = 2; + optional int32 field11953 = 3; +} + +message Message11920 { + optional .benchmarks.google_message4.Enum11901 field11945 = 1; + optional .benchmarks.google_message4.UnusedEnum field11946 = 2; +} + +message Message6643 { + optional .benchmarks.google_message4.UnusedEmptyMessage field6683 = 3; + optional .benchmarks.google_message4.UnusedEmptyMessage field6684 = 4; + optional double field6685 = 5; + optional double field6686 = 6; + optional int32 field6687 = 1; + optional int32 field6688 = 2; + optional double field6689 = 9; + optional bytes field6690 = 10; + optional int32 field6691 = 11; + optional bool field6692 = 12; + optional bool field6693 = 13; + optional .benchmarks.google_message4.Message6578 field6694 = 15; + optional .benchmarks.google_message4.UnusedEnum field6695 = 16; + optional int64 field6696 = 17; + repeated .benchmarks.google_message4.UnusedEmptyMessage field6697 = 22; + optional .benchmarks.google_message4.UnusedEmptyMessage field6698 = 19; + optional .benchmarks.google_message4.UnusedEmptyMessage field6699 = 20; + optional int32 field6700 = 21; +} + +message Message6133 { + optional .benchmarks.google_message4.Message4016 field6173 = 12; + optional double field6174 = 16; + required string field6175 = 1; + required string field6176 = 2; + required string field6177 = 3; + optional string field6178 = 4; + optional string field6179 = 8; + repeated .benchmarks.google_message4.Message6109 field6180 = 5; + repeated .benchmarks.google_message4.Message5908 field6181 = 13; + repeated .benchmarks.google_message4.Message6107 field6182 = 7; + repeated .benchmarks.google_message4.Message6126 field6183 = 9; + repeated .benchmarks.google_message4.Message6129 field6184 = 15; + optional int32 field6185 = 10; + optional int32 field6186 = 11; + optional .benchmarks.google_message4.Message4016 field6187 = 17; + optional double field6188 = 14; + optional double field6189 = 18; + optional string field6190 = 19; + optional string field6191 = 20; + repeated .benchmarks.google_message4.Message5881 field6192 = 21; +} + +message Message6109 { + optional string field6140 = 1; + required .benchmarks.google_message4.Enum6111 field6141 = 2; + optional int32 field6142 = 9; + optional string field6143 = 3; + repeated .benchmarks.google_message4.Message6110 field6144 = 4; + repeated int32 field6145 = 7; + repeated int32 field6146 = 8; + optional .benchmarks.google_message4.Message6133 field6147 = 10; + repeated int32 field6148 = 11; + optional string field6149 = 12; + optional string field6150 = 13; + optional bool field6151 = 14; + extensions 1000 to 536870911; +} + +message Message3046 { + required .benchmarks.google_message4.Enum2593 field3222 = 1; + optional int32 field3223 = 4; +} + +message Message3060 { + optional int64 field3283 = 1; + optional int64 field3284 = 2; + optional int64 field3285 = 3; +} + +message Message3041 { + optional string field3214 = 1; + optional int32 field3215 = 2; +} + +message Message3040 { + required fixed64 field3209 = 1; + repeated fixed64 field3210 = 4; + optional int32 field3211 = 5; + optional fixed64 field3212 = 2; + required string field3213 = 3; +} + +message Message3050 { + optional bytes field3245 = 5; + optional int32 field3246 = 2; + optional bytes field3247 = 6; + optional int32 field3248 = 4; + optional fixed32 field3249 = 1; + optional fixed32 field3250 = 3; +} + +message Message7905 { + optional int32 field7911 = 1; + optional bool field7912 = 2; + optional bytes field7913 = 3; + optional int32 field7914 = 4; + optional int32 field7915 = 5; + optional bytes field7916 = 6; + optional int32 field7917 = 7; +} + +message Message3886 { + repeated group Message3887 = 1 { + required string field3932 = 2; + optional string field3933 = 9; + optional .benchmarks.google_message4.Message3850 field3934 = 3; + optional bytes field3935 = 8; + } +} + +message Message7864 { + optional string field7866 = 1; + optional string field7867 = 2; + repeated .benchmarks.google_message4.Message7865 field7868 = 5; + repeated .benchmarks.google_message4.Message7865 field7869 = 6; + repeated .benchmarks.google_message4.Message7865 field7870 = 7; + repeated .benchmarks.google_message4.UnusedEmptyMessage field7871 = 8; +} + +message Message3922 { + optional uint64 field4012 = 1; +} + +message Message3052 { + repeated string field3254 = 1; + repeated string field3255 = 2; + repeated bytes field3256 = 3; + repeated string field3257 = 4; + optional bool field3258 = 5; + optional int32 field3259 = 6; + optional int32 field3260 = 7; + optional string field3261 = 8; + optional string field3262 = 9; +} + +message Message8575 {} + +message Message7843 { + optional bool field7844 = 5; + optional int32 field7845 = 1; + optional .benchmarks.google_message4.UnusedEmptyMessage field7846 = 22; + repeated int32 field7847 = 3; + repeated string field7848 = 11; + optional .benchmarks.google_message4.UnusedEnum field7849 = 15; + optional .benchmarks.google_message4.UnusedEmptyMessage field7850 = 6; + optional .benchmarks.google_message4.UnusedEmptyMessage field7851 = 14; + optional .benchmarks.google_message4.UnusedEmptyMessage field7852 = 10; + optional .benchmarks.google_message4.Message7511 field7853 = 13; + optional .benchmarks.google_message4.UnusedEmptyMessage field7854 = 16; + optional .benchmarks.google_message4.UnusedEmptyMessage field7855 = 17; + optional .benchmarks.google_message4.UnusedEmptyMessage field7856 = 19; + optional .benchmarks.google_message4.UnusedEmptyMessage field7857 = 18; + optional .benchmarks.google_message4.UnusedEnum field7858 = 20; + optional int32 field7859 = 2; +} + +message Message3919 { + repeated .benchmarks.google_message4.Message3920 field4009 = 1; +} + +message Message7929 { + optional int64 field7942 = 1; + optional int64 field7943 = 4; + optional int64 field7944 = 5; + optional int64 field7945 = 12; + optional int64 field7946 = 13; + optional int64 field7947 = 18; + optional int64 field7948 = 6; + optional int64 field7949 = 7; + repeated .benchmarks.google_message4.Message7919 field7950 = 8; + repeated .benchmarks.google_message4.UnusedEmptyMessage field7951 = 20; + repeated .benchmarks.google_message4.Message7920 field7952 = 14; + repeated .benchmarks.google_message4.Message7921 field7953 = 15; + repeated .benchmarks.google_message4.Message7928 field7954 = 17; + optional int64 field7955 = 19; + optional bool field7956 = 2; + optional int64 field7957 = 3; + optional int64 field7958 = 9; + repeated .benchmarks.google_message4.UnusedEmptyMessage field7959 = 10; + repeated bytes field7960 = 11; + optional int64 field7961 = 16; +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4_2.proto b/third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4_2.proto new file mode 100644 index 00000000..0c4cdfd8 --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4_2.proto @@ -0,0 +1,316 @@ +// 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. + +syntax = "proto2"; + +package benchmarks.google_message4; + +import "datasets/google_message4/benchmark_message4_3.proto"; + +option cc_enable_arenas = true; +option java_package = "com.google.protobuf.benchmarks"; + +message Message12774 { + optional uint32 field12777 = 1; + optional uint32 field12778 = 2; + optional uint32 field12779 = 3; + optional uint32 field12780 = 4; + optional uint32 field12781 = 5; + optional bool field12782 = 6; +} + +message Message12796 { + repeated fixed64 field12800 = 1; + optional uint64 field12801 = 2; +} + +message Message12821 { + optional int32 field12848 = 1; + optional int32 field12849 = 2; + optional int32 field12850 = 3; + optional int32 field12851 = 4; + optional int32 field12852 = 5; +} + +message Message12820 { + optional int32 field12840 = 1; + optional int32 field12841 = 2; + optional int32 field12842 = 3; + optional int32 field12843 = 8; + optional int32 field12844 = 4; + optional int32 field12845 = 5; + optional int32 field12846 = 6; + optional int32 field12847 = 7; +} + +message Message12819 { + optional double field12834 = 1; + optional double field12835 = 2; + optional double field12836 = 3; + optional double field12837 = 4; + optional double field12838 = 5; + optional double field12839 = 6; +} + +message Message12818 { + optional uint64 field12829 = 1; + optional int32 field12830 = 2; + optional int32 field12831 = 3; + optional int32 field12832 = 5; + repeated .benchmarks.google_message4.Message12817 field12833 = 4; +} + +message Message10319 { + optional .benchmarks.google_message4.Enum10325 field10340 = 1; + optional int32 field10341 = 4; + optional int32 field10342 = 5; + optional bytes field10343 = 3; + optional string field10344 = 2; + optional string field10345 = 6; + optional string field10346 = 7; +} + +message Message6578 { + optional .benchmarks.google_message4.Enum6579 field6632 = 1; + optional .benchmarks.google_message4.Enum6588 field6633 = 2; +} + +message Message6126 { + required string field6152 = 1; + repeated .benchmarks.google_message4.Message6127 field6153 = 9; + optional int32 field6154 = 14; + optional bytes field6155 = 10; + optional .benchmarks.google_message4.Message6024 field6156 = 12; + optional int32 field6157 = 4; + optional string field6158 = 5; + optional int32 field6159 = 6; + repeated int32 field6160 = 2; + repeated int32 field6161 = 3; + repeated .benchmarks.google_message4.Message6052 field6162 = 7; + repeated .benchmarks.google_message4.UnusedEmptyMessage field6163 = 11; + optional .benchmarks.google_message4.Enum6065 field6164 = 15; + repeated .benchmarks.google_message4.Message6127 field6165 = 8; + optional bool field6166 = 13; + optional bool field6167 = 16; + optional bool field6168 = 18; + repeated .benchmarks.google_message4.Message6054 field6169 = 17; + optional int32 field6170 = 19; +} + +message Message5881 { + required double field5897 = 1; + optional string field5898 = 5; + optional .benchmarks.google_message4.Message5861 field5899 = 2; + optional .benchmarks.google_message4.UnusedEmptyMessage field5900 = 3; + optional .benchmarks.google_message4.Message5867 field5901 = 4; + optional .benchmarks.google_message4.Message5880 field5902 = 6; +} + +message Message6110 {} + +message Message6107 { + optional .benchmarks.google_message4.Message4016 field6134 = 1; + optional int32 field6135 = 2; + optional string field6136 = 3; + repeated int32 field6137 = 4; + optional int32 field6138 = 5; + repeated .benchmarks.google_message4.Message6108 field6139 = 6; +} + +message Message6129 { + required .benchmarks.google_message4.Enum6130 field6171 = 1; + required string field6172 = 2; +} + +message Message5908 { + optional string field5971 = 1; + optional int32 field5972 = 2; + optional int32 field5973 = 3; + optional .benchmarks.google_message4.Enum5909 field5974 = 45; + optional .benchmarks.google_message4.Enum5912 field5975 = 4; + optional fixed32 field5976 = 50; + optional fixed32 field5977 = 5; + optional fixed32 field5978 = 6; + optional string field5979 = 7; + optional .benchmarks.google_message4.Enum5915 field5980 = 8; + optional .benchmarks.google_message4.Message5903 field5981 = 9; + optional .benchmarks.google_message4.Message5903 field5982 = 10; + optional .benchmarks.google_message4.Enum5920 field5983 = 11; + optional .benchmarks.google_message4.Enum5923 field5984 = 40; + optional .benchmarks.google_message4.Message5903 field5985 = 41; + optional .benchmarks.google_message4.Message5903 field5986 = 42; + optional .benchmarks.google_message4.Enum5928 field5987 = 47; + optional bool field5988 = 48; + repeated fixed32 field5989 = 49; + optional string field5990 = 12; + optional .benchmarks.google_message4.Message5903 field5991 = 13; + optional .benchmarks.google_message4.Message5903 field5992 = 14; + optional .benchmarks.google_message4.Message5903 field5993 = 15; + optional .benchmarks.google_message4.Message5903 field5994 = 16; + optional .benchmarks.google_message4.Message5903 field5995 = 32; + optional .benchmarks.google_message4.Message5903 field5996 = 33; + optional .benchmarks.google_message4.Message5903 field5997 = 34; + optional .benchmarks.google_message4.Message5903 field5998 = 35; + optional .benchmarks.google_message4.Enum5931 field5999 = 17; + optional .benchmarks.google_message4.Enum5935 field6000 = 18; + optional .benchmarks.google_message4.Enum5939 field6001 = 36; + optional .benchmarks.google_message4.Enum5939 field6002 = 37; + repeated int32 field6003 = 19; + optional uint32 field6004 = 20; + optional uint32 field6005 = 21; + optional uint32 field6006 = 22; + optional uint32 field6007 = 23; + optional .benchmarks.google_message4.Enum5946 field6008 = 24; + optional .benchmarks.google_message4.Enum5946 field6009 = 25; + optional .benchmarks.google_message4.Enum5946 field6010 = 26; + optional .benchmarks.google_message4.Enum5946 field6011 = 27; + optional fixed32 field6012 = 28; + optional fixed32 field6013 = 29; + optional fixed32 field6014 = 30; + optional fixed32 field6015 = 31; + optional int32 field6016 = 38; + optional float field6017 = 39; + optional .benchmarks.google_message4.Enum5957 field6018 = 43; + optional .benchmarks.google_message4.Message5907 field6019 = 44; + optional .benchmarks.google_message4.Enum5962 field6020 = 46; +} + +message Message3850 { + optional .benchmarks.google_message4.Enum3851 field3924 = 2; + optional bool field3925 = 12; + optional int32 field3926 = 4; + optional bool field3927 = 10; + optional bool field3928 = 13; + optional bool field3929 = 14; +} + +message Message7865 {} + +message Message7511 { + optional bool field7523 = 1; + optional .benchmarks.google_message4.Enum7512 field7524 = 2; + optional int32 field7525 = 3; + optional int32 field7526 = 4; + optional bool field7527 = 5; + optional int32 field7528 = 6; + optional int32 field7529 = 7; +} + +message Message3920 {} + +message Message7928 { + optional string field7940 = 1; + optional int64 field7941 = 2; +} + +message Message7921 { + optional int32 field7936 = 1; + optional int64 field7937 = 2; + optional float field7938 = 3; + optional .benchmarks.google_message4.Enum7922 field7939 = 4; +} + +message Message7920 { + optional int64 field7934 = 1; + optional int64 field7935 = 2; +} + +message Message7919 { + optional fixed64 field7931 = 1; + optional int64 field7932 = 2; + optional bytes field7933 = 3; +} + +message Message12817 { + optional int32 field12826 = 1; + optional int32 field12827 = 2; + optional int32 field12828 = 3; +} + +message Message6054 { + required string field6089 = 1; + optional string field6090 = 2; +} + +message Message6127 {} + +message Message6052 { + required string field6084 = 1; + required bytes field6085 = 2; +} + +message Message6024 { + optional .benchmarks.google_message4.Enum6025 field6048 = 1; + optional string field6049 = 2; + optional .benchmarks.google_message4.UnusedEmptyMessage field6050 = 3; +} + +message Message5861 { + required .benchmarks.google_message4.Enum5862 field5882 = 1; + required string field5883 = 2; + optional bool field5884 = 3; + optional string field5885 = 4; +} + +message Message5880 { + optional string field5896 = 1; +} + +message Message5867 { + optional .benchmarks.google_message4.Enum5868 field5890 = 1; + optional string field5891 = 2; + optional .benchmarks.google_message4.Enum5873 field5892 = 3; + optional int32 field5893 = 4; + optional .benchmarks.google_message4.UnusedEnum field5894 = 5; + optional bool field5895 = 6; +} + +message Message4016 { + required int32 field4017 = 1; + required int32 field4018 = 2; + required int32 field4019 = 3; + required int32 field4020 = 4; +} + +message Message6108 {} + +message Message5907 { + optional .benchmarks.google_message4.Message5903 field5967 = 1; + optional .benchmarks.google_message4.Message5903 field5968 = 2; + optional .benchmarks.google_message4.Message5903 field5969 = 3; + optional .benchmarks.google_message4.Message5903 field5970 = 4; +} + +message UnusedEmptyMessage {} + +message Message5903 { + required int32 field5965 = 1; + optional .benchmarks.google_message4.Enum5904 field5966 = 2; +} diff --git a/third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4_3.proto b/third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4_3.proto new file mode 100644 index 00000000..42e254b7 --- /dev/null +++ b/third_party/protobuf/benchmarks/datasets/google_message4/benchmark_message4_3.proto @@ -0,0 +1,779 @@ +// 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. + +syntax = "proto2"; + +package benchmarks.google_message4; + +option cc_enable_arenas = true; +option java_package = "com.google.protobuf.benchmarks"; + +enum UnusedEnum { + UNUSED_ENUM_VALUE1 = 0; + UNUSED_ENUM_VALUE2 = 1; +} + +enum Enum2593 { + ENUM_VALUE2594 = 0; + ENUM_VALUE2595 = 1; + ENUM_VALUE2596 = 2; + ENUM_VALUE2597 = 3; + ENUM_VALUE2598 = 4; + ENUM_VALUE2599 = 5; + ENUM_VALUE2600 = 6; + ENUM_VALUE2601 = 7; +} + +enum Enum2834 { + ENUM_VALUE2835 = 0; + ENUM_VALUE2836 = 1; + ENUM_VALUE2837 = 2; +} + +enum Enum2806 { + ENUM_VALUE2807 = 0; + ENUM_VALUE2808 = 1; + ENUM_VALUE2809 = 2; + ENUM_VALUE2810 = 3; + ENUM_VALUE2811 = 4; + ENUM_VALUE2812 = 5; + ENUM_VALUE2813 = 6; + ENUM_VALUE2814 = 7; + ENUM_VALUE2815 = 8; + ENUM_VALUE2816 = 9; + ENUM_VALUE2817 = 10; + ENUM_VALUE2818 = 11; + ENUM_VALUE2819 = 12; + ENUM_VALUE2820 = 13; + ENUM_VALUE2821 = 14; +} + +enum Enum2851 { + option allow_alias = true; + + ENUM_VALUE2852 = 0; + ENUM_VALUE2853 = 0; + ENUM_VALUE2854 = 1; + ENUM_VALUE2855 = 2; + ENUM_VALUE2856 = 3; + ENUM_VALUE2857 = 4; + ENUM_VALUE2858 = 5; + ENUM_VALUE2859 = 6; + ENUM_VALUE2860 = 7; + ENUM_VALUE2861 = 8; + ENUM_VALUE2862 = 9; + ENUM_VALUE2863 = 10; + ENUM_VALUE2864 = 11; + ENUM_VALUE2865 = 12; + ENUM_VALUE2866 = 13; + ENUM_VALUE2867 = 14; + ENUM_VALUE2868 = 15; + ENUM_VALUE2869 = 16; + ENUM_VALUE2870 = 17; + ENUM_VALUE2871 = 18; + ENUM_VALUE2872 = 19; + ENUM_VALUE2873 = 20; + ENUM_VALUE2874 = 21; + ENUM_VALUE2875 = 22; + ENUM_VALUE2876 = 23; + ENUM_VALUE2877 = 24; + ENUM_VALUE2878 = 25; + ENUM_VALUE2879 = 26; + ENUM_VALUE2880 = 27; + ENUM_VALUE2881 = 28; + ENUM_VALUE2882 = 29; + ENUM_VALUE2883 = 30; + ENUM_VALUE2884 = 31; + ENUM_VALUE2885 = 32; + ENUM_VALUE2886 = 33; + ENUM_VALUE2887 = 34; + ENUM_VALUE2888 = 35; + ENUM_VALUE2889 = 36; + ENUM_VALUE2890 = 37; + ENUM_VALUE2891 = 38; + ENUM_VALUE2892 = 39; + ENUM_VALUE2893 = 40; + ENUM_VALUE2894 = 41; + ENUM_VALUE2895 = 42; + ENUM_VALUE2896 = 43; + ENUM_VALUE2897 = 44; + ENUM_VALUE2898 = 45; + ENUM_VALUE2899 = 46; + ENUM_VALUE2900 = 47; + ENUM_VALUE2901 = 48; + ENUM_VALUE2902 = 49; + ENUM_VALUE2903 = 50; + ENUM_VALUE2904 = 51; + ENUM_VALUE2905 = 52; + ENUM_VALUE2906 = 53; + ENUM_VALUE2907 = 54; + ENUM_VALUE2908 = 55; + ENUM_VALUE2909 = 56; + ENUM_VALUE2910 = 57; + ENUM_VALUE2911 = 58; + ENUM_VALUE2912 = 59; + ENUM_VALUE2913 = 60; + ENUM_VALUE2914 = 61; + ENUM_VALUE2915 = 62; + ENUM_VALUE2916 = 63; + ENUM_VALUE2917 = 64; + ENUM_VALUE2918 = 65; + ENUM_VALUE2919 = 66; + ENUM_VALUE2920 = 67; + ENUM_VALUE2921 = 68; + ENUM_VALUE2922 = 69; + ENUM_VALUE2923 = 70; + ENUM_VALUE2924 = 71; + ENUM_VALUE2925 = 72; + ENUM_VALUE2926 = 73; + ENUM_VALUE2927 = 74; + ENUM_VALUE2928 = 75; + ENUM_VALUE2929 = 76; + ENUM_VALUE2930 = 77; + ENUM_VALUE2931 = 78; + ENUM_VALUE2932 = 79; + ENUM_VALUE2933 = 80; + ENUM_VALUE2934 = 81; + ENUM_VALUE2935 = 82; + ENUM_VALUE2936 = 83; + ENUM_VALUE2937 = 84; + ENUM_VALUE2938 = 85; + ENUM_VALUE2939 = 86; + ENUM_VALUE2940 = 87; + ENUM_VALUE2941 = 88; + ENUM_VALUE2942 = 89; + ENUM_VALUE2943 = 90; + ENUM_VALUE2944 = 91; + ENUM_VALUE2945 = 92; + ENUM_VALUE2946 = 93; + ENUM_VALUE2947 = 94; + ENUM_VALUE2948 = 95; + ENUM_VALUE2949 = 96; + ENUM_VALUE2950 = 97; + ENUM_VALUE2951 = 98; + ENUM_VALUE2952 = 99; + ENUM_VALUE2953 = 100; + ENUM_VALUE2954 = 101; + ENUM_VALUE2955 = 102; + ENUM_VALUE2956 = 103; + ENUM_VALUE2957 = 104; + ENUM_VALUE2958 = 105; + ENUM_VALUE2959 = 106; + ENUM_VALUE2960 = 107; + ENUM_VALUE2961 = 108; + ENUM_VALUE2962 = 109; + ENUM_VALUE2963 = 110; + ENUM_VALUE2964 = 111; + ENUM_VALUE2965 = 112; + ENUM_VALUE2966 = 113; + ENUM_VALUE2967 = 114; + ENUM_VALUE2968 = 115; + ENUM_VALUE2969 = 116; + ENUM_VALUE2970 = 117; + ENUM_VALUE2971 = 118; + ENUM_VALUE2972 = 119; +} + +enum Enum2602 { + ENUM_VALUE2603 = 0; + ENUM_VALUE2604 = 1; + ENUM_VALUE2605 = 2; + ENUM_VALUE2606 = 3; + ENUM_VALUE2607 = 4; + ENUM_VALUE2608 = 5; + ENUM_VALUE2609 = 6; + ENUM_VALUE2610 = 7; + ENUM_VALUE2611 = 8; + ENUM_VALUE2612 = 9; + ENUM_VALUE2613 = 10; + ENUM_VALUE2614 = 11; +} + +enum Enum3071 { + ENUM_VALUE3072 = 1; + ENUM_VALUE3073 = 2; + ENUM_VALUE3074 = 3; + ENUM_VALUE3075 = 4; + ENUM_VALUE3076 = 5; + ENUM_VALUE3077 = 6; + ENUM_VALUE3078 = 7; + ENUM_VALUE3079 = 8; + ENUM_VALUE3080 = 9; + ENUM_VALUE3081 = 10; + ENUM_VALUE3082 = 11; + ENUM_VALUE3083 = 12; + ENUM_VALUE3084 = 13; + ENUM_VALUE3085 = 14; + ENUM_VALUE3086 = 15; + ENUM_VALUE3087 = 16; + ENUM_VALUE3088 = 17; + ENUM_VALUE3089 = 18; + ENUM_VALUE3090 = 19; + ENUM_VALUE3091 = 20; + ENUM_VALUE3092 = 21; + ENUM_VALUE3093 = 22; + ENUM_VALUE3094 = 23; + ENUM_VALUE3095 = 24; + ENUM_VALUE3096 = 25; + ENUM_VALUE3097 = 26; + ENUM_VALUE3098 = 27; + ENUM_VALUE3099 = 28; +} + +enum Enum3805 { + ENUM_VALUE3806 = 0; + ENUM_VALUE3807 = 1; + ENUM_VALUE3808 = 2; + ENUM_VALUE3809 = 3; + ENUM_VALUE3810 = 4; + ENUM_VALUE3811 = 5; + ENUM_VALUE3812 = 6; + ENUM_VALUE3813 = 7; + ENUM_VALUE3814 = 8; + ENUM_VALUE3815 = 9; + ENUM_VALUE3816 = 11; + ENUM_VALUE3817 = 10; +} + +enum Enum3783 { + ENUM_VALUE3784 = 0; + ENUM_VALUE3785 = 1; + ENUM_VALUE3786 = 2; + ENUM_VALUE3787 = 3; + ENUM_VALUE3788 = 4; + ENUM_VALUE3789 = 5; + ENUM_VALUE3790 = 6; + ENUM_VALUE3791 = 7; + ENUM_VALUE3792 = 8; + ENUM_VALUE3793 = 9; + ENUM_VALUE3794 = 10; + ENUM_VALUE3795 = 11; + ENUM_VALUE3796 = 12; + ENUM_VALUE3797 = 13; + ENUM_VALUE3798 = 14; + ENUM_VALUE3799 = 15; + ENUM_VALUE3800 = 16; + ENUM_VALUE3801 = 20; + ENUM_VALUE3802 = 21; + ENUM_VALUE3803 = 50; +} + +enum Enum3851 { + ENUM_VALUE3852 = 0; + ENUM_VALUE3853 = 1; + ENUM_VALUE3854 = 2; + ENUM_VALUE3855 = 3; + ENUM_VALUE3856 = 4; + ENUM_VALUE3857 = 5; + ENUM_VALUE3858 = 6; + ENUM_VALUE3859 = 7; + ENUM_VALUE3860 = 8; + ENUM_VALUE3861 = 9; + ENUM_VALUE3862 = 10; + ENUM_VALUE3863 = 11; + ENUM_VALUE3864 = 12; + ENUM_VALUE3865 = 13; + ENUM_VALUE3866 = 14; + ENUM_VALUE3867 = 15; + ENUM_VALUE3868 = 16; + ENUM_VALUE3869 = 17; +} + +enum Enum5862 { + ENUM_VALUE5863 = 1; + ENUM_VALUE5864 = 2; + ENUM_VALUE5865 = 3; +} + +enum Enum5868 { + ENUM_VALUE5869 = 0; + ENUM_VALUE5870 = 1; + ENUM_VALUE5871 = 2; + ENUM_VALUE5872 = 3; +} + +enum Enum5873 { + ENUM_VALUE5874 = 0; + ENUM_VALUE5875 = 1; + ENUM_VALUE5876 = 2; +} + +enum Enum5904 { + ENUM_VALUE5905 = 0; + ENUM_VALUE5906 = 1; +} + +enum Enum5909 { + ENUM_VALUE5910 = 0; + ENUM_VALUE5911 = 1; +} + +enum Enum5912 { + ENUM_VALUE5913 = 0; + ENUM_VALUE5914 = 1; +} + +enum Enum5915 { + ENUM_VALUE5916 = 0; + ENUM_VALUE5917 = 1; + ENUM_VALUE5918 = 2; + ENUM_VALUE5919 = 3; +} + +enum Enum5920 { + ENUM_VALUE5921 = 0; + ENUM_VALUE5922 = 1; +} + +enum Enum5923 { + ENUM_VALUE5924 = 0; + ENUM_VALUE5925 = 1; + ENUM_VALUE5926 = 2; + ENUM_VALUE5927 = 3; +} + +enum Enum5928 { + ENUM_VALUE5929 = 0; + ENUM_VALUE5930 = 1; +} + +enum Enum5931 { + ENUM_VALUE5932 = 0; + ENUM_VALUE5933 = 1; + ENUM_VALUE5934 = 2; +} + +enum Enum5935 { + ENUM_VALUE5936 = 0; + ENUM_VALUE5937 = 1; + ENUM_VALUE5938 = 2; +} + +enum Enum5939 { + ENUM_VALUE5940 = 0; + ENUM_VALUE5941 = 1; + ENUM_VALUE5942 = 2; + ENUM_VALUE5943 = 3; + ENUM_VALUE5944 = 4; + ENUM_VALUE5945 = 5; +} + +enum Enum5946 { + ENUM_VALUE5947 = 0; + ENUM_VALUE5948 = 1; + ENUM_VALUE5949 = 2; + ENUM_VALUE5950 = 3; + ENUM_VALUE5951 = 4; + ENUM_VALUE5952 = 5; + ENUM_VALUE5953 = 6; + ENUM_VALUE5954 = 7; + ENUM_VALUE5955 = 8; + ENUM_VALUE5956 = 9; +} + +enum Enum5957 { + ENUM_VALUE5958 = 0; + ENUM_VALUE5959 = 1; + ENUM_VALUE5960 = 2; + ENUM_VALUE5961 = 3; +} + +enum Enum5962 { + ENUM_VALUE5963 = 0; + ENUM_VALUE5964 = 1; +} + +enum Enum6025 { + ENUM_VALUE6026 = 0; + ENUM_VALUE6027 = 1; + ENUM_VALUE6028 = 2; + ENUM_VALUE6029 = 3; + ENUM_VALUE6030 = 4; + ENUM_VALUE6031 = 5; + ENUM_VALUE6032 = 6; + ENUM_VALUE6033 = 7; + ENUM_VALUE6034 = 8; + ENUM_VALUE6035 = 9; + ENUM_VALUE6036 = 10; + ENUM_VALUE6037 = 11; + ENUM_VALUE6038 = 12; + ENUM_VALUE6039 = 13; + ENUM_VALUE6040 = 14; + ENUM_VALUE6041 = 15; + ENUM_VALUE6042 = 16; + ENUM_VALUE6043 = 17; + ENUM_VALUE6044 = 18; + ENUM_VALUE6045 = 19; + ENUM_VALUE6046 = 20; + ENUM_VALUE6047 = 21; +} + +enum Enum6111 { + ENUM_VALUE6112 = 1; + ENUM_VALUE6113 = 2; + ENUM_VALUE6114 = 3; + ENUM_VALUE6115 = 4; + ENUM_VALUE6116 = 5; + ENUM_VALUE6117 = 6; + ENUM_VALUE6118 = 7; + ENUM_VALUE6119 = 8; + ENUM_VALUE6120 = 9; + ENUM_VALUE6121 = 10; + ENUM_VALUE6122 = 11; + ENUM_VALUE6123 = 12; + ENUM_VALUE6124 = 13; + ENUM_VALUE6125 = 14; +} + +enum Enum6065 { + ENUM_VALUE6066 = 0; + ENUM_VALUE6067 = 1; + ENUM_VALUE6068 = 2; + ENUM_VALUE6069 = 3; + ENUM_VALUE6070 = 4; + ENUM_VALUE6071 = 5; + ENUM_VALUE6072 = 6; + ENUM_VALUE6073 = 7; + ENUM_VALUE6074 = 8; + ENUM_VALUE6075 = 9; + ENUM_VALUE6076 = 10; + ENUM_VALUE6077 = 11; + ENUM_VALUE6078 = 12; + ENUM_VALUE6079 = 13; + ENUM_VALUE6080 = 14; +} + +enum Enum6130 { + ENUM_VALUE6131 = 0; + ENUM_VALUE6132 = 1; +} + +enum Enum6579 { + ENUM_VALUE6580 = 0; + ENUM_VALUE6581 = 2; + ENUM_VALUE6582 = 3; + ENUM_VALUE6583 = 5; + ENUM_VALUE6584 = 10; + ENUM_VALUE6585 = 15; + ENUM_VALUE6586 = 25; + ENUM_VALUE6587 = 30; +} + +enum Enum6588 { + ENUM_VALUE6589 = 0; + ENUM_VALUE6590 = 1; + ENUM_VALUE6591 = 2; + ENUM_VALUE6592 = 3; + ENUM_VALUE6593 = 4; + ENUM_VALUE6594 = 5; + ENUM_VALUE6595 = 6; + ENUM_VALUE6596 = 7; + ENUM_VALUE6597 = 8; + ENUM_VALUE6598 = 9; + ENUM_VALUE6599 = 10; + ENUM_VALUE6600 = 11; + ENUM_VALUE6601 = 12; + ENUM_VALUE6602 = 13; + ENUM_VALUE6603 = 14; + ENUM_VALUE6604 = 15; + ENUM_VALUE6605 = 16; + ENUM_VALUE6606 = 17; + ENUM_VALUE6607 = 19; + ENUM_VALUE6608 = 20; + ENUM_VALUE6609 = 21; + ENUM_VALUE6610 = 22; + ENUM_VALUE6611 = 23; + ENUM_VALUE6612 = 24; + ENUM_VALUE6613 = 25; + ENUM_VALUE6614 = 26; + ENUM_VALUE6615 = 27; + ENUM_VALUE6616 = 28; + ENUM_VALUE6617 = 29; + ENUM_VALUE6618 = 30; + ENUM_VALUE6619 = 31; + ENUM_VALUE6620 = 32; + ENUM_VALUE6621 = 33; + ENUM_VALUE6622 = 34; +} + +enum Enum7288 { + ENUM_VALUE7289 = 0; + ENUM_VALUE7290 = 1; + ENUM_VALUE7291 = 2; + ENUM_VALUE7292 = 3; +} + +enum Enum7512 { + ENUM_VALUE7513 = 0; + ENUM_VALUE7514 = 1; + ENUM_VALUE7515 = 2; + ENUM_VALUE7516 = 3; + ENUM_VALUE7517 = 4; + ENUM_VALUE7518 = 5; + ENUM_VALUE7519 = 6; + ENUM_VALUE7520 = 7; +} + +enum Enum7922 { + ENUM_VALUE7923 = 1; + ENUM_VALUE7924 = 2; + ENUM_VALUE7925 = 3; + ENUM_VALUE7926 = 4; + ENUM_VALUE7927 = 5; +} + +enum Enum3476 { + ENUM_VALUE3477 = 0; + ENUM_VALUE3478 = 1; + ENUM_VALUE3479 = 2; + ENUM_VALUE3480 = 3; + ENUM_VALUE3481 = 4; + ENUM_VALUE3482 = 5; + ENUM_VALUE3483 = 6; + ENUM_VALUE3484 = 7; + ENUM_VALUE3485 = 8; + ENUM_VALUE3486 = 9; + ENUM_VALUE3487 = 10; + ENUM_VALUE3488 = 11; + ENUM_VALUE3489 = 12; + ENUM_VALUE3490 = 13; + ENUM_VALUE3491 = 14; + ENUM_VALUE3492 = 15; + ENUM_VALUE3493 = 16; + ENUM_VALUE3494 = 17; + ENUM_VALUE3495 = 18; + ENUM_VALUE3496 = 19; + ENUM_VALUE3497 = 20; + ENUM_VALUE3498 = 21; + ENUM_VALUE3499 = 22; + ENUM_VALUE3500 = 23; + ENUM_VALUE3501 = 24; + ENUM_VALUE3502 = 25; + ENUM_VALUE3503 = 26; + ENUM_VALUE3504 = 27; + ENUM_VALUE3505 = 28; + ENUM_VALUE3506 = 29; + ENUM_VALUE3507 = 30; + ENUM_VALUE3508 = 31; + ENUM_VALUE3509 = 32; + ENUM_VALUE3510 = 33; + ENUM_VALUE3511 = 34; + ENUM_VALUE3512 = 35; + ENUM_VALUE3513 = 36; + ENUM_VALUE3514 = 37; + ENUM_VALUE3515 = 38; + ENUM_VALUE3516 = 39; + ENUM_VALUE3517 = 40; + ENUM_VALUE3518 = 41; + ENUM_VALUE3519 = 42; + ENUM_VALUE3520 = 43; + ENUM_VALUE3521 = 44; + ENUM_VALUE3522 = 45; + ENUM_VALUE3523 = 46; + ENUM_VALUE3524 = 47; + ENUM_VALUE3525 = 48; + ENUM_VALUE3526 = 49; + ENUM_VALUE3527 = 50; + ENUM_VALUE3528 = 51; + ENUM_VALUE3529 = 52; + ENUM_VALUE3530 = 53; + ENUM_VALUE3531 = 54; + ENUM_VALUE3532 = 55; + ENUM_VALUE3533 = 56; + ENUM_VALUE3534 = 57; + ENUM_VALUE3535 = 58; + ENUM_VALUE3536 = 59; + ENUM_VALUE3537 = 60; + ENUM_VALUE3538 = 61; + ENUM_VALUE3539 = 62; + ENUM_VALUE3540 = 63; + ENUM_VALUE3541 = 64; + ENUM_VALUE3542 = 65; + ENUM_VALUE3543 = 66; + ENUM_VALUE3544 = 67; + ENUM_VALUE3545 = 68; + ENUM_VALUE3546 = 69; + ENUM_VALUE3547 = 70; + ENUM_VALUE3548 = 71; + ENUM_VALUE3549 = 72; + ENUM_VALUE3550 = 73; + ENUM_VALUE3551 = 74; + ENUM_VALUE3552 = 75; + ENUM_VALUE3553 = 76; + ENUM_VALUE3554 = 77; + ENUM_VALUE3555 = 78; + ENUM_VALUE3556 = 79; + ENUM_VALUE3557 = 80; + ENUM_VALUE3558 = 81; + ENUM_VALUE3559 = 82; + ENUM_VALUE3560 = 83; + ENUM_VALUE3561 = 84; + ENUM_VALUE3562 = 85; + ENUM_VALUE3563 = 86; + ENUM_VALUE3564 = 87; + ENUM_VALUE3565 = 88; + ENUM_VALUE3566 = 89; + ENUM_VALUE3567 = 90; + ENUM_VALUE3568 = 91; + ENUM_VALUE3569 = 92; + ENUM_VALUE3570 = 93; + ENUM_VALUE3571 = 94; + ENUM_VALUE3572 = 95; + ENUM_VALUE3573 = 96; + ENUM_VALUE3574 = 97; + ENUM_VALUE3575 = 98; + ENUM_VALUE3576 = 99; + ENUM_VALUE3577 = 100; + ENUM_VALUE3578 = 101; + ENUM_VALUE3579 = 102; + ENUM_VALUE3580 = 103; + ENUM_VALUE3581 = 104; + ENUM_VALUE3582 = 105; + ENUM_VALUE3583 = 106; + ENUM_VALUE3584 = 107; + ENUM_VALUE3585 = 108; + ENUM_VALUE3586 = 109; + ENUM_VALUE3587 = 110; + ENUM_VALUE3588 = 111; + ENUM_VALUE3589 = 112; + ENUM_VALUE3590 = 113; + ENUM_VALUE3591 = 114; + ENUM_VALUE3592 = 115; + ENUM_VALUE3593 = 116; + ENUM_VALUE3594 = 117; + ENUM_VALUE3595 = 118; + ENUM_VALUE3596 = 119; + ENUM_VALUE3597 = 120; + ENUM_VALUE3598 = 121; + ENUM_VALUE3599 = 122; + ENUM_VALUE3600 = 123; + ENUM_VALUE3601 = 124; + ENUM_VALUE3602 = 125; + ENUM_VALUE3603 = 126; + ENUM_VALUE3604 = 127; + ENUM_VALUE3605 = 128; + ENUM_VALUE3606 = 129; + ENUM_VALUE3607 = 130; + ENUM_VALUE3608 = 131; + ENUM_VALUE3609 = 132; + ENUM_VALUE3610 = 133; + ENUM_VALUE3611 = 134; + ENUM_VALUE3612 = 135; + ENUM_VALUE3613 = 136; + ENUM_VALUE3614 = 137; + ENUM_VALUE3615 = 138; + ENUM_VALUE3616 = 139; + ENUM_VALUE3617 = 140; + ENUM_VALUE3618 = 141; + ENUM_VALUE3619 = 142; + ENUM_VALUE3620 = 143; + ENUM_VALUE3621 = 144; + ENUM_VALUE3622 = 145; + ENUM_VALUE3623 = 146; + ENUM_VALUE3624 = 147; + ENUM_VALUE3625 = 148; + ENUM_VALUE3626 = 149; + ENUM_VALUE3627 = 150; + ENUM_VALUE3628 = 151; + ENUM_VALUE3629 = 152; + ENUM_VALUE3630 = 153; + ENUM_VALUE3631 = 154; + ENUM_VALUE3632 = 155; + ENUM_VALUE3633 = 156; + ENUM_VALUE3634 = 157; + ENUM_VALUE3635 = 158; + ENUM_VALUE3636 = 159; + ENUM_VALUE3637 = 160; + ENUM_VALUE3638 = 161; + ENUM_VALUE3639 = 162; + ENUM_VALUE3640 = 163; + ENUM_VALUE3641 = 164; + ENUM_VALUE3642 = 165; + ENUM_VALUE3643 = 166; + ENUM_VALUE3644 = 167; + ENUM_VALUE3645 = 168; + ENUM_VALUE3646 = 169; + ENUM_VALUE3647 = 170; + ENUM_VALUE3648 = 171; + ENUM_VALUE3649 = 172; + ENUM_VALUE3650 = 173; + ENUM_VALUE3651 = 174; + ENUM_VALUE3652 = 175; + ENUM_VALUE3653 = 176; + ENUM_VALUE3654 = 177; + ENUM_VALUE3655 = 178; + ENUM_VALUE3656 = 179; + ENUM_VALUE3657 = 180; + ENUM_VALUE3658 = 181; + ENUM_VALUE3659 = 182; + ENUM_VALUE3660 = 183; +} + +enum Enum10325 { + ENUM_VALUE10326 = 0; + ENUM_VALUE10327 = 1; + ENUM_VALUE10328 = 2; + ENUM_VALUE10329 = 3; + ENUM_VALUE10330 = 4; + ENUM_VALUE10331 = 5; + ENUM_VALUE10332 = 6; + ENUM_VALUE10333 = 7; + ENUM_VALUE10334 = 8; +} + +enum Enum10335 { ENUM_VALUE10336 = 0; } + +enum Enum10337 { + ENUM_VALUE10338 = 0; + ENUM_VALUE10339 = 1; +} + +enum Enum11901 { + ENUM_VALUE11902 = 0; + ENUM_VALUE11903 = 1; + ENUM_VALUE11904 = 2; + ENUM_VALUE11905 = 3; +} + +enum Enum12735 { + ENUM_VALUE12736 = 0; + ENUM_VALUE12737 = 1; + ENUM_VALUE12738 = 2; + ENUM_VALUE12739 = 3; +} + +enum Enum12871 { + ENUM_VALUE12872 = 1; + ENUM_VALUE12873 = 2; + ENUM_VALUE12874 = 3; + ENUM_VALUE12875 = 4; + ENUM_VALUE12876 = 5; + ENUM_VALUE12877 = 6; +} diff --git a/third_party/protobuf/benchmarks/google_size.proto b/third_party/protobuf/benchmarks/google_size.proto new file mode 100644 index 00000000..d2d319f3 --- /dev/null +++ b/third_party/protobuf/benchmarks/google_size.proto @@ -0,0 +1,138 @@ +syntax = "proto2"; + +package benchmarks; + +option java_outer_classname = "GoogleSize"; +option optimize_for = CODE_SIZE; + +message SizeMessage1 { + required string field1 = 1; + optional string field9 = 9; + optional string field18 = 18; + optional bool field80 = 80 [default=false]; + optional bool field81 = 81 [default=true]; + required int32 field2 = 2; + required int32 field3 = 3; + optional int32 field280 = 280; + optional int32 field6 = 6 [default=0]; + optional int64 field22 = 22; + optional string field4 = 4; + repeated fixed64 field5 = 5; + optional bool field59 = 59 [default=false]; + optional string field7 = 7; + optional int32 field16 = 16; + optional int32 field130 = 130 [default=0]; + optional bool field12 = 12 [default=true]; + optional bool field17 = 17 [default=true]; + optional bool field13 = 13 [default=true]; + optional bool field14 = 14 [default=true]; + optional int32 field104 = 104 [default=0]; + optional int32 field100 = 100 [default=0]; + optional int32 field101 = 101 [default=0]; + optional string field102 = 102; + optional string field103 = 103; + optional int32 field29 = 29 [default=0]; + optional bool field30 = 30 [default=false]; + optional int32 field60 = 60 [default=-1]; + optional int32 field271 = 271 [default=-1]; + optional int32 field272 = 272 [default=-1]; + optional int32 field150 = 150; + optional int32 field23 = 23 [default=0]; + optional bool field24 = 24 [default=false]; + optional int32 field25 = 25 [default=0]; + optional SizeMessage1SubMessage field15 = 15; + optional bool field78 = 78; + optional int32 field67 = 67 [default=0]; + optional int32 field68 = 68; + optional int32 field128 = 128 [default=0]; + optional string field129 = 129 [default="xxxxxxxxxxxxxxxxxxxxx"]; + optional int32 field131 = 131 [default=0]; +} + +message SizeMessage1SubMessage { + optional int32 field1 = 1 [default=0]; + optional int32 field2 = 2 [default=0]; + optional int32 field3 = 3 [default=0]; + optional string field15 = 15; + optional bool field12 = 12 [default=true]; + optional int64 field13 = 13; + optional int64 field14 = 14; + optional int32 field16 = 16; + optional int32 field19 = 19 [default=2]; + optional bool field20 = 20 [default=true]; + optional bool field28 = 28 [default=true]; + optional fixed64 field21 = 21; + optional int32 field22 = 22; + optional bool field23 = 23 [ default=false ]; + optional bool field206 = 206 [default=false]; + optional fixed32 field203 = 203; + optional int32 field204 = 204; + optional string field205 = 205; + optional uint64 field207 = 207; + optional uint64 field300 = 300; +} + +message SizeMessage2 { + optional string field1 = 1; + optional int64 field3 = 3; + optional int64 field4 = 4; + optional int64 field30 = 30; + optional bool field75 = 75 [default=false]; + optional string field6 = 6; + optional bytes field2 = 2; + optional int32 field21 = 21 [default=0]; + optional int32 field71 = 71; + optional float field25 = 25; + optional int32 field109 = 109 [default=0]; + optional int32 field210 = 210 [default=0]; + optional int32 field211 = 211 [default=0]; + optional int32 field212 = 212 [default=0]; + optional int32 field213 = 213 [default=0]; + optional int32 field216 = 216 [default=0]; + optional int32 field217 = 217 [default=0]; + optional int32 field218 = 218 [default=0]; + optional int32 field220 = 220 [default=0]; + optional int32 field221 = 221 [default=0]; + optional float field222 = 222 [default=0.0]; + optional int32 field63 = 63; + + repeated group Group1 = 10 { + required float field11 = 11; + optional float field26 = 26; + optional string field12 = 12; + optional string field13 = 13; + repeated string field14 = 14; + required uint64 field15 = 15; + optional int32 field5 = 5; + optional string field27 = 27; + optional int32 field28 = 28; + optional string field29 = 29; + optional string field16 = 16; + repeated string field22 = 22; + repeated int32 field73 = 73; + optional int32 field20 = 20 [default=0]; + optional string field24 = 24; + optional SizeMessage2GroupedMessage field31 = 31; + } + repeated string field128 = 128; + optional int64 field131 = 131; + repeated string field127 = 127; + optional int32 field129 = 129; + repeated int64 field130 = 130; + optional bool field205 = 205 [default=false]; + optional bool field206 = 206 [default=false]; +} + +message SizeMessage2GroupedMessage { + optional float field1 = 1; + optional float field2 = 2; + optional float field3 = 3 [default=0.0]; + optional bool field4 = 4; + optional bool field5 = 5; + optional bool field6 = 6 [default=true]; + optional bool field7 = 7 [default=false]; + optional float field8 = 8; + optional bool field9 = 9; + optional float field10 = 10; + optional int64 field11 = 11; +} diff --git a/third_party/protobuf/build_files_updated_unittest.sh b/third_party/protobuf/build_files_updated_unittest.sh new file mode 100755 index 00000000..c8630719 --- /dev/null +++ b/third_party/protobuf/build_files_updated_unittest.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# This script verifies that BUILD files and cmake files are in sync with src/Makefile.am + +set -eo pipefail + +if [ "$(uname)" != "Linux" ]; then + echo "build_files_updated_unittest only supported on Linux. Skipping..." + exit 0 +fi + +# Keep in sync with files needed by update_file_lists.sh +generated_files=( + "BUILD" + "cmake/extract_includes.bat.in" + "cmake/libprotobuf-lite.cmake" + "cmake/libprotobuf.cmake" + "cmake/libprotoc.cmake" + "cmake/tests.cmake" + "src/Makefile.am" +) + +# If we're running in Bazel, use the Bazel-provided temp-dir. +if [ -n "${TEST_TMPDIR}" ]; then + # Env-var TEST_TMPDIR is set, assume that this is Bazel. + # Bazel may have opinions whether we are allowed to delete TEST_TMPDIR. + test_root="${TEST_TMPDIR}/build_files_updated_unittest" + mkdir "${test_root}" +else + # Seems like we're not executed by Bazel. + test_root=$(mktemp -d) +fi + +# From now on, fail if there are any unbound variables. +set -u + +# Remove artifacts after test is finished. +function cleanup { + rm -rf "${test_root}" +} +trap cleanup EXIT + +# Create golden dir and add snapshot of current state. +golden_dir="${test_root}/golden" +mkdir -p "${golden_dir}/cmake" "${golden_dir}/src" +for file in ${generated_files[@]}; do + cp "${file}" "${golden_dir}/${file}" +done + +# Create test dir, copy current state into it, and execute update script. +test_dir="${test_root}/test" +cp -R "${golden_dir}" "${test_dir}" + +cp "update_file_lists.sh" "${test_dir}/update_file_lists.sh" +chmod +x "${test_dir}/update_file_lists.sh" +cd "${test_root}/test" +bash "${test_dir}/update_file_lists.sh" + +# Test whether there are any differences +for file in ${generated_files[@]}; do + diff "${golden_dir}/${file}" "${test_dir}/${file}" +done diff --git a/third_party/protobuf/cc_proto_blacklist_test.bzl b/third_party/protobuf/cc_proto_blacklist_test.bzl new file mode 100644 index 00000000..df54293c --- /dev/null +++ b/third_party/protobuf/cc_proto_blacklist_test.bzl @@ -0,0 +1,38 @@ +"""Contains a unittest to verify that `cc_proto_library` does not generate code for blacklisted `.proto` sources (i.e. WKPs).""" + +load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest") + +def _cc_proto_blacklist_test_impl(ctx): + """Verifies that there are no C++ compile actions for Well-Known-Protos. + + Args: + ctx: The rule context. + + Returns: A (not further specified) sequence of providers. + """ + + env = unittest.begin(ctx) + + for dep in ctx.attr.deps: + files = len(dep.files.to_list()) + asserts.equals( + env, + 0, + files, + "Expected that target '{}' does not provide files, got {}".format( + dep.label, + files, + ), + ) + + return unittest.end(env) + +cc_proto_blacklist_test = unittest.make( + impl = _cc_proto_blacklist_test_impl, + attrs = { + "deps": attr.label_list( + mandatory = True, + providers = [CcInfo], + ), + }, +) diff --git a/third_party/protobuf/cmake/CMakeLists.txt b/third_party/protobuf/cmake/CMakeLists.txt index 71a0f37a..84967999 100644 --- a/third_party/protobuf/cmake/CMakeLists.txt +++ b/third_party/protobuf/cmake/CMakeLists.txt @@ -28,6 +28,14 @@ else() set(CMAKE_CXX_EXTENSIONS OFF) endif() +# The Intel compiler isn't able to deal with noinline member functions of +# template classses defined in headers. As such it spams the output with +# warning #2196: routine is both "inline" and "noinline" +# This silences that warning. +if (CMAKE_CXX_COMPILER_ID MATCHES Intel) + string(APPEND CMAKE_CXX_FLAGS " -diag-disable=2196") +endif() + # Options option(protobuf_BUILD_TESTS "Build tests" ON) option(protobuf_BUILD_CONFORMANCE "Build conformance tests" OFF) @@ -132,6 +140,25 @@ if (HAVE_ZLIB) add_definitions(-DHAVE_ZLIB) endif (HAVE_ZLIB) +# We need to link with libatomic on systems that do not have builtin atomics, or +# don't have builtin support for 8 byte atomics +set(protobuf_LINK_LIBATOMIC false) +if (NOT MSVC) + include(CheckCXXSourceCompiles) + set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) + set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} -std=c++11) + check_cxx_source_compiles(" + #include + int main() { + return std::atomic{}; + } + " protobuf_HAVE_BUILTIN_ATOMICS) + if (NOT protobuf_HAVE_BUILTIN_ATOMICS) + set(protobuf_LINK_LIBATOMIC true) + endif (NOT protobuf_HAVE_BUILTIN_ATOMICS) + set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) +endif (NOT MSVC) + if (protobuf_BUILD_SHARED_LIBS) set(protobuf_SHARED_OR_STATIC "SHARED") else (protobuf_BUILD_SHARED_LIBS) @@ -180,7 +207,7 @@ if (MSVC) configure_file(extract_includes.bat.in extract_includes.bat) # Suppress linker warnings about files with no symbols defined. - set(CMAKE_STATIC_LINKER_FLAGS /ignore:4221) + set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221") # Configure Resource Compiler enable_language(RC) diff --git a/third_party/protobuf/cmake/README.md b/third_party/protobuf/cmake/README.md index 96aaf4f9..89d00c1b 100644 --- a/third_party/protobuf/cmake/README.md +++ b/third_party/protobuf/cmake/README.md @@ -13,13 +13,13 @@ Environment Setup Open the appropriate *Command Prompt* from the *Start* menu. -For example *VS2013 x64 Native Tools Command Prompt*: +For example *x86 Native Tools Command Prompt for VS 2019*: - C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64> + C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional> Change to your working directory: - C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64>cd C:\Path\to + C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional>cd C:\Path\to C:\Path\to> Where *C:\Path\to* is path to your real working directory. @@ -121,7 +121,7 @@ It will generate *nmake* *Makefile* in current directory. To create *Visual Studio* solution file: C:\Path\to\protobuf\cmake\build>mkdir solution & cd solution - C:\Path\to\protobuf\cmake\build\solution>cmake -G "Visual Studio 14 2015 Win64" ^ + C:\Path\to\protobuf\cmake\build\solution>cmake -G "Visual Studio 16 2019" ^ -DCMAKE_INSTALL_PREFIX=../../../../install ^ ../.. @@ -130,8 +130,8 @@ It will generate *Visual Studio* solution file *protobuf.sln* in current directo If the *gmock* directory does not exist, and you do not want to build protobuf unit tests, you need to add *cmake* command argument `-Dprotobuf_BUILD_TESTS=OFF` to disable testing. -To make a *Visual Studio* file for Visual Studio 15 2017, create the *Visual Studio* -solution file above and edit the CmakeCache file. +To make a *Visual Studio* file for Visual Studio 16 2019, create the *Visual Studio* +solution file above and edit the CMakeCache file. C:Path\to\protobuf\cmake\build\solution\CMakeCache diff --git a/third_party/protobuf/cmake/extract_includes.bat.in b/third_party/protobuf/cmake/extract_includes.bat.in index c9a1524b..007cc806 100644 --- a/third_party/protobuf/cmake/extract_includes.bat.in +++ b/third_party/protobuf/cmake/extract_includes.bat.in @@ -56,6 +56,7 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\implicit_weak_message copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\inlined_string_field.h" include\google\protobuf\inlined_string_field.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\coded_stream.h" include\google\protobuf\io\coded_stream.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\gzip_stream.h" include\google\protobuf\io\gzip_stream.h +copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\io_win32.h" include\google\protobuf\io\io_win32.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\printer.h" include\google\protobuf\io\printer.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\strtod.h" include\google\protobuf\io\strtod.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\tokenizer.h" include\google\protobuf\io\tokenizer.h @@ -89,9 +90,9 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\casts.h" includ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\common.h" include\google\protobuf\stubs\common.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\fastmem.h" include\google\protobuf\stubs\fastmem.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\hash.h" include\google\protobuf\stubs\hash.h -copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\io_win32.h" include\google\protobuf\stubs\io_win32.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\logging.h" include\google\protobuf\stubs\logging.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\macros.h" include\google\protobuf\stubs\macros.h +copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\map_util.h" include\google\protobuf\stubs\map_util.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\mutex.h" include\google\protobuf\stubs\mutex.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\once.h" include\google\protobuf\stubs\once.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\stubs\platform_macros.h" include\google\protobuf\stubs\platform_macros.h diff --git a/third_party/protobuf/cmake/install.cmake b/third_party/protobuf/cmake/install.cmake index 9b2ae93c..be47c54a 100644 --- a/third_party/protobuf/cmake/install.cmake +++ b/third_party/protobuf/cmake/install.cmake @@ -33,7 +33,7 @@ if (protobuf_BUILD_PROTOC_BINARIES) RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) if (UNIX AND NOT APPLE) set_property(TARGET protoc - PROPERTY INSTALL_RPATH "$ORIGIN/../lib") + PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}") elseif (APPLE) set_property(TARGET protoc PROPERTY INSTALL_RPATH "@loader_path/../lib") diff --git a/third_party/protobuf/cmake/libprotobuf-lite.cmake b/third_party/protobuf/cmake/libprotobuf-lite.cmake index 652eb91c..6bf86a27 100644 --- a/third_party/protobuf/cmake/libprotobuf-lite.cmake +++ b/third_party/protobuf/cmake/libprotobuf-lite.cmake @@ -2,6 +2,7 @@ set(libprotobuf_lite_files ${protobuf_source_dir}/src/google/protobuf/any_lite.cc ${protobuf_source_dir}/src/google/protobuf/arena.cc ${protobuf_source_dir}/src/google/protobuf/extension_set.cc + ${protobuf_source_dir}/src/google/protobuf/generated_enum_util.cc ${protobuf_source_dir}/src/google/protobuf/generated_message_table_driven_lite.cc ${protobuf_source_dir}/src/google/protobuf/generated_message_util.cc ${protobuf_source_dir}/src/google/protobuf/implicit_weak_message.cc @@ -9,6 +10,7 @@ set(libprotobuf_lite_files ${protobuf_source_dir}/src/google/protobuf/io/io_win32.cc ${protobuf_source_dir}/src/google/protobuf/io/strtod.cc ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream.cc + ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl.cc ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl_lite.cc ${protobuf_source_dir}/src/google/protobuf/message_lite.cc ${protobuf_source_dir}/src/google/protobuf/parse_context.cc @@ -36,6 +38,7 @@ set(libprotobuf_lite_includes ${protobuf_source_dir}/src/google/protobuf/io/coded_stream.h ${protobuf_source_dir}/src/google/protobuf/io/strtod.h ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream.h + ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl.h ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl_lite.h ${protobuf_source_dir}/src/google/protobuf/message_lite.h ${protobuf_source_dir}/src/google/protobuf/repeated_field.h @@ -61,6 +64,9 @@ endif() add_library(libprotobuf-lite ${protobuf_SHARED_OR_STATIC} ${libprotobuf_lite_files} ${libprotobuf_lite_includes} ${libprotobuf_lite_rc_files}) target_link_libraries(libprotobuf-lite ${CMAKE_THREAD_LIBS_INIT}) +if(protobuf_LINK_LIBATOMIC) + target_link_libraries(libprotobuf-lite atomic) +endif() target_include_directories(libprotobuf-lite PUBLIC ${protobuf_source_dir}/src) if(MSVC AND protobuf_BUILD_SHARED_LIBS) target_compile_definitions(libprotobuf-lite diff --git a/third_party/protobuf/cmake/libprotobuf.cmake b/third_party/protobuf/cmake/libprotobuf.cmake index 9a434a7d..0c12596c 100644 --- a/third_party/protobuf/cmake/libprotobuf.cmake +++ b/third_party/protobuf/cmake/libprotobuf.cmake @@ -17,14 +17,12 @@ set(libprotobuf_files ${protobuf_source_dir}/src/google/protobuf/io/gzip_stream.cc ${protobuf_source_dir}/src/google/protobuf/io/printer.cc ${protobuf_source_dir}/src/google/protobuf/io/tokenizer.cc - ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl.cc ${protobuf_source_dir}/src/google/protobuf/map_field.cc ${protobuf_source_dir}/src/google/protobuf/message.cc ${protobuf_source_dir}/src/google/protobuf/reflection_ops.cc ${protobuf_source_dir}/src/google/protobuf/service.cc ${protobuf_source_dir}/src/google/protobuf/source_context.pb.cc ${protobuf_source_dir}/src/google/protobuf/struct.pb.cc - ${protobuf_source_dir}/src/google/protobuf/stubs/mathlimits.cc ${protobuf_source_dir}/src/google/protobuf/stubs/substitute.cc ${protobuf_source_dir}/src/google/protobuf/text_format.cc ${protobuf_source_dir}/src/google/protobuf/timestamp.pb.cc @@ -72,14 +70,12 @@ set(libprotobuf_includes ${protobuf_source_dir}/src/google/protobuf/io/gzip_stream.h ${protobuf_source_dir}/src/google/protobuf/io/printer.h ${protobuf_source_dir}/src/google/protobuf/io/tokenizer.h - ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl.h ${protobuf_source_dir}/src/google/protobuf/map_field.h ${protobuf_source_dir}/src/google/protobuf/message.h ${protobuf_source_dir}/src/google/protobuf/reflection_ops.h ${protobuf_source_dir}/src/google/protobuf/service.h ${protobuf_source_dir}/src/google/protobuf/source_context.pb.h ${protobuf_source_dir}/src/google/protobuf/struct.pb.h - ${protobuf_source_dir}/src/google/protobuf/stubs/mathlimits.h ${protobuf_source_dir}/src/google/protobuf/stubs/substitute.h ${protobuf_source_dir}/src/google/protobuf/text_format.h ${protobuf_source_dir}/src/google/protobuf/timestamp.pb.h @@ -120,7 +116,10 @@ add_library(libprotobuf ${protobuf_SHARED_OR_STATIC} ${libprotobuf_lite_files} ${libprotobuf_files} ${libprotobuf_includes} ${libprotobuf_rc_files}) target_link_libraries(libprotobuf ${CMAKE_THREAD_LIBS_INIT}) if(protobuf_WITH_ZLIB) - target_link_libraries(libprotobuf ${ZLIB_LIBRARIES}) + target_link_libraries(libprotobuf ${ZLIB_LIBRARIES}) +endif() +if(protobuf_LINK_LIBATOMIC) + target_link_libraries(libprotobuf atomic) endif() target_include_directories(libprotobuf PUBLIC ${protobuf_source_dir}/src) if(MSVC AND protobuf_BUILD_SHARED_LIBS) diff --git a/third_party/protobuf/cmake/protobuf-config.cmake.in b/third_party/protobuf/cmake/protobuf-config.cmake.in index 29e39d88..11b85d3c 100644 --- a/third_party/protobuf/cmake/protobuf-config.cmake.in +++ b/third_party/protobuf/cmake/protobuf-config.cmake.in @@ -11,7 +11,7 @@ function(protobuf_generate) include(CMakeParseArguments) set(_options APPEND_PATH) - set(_singleargs LANGUAGE OUT_VAR EXPORT_MACRO PROTOC_OUT_DIR) + set(_singleargs LANGUAGE OUT_VAR EXPORT_MACRO PROTOC_OUT_DIR PLUGIN) if(COMMAND target_sources) list(APPEND _singleargs TARGET) endif() @@ -41,6 +41,10 @@ function(protobuf_generate) if(protobuf_generate_EXPORT_MACRO AND protobuf_generate_LANGUAGE STREQUAL cpp) set(_dll_export_decl "dllexport_decl=${protobuf_generate_EXPORT_MACRO}:") endif() + + if(protobuf_generate_PLUGIN) + set(_plugin "--plugin=${protobuf_generate_PLUGIN}") + endif() if(NOT protobuf_generate_GENERATE_EXTENSIONS) if(protobuf_generate_LANGUAGE STREQUAL cpp) @@ -77,8 +81,6 @@ function(protobuf_generate) list(APPEND _protobuf_include_path -I ${_abs_path}) endif() endforeach() - else() - set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR}) endif() foreach(DIR ${protobuf_generate_IMPORT_DIRS}) @@ -89,12 +91,31 @@ function(protobuf_generate) endif() endforeach() + if(NOT _protobuf_include_path) + set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR}) + endif() + set(_generated_srcs_all) foreach(_proto ${protobuf_generate_PROTOS}) get_filename_component(_abs_file ${_proto} ABSOLUTE) get_filename_component(_abs_dir ${_abs_file} DIRECTORY) - get_filename_component(_basename ${_proto} NAME_WE) - file(RELATIVE_PATH _rel_dir ${CMAKE_CURRENT_SOURCE_DIR} ${_abs_dir}) + get_filename_component(_basename ${_proto} NAME_WLE) + + set(_suitable_include_found FALSE) + foreach(DIR ${_protobuf_include_path}) + if(NOT DIR STREQUAL "-I") + file(RELATIVE_PATH _rel_dir ${DIR} ${_abs_dir}) + if(NOT "${_rel_dir}" MATCHES "^\.\.[/\\].*") + set(_suitable_include_found TRUE) + break() + endif() + endif() + endforeach() + + if(NOT _suitable_include_found) + message(SEND_ERROR "Error: protobuf_generate could not find any correct proto include directory.") + return() + endif() set(_generated_srcs) foreach(_ext ${protobuf_generate_GENERATE_EXTENSIONS}) @@ -105,7 +126,7 @@ function(protobuf_generate) add_custom_command( OUTPUT ${_generated_srcs} COMMAND protobuf::protoc - ARGS --${protobuf_generate_LANGUAGE}_out ${_dll_export_decl}${protobuf_generate_PROTOC_OUT_DIR} ${_protobuf_include_path} ${_abs_file} + ARGS --${protobuf_generate_LANGUAGE}_out ${_dll_export_decl}${protobuf_generate_PROTOC_OUT_DIR} ${_plugin} ${_protobuf_include_path} ${_abs_file} DEPENDS ${_abs_file} protobuf::protoc COMMENT "Running ${protobuf_generate_LANGUAGE} protocol buffer compiler on ${_proto}" VERBATIM ) diff --git a/third_party/protobuf/cmake/tests.cmake b/third_party/protobuf/cmake/tests.cmake index 72269617..c3ef7301 100644 --- a/third_party/protobuf/cmake/tests.cmake +++ b/third_party/protobuf/cmake/tests.cmake @@ -67,6 +67,7 @@ set(tests_protos google/protobuf/unittest_proto3_arena.proto google/protobuf/unittest_proto3_arena_lite.proto google/protobuf/unittest_proto3_lite.proto + google/protobuf/unittest_proto3_optional.proto google/protobuf/unittest_well_known_types.proto google/protobuf/util/internal/testdata/anys.proto google/protobuf/util/internal/testdata/books.proto @@ -93,6 +94,7 @@ macro(compile_proto_file filename) COMMAND protoc ${protobuf_source_dir}/src/${dirname}/${basename}.proto --proto_path=${protobuf_source_dir}/src --cpp_out=${protobuf_source_dir}/src + --experimental_allow_proto3_optional ) endmacro(compile_proto_file) @@ -114,7 +116,7 @@ endforeach(proto_file) set(common_test_files ${protobuf_source_dir}/src/google/protobuf/arena_test_util.cc - ${protobuf_source_dir}/src/google/protobuf/map_test_util.cc + ${protobuf_source_dir}/src/google/protobuf/map_test_util.inc ${protobuf_source_dir}/src/google/protobuf/test_util.cc ${protobuf_source_dir}/src/google/protobuf/test_util.inc ${protobuf_source_dir}/src/google/protobuf/testing/file.cc @@ -132,7 +134,6 @@ set(tests_files ${protobuf_source_dir}/src/google/protobuf/arena_unittest.cc ${protobuf_source_dir}/src/google/protobuf/arenastring_unittest.cc ${protobuf_source_dir}/src/google/protobuf/compiler/annotation_test_util.cc - ${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface_unittest.cc ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_move_unittest.cc ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc @@ -203,12 +204,21 @@ set(tests_files ${protobuf_source_dir}/src/google/protobuf/wire_format_unittest.cc ) +set(non_msvc_tests_files + ${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface_unittest.cc +) + +set(all_tests_files + ${tests_files} + ${non_msvc_tests_files} +) + if(protobuf_ABSOLUTE_TEST_PLUGIN_PATH) add_compile_options(-DGOOGLE_PROTOBUF_TEST_PLUGIN_PATH="$") endif() if(MINGW) - set_source_files_properties(${tests_files} PROPERTIES COMPILE_FLAGS "-Wno-narrowing") + set_source_files_properties(${all_tests_files} PROPERTIES COMPILE_FLAGS "-Wno-narrowing") # required for tests on MinGW Win64 if (CMAKE_SIZEOF_VOID_P EQUAL 8) @@ -218,7 +228,7 @@ if(MINGW) endif() -add_executable(tests ${tests_files} ${common_test_files} ${tests_proto_files} ${lite_test_proto_files}) +add_executable(tests ${all_tests_files} ${common_test_files} ${tests_proto_files} ${lite_test_proto_files}) target_link_libraries(tests libprotoc libprotobuf gmock_main) set(test_plugin_files diff --git a/third_party/protobuf/compile b/third_party/protobuf/compile index a85b723c..23fcba01 100755 --- a/third_party/protobuf/compile +++ b/third_party/protobuf/compile @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -53,7 +53,7 @@ func_file_conv () MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ func_file_conv () mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) @@ -255,7 +255,8 @@ EOF echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -339,9 +340,9 @@ exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/third_party/protobuf/compiler_config_setting.bzl b/third_party/protobuf/compiler_config_setting.bzl index 5e52a652..f4d1f7b9 100644 --- a/third_party/protobuf/compiler_config_setting.bzl +++ b/third_party/protobuf/compiler_config_setting.bzl @@ -1,6 +1,6 @@ """Creates config_setting that allows selecting based on 'compiler' value.""" -def create_compiler_config_setting(name, value): +def create_compiler_config_setting(name, value, visibility = None): # The "do_not_use_tools_cpp_compiler_present" attribute exists to # distinguish between older versions of Bazel that do not support # "@bazel_tools//tools/cpp:compiler" flag_value, and newer ones that do. @@ -13,9 +13,11 @@ def create_compiler_config_setting(name, value): flag_values = { "@bazel_tools//tools/cpp:compiler": value, }, + visibility = visibility, ) else: native.config_setting( name = name, values = {"compiler": value}, + visibility = visibility, ) diff --git a/third_party/protobuf/configure b/third_party/protobuf/configure index add76733..be143029 100755 --- a/third_party/protobuf/configure +++ b/third_party/protobuf/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Protocol Buffers 3.8.0. +# Generated by GNU Autoconf 2.69 for Protocol Buffers 3.12.4. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Protocol Buffers' PACKAGE_TARNAME='protobuf' -PACKAGE_VERSION='3.8.0' -PACKAGE_STRING='Protocol Buffers 3.8.0' +PACKAGE_VERSION='3.12.4' +PACKAGE_STRING='Protocol Buffers 3.12.4' PACKAGE_BUGREPORT='protobuf@googlegroups.com' PACKAGE_URL='' @@ -716,7 +716,6 @@ am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE -am__quote am__include DEPDIR OBJEXT @@ -807,7 +806,8 @@ PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR -SHELL' +SHELL +am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -1395,7 +1395,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Protocol Buffers 3.8.0 to adapt to many kinds of systems. +\`configure' configures Protocol Buffers 3.12.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1467,7 +1467,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Protocol Buffers 3.8.0:";; + short | recursive ) echo "Configuration of Protocol Buffers 3.12.4:";; esac cat <<\_ACEOF @@ -1596,7 +1596,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Protocol Buffers configure 3.8.0 +Protocol Buffers configure 3.12.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2268,7 +2268,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Protocol Buffers $as_me 3.8.0, which was +It was created by Protocol Buffers $as_me 3.12.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2809,7 +2809,7 @@ test -n "$target_alias" && NONENONEs,x,x, && program_prefix=${target_alias}- -am__api_version='1.15' +am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3295,7 +3295,7 @@ fi # Define the identity of the package. PACKAGE='protobuf' - VERSION='3.8.0' + VERSION='3.12.4' cat >>confdefs.h <<_ACEOF @@ -3325,8 +3325,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The @@ -3493,7 +3493,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -3505,6 +3505,49 @@ END fi +# Silent rules enabled: the output is minimal but informative. +# In particular, the warnings from the compiler stick out very clearly. +# To see all logs, use the --disable-silent-rules on configure or via make V=1 +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + + # Check whether --with-zlib was given. if test "${with_zlib+set}" = set; then : @@ -4389,45 +4432,45 @@ DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" - -am_make=${MAKE-make} -cat > confinc << 'END' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 + (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + case $?:`cat confinc.out 2>/dev/null` in #( + '0:this is the am__doit target') : + case $s in #( + BSD) : + am__include='.include' am__quote='"' ;; #( + *) : + am__include='include' am__quote='' ;; +esac ;; #( + *) : ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf +esac + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : @@ -9164,7 +9207,7 @@ esac fi : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr} @@ -9665,11 +9708,8 @@ _LT_EOF test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -10888,8 +10928,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 + echo "$AR cr libconftest.a conftest.o" >&5 + $AR cr libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -11761,6 +11801,12 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; + # flang / f18. f95 an alias for gfortran or flang on Debian + flang* | f18* | f95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -15703,7 +15749,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no @@ -16195,7 +16241,7 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -16260,7 +16306,7 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -16599,7 +16645,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support @@ -16683,7 +16729,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -16694,7 +16740,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' @@ -21268,7 +21314,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Protocol Buffers $as_me 3.8.0, which was +This file was extended by Protocol Buffers $as_me 3.12.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21334,7 +21380,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Protocol Buffers config.status 3.8.0 +Protocol Buffers config.status 3.12.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -21453,7 +21499,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout @@ -22452,29 +22498,35 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + case $CONFIG_FILES in #( + *\'*) : + eval set x "$CONFIG_FILES" ;; #( + *) : + set x $CONFIG_FILES ;; #( + *) : + ;; +esac shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`$as_dirname -- "$am_mf" || +$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$am_mf" : 'X\(//\)[^/]' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -22492,53 +22544,50 @@ $as_echo X"$mf" | q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + am_filepart=`$as_basename -- "$am_mf" || +$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$am_mf" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } - /^X\(\/\/\)[^/].*/{ + /^X\/\(\/\/\)$/{ s//\1/ q } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ + /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + { echo "$as_me:$LINENO: cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles" >&5 + (cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } || am_rc=$? done + if test $am_rc -ne 0; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking). +See \`config.log' for more details" "$LINENO" 5; } + fi + { am_dirpart=; unset am_dirpart;} + { am_filepart=; unset am_filepart;} + { am_mf=; unset am_mf;} + { am_rc=; unset am_rc;} + rm -f conftest-deps.mk } ;; "libtool":C) diff --git a/third_party/protobuf/configure.ac b/third_party/protobuf/configure.ac index 2f025b7e..c6c8f240 100644 --- a/third_party/protobuf/configure.ac +++ b/third_party/protobuf/configure.ac @@ -17,7 +17,7 @@ AC_PREREQ(2.59) # In the SVN trunk, the version should always be the next anticipated release # version with the "-pre" suffix. (We used to use "-SNAPSHOT" but this pushed # the size of one file name in the dist tarfile over the 99-char limit.) -AC_INIT([Protocol Buffers],[3.8.0],[protobuf@googlegroups.com],[protobuf]) +AC_INIT([Protocol Buffers],[3.12.4],[protobuf@googlegroups.com],[protobuf]) AM_MAINTAINER_MODE([enable]) @@ -47,6 +47,11 @@ AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([1.9 tar-ustar subdir-objects]) +# Silent rules enabled: the output is minimal but informative. +# In particular, the warnings from the compiler stick out very clearly. +# To see all logs, use the --disable-silent-rules on configure or via make V=1 +AM_SILENT_RULES([yes]) + AC_ARG_WITH([zlib], [AS_HELP_STRING([--with-zlib], [include classes for streaming compressed data in and out @<:@default=check@:>@])], diff --git a/third_party/protobuf/conformance/ConformanceJava.java b/third_party/protobuf/conformance/ConformanceJava.java index c5b3f4e1..fa4dfb77 100644 --- a/third_party/protobuf/conformance/ConformanceJava.java +++ b/third_party/protobuf/conformance/ConformanceJava.java @@ -1,3 +1,33 @@ +// 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. + import com.google.protobuf.AbstractMessage; import com.google.protobuf.ByteString; import com.google.protobuf.CodedInputStream; diff --git a/third_party/protobuf/conformance/ConformanceJavaLite.java b/third_party/protobuf/conformance/ConformanceJavaLite.java index 016f7932..147738dc 100644 --- a/third_party/protobuf/conformance/ConformanceJavaLite.java +++ b/third_party/protobuf/conformance/ConformanceJavaLite.java @@ -1,3 +1,32 @@ +// 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. import com.google.protobuf.conformance.Conformance; import com.google.protobuf.InvalidProtocolBufferException; diff --git a/third_party/protobuf/conformance/Makefile.am b/third_party/protobuf/conformance/Makefile.am index e47fd108..6815c733 100644 --- a/third_party/protobuf/conformance/Makefile.am +++ b/third_party/protobuf/conformance/Makefile.am @@ -218,7 +218,7 @@ conformance_test_runner_SOURCES = conformance_test.h conformance_test.cc \ nodist_conformance_test_runner_SOURCES = conformance.pb.cc google/protobuf/test_messages_proto3.pb.cc google/protobuf/test_messages_proto2.pb.cc conformance_test_runner_CPPFLAGS = -I$(top_srcdir)/src -I$(srcdir) conformance_test_runner_CXXFLAGS = -std=c++11 -# Explicit deps beacuse BUILT_SOURCES are only done before a "make all/check" +# Explicit deps because BUILT_SOURCES are only done before a "make all/check" # so a direct "make test_cpp" could fail if parallel enough. conformance_test_runner-conformance_test.$(OBJEXT): conformance.pb.h conformance_test_runner-conformance_test_runner.$(OBJEXT): conformance.pb.h @@ -227,7 +227,7 @@ conformance_cpp_LDADD = $(top_srcdir)/src/libprotobuf.la conformance_cpp_SOURCES = conformance_cpp.cc nodist_conformance_cpp_SOURCES = conformance.pb.cc google/protobuf/test_messages_proto3.pb.cc google/protobuf/test_messages_proto2.pb.cc conformance_cpp_CPPFLAGS = -I$(top_srcdir)/src -# Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check" +# Explicit dep because BUILT_SOURCES are only done before a "make all/check" # so a direct "make test_cpp" could fail if parallel enough. conformance_cpp-conformance_cpp.$(OBJEXT): conformance.pb.h @@ -243,7 +243,7 @@ nodist_conformance_objc_SOURCES = Conformance.pbobjc.m google/protobuf/TestMessa # setup for Xcode and old frameworks are being found. conformance_objc_CPPFLAGS = -I$(top_srcdir)/objectivec -isysroot `xcrun --sdk macosx --show-sdk-path` conformance_objc_LDFLAGS = -framework Foundation -# Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check" +# Explicit dep because BUILT_SOURCES are only done before a "make all/check" # so a direct "make test_objc" could fail if parallel enough. conformance_objc-conformance_objc.$(OBJEXT): Conformance.pbobjc.h google/protobuf/TestMessagesProto2.pbobjc.h google/protobuf/TestMessagesProto3.pbobjc.h @@ -347,17 +347,14 @@ test_csharp: protoc_middleman conformance-test-runner conformance-csharp test_ruby: protoc_middleman conformance-test-runner $(other_language_protoc_outputs) RUBYLIB=../ruby/lib:. ./conformance-test-runner --enforce_recommended --failure_list failure_list_ruby.txt --text_format_failure_list text_format_failure_list_ruby.txt ./conformance_ruby.rb -test_ruby_mac: protoc_middleman conformance-test-runner $(other_language_protoc_outputs) - RUBYLIB=../ruby/lib:. ./conformance-test-runner --enforce_recommended --failure_list failure_list_ruby_mac.txt --text_format_failure_list text_format_failure_list_ruby.txt ./conformance_ruby.rb - test_php: protoc_middleman conformance-test-runner conformance-php $(other_language_protoc_outputs) ./conformance-test-runner --enforce_recommended --failure_list failure_list_php.txt --text_format_failure_list text_format_failure_list_php.txt ./conformance-php test_php_c: protoc_middleman conformance-test-runner conformance-php-c $(other_language_protoc_outputs) ./conformance-test-runner --enforce_recommended --failure_list failure_list_php_c.txt --text_format_failure_list text_format_failure_list_php.txt ./conformance-php-c -test_php_zts_c: protoc_middleman conformance-test-runner conformance-php-c $(other_language_protoc_outputs) - ./conformance-test-runner --enforce_recommended --failure_list failure_list_php_zts_c.txt --text_format_failure_list text_format_failure_list_php.txt ./conformance-php-c +test_php_c_32: protoc_middleman conformance-test-runner conformance-php-c $(other_language_protoc_outputs) + ./conformance-test-runner --enforce_recommended --failure_list failure_list_php_c_32.txt --text_format_failure_list text_format_failure_list_php.txt ./conformance-php-c # These depend on library paths being properly set up. The easiest way to # run them is to just use "tox" from the python dir. diff --git a/third_party/protobuf/conformance/Makefile.in b/third_party/protobuf/conformance/Makefile.in index 0cbea2b6..2f78083c 100644 --- a/third_party/protobuf/conformance/Makefile.in +++ b/third_party/protobuf/conformance/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -174,7 +174,25 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ../objectivec/$(DEPDIR)/conformance_objc-GPBProtocolBuffers.Po \ + ./$(DEPDIR)/conformance_cpp-conformance.pb.Po \ + ./$(DEPDIR)/conformance_cpp-conformance_cpp.Po \ + ./$(DEPDIR)/conformance_objc-Conformance.pbobjc.Po \ + ./$(DEPDIR)/conformance_objc-conformance_objc.Po \ + ./$(DEPDIR)/conformance_test_runner-binary_json_conformance_suite.Po \ + ./$(DEPDIR)/conformance_test_runner-conformance.pb.Po \ + ./$(DEPDIR)/conformance_test_runner-conformance_test.Po \ + ./$(DEPDIR)/conformance_test_runner-conformance_test_main.Po \ + ./$(DEPDIR)/conformance_test_runner-conformance_test_runner.Po \ + ./$(DEPDIR)/conformance_test_runner-text_format_conformance_suite.Po \ + google/protobuf/$(DEPDIR)/conformance_cpp-test_messages_proto2.pb.Po \ + google/protobuf/$(DEPDIR)/conformance_cpp-test_messages_proto3.pb.Po \ + google/protobuf/$(DEPDIR)/conformance_objc-TestMessagesProto2.pbobjc.Po \ + google/protobuf/$(DEPDIR)/conformance_objc-TestMessagesProto3.pbobjc.Po \ + google/protobuf/$(DEPDIR)/conformance_test_runner-test_messages_proto2.pb.Po \ + google/protobuf/$(DEPDIR)/conformance_test_runner-test_messages_proto3.pb.Po \ + third_party/jsoncpp/$(DEPDIR)/conformance_test_runner-jsoncpp.Po am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -633,8 +651,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -758,24 +776,30 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@../objectivec/$(DEPDIR)/conformance_objc-GPBProtocolBuffers.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_cpp-conformance.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_cpp-conformance_cpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_objc-Conformance.pbobjc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_objc-conformance_objc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_test_runner-binary_json_conformance_suite.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_test_runner-conformance.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_test_runner-conformance_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_test_runner-conformance_test_main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_test_runner-conformance_test_runner.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_test_runner-text_format_conformance_suite.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/conformance_cpp-test_messages_proto2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/conformance_cpp-test_messages_proto3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/conformance_objc-TestMessagesProto2.pbobjc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/conformance_objc-TestMessagesProto3.pbobjc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/conformance_test_runner-test_messages_proto2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/conformance_test_runner-test_messages_proto3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@third_party/jsoncpp/$(DEPDIR)/conformance_test_runner-jsoncpp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../objectivec/$(DEPDIR)/conformance_objc-GPBProtocolBuffers.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_cpp-conformance.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_cpp-conformance_cpp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_objc-Conformance.pbobjc.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_objc-conformance_objc.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_test_runner-binary_json_conformance_suite.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_test_runner-conformance.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_test_runner-conformance_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_test_runner-conformance_test_main.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_test_runner-conformance_test_runner.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_test_runner-text_format_conformance_suite.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/conformance_cpp-test_messages_proto2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/conformance_cpp-test_messages_proto3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/conformance_objc-TestMessagesProto2.pbobjc.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/conformance_objc-TestMessagesProto3.pbobjc.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/conformance_test_runner-test_messages_proto2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/conformance_test_runner-test_messages_proto3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@third_party/jsoncpp/$(DEPDIR)/conformance_test_runner-jsoncpp.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -1159,7 +1183,10 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -1239,7 +1266,24 @@ clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am - -rm -rf ../objectivec/$(DEPDIR) ./$(DEPDIR) google/protobuf/$(DEPDIR) third_party/jsoncpp/$(DEPDIR) + -rm -f ../objectivec/$(DEPDIR)/conformance_objc-GPBProtocolBuffers.Po + -rm -f ./$(DEPDIR)/conformance_cpp-conformance.pb.Po + -rm -f ./$(DEPDIR)/conformance_cpp-conformance_cpp.Po + -rm -f ./$(DEPDIR)/conformance_objc-Conformance.pbobjc.Po + -rm -f ./$(DEPDIR)/conformance_objc-conformance_objc.Po + -rm -f ./$(DEPDIR)/conformance_test_runner-binary_json_conformance_suite.Po + -rm -f ./$(DEPDIR)/conformance_test_runner-conformance.pb.Po + -rm -f ./$(DEPDIR)/conformance_test_runner-conformance_test.Po + -rm -f ./$(DEPDIR)/conformance_test_runner-conformance_test_main.Po + -rm -f ./$(DEPDIR)/conformance_test_runner-conformance_test_runner.Po + -rm -f ./$(DEPDIR)/conformance_test_runner-text_format_conformance_suite.Po + -rm -f google/protobuf/$(DEPDIR)/conformance_cpp-test_messages_proto2.pb.Po + -rm -f google/protobuf/$(DEPDIR)/conformance_cpp-test_messages_proto3.pb.Po + -rm -f google/protobuf/$(DEPDIR)/conformance_objc-TestMessagesProto2.pbobjc.Po + -rm -f google/protobuf/$(DEPDIR)/conformance_objc-TestMessagesProto3.pbobjc.Po + -rm -f google/protobuf/$(DEPDIR)/conformance_test_runner-test_messages_proto2.pb.Po + -rm -f google/protobuf/$(DEPDIR)/conformance_test_runner-test_messages_proto3.pb.Po + -rm -f third_party/jsoncpp/$(DEPDIR)/conformance_test_runner-jsoncpp.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -1285,7 +1329,24 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ../objectivec/$(DEPDIR) ./$(DEPDIR) google/protobuf/$(DEPDIR) third_party/jsoncpp/$(DEPDIR) + -rm -f ../objectivec/$(DEPDIR)/conformance_objc-GPBProtocolBuffers.Po + -rm -f ./$(DEPDIR)/conformance_cpp-conformance.pb.Po + -rm -f ./$(DEPDIR)/conformance_cpp-conformance_cpp.Po + -rm -f ./$(DEPDIR)/conformance_objc-Conformance.pbobjc.Po + -rm -f ./$(DEPDIR)/conformance_objc-conformance_objc.Po + -rm -f ./$(DEPDIR)/conformance_test_runner-binary_json_conformance_suite.Po + -rm -f ./$(DEPDIR)/conformance_test_runner-conformance.pb.Po + -rm -f ./$(DEPDIR)/conformance_test_runner-conformance_test.Po + -rm -f ./$(DEPDIR)/conformance_test_runner-conformance_test_main.Po + -rm -f ./$(DEPDIR)/conformance_test_runner-conformance_test_runner.Po + -rm -f ./$(DEPDIR)/conformance_test_runner-text_format_conformance_suite.Po + -rm -f google/protobuf/$(DEPDIR)/conformance_cpp-test_messages_proto2.pb.Po + -rm -f google/protobuf/$(DEPDIR)/conformance_cpp-test_messages_proto3.pb.Po + -rm -f google/protobuf/$(DEPDIR)/conformance_objc-TestMessagesProto2.pbobjc.Po + -rm -f google/protobuf/$(DEPDIR)/conformance_objc-TestMessagesProto3.pbobjc.Po + -rm -f google/protobuf/$(DEPDIR)/conformance_test_runner-test_messages_proto2.pb.Po + -rm -f google/protobuf/$(DEPDIR)/conformance_test_runner-test_messages_proto3.pb.Po + -rm -f third_party/jsoncpp/$(DEPDIR)/conformance_test_runner-jsoncpp.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -1306,7 +1367,7 @@ uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ @@ -1362,14 +1423,14 @@ uninstall-am: uninstall-binPROGRAMS # lite/com/google/protobuf/Value.java \ # lite/com/google/protobuf/ValueOrBuilder.java \ # lite/com/google/protobuf/WrappersProto.java -# Explicit deps beacuse BUILT_SOURCES are only done before a "make all/check" +# Explicit deps because BUILT_SOURCES are only done before a "make all/check" # so a direct "make test_cpp" could fail if parallel enough. conformance_test_runner-conformance_test.$(OBJEXT): conformance.pb.h conformance_test_runner-conformance_test_runner.$(OBJEXT): conformance.pb.h -# Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check" +# Explicit dep because BUILT_SOURCES are only done before a "make all/check" # so a direct "make test_cpp" could fail if parallel enough. conformance_cpp-conformance_cpp.$(OBJEXT): conformance.pb.h -# Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check" +# Explicit dep because BUILT_SOURCES are only done before a "make all/check" # so a direct "make test_objc" could fail if parallel enough. @OBJC_CONFORMANCE_TEST_TRUE@conformance_objc-conformance_objc.$(OBJEXT): Conformance.pbobjc.h google/protobuf/TestMessagesProto2.pbobjc.h google/protobuf/TestMessagesProto3.pbobjc.h @@ -1457,17 +1518,14 @@ test_csharp: protoc_middleman conformance-test-runner conformance-csharp test_ruby: protoc_middleman conformance-test-runner $(other_language_protoc_outputs) RUBYLIB=../ruby/lib:. ./conformance-test-runner --enforce_recommended --failure_list failure_list_ruby.txt --text_format_failure_list text_format_failure_list_ruby.txt ./conformance_ruby.rb -test_ruby_mac: protoc_middleman conformance-test-runner $(other_language_protoc_outputs) - RUBYLIB=../ruby/lib:. ./conformance-test-runner --enforce_recommended --failure_list failure_list_ruby_mac.txt --text_format_failure_list text_format_failure_list_ruby.txt ./conformance_ruby.rb - test_php: protoc_middleman conformance-test-runner conformance-php $(other_language_protoc_outputs) ./conformance-test-runner --enforce_recommended --failure_list failure_list_php.txt --text_format_failure_list text_format_failure_list_php.txt ./conformance-php test_php_c: protoc_middleman conformance-test-runner conformance-php-c $(other_language_protoc_outputs) ./conformance-test-runner --enforce_recommended --failure_list failure_list_php_c.txt --text_format_failure_list text_format_failure_list_php.txt ./conformance-php-c -test_php_zts_c: protoc_middleman conformance-test-runner conformance-php-c $(other_language_protoc_outputs) - ./conformance-test-runner --enforce_recommended --failure_list failure_list_php_zts_c.txt --text_format_failure_list text_format_failure_list_php.txt ./conformance-php-c +test_php_c_32: protoc_middleman conformance-test-runner conformance-php-c $(other_language_protoc_outputs) + ./conformance-test-runner --enforce_recommended --failure_list failure_list_php_c_32.txt --text_format_failure_list text_format_failure_list_php.txt ./conformance-php-c # These depend on library paths being properly set up. The easiest way to # run them is to just use "tox" from the python dir. diff --git a/third_party/protobuf/conformance/binary_json_conformance_suite.cc b/third_party/protobuf/conformance/binary_json_conformance_suite.cc index 8cb9bf7c..93f43dc1 100644 --- a/third_party/protobuf/conformance/binary_json_conformance_suite.cc +++ b/third_party/protobuf/conformance/binary_json_conformance_suite.cc @@ -29,18 +29,18 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "binary_json_conformance_suite.h" -#include "conformance_test.h" -#include "third_party/jsoncpp/json.h" -#include -#include - -#include -#include #include +#include #include #include -#include +#include "third_party/jsoncpp/json.h" +#include "conformance_test.h" +#include +#include +#include + +namespace proto2_messages = protobuf_test_messages::proto2; using conformance::ConformanceRequest; using conformance::ConformanceResponse; @@ -48,11 +48,11 @@ using conformance::WireFormat; using google::protobuf::Descriptor; using google::protobuf::FieldDescriptor; using google::protobuf::Message; -using google::protobuf::internal::WireFormatLite; using google::protobuf::TextFormat; +using google::protobuf::internal::WireFormatLite; using google::protobuf::util::NewTypeResolverForDescriptorPool; +using proto2_messages::TestAllTypesProto2; using protobuf_test_messages::proto3::TestAllTypesProto3; -using protobuf_test_messages::proto2::TestAllTypesProto2; using std::string; namespace { @@ -149,24 +149,153 @@ string tag(uint32_t fieldnum, char wire_type) { return varint((fieldnum << 3) | wire_type); } -string submsg(uint32_t fn, const string& buf) { - return cat( tag(fn, WireFormatLite::WIRETYPE_LENGTH_DELIMITED), delim(buf) ); +string GetDefaultValue(FieldDescriptor::Type type) { + switch (type) { + case FieldDescriptor::TYPE_INT32: + case FieldDescriptor::TYPE_INT64: + case FieldDescriptor::TYPE_UINT32: + case FieldDescriptor::TYPE_UINT64: + case FieldDescriptor::TYPE_ENUM: + case FieldDescriptor::TYPE_BOOL: + return varint(0); + case FieldDescriptor::TYPE_SINT32: + return zz32(0); + case FieldDescriptor::TYPE_SINT64: + return zz64(0); + case FieldDescriptor::TYPE_FIXED32: + case FieldDescriptor::TYPE_SFIXED32: + return u32(0); + case FieldDescriptor::TYPE_FIXED64: + case FieldDescriptor::TYPE_SFIXED64: + return u64(0); + case FieldDescriptor::TYPE_FLOAT: + return flt(0); + case FieldDescriptor::TYPE_DOUBLE: + return dbl(0); + case FieldDescriptor::TYPE_STRING: + case FieldDescriptor::TYPE_BYTES: + case FieldDescriptor::TYPE_MESSAGE: + return delim(""); + default: + return ""; + } + return ""; +} + +string GetNonDefaultValue(FieldDescriptor::Type type) { + switch (type) { + case FieldDescriptor::TYPE_INT32: + case FieldDescriptor::TYPE_INT64: + case FieldDescriptor::TYPE_UINT32: + case FieldDescriptor::TYPE_UINT64: + case FieldDescriptor::TYPE_ENUM: + case FieldDescriptor::TYPE_BOOL: + return varint(1); + case FieldDescriptor::TYPE_SINT32: + return zz32(1); + case FieldDescriptor::TYPE_SINT64: + return zz64(1); + case FieldDescriptor::TYPE_FIXED32: + case FieldDescriptor::TYPE_SFIXED32: + return u32(1); + case FieldDescriptor::TYPE_FIXED64: + case FieldDescriptor::TYPE_SFIXED64: + return u64(1); + case FieldDescriptor::TYPE_FLOAT: + return flt(1); + case FieldDescriptor::TYPE_DOUBLE: + return dbl(1); + case FieldDescriptor::TYPE_STRING: + case FieldDescriptor::TYPE_BYTES: + return delim("a"); + case FieldDescriptor::TYPE_MESSAGE: + return delim(cat(tag(1, WireFormatLite::WIRETYPE_VARINT), varint(1234))); + default: + return ""; + } + return ""; } #define UNKNOWN_FIELD 666 -const FieldDescriptor* GetFieldForType(FieldDescriptor::Type type, - bool repeated, bool is_proto3) { +enum class Packed { + UNSPECIFIED = 0, + TRUE = 1, + FALSE = 2, +}; +const FieldDescriptor* GetFieldForType(FieldDescriptor::Type type, + bool repeated, bool is_proto3, + Packed packed = Packed::UNSPECIFIED) { const Descriptor* d = is_proto3 ? TestAllTypesProto3().GetDescriptor() : TestAllTypesProto2().GetDescriptor(); for (int i = 0; i < d->field_count(); i++) { const FieldDescriptor* f = d->field(i); if (f->type() == type && f->is_repeated() == repeated) { + if ((packed == Packed::TRUE && !f->is_packed()) || + (packed == Packed::FALSE && f->is_packed())) { + continue; + } return f; } } - GOOGLE_LOG(FATAL) << "Couldn't find field with type " << (int)type; + + string packed_string = ""; + const string repeated_string = repeated ? "Repeated " : "Singular "; + const string proto_string = is_proto3 ? "Proto3" : "Proto2"; + if (packed == Packed::TRUE) { + packed_string = "Packed "; + } + if (packed == Packed::FALSE) { + packed_string = "Unpacked "; + } + GOOGLE_LOG(FATAL) << "Couldn't find field with type: " << repeated_string.c_str() + << packed_string.c_str() << FieldDescriptor::TypeName(type) + << " for " << proto_string.c_str(); + return nullptr; +} + +const FieldDescriptor* GetFieldForMapType(FieldDescriptor::Type key_type, + FieldDescriptor::Type value_type, + bool is_proto3) { + const Descriptor* d = is_proto3 ? TestAllTypesProto3().GetDescriptor() + : TestAllTypesProto2().GetDescriptor(); + for (int i = 0; i < d->field_count(); i++) { + const FieldDescriptor* f = d->field(i); + if (f->is_map()) { + const Descriptor* map_entry = f->message_type(); + const FieldDescriptor* key = map_entry->field(0); + const FieldDescriptor* value = map_entry->field(1); + if (key->type() == key_type && value->type() == value_type) { + return f; + } + } + } + + const string proto_string = is_proto3 ? "Proto3" : "Proto2"; + GOOGLE_LOG(FATAL) << "Couldn't find map field with type: " + << FieldDescriptor::TypeName(key_type) << " and " + << FieldDescriptor::TypeName(key_type) << " for " + << proto_string.c_str(); + return nullptr; +} + +const FieldDescriptor* GetFieldForOneofType(FieldDescriptor::Type type, + bool is_proto3, + bool exclusive = false) { + const Descriptor* d = is_proto3 ? TestAllTypesProto3().GetDescriptor() + : TestAllTypesProto2().GetDescriptor(); + for (int i = 0; i < d->field_count(); i++) { + const FieldDescriptor* f = d->field(i); + if (f->containing_oneof() && ((f->type() == type) ^ exclusive)) { + return f; + } + } + + const string proto_string = is_proto3 ? "Proto3" : "Proto2"; + GOOGLE_LOG(FATAL) << "Couldn't find oneof field with type: " + << FieldDescriptor::TypeName(type) << " for " + << proto_string.c_str(); return nullptr; } @@ -187,6 +316,35 @@ std::unique_ptr NewTestMessage(bool is_proto3) { return prototype; } +bool IsProto3Default(FieldDescriptor::Type type, const string& binary_data) { + switch (type) { + case FieldDescriptor::TYPE_DOUBLE: + return binary_data == dbl(0); + case FieldDescriptor::TYPE_FLOAT: + return binary_data == flt(0); + case FieldDescriptor::TYPE_BOOL: + case FieldDescriptor::TYPE_INT64: + case FieldDescriptor::TYPE_UINT64: + case FieldDescriptor::TYPE_INT32: + case FieldDescriptor::TYPE_UINT32: + case FieldDescriptor::TYPE_SINT32: + case FieldDescriptor::TYPE_SINT64: + case FieldDescriptor::TYPE_ENUM: + return binary_data == varint(0); + case FieldDescriptor::TYPE_FIXED64: + case FieldDescriptor::TYPE_SFIXED64: + return binary_data == u64(0); + case FieldDescriptor::TYPE_FIXED32: + case FieldDescriptor::TYPE_SFIXED32: + return binary_data == u32(0); + case FieldDescriptor::TYPE_STRING: + case FieldDescriptor::TYPE_BYTES: + return binary_data == delim(""); + default: + return false; + } +} + } // anonymous namespace namespace google { @@ -205,9 +363,8 @@ bool BinaryAndJsonConformanceSuite::ParseJsonResponse( } if (!test_message->ParseFromString(binary_protobuf)) { - GOOGLE_LOG(FATAL) - << "INTERNAL ERROR: internal JSON->protobuf transcode " - << "yielded unparseable proto."; + GOOGLE_LOG(FATAL) << "INTERNAL ERROR: internal JSON->protobuf transcode " + << "yielded unparseable proto."; return false; } @@ -226,10 +383,11 @@ bool BinaryAndJsonConformanceSuite::ParseResponse( switch (response.result_case()) { case ConformanceResponse::kProtobufPayload: { if (requested_output != conformance::PROTOBUF) { - ReportFailure( - test_name, level, request, response, - StrCat("Test was asked for ", WireFormatToString(requested_output), - " output but provided PROTOBUF instead.").c_str()); + ReportFailure(test_name, level, request, response, + StrCat("Test was asked for ", + WireFormatToString(requested_output), + " output but provided PROTOBUF instead.") + .c_str()); return false; } @@ -244,10 +402,11 @@ bool BinaryAndJsonConformanceSuite::ParseResponse( case ConformanceResponse::kJsonPayload: { if (requested_output != conformance::JSON) { - ReportFailure( - test_name, level, request, response, - StrCat("Test was asked for ", WireFormatToString(requested_output), - " output but provided JSON instead.").c_str()); + ReportFailure(test_name, level, request, response, + StrCat("Test was asked for ", + WireFormatToString(requested_output), + " output but provided JSON instead.") + .c_str()); return false; } @@ -261,8 +420,8 @@ bool BinaryAndJsonConformanceSuite::ParseResponse( } default: - GOOGLE_LOG(FATAL) << test_name << ": unknown payload type: " - << response.result_case(); + GOOGLE_LOG(FATAL) << test_name + << ": unknown payload type: " << response.result_case(); } return true; @@ -281,10 +440,9 @@ void BinaryAndJsonConformanceSuite::ExpectParseFailureForProtoWithProtoVersion ( const ConformanceRequest& request = setting.GetRequest(); ConformanceResponse response; - string effective_test_name = - StrCat(setting.ConformanceLevelToString(level), - (is_proto3 ? ".Proto3" : ".Proto2"), - ".ProtobufInput.", test_name); + string effective_test_name = StrCat( + setting.ConformanceLevelToString(level), + (is_proto3 ? ".Proto3" : ".Proto2"), ".ProtobufInput.", test_name); RunTest(effective_test_name, request, &response); if (response.result_case() == ConformanceResponse::kParseError) { @@ -375,12 +533,20 @@ void BinaryAndJsonConformanceSuite::RunValidProtobufTest( void BinaryAndJsonConformanceSuite::RunValidBinaryProtobufTest( const string& test_name, ConformanceLevel level, const string& input_protobuf, bool is_proto3) { + RunValidBinaryProtobufTest(test_name, level, input_protobuf, input_protobuf, + is_proto3); +} + +void BinaryAndJsonConformanceSuite::RunValidBinaryProtobufTest( + const string& test_name, ConformanceLevel level, + const string& input_protobuf, const string& expected_protobuf, + bool is_proto3) { std::unique_ptr prototype = NewTestMessage(is_proto3); ConformanceRequestSetting setting( level, conformance::PROTOBUF, conformance::PROTOBUF, conformance::BINARY_TEST, *prototype, test_name, input_protobuf); - RunValidBinaryInputTest(setting, input_protobuf); + RunValidBinaryInputTest(setting, expected_protobuf, true); } void BinaryAndJsonConformanceSuite::RunValidProtobufTestWithMessage( @@ -407,8 +573,7 @@ void BinaryAndJsonConformanceSuite::RunValidJsonTestWithValidator( ConformanceResponse response; string effective_test_name = StrCat(setting.ConformanceLevelToString(level), - ".Proto3.JsonInput.", - test_name, ".Validator"); + ".Proto3.JsonInput.", test_name, ".Validator"); RunTest(effective_test_name, request, &response); @@ -450,9 +615,8 @@ void BinaryAndJsonConformanceSuite::ExpectParseFailureForJson( prototype, test_name, input_json); const ConformanceRequest& request = setting.GetRequest(); ConformanceResponse response; - string effective_test_name = - StrCat(setting.ConformanceLevelToString(level), - ".Proto3.JsonInput.", test_name); + string effective_test_name = StrCat( + setting.ConformanceLevelToString(level), ".Proto3.JsonInput.", test_name); RunTest(effective_test_name, request, &response); if (response.result_case() == ConformanceResponse::kParseError) { @@ -468,9 +632,8 @@ void BinaryAndJsonConformanceSuite::ExpectParseFailureForJson( void BinaryAndJsonConformanceSuite::ExpectSerializeFailureForJson( const string& test_name, ConformanceLevel level, const string& text_format) { TestAllTypesProto3 payload_message; - GOOGLE_CHECK( - TextFormat::ParseFromString(text_format, &payload_message)) - << "Failed to parse: " << text_format; + GOOGLE_CHECK(TextFormat::ParseFromString(text_format, &payload_message)) + << "Failed to parse: " << text_format; TestAllTypesProto3 prototype; ConformanceRequestSetting setting( @@ -479,9 +642,8 @@ void BinaryAndJsonConformanceSuite::ExpectSerializeFailureForJson( prototype, test_name, payload_message.SerializeAsString()); const ConformanceRequest& request = setting.GetRequest(); ConformanceResponse response; - string effective_test_name = - StrCat(setting.ConformanceLevelToString(level), - ".", test_name, ".JsonOutput"); + string effective_test_name = StrCat( + setting.ConformanceLevelToString(level), ".", test_name, ".JsonOutput"); RunTest(effective_test_name, request, &response); if (response.result_case() == ConformanceResponse::kSerializeError) { @@ -494,7 +656,6 @@ void BinaryAndJsonConformanceSuite::ExpectSerializeFailureForJson( } } -//TODO: proto2? void BinaryAndJsonConformanceSuite::TestPrematureEOFForType( FieldDescriptor::Type type) { // Incomplete values for each wire type. @@ -594,31 +755,483 @@ void BinaryAndJsonConformanceSuite::TestValidDataForType( const FieldDescriptor* field = GetFieldForType(type, false, is_proto3); const FieldDescriptor* rep_field = GetFieldForType(type, true, is_proto3); - RunValidProtobufTest("ValidDataScalar" + type_name, REQUIRED, - cat(tag(field->number(), wire_type), values[0].first), - field->name() + ": " + values[0].second, is_proto3); + // Test singular data for singular fields. + for (size_t i = 0; i < values.size(); i++) { + string proto = cat(tag(field->number(), wire_type), values[i].first); + // In proto3, default primitive fields should not be encoded. + string expected_proto = + is_proto3 && IsProto3Default(field->type(), values[i].second) + ? "" + : cat(tag(field->number(), wire_type), values[i].second); + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(expected_proto); + string text = test_message->DebugString(); + RunValidProtobufTest( + StrCat("ValidDataScalar", type_name, "[", i, "]"), REQUIRED, + proto, text, is_proto3); + RunValidBinaryProtobufTest( + StrCat("ValidDataScalarBinary", type_name, "[", i, "]"), + RECOMMENDED, proto, expected_proto, is_proto3); + } + + // Test repeated data for singular fields. + // For scalar message fields, repeated values are merged, which is tested + // separately. + if (type != FieldDescriptor::TYPE_MESSAGE) { + string proto; + for (size_t i = 0; i < values.size(); i++) { + proto += cat(tag(field->number(), wire_type), values[i].first); + } + string expected_proto = + cat(tag(field->number(), wire_type), values.back().second); + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(expected_proto); + string text = test_message->DebugString(); + + RunValidProtobufTest("RepeatedScalarSelectsLast" + type_name, REQUIRED, + proto, text, is_proto3); + } + + // Test repeated fields. + if (FieldDescriptor::IsTypePackable(type)) { + const FieldDescriptor* packed_field = + GetFieldForType(type, true, is_proto3, Packed::TRUE); + const FieldDescriptor* unpacked_field = + GetFieldForType(type, true, is_proto3, Packed::FALSE); + + string default_proto_packed; + string default_proto_unpacked; + string default_proto_packed_expected; + string default_proto_unpacked_expected; + string packed_proto_packed; + string packed_proto_unpacked; + string packed_proto_expected; + string unpacked_proto_packed; + string unpacked_proto_unpacked; + string unpacked_proto_expected; + + for (size_t i = 0; i < values.size(); i++) { + default_proto_unpacked += + cat(tag(rep_field->number(), wire_type), values[i].first); + default_proto_unpacked_expected += + cat(tag(rep_field->number(), wire_type), values[i].second); + default_proto_packed += values[i].first; + default_proto_packed_expected += values[i].second; + packed_proto_unpacked += + cat(tag(packed_field->number(), wire_type), values[i].first); + packed_proto_packed += values[i].first; + packed_proto_expected += values[i].second; + unpacked_proto_unpacked += + cat(tag(unpacked_field->number(), wire_type), values[i].first); + unpacked_proto_packed += values[i].first; + unpacked_proto_expected += + cat(tag(unpacked_field->number(), wire_type), values[i].second); + } + default_proto_packed = cat( + tag(rep_field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(default_proto_packed)); + default_proto_packed_expected = cat( + tag(rep_field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(default_proto_packed_expected)); + packed_proto_packed = cat(tag(packed_field->number(), + WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(packed_proto_packed)); + packed_proto_expected = + cat(tag(packed_field->number(), + WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(packed_proto_expected)); + unpacked_proto_packed = + cat(tag(unpacked_field->number(), + WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(unpacked_proto_packed)); + + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(default_proto_packed_expected); + string text = test_message->DebugString(); + + // Ensures both packed and unpacked data can be parsed. + RunValidProtobufTest( + StrCat("ValidDataRepeated", type_name, ".UnpackedInput"), + REQUIRED, default_proto_unpacked, text, is_proto3); + RunValidProtobufTest( + StrCat("ValidDataRepeated", type_name, ".PackedInput"), + REQUIRED, default_proto_packed, text, is_proto3); + + // proto2 should encode as unpacked by default and proto3 should encode as + // packed by default. + string expected_proto = rep_field->is_packed() + ? default_proto_packed_expected + : default_proto_unpacked_expected; + RunValidBinaryProtobufTest(StrCat("ValidDataRepeated", type_name, + ".UnpackedInput.DefaultOutput"), + RECOMMENDED, default_proto_unpacked, + expected_proto, is_proto3); + RunValidBinaryProtobufTest(StrCat("ValidDataRepeated", type_name, + ".PackedInput.DefaultOutput"), + RECOMMENDED, default_proto_packed, + expected_proto, is_proto3); + RunValidBinaryProtobufTest(StrCat("ValidDataRepeated", type_name, + ".UnpackedInput.PackedOutput"), + RECOMMENDED, packed_proto_unpacked, + packed_proto_expected, is_proto3); + RunValidBinaryProtobufTest(StrCat("ValidDataRepeated", type_name, + ".PackedInput.PackedOutput"), + RECOMMENDED, packed_proto_packed, + packed_proto_expected, is_proto3); + RunValidBinaryProtobufTest(StrCat("ValidDataRepeated", type_name, + ".UnpackedInput.UnpackedOutput"), + RECOMMENDED, unpacked_proto_unpacked, + unpacked_proto_expected, is_proto3); + RunValidBinaryProtobufTest(StrCat("ValidDataRepeated", type_name, + ".PackedInput.UnpackedOutput"), + RECOMMENDED, unpacked_proto_packed, + unpacked_proto_expected, is_proto3); + } else { + string proto; + string expected_proto; + for (size_t i = 0; i < values.size(); i++) { + proto += cat(tag(rep_field->number(), wire_type), values[i].first); + expected_proto += + cat(tag(rep_field->number(), wire_type), values[i].second); + } + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(expected_proto); + string text = test_message->DebugString(); + + RunValidProtobufTest(StrCat("ValidDataRepeated", type_name), + REQUIRED, proto, text, is_proto3); + } + } +} + +void BinaryAndJsonConformanceSuite::TestValidDataForRepeatedScalarMessage() { + std::vector values = { + delim(cat( + tag(2, WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(tag(1, WireFormatLite::WIRETYPE_VARINT), varint(1234), + tag(2, WireFormatLite::WIRETYPE_VARINT), varint(1234), + tag(31, WireFormatLite::WIRETYPE_VARINT), varint(1234))))), + delim(cat( + tag(2, WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(tag(1, WireFormatLite::WIRETYPE_VARINT), varint(4321), + tag(3, WireFormatLite::WIRETYPE_VARINT), varint(4321), + tag(31, WireFormatLite::WIRETYPE_VARINT), varint(4321))))), + }; + + const std::string expected = + R"({ + corecursive: { + optional_int32: 4321, + optional_int64: 1234, + optional_uint32: 4321, + repeated_int32: [1234, 4321], + } + })"; + + for (int is_proto3 = 0; is_proto3 < 2; is_proto3++) { string proto; - string text = field->name() + ": " + values.back().second; + const FieldDescriptor* field = + GetFieldForType(FieldDescriptor::TYPE_MESSAGE, false, is_proto3); for (size_t i = 0; i < values.size(); i++) { - proto += cat(tag(field->number(), wire_type), values[i].first); + proto += + cat(tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + values[i]); } - RunValidProtobufTest("RepeatedScalarSelectsLast" + type_name, REQUIRED, - proto, text, is_proto3); - proto.clear(); - text.clear(); + RunValidProtobufTest("RepeatedScalarMessageMerge", REQUIRED, proto, + field->name() + ": " + expected, is_proto3); + } +} - for (size_t i = 0; i < values.size(); i++) { - proto += cat(tag(rep_field->number(), wire_type), values[i].first); - text += rep_field->name() + ": " + values[i].second + " "; +void BinaryAndJsonConformanceSuite::TestValidDataForMapType( + FieldDescriptor::Type key_type, FieldDescriptor::Type value_type) { + const string key_type_name = + UpperCase(string(".") + FieldDescriptor::TypeName(key_type)); + const string value_type_name = + UpperCase(string(".") + FieldDescriptor::TypeName(value_type)); + WireFormatLite::WireType key_wire_type = WireFormatLite::WireTypeForFieldType( + static_cast(key_type)); + WireFormatLite::WireType value_wire_type = + WireFormatLite::WireTypeForFieldType( + static_cast(value_type)); + + string key1_data = cat(tag(1, key_wire_type), GetDefaultValue(key_type)); + string value1_data = + cat(tag(2, value_wire_type), GetDefaultValue(value_type)); + string key2_data = cat(tag(1, key_wire_type), GetNonDefaultValue(key_type)); + string value2_data = + cat(tag(2, value_wire_type), GetNonDefaultValue(value_type)); + + for (int is_proto3 = 0; is_proto3 < 2; is_proto3++) { + const FieldDescriptor* field = + GetFieldForMapType(key_type, value_type, is_proto3); + + { + // Tests map with default key and value. + string proto = + cat(tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(key1_data, value1_data))); + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(proto); + string text = test_message->DebugString(); + RunValidProtobufTest(StrCat("ValidDataMap", key_type_name, + value_type_name, ".Default"), + REQUIRED, proto, text, is_proto3); } - RunValidProtobufTest("ValidDataRepeated" + type_name, REQUIRED, + + { + // Tests map with missing default key and value. + string proto = + cat(tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim("")); + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(proto); + string text = test_message->DebugString(); + RunValidProtobufTest(StrCat("ValidDataMap", key_type_name, + value_type_name, ".MissingDefault"), + REQUIRED, proto, text, is_proto3); + } + + { + // Tests map with non-default key and value. + string proto = + cat(tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(key2_data, value2_data))); + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(proto); + string text = test_message->DebugString(); + RunValidProtobufTest(StrCat("ValidDataMap", key_type_name, + value_type_name, ".NonDefault"), + REQUIRED, proto, text, is_proto3); + } + + { + // Tests map with unordered key and value. + string proto = + cat(tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(value2_data, key2_data))); + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(proto); + string text = test_message->DebugString(); + RunValidProtobufTest(StrCat("ValidDataMap", key_type_name, + value_type_name, ".Unordered"), + REQUIRED, proto, text, is_proto3); + } + + { + // Tests map with duplicate key. + string proto1 = + cat(tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(key2_data, value1_data))); + string proto2 = + cat(tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(key2_data, value2_data))); + string proto = cat(proto1, proto2); + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(proto2); + string text = test_message->DebugString(); + RunValidProtobufTest(StrCat("ValidDataMap", key_type_name, + value_type_name, ".DuplicateKey"), + REQUIRED, proto, text, is_proto3); + } + + { + // Tests map with duplicate key in map entry. + string proto = + cat(tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(key1_data, key2_data, value2_data))); + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(proto); + string text = test_message->DebugString(); + RunValidProtobufTest( + StrCat("ValidDataMap", key_type_name, value_type_name, + ".DuplicateKeyInMapEntry"), + REQUIRED, proto, text, is_proto3); + } + + { + // Tests map with duplicate value in map entry. + string proto = + cat(tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(key2_data, value1_data, value2_data))); + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(proto); + string text = test_message->DebugString(); + RunValidProtobufTest( + StrCat("ValidDataMap", key_type_name, value_type_name, + ".DuplicateValueInMapEntry"), + REQUIRED, proto, text, is_proto3); + } + } +} + +void BinaryAndJsonConformanceSuite::TestOverwriteMessageValueMap() { + string key_data = + cat(tag(1, WireFormatLite::WIRETYPE_LENGTH_DELIMITED), delim("")); + string field1_data = cat(tag(1, WireFormatLite::WIRETYPE_VARINT), varint(1)); + string field2_data = cat(tag(2, WireFormatLite::WIRETYPE_VARINT), varint(1)); + string field31_data = + cat(tag(31, WireFormatLite::WIRETYPE_VARINT), varint(1)); + string submsg1_data = delim(cat(field1_data, field31_data)); + string submsg2_data = delim(cat(field2_data, field31_data)); + string value1_data = + cat(tag(2, WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(tag(2, WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + submsg1_data))); + string value2_data = + cat(tag(2, WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(tag(2, WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + submsg2_data))); + + for (int is_proto3 = 0; is_proto3 < 2; is_proto3++) { + const FieldDescriptor* field = GetFieldForMapType( + FieldDescriptor::TYPE_STRING, FieldDescriptor::TYPE_MESSAGE, is_proto3); + + string proto1 = + cat(tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(key_data, value1_data))); + string proto2 = + cat(tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(key_data, value2_data))); + string proto = cat(proto1, proto2); + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(proto2); + string text = test_message->DebugString(); + RunValidProtobufTest("ValidDataMap.STRING.MESSAGE.MergeValue", REQUIRED, proto, text, is_proto3); } } -// TODO: proto2? +void BinaryAndJsonConformanceSuite::TestValidDataForOneofType( + FieldDescriptor::Type type) { + const string type_name = + UpperCase(string(".") + FieldDescriptor::TypeName(type)); + WireFormatLite::WireType wire_type = WireFormatLite::WireTypeForFieldType( + static_cast(type)); + + for (int is_proto3 = 0; is_proto3 < 2; is_proto3++) { + const FieldDescriptor* field = GetFieldForOneofType(type, is_proto3); + const string default_value = + cat(tag(field->number(), wire_type), GetDefaultValue(type)); + const string non_default_value = + cat(tag(field->number(), wire_type), GetNonDefaultValue(type)); + + { + // Tests oneof with default value. + const string proto = default_value; + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(proto); + string text = test_message->DebugString(); + + RunValidProtobufTest( + StrCat("ValidDataOneof", type_name, ".DefaultValue"), REQUIRED, + proto, text, is_proto3); + RunValidBinaryProtobufTest( + StrCat("ValidDataOneofBinary", type_name, ".DefaultValue"), + RECOMMENDED, proto, proto, is_proto3); + } + + { + // Tests oneof with non-default value. + const string proto = non_default_value; + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(proto); + string text = test_message->DebugString(); + + RunValidProtobufTest( + StrCat("ValidDataOneof", type_name, ".NonDefaultValue"), + REQUIRED, proto, text, is_proto3); + RunValidBinaryProtobufTest( + StrCat("ValidDataOneofBinary", type_name, ".NonDefaultValue"), + RECOMMENDED, proto, proto, is_proto3); + } + + { + // Tests oneof with multiple values of the same field. + const string proto = StrCat(default_value, non_default_value); + const string expected_proto = non_default_value; + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(expected_proto); + string text = test_message->DebugString(); + + RunValidProtobufTest(StrCat("ValidDataOneof", type_name, + ".MultipleValuesForSameField"), + REQUIRED, proto, text, is_proto3); + RunValidBinaryProtobufTest(StrCat("ValidDataOneofBinary", type_name, + ".MultipleValuesForSameField"), + RECOMMENDED, proto, expected_proto, is_proto3); + } + + { + // Tests oneof with multiple values of the different fields. + const FieldDescriptor* other_field = + GetFieldForOneofType(type, is_proto3, true); + FieldDescriptor::Type other_type = other_field->type(); + WireFormatLite::WireType other_wire_type = + WireFormatLite::WireTypeForFieldType( + static_cast(other_type)); + const string other_value = + cat(tag(other_field->number(), other_wire_type), + GetDefaultValue(other_type)); + + const string proto = StrCat(other_value, non_default_value); + const string expected_proto = non_default_value; + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(expected_proto); + string text = test_message->DebugString(); + + RunValidProtobufTest(StrCat("ValidDataOneof", type_name, + ".MultipleValuesForDifferentField"), + REQUIRED, proto, text, is_proto3); + RunValidBinaryProtobufTest( + StrCat("ValidDataOneofBinary", type_name, + ".MultipleValuesForDifferentField"), + RECOMMENDED, proto, expected_proto, is_proto3); + } + } +} + +void BinaryAndJsonConformanceSuite::TestMergeOneofMessage() { + string field1_data = cat(tag(1, WireFormatLite::WIRETYPE_VARINT), varint(1)); + string field2a_data = cat(tag(2, WireFormatLite::WIRETYPE_VARINT), varint(1)); + string field2b_data = cat(tag(2, WireFormatLite::WIRETYPE_VARINT), varint(1)); + string field89_data = + cat(tag(89, WireFormatLite::WIRETYPE_VARINT), varint(1)); + string submsg1_data = + cat(tag(2, WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(field1_data, field2a_data, field89_data))); + string submsg2_data = cat(tag(2, WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(field2b_data, field89_data))); + string merged_data = + cat(tag(2, WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(cat(field1_data, field2b_data, field89_data, field89_data))); + + for (int is_proto3 = 0; is_proto3 < 2; is_proto3++) { + const FieldDescriptor* field = + GetFieldForOneofType(FieldDescriptor::TYPE_MESSAGE, is_proto3); + + string proto1 = + cat(tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(submsg1_data)); + string proto2 = + cat(tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(submsg2_data)); + string proto = cat(proto1, proto2); + string expected_proto = + cat(tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), + delim(merged_data)); + + std::unique_ptr test_message = NewTestMessage(is_proto3); + test_message->MergeFromString(expected_proto); + string text = test_message->DebugString(); + RunValidProtobufTest("ValidDataOneof.MESSAGE.Merge", REQUIRED, proto, text, + is_proto3); + RunValidBinaryProtobufTest("ValidDataOneofBinary.MESSAGE.Merge", + RECOMMENDED, proto, expected_proto, is_proto3); + } +} + void BinaryAndJsonConformanceSuite::TestIllegalTags() { // field num 0 is illegal string nullfield[] = { @@ -682,7 +1295,7 @@ void BinaryAndJsonConformanceSuite::TestUnknownMessage( void BinaryAndJsonConformanceSuite::RunSuiteImpl() { // Hack to get the list of test failures based on whether - // GOOGLE3_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER is enabled or not. + // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER is enabled or not. conformance::FailureSet failure_set; ConformanceRequest req; ConformanceResponse res; @@ -713,97 +1326,273 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { int32 kInt32Min = -2147483648; uint32 kUint32Max = 4294967295UL; - TestValidDataForType(FieldDescriptor::TYPE_DOUBLE, { - {dbl(0.1), "0.1"}, - {dbl(1.7976931348623157e+308), "1.7976931348623157e+308"}, - {dbl(2.22507385850720138309e-308), "2.22507385850720138309e-308"} - }); - TestValidDataForType(FieldDescriptor::TYPE_FLOAT, { - {flt(0.1), "0.1"}, - {flt(1.00000075e-36), "1.00000075e-36"}, - {flt(3.402823e+38), "3.402823e+38"}, // 3.40282347e+38 - {flt(1.17549435e-38f), "1.17549435e-38"} - }); - TestValidDataForType(FieldDescriptor::TYPE_INT64, { - {varint(12345), "12345"}, - {varint(kInt64Max), std::to_string(kInt64Max)}, - {varint(kInt64Min), std::to_string(kInt64Min)} - }); - TestValidDataForType(FieldDescriptor::TYPE_UINT64, { - {varint(12345), "12345"}, - {varint(kUint64Max), std::to_string(kUint64Max)}, - {varint(0), "0"} - }); - TestValidDataForType(FieldDescriptor::TYPE_INT32, { - {varint(12345), "12345"}, - {longvarint(12345, 2), "12345"}, - {longvarint(12345, 7), "12345"}, - {varint(kInt32Max), std::to_string(kInt32Max)}, - {varint(kInt32Min), std::to_string(kInt32Min)}, - {varint(1LL << 33), std::to_string(static_cast(1LL << 33))}, - {varint((1LL << 33) - 1), - std::to_string(static_cast((1LL << 33) - 1))}, - }); - TestValidDataForType(FieldDescriptor::TYPE_UINT32, { - {varint(12345), "12345"}, - {longvarint(12345, 2), "12345"}, - {longvarint(12345, 7), "12345"}, - {varint(kUint32Max), std::to_string(kUint32Max)}, // UINT32_MAX - {varint(0), "0"}, - {varint(1LL << 33), std::to_string(static_cast(1LL << 33))}, - {varint((1LL << 33) - 1), - std::to_string(static_cast((1LL << 33) - 1))}, - }); - TestValidDataForType(FieldDescriptor::TYPE_FIXED64, { - {u64(12345), "12345"}, - {u64(kUint64Max), std::to_string(kUint64Max)}, - {u64(0), "0"} - }); - TestValidDataForType(FieldDescriptor::TYPE_FIXED32, { - {u32(12345), "12345"}, - {u32(kUint32Max), std::to_string(kUint32Max)}, // UINT32_MAX - {u32(0), "0"} - }); - TestValidDataForType(FieldDescriptor::TYPE_SFIXED64, { - {u64(12345), "12345"}, - {u64(kInt64Max), std::to_string(kInt64Max)}, - {u64(kInt64Min), std::to_string(kInt64Min)} - }); - TestValidDataForType(FieldDescriptor::TYPE_SFIXED32, { - {u32(12345), "12345"}, - {u32(kInt32Max), std::to_string(kInt32Max)}, - {u32(kInt32Min), std::to_string(kInt32Min)} - }); - TestValidDataForType(FieldDescriptor::TYPE_BOOL, { - {varint(1), "true"}, - {varint(0), "false"}, - {varint(12345678), "true"} - }); - TestValidDataForType(FieldDescriptor::TYPE_SINT32, { - {zz32(12345), "12345"}, - {zz32(kInt32Max), std::to_string(kInt32Max)}, - {zz32(kInt32Min), std::to_string(kInt32Min)} - }); - TestValidDataForType(FieldDescriptor::TYPE_SINT64, { - {zz64(12345), "12345"}, - {zz64(kInt64Max), std::to_string(kInt64Max)}, - {zz64(kInt64Min), std::to_string(kInt64Min)} - }); + TestValidDataForType( + FieldDescriptor::TYPE_DOUBLE, + { + {dbl(0), dbl(0)}, + {dbl(0.1), dbl(0.1)}, + {dbl(1.7976931348623157e+308), dbl(1.7976931348623157e+308)}, + {dbl(2.22507385850720138309e-308), dbl(2.22507385850720138309e-308)}, + }); + TestValidDataForType( + FieldDescriptor::TYPE_FLOAT, + { + {flt(0), flt(0)}, + {flt(0.1), flt(0.1)}, + {flt(1.00000075e-36), flt(1.00000075e-36)}, + {flt(3.402823e+38), flt(3.402823e+38)}, // 3.40282347e+38 + {flt(1.17549435e-38f), flt(1.17549435e-38)}, + }); + TestValidDataForType(FieldDescriptor::TYPE_INT64, + { + {varint(0), varint(0)}, + {varint(12345), varint(12345)}, + {varint(kInt64Max), varint(kInt64Max)}, + {varint(kInt64Min), varint(kInt64Min)}, + }); + TestValidDataForType(FieldDescriptor::TYPE_UINT64, + { + {varint(0), varint(0)}, + {varint(12345), varint(12345)}, + {varint(kUint64Max), varint(kUint64Max)}, + }); + TestValidDataForType(FieldDescriptor::TYPE_INT32, + { + {varint(0), varint(0)}, + {varint(12345), varint(12345)}, + {longvarint(12345, 2), varint(12345)}, + {longvarint(12345, 7), varint(12345)}, + {varint(kInt32Max), varint(kInt32Max)}, + {varint(kInt32Min), varint(kInt32Min)}, + {varint(1LL << 33), varint(0)}, + {varint((1LL << 33) - 1), varint(-1)}, + {varint(kInt64Max), varint(-1)}, + {varint(kInt64Min + 1), varint(1)}, + }); + TestValidDataForType( + FieldDescriptor::TYPE_UINT32, + { + {varint(0), varint(0)}, + {varint(12345), varint(12345)}, + {longvarint(12345, 2), varint(12345)}, + {longvarint(12345, 7), varint(12345)}, + {varint(kUint32Max), varint(kUint32Max)}, // UINT32_MAX + {varint(1LL << 33), varint(0)}, + {varint((1LL << 33) + 1), varint(1)}, + {varint((1LL << 33) - 1), varint((1LL << 32) - 1)}, + {varint(kInt64Max), varint((1LL << 32) - 1)}, + {varint(kInt64Min + 1), varint(1)}, + }); + TestValidDataForType(FieldDescriptor::TYPE_FIXED64, + { + {u64(0), u64(0)}, + {u64(12345), u64(12345)}, + {u64(kUint64Max), u64(kUint64Max)}, + }); + TestValidDataForType(FieldDescriptor::TYPE_FIXED32, + { + {u32(0), u32(0)}, + {u32(12345), u32(12345)}, + {u32(kUint32Max), u32(kUint32Max)}, // UINT32_MAX + }); + TestValidDataForType(FieldDescriptor::TYPE_SFIXED64, + { + {u64(0), u64(0)}, + {u64(12345), u64(12345)}, + {u64(kInt64Max), u64(kInt64Max)}, + {u64(kInt64Min), u64(kInt64Min)}, + }); + TestValidDataForType(FieldDescriptor::TYPE_SFIXED32, + { + {u32(0), u32(0)}, + {u32(12345), u32(12345)}, + {u32(kInt32Max), u32(kInt32Max)}, + {u32(kInt32Min), u32(kInt32Min)}, + }); + // Bools should be serialized as 0 for false and 1 for true. Parsers should + // also interpret any nonzero value as true. + TestValidDataForType(FieldDescriptor::TYPE_BOOL, + { + {varint(0), varint(0)}, + {varint(1), varint(1)}, + {varint(-1), varint(1)}, + {varint(12345678), varint(1)}, + {varint(1LL << 33), varint(1)}, + {varint(kInt64Max), varint(1)}, + {varint(kInt64Min), varint(1)}, + }); + TestValidDataForType(FieldDescriptor::TYPE_SINT32, + { + {zz32(0), zz32(0)}, + {zz32(12345), zz32(12345)}, + {zz32(kInt32Max), zz32(kInt32Max)}, + {zz32(kInt32Min), zz32(kInt32Min)}, + {zz64(kInt32Max + 2LL), zz32(1)}, + }); + TestValidDataForType(FieldDescriptor::TYPE_SINT64, + { + {zz64(0), zz64(0)}, + {zz64(12345), zz64(12345)}, + {zz64(kInt64Max), zz64(kInt64Max)}, + {zz64(kInt64Min), zz64(kInt64Min)}, + }); + TestValidDataForType( + FieldDescriptor::TYPE_STRING, + { + {delim(""), delim("")}, + {delim("Hello world!"), delim("Hello world!")}, + {delim("\'\"\?\\\a\b\f\n\r\t\v"), + delim("\'\"\?\\\a\b\f\n\r\t\v")}, // escape + {delim("谷歌"), delim("谷歌")}, // Google in Chinese + {delim("\u8C37\u6B4C"), delim("谷歌")}, // unicode escape + {delim("\u8c37\u6b4c"), delim("谷歌")}, // lowercase unicode + {delim("\xF0\x9F\x98\x81"), delim("\xF0\x9F\x98\x81")}, // emoji: 😁 + }); + TestValidDataForType(FieldDescriptor::TYPE_BYTES, + { + {delim(""), delim("")}, + {delim("Hello world!"), delim("Hello world!")}, + {delim("\x01\x02"), delim("\x01\x02")}, + {delim("\xfb"), delim("\xfb")}, + }); + TestValidDataForType(FieldDescriptor::TYPE_ENUM, + { + {varint(0), varint(0)}, + {varint(1), varint(1)}, + {varint(2), varint(2)}, + {varint(-1), varint(-1)}, + {varint(kInt64Max), varint(-1)}, + {varint(kInt64Min + 1), varint(1)}, + }); + TestValidDataForRepeatedScalarMessage(); + TestValidDataForType( + FieldDescriptor::TYPE_MESSAGE, + { + {delim(""), delim("")}, + {delim(cat(tag(1, WireFormatLite::WIRETYPE_VARINT), varint(1234))), + delim(cat(tag(1, WireFormatLite::WIRETYPE_VARINT), varint(1234)))}, + }); + + TestValidDataForMapType(FieldDescriptor::TYPE_INT32, + FieldDescriptor::TYPE_INT32); + TestValidDataForMapType(FieldDescriptor::TYPE_INT64, + FieldDescriptor::TYPE_INT64); + TestValidDataForMapType(FieldDescriptor::TYPE_UINT32, + FieldDescriptor::TYPE_UINT32); + TestValidDataForMapType(FieldDescriptor::TYPE_UINT64, + FieldDescriptor::TYPE_UINT64); + TestValidDataForMapType(FieldDescriptor::TYPE_SINT32, + FieldDescriptor::TYPE_SINT32); + TestValidDataForMapType(FieldDescriptor::TYPE_SINT64, + FieldDescriptor::TYPE_SINT64); + TestValidDataForMapType(FieldDescriptor::TYPE_FIXED32, + FieldDescriptor::TYPE_FIXED32); + TestValidDataForMapType(FieldDescriptor::TYPE_FIXED64, + FieldDescriptor::TYPE_FIXED64); + TestValidDataForMapType(FieldDescriptor::TYPE_SFIXED32, + FieldDescriptor::TYPE_SFIXED32); + TestValidDataForMapType(FieldDescriptor::TYPE_SFIXED64, + FieldDescriptor::TYPE_SFIXED64); + TestValidDataForMapType(FieldDescriptor::TYPE_INT32, + FieldDescriptor::TYPE_FLOAT); + TestValidDataForMapType(FieldDescriptor::TYPE_INT32, + FieldDescriptor::TYPE_DOUBLE); + TestValidDataForMapType(FieldDescriptor::TYPE_BOOL, + FieldDescriptor::TYPE_BOOL); + TestValidDataForMapType(FieldDescriptor::TYPE_STRING, + FieldDescriptor::TYPE_STRING); + TestValidDataForMapType(FieldDescriptor::TYPE_STRING, + FieldDescriptor::TYPE_BYTES); + TestValidDataForMapType(FieldDescriptor::TYPE_STRING, + FieldDescriptor::TYPE_ENUM); + TestValidDataForMapType(FieldDescriptor::TYPE_STRING, + FieldDescriptor::TYPE_MESSAGE); + // Additional test to check overwriting message value map. + TestOverwriteMessageValueMap(); + + TestValidDataForOneofType(FieldDescriptor::TYPE_UINT32); + TestValidDataForOneofType(FieldDescriptor::TYPE_BOOL); + TestValidDataForOneofType(FieldDescriptor::TYPE_UINT64); + TestValidDataForOneofType(FieldDescriptor::TYPE_FLOAT); + TestValidDataForOneofType(FieldDescriptor::TYPE_DOUBLE); + TestValidDataForOneofType(FieldDescriptor::TYPE_STRING); + TestValidDataForOneofType(FieldDescriptor::TYPE_BYTES); + TestValidDataForOneofType(FieldDescriptor::TYPE_ENUM); + TestValidDataForOneofType(FieldDescriptor::TYPE_MESSAGE); + // Additional test to check merging oneof message. + TestMergeOneofMessage(); // TODO(haberman): - // TestValidDataForType(FieldDescriptor::TYPE_STRING // TestValidDataForType(FieldDescriptor::TYPE_GROUP - // TestValidDataForType(FieldDescriptor::TYPE_MESSAGE - // TestValidDataForType(FieldDescriptor::TYPE_BYTES - // TestValidDataForType(FieldDescriptor::TYPE_ENUM + // Unknown fields. + { + TestAllTypesProto3 messageProto3; + TestAllTypesProto2 messageProto2; + // TODO(yilunchong): update this behavior when unknown field's behavior + // changed in open source. Also delete + // Required.Proto3.ProtobufInput.UnknownVarint.ProtobufOutput + // from failure list of python_cpp python java + TestUnknownMessage(messageProto3, true); + TestUnknownMessage(messageProto2, false); + } + + RunJsonTests(); +} + +void BinaryAndJsonConformanceSuite::RunJsonTests() { RunValidJsonTest("HelloWorld", REQUIRED, "{\"optionalString\":\"Hello, World!\"}", "optional_string: 'Hello, World!'"); // NOTE: The spec for JSON support is still being sorted out, these may not // all be correct. - // Test field name conventions. + + RunJsonTestsForFieldNameConvention(); + RunJsonTestsForNonRepeatedTypes(); + RunJsonTestsForRepeatedTypes(); + RunJsonTestsForNullTypes(); + RunJsonTestsForWrapperTypes(); + RunJsonTestsForFieldMask(); + RunJsonTestsForStruct(); + RunJsonTestsForValue(); + RunJsonTestsForAny(); + + RunValidJsonIgnoreUnknownTest("IgnoreUnknownJsonNumber", REQUIRED, + R"({ + "unknown": 1 + })", + ""); + RunValidJsonIgnoreUnknownTest("IgnoreUnknownJsonString", REQUIRED, + R"({ + "unknown": "a" + })", + ""); + RunValidJsonIgnoreUnknownTest("IgnoreUnknownJsonTrue", REQUIRED, + R"({ + "unknown": true + })", + ""); + RunValidJsonIgnoreUnknownTest("IgnoreUnknownJsonFalse", REQUIRED, + R"({ + "unknown": false + })", + ""); + RunValidJsonIgnoreUnknownTest("IgnoreUnknownJsonNull", REQUIRED, + R"({ + "unknown": null + })", + ""); + RunValidJsonIgnoreUnknownTest("IgnoreUnknownJsonObject", REQUIRED, + R"({ + "unknown": {"a": 1} + })", + ""); + + ExpectParseFailureForJson("RejectTopLevelNull", REQUIRED, "null"); +} + +void BinaryAndJsonConformanceSuite::RunJsonTestsForFieldNameConvention() { RunValidJsonTest( "FieldNameInSnakeCase", REQUIRED, R"({ @@ -1058,7 +1847,9 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { value.isMember("fieldName17") && value.isMember("FieldName18"); }); +} +void BinaryAndJsonConformanceSuite::RunJsonTestsForNonRepeatedTypes() { // Integer fields. RunValidJsonTest( "Int32FieldMaxValue", REQUIRED, @@ -1182,7 +1973,7 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { ExpectParseFailureForJson( "Uint64FieldNotNumber", REQUIRED, R"({"optionalUint64": "3x3"})"); - // JSON does not allow "+" on numric values. + // JSON does not allow "+" on numeric values. ExpectParseFailureForJson( "Int32FieldPlusSign", REQUIRED, R"({"optionalInt32": +1})"); @@ -1289,7 +2080,7 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { "FloatFieldNegativeInfinity", REQUIRED, R"({"optionalFloat": "-Infinity"})", "optional_float: -inf"); - // Non-cannonical Nan will be correctly normalized. + // Non-canonical Nan will be correctly normalized. { TestAllTypesProto3 message; // IEEE floating-point standard 32-bit quiet NaN: @@ -1348,7 +2139,7 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { "DoubleFieldQuotedValue", REQUIRED, R"({"optionalDouble": "1"})", "optional_double: 1"); - // Speical values. + // Special values. RunValidJsonTest( "DoubleFieldNan", REQUIRED, R"({"optionalDouble": "NaN"})", @@ -1361,16 +2152,16 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { "DoubleFieldNegativeInfinity", REQUIRED, R"({"optionalDouble": "-Infinity"})", "optional_double: -inf"); - // Non-cannonical Nan will be correctly normalized. + // Non-canonical Nan will be correctly normalized. { TestAllTypesProto3 message; message.set_optional_double( - WireFormatLite::DecodeDouble(0x7FFA123456789ABCLL)); + WireFormatLite::DecodeDouble(int64{0x7FFA123456789ABC})); RunValidJsonTestWithProtobufInput( "DoubleFieldNormalizeQuietNan", REQUIRED, message, "optional_double: nan"); message.set_optional_double( - WireFormatLite::DecodeDouble(0xFFFBCBA987654321LL)); + WireFormatLite::DecodeDouble(uint64{0xFFFBCBA987654321})); RunValidJsonTestWithProtobufInput( "DoubleFieldNormalizeSignalingNan", REQUIRED, message, "optional_double: nan"); @@ -1543,71 +2334,6 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { "OneofZeroEnum", RECOMMENDED, R"({"oneofEnum":"FOO"})", "oneof_enum: FOO"); - // Repeated fields. - RunValidJsonTest( - "PrimitiveRepeatedField", REQUIRED, - R"({"repeatedInt32": [1, 2, 3, 4]})", - "repeated_int32: [1, 2, 3, 4]"); - RunValidJsonTest( - "EnumRepeatedField", REQUIRED, - R"({"repeatedNestedEnum": ["FOO", "BAR", "BAZ"]})", - "repeated_nested_enum: [FOO, BAR, BAZ]"); - RunValidJsonTest( - "StringRepeatedField", REQUIRED, - R"({"repeatedString": ["Hello", "world"]})", - R"(repeated_string: ["Hello", "world"])"); - RunValidJsonTest( - "BytesRepeatedField", REQUIRED, - R"({"repeatedBytes": ["AAEC", "AQI="]})", - R"(repeated_bytes: ["\x00\x01\x02", "\x01\x02"])"); - RunValidJsonTest( - "MessageRepeatedField", REQUIRED, - R"({"repeatedNestedMessage": [{"a": 1234}, {"a": 5678}]})", - "repeated_nested_message: {a: 1234}" - "repeated_nested_message: {a: 5678}"); - - // Repeated field elements are of incorrect type. - ExpectParseFailureForJson( - "RepeatedFieldWrongElementTypeExpectingIntegersGotBool", REQUIRED, - R"({"repeatedInt32": [1, false, 3, 4]})"); - ExpectParseFailureForJson( - "RepeatedFieldWrongElementTypeExpectingIntegersGotString", REQUIRED, - R"({"repeatedInt32": [1, 2, "name", 4]})"); - ExpectParseFailureForJson( - "RepeatedFieldWrongElementTypeExpectingIntegersGotMessage", REQUIRED, - R"({"repeatedInt32": [1, 2, 3, {"a": 4}]})"); - ExpectParseFailureForJson( - "RepeatedFieldWrongElementTypeExpectingStringsGotInt", REQUIRED, - R"({"repeatedString": ["1", 2, "3", "4"]})"); - ExpectParseFailureForJson( - "RepeatedFieldWrongElementTypeExpectingStringsGotBool", REQUIRED, - R"({"repeatedString": ["1", "2", false, "4"]})"); - ExpectParseFailureForJson( - "RepeatedFieldWrongElementTypeExpectingStringsGotMessage", REQUIRED, - R"({"repeatedString": ["1", 2, "3", {"a": 4}]})"); - ExpectParseFailureForJson( - "RepeatedFieldWrongElementTypeExpectingMessagesGotInt", REQUIRED, - R"({"repeatedNestedMessage": [{"a": 1}, 2]})"); - ExpectParseFailureForJson( - "RepeatedFieldWrongElementTypeExpectingMessagesGotBool", REQUIRED, - R"({"repeatedNestedMessage": [{"a": 1}, false]})"); - ExpectParseFailureForJson( - "RepeatedFieldWrongElementTypeExpectingMessagesGotString", REQUIRED, - R"({"repeatedNestedMessage": [{"a": 1}, "2"]})"); - // Trailing comma in the repeated field is not allowed. - ExpectParseFailureForJson( - "RepeatedFieldTrailingComma", RECOMMENDED, - R"({"repeatedInt32": [1, 2, 3, 4,]})"); - ExpectParseFailureForJson( - "RepeatedFieldTrailingCommaWithSpace", RECOMMENDED, - "{\"repeatedInt32\": [1, 2, 3, 4 ,]}"); - ExpectParseFailureForJson( - "RepeatedFieldTrailingCommaWithSpaceCommaSpace", RECOMMENDED, - "{\"repeatedInt32\": [1, 2, 3, 4 , ]}"); - ExpectParseFailureForJson( - "RepeatedFieldTrailingCommaWithNewlines", RECOMMENDED, - "{\"repeatedInt32\": [\n 1,\n 2,\n 3,\n 4,\n]}"); - // Map fields. RunValidJsonTest( "Int32MapField", REQUIRED, @@ -1681,6 +2407,77 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { R"({"mapBoolBool": {"tr\u0075e": true}})", "map_bool_bool: {key: true value: true}"); + // http://www.rfc-editor.org/rfc/rfc7159.txt says strings have to use double + // quotes. + ExpectParseFailureForJson("StringFieldSingleQuoteKey", RECOMMENDED, + R"({'optionalString': "Hello world!"})"); + ExpectParseFailureForJson("StringFieldSingleQuoteValue", RECOMMENDED, + R"({"optionalString": 'Hello world!'})"); + ExpectParseFailureForJson("StringFieldSingleQuoteBoth", RECOMMENDED, + R"({'optionalString': 'Hello world!'})"); +} + +void BinaryAndJsonConformanceSuite::RunJsonTestsForRepeatedTypes() { + // Repeated fields. + RunValidJsonTest("PrimitiveRepeatedField", REQUIRED, + R"({"repeatedInt32": [1, 2, 3, 4]})", + "repeated_int32: [1, 2, 3, 4]"); + RunValidJsonTest("EnumRepeatedField", REQUIRED, + R"({"repeatedNestedEnum": ["FOO", "BAR", "BAZ"]})", + "repeated_nested_enum: [FOO, BAR, BAZ]"); + RunValidJsonTest("StringRepeatedField", REQUIRED, + R"({"repeatedString": ["Hello", "world"]})", + R"(repeated_string: ["Hello", "world"])"); + RunValidJsonTest("BytesRepeatedField", REQUIRED, + R"({"repeatedBytes": ["AAEC", "AQI="]})", + R"(repeated_bytes: ["\x00\x01\x02", "\x01\x02"])"); + RunValidJsonTest("MessageRepeatedField", REQUIRED, + R"({"repeatedNestedMessage": [{"a": 1234}, {"a": 5678}]})", + "repeated_nested_message: {a: 1234}" + "repeated_nested_message: {a: 5678}"); + + // Repeated field elements are of incorrect type. + ExpectParseFailureForJson( + "RepeatedFieldWrongElementTypeExpectingIntegersGotBool", REQUIRED, + R"({"repeatedInt32": [1, false, 3, 4]})"); + ExpectParseFailureForJson( + "RepeatedFieldWrongElementTypeExpectingIntegersGotString", REQUIRED, + R"({"repeatedInt32": [1, 2, "name", 4]})"); + ExpectParseFailureForJson( + "RepeatedFieldWrongElementTypeExpectingIntegersGotMessage", REQUIRED, + R"({"repeatedInt32": [1, 2, 3, {"a": 4}]})"); + ExpectParseFailureForJson( + "RepeatedFieldWrongElementTypeExpectingStringsGotInt", REQUIRED, + R"({"repeatedString": ["1", 2, "3", "4"]})"); + ExpectParseFailureForJson( + "RepeatedFieldWrongElementTypeExpectingStringsGotBool", REQUIRED, + R"({"repeatedString": ["1", "2", false, "4"]})"); + ExpectParseFailureForJson( + "RepeatedFieldWrongElementTypeExpectingStringsGotMessage", REQUIRED, + R"({"repeatedString": ["1", 2, "3", {"a": 4}]})"); + ExpectParseFailureForJson( + "RepeatedFieldWrongElementTypeExpectingMessagesGotInt", REQUIRED, + R"({"repeatedNestedMessage": [{"a": 1}, 2]})"); + ExpectParseFailureForJson( + "RepeatedFieldWrongElementTypeExpectingMessagesGotBool", REQUIRED, + R"({"repeatedNestedMessage": [{"a": 1}, false]})"); + ExpectParseFailureForJson( + "RepeatedFieldWrongElementTypeExpectingMessagesGotString", REQUIRED, + R"({"repeatedNestedMessage": [{"a": 1}, "2"]})"); + // Trailing comma in the repeated field is not allowed. + ExpectParseFailureForJson("RepeatedFieldTrailingComma", RECOMMENDED, + R"({"repeatedInt32": [1, 2, 3, 4,]})"); + ExpectParseFailureForJson("RepeatedFieldTrailingCommaWithSpace", RECOMMENDED, + "{\"repeatedInt32\": [1, 2, 3, 4 ,]}"); + ExpectParseFailureForJson("RepeatedFieldTrailingCommaWithSpaceCommaSpace", + RECOMMENDED, + "{\"repeatedInt32\": [1, 2, 3, 4 , ]}"); + ExpectParseFailureForJson( + "RepeatedFieldTrailingCommaWithNewlines", RECOMMENDED, + "{\"repeatedInt32\": [\n 1,\n 2,\n 3,\n 4,\n]}"); +} + +void BinaryAndJsonConformanceSuite::RunJsonTestsForNullTypes() { // "null" is accepted for all fields types. RunValidJsonTest( "AllFieldAcceptNull", REQUIRED, @@ -1740,36 +2537,12 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { ExpectParseFailureForJson( "MapFieldValueIsNull", RECOMMENDED, R"({"mapInt32Int32": {"0": null}})"); +} - // http://www.rfc-editor.org/rfc/rfc7159.txt says strings have to use double - // quotes. - ExpectParseFailureForJson( - "StringFieldSingleQuoteKey", RECOMMENDED, - R"({'optionalString': "Hello world!"})"); - ExpectParseFailureForJson( - "StringFieldSingleQuoteValue", RECOMMENDED, - R"({"optionalString": 'Hello world!'})"); - ExpectParseFailureForJson( - "StringFieldSingleQuoteBoth", RECOMMENDED, - R"({'optionalString': 'Hello world!'})"); - - // Unknown fields. - { - TestAllTypesProto3 messageProto3; - TestAllTypesProto2 messageProto2; - //TODO(yilunchong): update this behavior when unknown field's behavior - // changed in open source. Also delete - // Required.Proto3.ProtobufInput.UnknownVarint.ProtobufOutput - // from failure list of python_cpp python java - TestUnknownMessage(messageProto3, true); - TestUnknownMessage(messageProto2, false); - } - - // Wrapper types. - RunValidJsonTest( - "OptionalBoolWrapper", REQUIRED, - R"({"optionalBoolWrapper": false})", - "optional_bool_wrapper: {value: false}"); +void BinaryAndJsonConformanceSuite::RunJsonTestsForWrapperTypes() { + RunValidJsonTest("OptionalBoolWrapper", REQUIRED, + R"({"optionalBoolWrapper": false})", + "optional_bool_wrapper: {value: false}"); RunValidJsonTest( "OptionalInt32Wrapper", REQUIRED, R"({"optionalInt32Wrapper": 0})", @@ -1978,14 +2751,15 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { })", "repeated_timestamp: {seconds: -62135596800}" "repeated_timestamp: {seconds: 253402300799 nanos: 999999999}"); - RunValidJsonTest( - "TimestampWithPositiveOffset", REQUIRED, - R"({"optionalTimestamp": "1970-01-01T08:00:00+08:00"})", - "optional_timestamp: {seconds: 0}"); - RunValidJsonTest( - "TimestampWithNegativeOffset", REQUIRED, - R"({"optionalTimestamp": "1969-12-31T16:00:00-08:00"})", - "optional_timestamp: {seconds: 0}"); + RunValidJsonTest("TimestampLeap", REQUIRED, + R"({"optionalTimestamp": "1993-02-10T00:00:00.000Z"})", + "optional_timestamp: {seconds: 729302400}"); + RunValidJsonTest("TimestampWithPositiveOffset", REQUIRED, + R"({"optionalTimestamp": "1970-01-01T08:00:01+08:00"})", + "optional_timestamp: {seconds: 1}"); + RunValidJsonTest("TimestampWithNegativeOffset", REQUIRED, + R"({"optionalTimestamp": "1969-12-31T16:00:01-08:00"})", + "optional_timestamp: {seconds: 1}"); RunValidJsonTest( "TimestampNull", REQUIRED, R"({"optionalTimestamp": null})", @@ -2019,39 +2793,38 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { "TimestampZeroNormalized", RECOMMENDED, R"({"optionalTimestamp": "1969-12-31T16:00:00-08:00"})", [](const Json::Value& value) { - return value["optionalTimestamp"].asString() == - "1970-01-01T00:00:00Z"; + return value["optionalTimestamp"].asString() == "1970-01-01T00:00:00Z"; }); RunValidJsonTestWithValidator( "TimestampHasZeroFractionalDigit", RECOMMENDED, R"({"optionalTimestamp": "1970-01-01T00:00:00.000000000Z"})", [](const Json::Value& value) { - return value["optionalTimestamp"].asString() == - "1970-01-01T00:00:00Z"; + return value["optionalTimestamp"].asString() == "1970-01-01T00:00:00Z"; }); RunValidJsonTestWithValidator( "TimestampHas3FractionalDigits", RECOMMENDED, R"({"optionalTimestamp": "1970-01-01T00:00:00.010000000Z"})", [](const Json::Value& value) { return value["optionalTimestamp"].asString() == - "1970-01-01T00:00:00.010Z"; + "1970-01-01T00:00:00.010Z"; }); RunValidJsonTestWithValidator( "TimestampHas6FractionalDigits", RECOMMENDED, R"({"optionalTimestamp": "1970-01-01T00:00:00.000010000Z"})", [](const Json::Value& value) { return value["optionalTimestamp"].asString() == - "1970-01-01T00:00:00.000010Z"; + "1970-01-01T00:00:00.000010Z"; }); RunValidJsonTestWithValidator( "TimestampHas9FractionalDigits", RECOMMENDED, R"({"optionalTimestamp": "1970-01-01T00:00:00.000000010Z"})", [](const Json::Value& value) { return value["optionalTimestamp"].asString() == - "1970-01-01T00:00:00.000000010Z"; + "1970-01-01T00:00:00.000000010Z"; }); +} - // FieldMask +void BinaryAndJsonConformanceSuite::RunJsonTestsForFieldMask() { RunValidJsonTest( "FieldMask", REQUIRED, R"({"optionalFieldMask": "foo,barBaz"})", @@ -2072,8 +2845,9 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { ExpectSerializeFailureForJson( "FieldMaskTooManyUnderscore", RECOMMENDED, R"(optional_field_mask: {paths: "foo__bar"})"); +} - // Struct +void BinaryAndJsonConformanceSuite::RunJsonTestsForStruct() { RunValidJsonTest( "Struct", REQUIRED, R"({ @@ -2157,7 +2931,9 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { } } )"); - // Value +} + +void BinaryAndJsonConformanceSuite::RunJsonTestsForValue() { RunValidJsonTest( "ValueAcceptInteger", REQUIRED, R"({"optionalValue": 1})", @@ -2238,8 +3014,9 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { } ] )"); +} - // Any +void BinaryAndJsonConformanceSuite::RunJsonTestsForAny() { RunValidJsonTest( "Any", REQUIRED, R"({ @@ -2415,43 +3192,6 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { } } )"); - - RunValidJsonIgnoreUnknownTest( - "IgnoreUnknownJsonNumber", REQUIRED, - R"({ - "unknown": 1 - })", - ""); - RunValidJsonIgnoreUnknownTest( - "IgnoreUnknownJsonString", REQUIRED, - R"({ - "unknown": "a" - })", - ""); - RunValidJsonIgnoreUnknownTest( - "IgnoreUnknownJsonTrue", REQUIRED, - R"({ - "unknown": true - })", - ""); - RunValidJsonIgnoreUnknownTest( - "IgnoreUnknownJsonFalse", REQUIRED, - R"({ - "unknown": false - })", - ""); - RunValidJsonIgnoreUnknownTest( - "IgnoreUnknownJsonNull", REQUIRED, - R"({ - "unknown": null - })", - ""); - RunValidJsonIgnoreUnknownTest( - "IgnoreUnknownJsonObject", REQUIRED, - R"({ - "unknown": {"a": 1} - })", - ""); } } // namespace protobuf diff --git a/third_party/protobuf/conformance/binary_json_conformance_suite.h b/third_party/protobuf/conformance/binary_json_conformance_suite.h index 7a03545f..fb3f5714 100644 --- a/third_party/protobuf/conformance/binary_json_conformance_suite.h +++ b/third_party/protobuf/conformance/binary_json_conformance_suite.h @@ -31,8 +31,8 @@ #ifndef CONFORMANCE_BINARY_JSON_CONFORMANCE_SUITE_H #define CONFORMANCE_BINARY_JSON_CONFORMANCE_SUITE_H -#include "conformance_test.h" #include "third_party/jsoncpp/json.h" +#include "conformance_test.h" namespace google { namespace protobuf { @@ -43,30 +43,44 @@ class BinaryAndJsonConformanceSuite : public ConformanceTestSuite { private: void RunSuiteImpl(); - void RunValidJsonTest(const string& test_name, - ConformanceLevel level, - const string& input_json, - const string& equivalent_text_format); + void RunJsonTests(); + void RunJsonTestsForFieldNameConvention(); + void RunJsonTestsForNonRepeatedTypes(); + void RunJsonTestsForRepeatedTypes(); + void RunJsonTestsForNullTypes(); + void RunJsonTestsForWrapperTypes(); + void RunJsonTestsForFieldMask(); + void RunJsonTestsForStruct(); + void RunJsonTestsForValue(); + void RunJsonTestsForAny(); + void RunValidJsonTest(const std::string& test_name, ConformanceLevel level, + const std::string& input_json, + const std::string& equivalent_text_format); void RunValidJsonTestWithProtobufInput( - const string& test_name, - ConformanceLevel level, + const std::string& test_name, ConformanceLevel level, const protobuf_test_messages::proto3::TestAllTypesProto3& input, - const string& equivalent_text_format); - void RunValidJsonIgnoreUnknownTest( - const string& test_name, ConformanceLevel level, const string& input_json, - const string& equivalent_text_format); - void RunValidProtobufTest(const string& test_name, ConformanceLevel level, - const string& input_protobuf, - const string& equivalent_text_format, + const std::string& equivalent_text_format); + void RunValidJsonIgnoreUnknownTest(const std::string& test_name, + ConformanceLevel level, + const std::string& input_json, + const std::string& equivalent_text_format); + void RunValidProtobufTest(const std::string& test_name, + ConformanceLevel level, + const std::string& input_protobuf, + const std::string& equivalent_text_format, bool is_proto3); - void RunValidBinaryProtobufTest(const string& test_name, + void RunValidBinaryProtobufTest(const std::string& test_name, ConformanceLevel level, - const string& input_protobuf, + const std::string& input_protobuf, + bool is_proto3); + void RunValidBinaryProtobufTest(const std::string& test_name, + ConformanceLevel level, + const std::string& input_protobuf, + const std::string& expected_protobuf, bool is_proto3); void RunValidProtobufTestWithMessage( - const string& test_name, ConformanceLevel level, - const Message *input, - const string& equivalent_text_format, + const std::string& test_name, ConformanceLevel level, + const Message* input, const std::string& equivalent_text_format, bool is_proto3); bool ParseJsonResponse( @@ -78,20 +92,20 @@ class BinaryAndJsonConformanceSuite : public ConformanceTestSuite { Message* test_message) override; typedef std::function Validator; - void RunValidJsonTestWithValidator(const string& test_name, + void RunValidJsonTestWithValidator(const std::string& test_name, ConformanceLevel level, - const string& input_json, + const std::string& input_json, const Validator& validator); - void ExpectParseFailureForJson(const string& test_name, + void ExpectParseFailureForJson(const std::string& test_name, ConformanceLevel level, - const string& input_json); - void ExpectSerializeFailureForJson(const string& test_name, + const std::string& input_json); + void ExpectSerializeFailureForJson(const std::string& test_name, ConformanceLevel level, - const string& text_format); - void ExpectParseFailureForProtoWithProtoVersion (const string& proto, - const string& test_name, - ConformanceLevel level, - bool is_proto3); + const std::string& text_format); + void ExpectParseFailureForProtoWithProtoVersion(const std::string& proto, + const std::string& test_name, + ConformanceLevel level, + bool is_proto3); void ExpectParseFailureForProto(const std::string& proto, const std::string& test_name, ConformanceLevel level); @@ -109,9 +123,14 @@ class BinaryAndJsonConformanceSuite : public ConformanceTestSuite { void TestValidDataForType( google::protobuf::FieldDescriptor::Type, std::vector> values); + void TestValidDataForRepeatedScalarMessage(); + void TestValidDataForMapType(google::protobuf::FieldDescriptor::Type, + google::protobuf::FieldDescriptor::Type); + void TestValidDataForOneofType(google::protobuf::FieldDescriptor::Type); + void TestMergeOneofMessage(); + void TestOverwriteMessageValueMap(); - std::unique_ptr - type_resolver_; + std::unique_ptr type_resolver_; std::string type_url_; }; diff --git a/third_party/protobuf/conformance/conformance.proto b/third_party/protobuf/conformance/conformance.proto index 54da406c..26c0bd26 100644 --- a/third_party/protobuf/conformance/conformance.proto +++ b/third_party/protobuf/conformance/conformance.proto @@ -113,7 +113,7 @@ message ConformanceRequest { string message_type = 4; // Each test is given a specific test category. Some category may need - // spedific support in testee programs. Refer to the defintion of TestCategory + // spedific support in testee programs. Refer to the definition of TestCategory // for more information. TestCategory test_category = 5; @@ -170,7 +170,7 @@ message ConformanceResponse { // Encoding options for jspb format. message JspbEncodingConfig { - // Encode the value field of Any as jspb array if ture, otherwise binary. + // Encode the value field of Any as jspb array if true, otherwise binary. bool use_jspb_array_any_format = 1; } diff --git a/third_party/protobuf/conformance/conformance_cpp.cc b/third_party/protobuf/conformance/conformance_cpp.cc index 5a1f2140..1cdfdae4 100644 --- a/third_party/protobuf/conformance/conformance_cpp.cc +++ b/third_party/protobuf/conformance/conformance_cpp.cc @@ -32,13 +32,14 @@ #include #include -#include "conformance.pb.h" -#include -#include #include #include #include #include +#include "conformance.pb.h" +#include +#include +#include using conformance::ConformanceRequest; using conformance::ConformanceResponse; @@ -51,41 +52,13 @@ using google::protobuf::util::BinaryToJsonString; using google::protobuf::util::JsonParseOptions; using google::protobuf::util::JsonToBinaryString; using google::protobuf::util::NewTypeResolverForDescriptorPool; -using google::protobuf::util::Status; using google::protobuf::util::TypeResolver; -using protobuf_test_messages::proto2::TestAllTypesProto2; using protobuf_test_messages::proto3::TestAllTypesProto3; using std::string; static const char kTypeUrlPrefix[] = "type.googleapis.com"; const char* kFailures[] = { -#if !GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - "Required.Proto2.ProtobufInput." - "PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE", - "Required.Proto2.ProtobufInput." - "PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE", - "Required.Proto2.ProtobufInput.PrematureEofInPackedField.BOOL", - "Required.Proto2.ProtobufInput.PrematureEofInPackedField.ENUM", - "Required.Proto2.ProtobufInput.PrematureEofInPackedField.INT32", - "Required.Proto2.ProtobufInput.PrematureEofInPackedField.INT64", - "Required.Proto2.ProtobufInput.PrematureEofInPackedField.SINT32", - "Required.Proto2.ProtobufInput.PrematureEofInPackedField.SINT64", - "Required.Proto2.ProtobufInput.PrematureEofInPackedField.UINT32", - "Required.Proto2.ProtobufInput.PrematureEofInPackedField.UINT64", - "Required.Proto3.ProtobufInput." - "PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE", - "Required.Proto3.ProtobufInput." - "PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE", - "Required.Proto3.ProtobufInput.PrematureEofInPackedField.BOOL", - "Required.Proto3.ProtobufInput.PrematureEofInPackedField.ENUM", - "Required.Proto3.ProtobufInput.PrematureEofInPackedField.INT32", - "Required.Proto3.ProtobufInput.PrematureEofInPackedField.INT64", - "Required.Proto3.ProtobufInput.PrematureEofInPackedField.SINT32", - "Required.Proto3.ProtobufInput.PrematureEofInPackedField.SINT64", - "Required.Proto3.ProtobufInput.PrematureEofInPackedField.UINT32", - "Required.Proto3.ProtobufInput.PrematureEofInPackedField.UINT64", -#endif }; static string GetTypeUrl(const Descriptor* message) { @@ -97,6 +70,10 @@ bool verbose = false; TypeResolver* type_resolver; string* type_url; +namespace google { +namespace protobuf { + +using util::Status; bool CheckedRead(int fd, void *buf, size_t len) { size_t ofs = 0; @@ -106,7 +83,7 @@ bool CheckedRead(int fd, void *buf, size_t len) { if (bytes_read == 0) return false; if (bytes_read < 0) { - GOOGLE_LOG(FATAL) << "Error reading from test runner: " << strerror(errno); + GOOGLE_LOG(FATAL) << "Error reading from test runner: " << strerror(errno); } len -= bytes_read; @@ -153,7 +130,7 @@ void DoTest(const ConformanceRequest& request, ConformanceResponse* response) { options); if (!status.ok()) { response->set_parse_error(string("Parse error: ") + - status.error_message().as_string()); + std::string(status.error_message())); return; } @@ -178,8 +155,7 @@ void DoTest(const ConformanceRequest& request, ConformanceResponse* response) { break; default: - GOOGLE_LOG(FATAL) << "unknown payload type: " - << request.payload_case(); + GOOGLE_LOG(FATAL) << "unknown payload type: " << request.payload_case(); break; } @@ -195,7 +171,8 @@ void DoTest(const ConformanceRequest& request, ConformanceResponse* response) { break; case conformance::PROTOBUF: { - GOOGLE_CHECK(test_message->SerializeToString(response->mutable_protobuf_payload())); + GOOGLE_CHECK(test_message->SerializeToString( + response->mutable_protobuf_payload())); break; } @@ -207,7 +184,7 @@ void DoTest(const ConformanceRequest& request, ConformanceResponse* response) { if (!status.ok()) { response->set_serialize_error( string("Failed to serialize JSON output: ") + - status.error_message().as_string()); + std::string(status.error_message())); return; } break; @@ -217,13 +194,13 @@ void DoTest(const ConformanceRequest& request, ConformanceResponse* response) { TextFormat::Printer printer; printer.SetHideUnknownFields(!request.print_unknown_fields()); GOOGLE_CHECK(printer.PrintToString(*test_message, - response->mutable_text_payload())); + response->mutable_text_payload())); break; } default: GOOGLE_LOG(FATAL) << "Unknown output format: " - << request.requested_output_format(); + << request.requested_output_format(); } } @@ -269,12 +246,15 @@ bool DoTestIo() { return true; } +} // namespace protobuf +} // namespace google + int main() { type_resolver = NewTypeResolverForDescriptorPool( kTypeUrlPrefix, DescriptorPool::generated_pool()); type_url = new string(GetTypeUrl(TestAllTypesProto3::descriptor())); while (1) { - if (!DoTestIo()) { + if (!google::protobuf::DoTestIo()) { fprintf(stderr, "conformance-cpp: received EOF from test runner " "after %d tests, exiting\n", test_count); return 0; diff --git a/third_party/protobuf/conformance/conformance_objc.m b/third_party/protobuf/conformance/conformance_objc.m index 60b2ac59..ab751c81 100644 --- a/third_party/protobuf/conformance/conformance_objc.m +++ b/third_party/protobuf/conformance/conformance_objc.m @@ -68,7 +68,8 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) { switch (request.payloadOneOfCase) { case ConformanceRequest_Payload_OneOfCase_GPBUnsetOneOfCase: - Die(@"Request didn't have a payload: %@", request); + response.runtimeError = + [NSString stringWithFormat:@"Request didn't have a payload: %@", request]; break; case ConformanceRequest_Payload_OneOfCase_ProtobufPayload: { @@ -78,7 +79,10 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) { } else if ([request.messageType isEqual:@"protobuf_test_messages.proto2.TestAllTypesProto2"]) { msgClass = [TestAllTypesProto2 class]; } else { - Die(@"Protobuf request had an unknown message_type: %@", request.messageType); + response.runtimeError = + [NSString stringWithFormat:@"Protobuf request had an unknown message_type: %@", + request.messageType]; + break; } NSError *error = nil; testMessage = [msgClass parseFromData:request.protobufPayload error:&error]; @@ -108,7 +112,8 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) { switch (request.requestedOutputFormat) { case WireFormat_GPBUnrecognizedEnumeratorValue: case WireFormat_Unspecified: - Die(@"Unrecognized/unspecified output format: %@", request); + response.runtimeError = + [NSString stringWithFormat:@"Unrecognized/unspecified output format: %@", request]; break; case WireFormat_Protobuf: diff --git a/third_party/protobuf/conformance/conformance_php.php b/third_party/protobuf/conformance/conformance_php.php old mode 100755 new mode 100644 diff --git a/third_party/protobuf/conformance/conformance_python.py b/third_party/protobuf/conformance/conformance_python.py index 88d97493..37ee36e2 100755 --- a/third_party/protobuf/conformance/conformance_python.py +++ b/third_party/protobuf/conformance/conformance_python.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ @@ -38,8 +37,6 @@ See conformance.proto for more information. import struct import sys import os -from google.protobuf import descriptor -from google.protobuf import descriptor_pool from google.protobuf import json_format from google.protobuf import message from google.protobuf import test_messages_proto3_pb2 diff --git a/third_party/protobuf/conformance/conformance_test.cc b/third_party/protobuf/conformance/conformance_test.cc index 6325b354..07b41506 100644 --- a/third_party/protobuf/conformance/conformance_test.cc +++ b/third_party/protobuf/conformance/conformance_test.cc @@ -28,32 +28,49 @@ // (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 -#include -#include -#include - -#include "conformance.pb.h" #include "conformance_test.h" +#include + +#include +#include +#include + #include -#include #include #include #include #include #include +#include "conformance.pb.h" using conformance::ConformanceRequest; using conformance::ConformanceResponse; using conformance::WireFormat; using google::protobuf::TextFormat; using google::protobuf::util::DefaultFieldComparator; -using google::protobuf::util::JsonToBinaryString; using google::protobuf::util::MessageDifferencer; -using google::protobuf::util::Status; using std::string; +namespace { + +static string ToOctString(const string& binary_string) { + string oct_string; + for (size_t i = 0; i < binary_string.size(); i++) { + uint8_t c = binary_string.at(i); + uint8_t high = c / 64; + uint8_t mid = (c % 64) / 8; + uint8_t low = c % 8; + oct_string.push_back('\\'); + oct_string.push_back('0' + high); + oct_string.push_back('0' + mid); + oct_string.push_back('0' + low); + } + return oct_string; +} + +} // namespace + namespace google { namespace protobuf { @@ -101,9 +118,9 @@ ConformanceTestSuite::ConformanceRequestSetting::ConformanceRequestSetting( request_.set_requested_output_format(output_format); } -Message* ConformanceTestSuite::ConformanceRequestSetting:: - GetTestMessage() const { - return prototype_message_for_compare_->New(); +std::unique_ptr +ConformanceTestSuite::ConformanceRequestSetting::NewTestMessage() const { + return std::unique_ptr(prototype_message_for_compare_->New()); } string ConformanceTestSuite::ConformanceRequestSetting:: @@ -112,11 +129,9 @@ string ConformanceTestSuite::ConformanceRequestSetting:: prototype_message_.GetDescriptor()->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 ? "Proto3" : "Proto2"; - return StrCat(ConformanceLevelToString(level_), ".", - rname, ".", - InputFormatString(input_format_), - ".", test_name_, ".", - OutputFormatString(output_format_)); + return StrCat(ConformanceLevelToString(level_), ".", rname, ".", + InputFormatString(input_format_), ".", test_name_, ".", + OutputFormatString(output_format_)); } string ConformanceTestSuite::ConformanceRequestSetting:: @@ -209,38 +224,37 @@ void ConformanceTestSuite::ReportSkip(const string& test_name, void ConformanceTestSuite::RunValidInputTest( const ConformanceRequestSetting& setting, const string& equivalent_text_format) { - Message* reference_message = setting.GetTestMessage(); - GOOGLE_CHECK( - TextFormat::ParseFromString(equivalent_text_format, reference_message)) - << "Failed to parse data for test case: " << setting.GetTestName() - << ", data: " << equivalent_text_format; + std::unique_ptr reference_message(setting.NewTestMessage()); + GOOGLE_CHECK(TextFormat::ParseFromString(equivalent_text_format, + reference_message.get())) + << "Failed to parse data for test case: " << setting.GetTestName() + << ", data: " << equivalent_text_format; const string equivalent_wire_format = reference_message->SerializeAsString(); RunValidBinaryInputTest(setting, equivalent_wire_format); } void ConformanceTestSuite::RunValidBinaryInputTest( const ConformanceRequestSetting& setting, - const string& equivalent_wire_format) { + const string& equivalent_wire_format, bool require_same_wire_format) { const ConformanceRequest& request = setting.GetRequest(); ConformanceResponse response; RunTest(setting.GetTestName(), request, &response); - VerifyResponse(setting, equivalent_wire_format, response, true); + VerifyResponse(setting, equivalent_wire_format, response, true, + require_same_wire_format); } void ConformanceTestSuite::VerifyResponse( const ConformanceRequestSetting& setting, - const string& equivalent_wire_format, - const ConformanceResponse& response, - bool need_report_success) { - Message* test_message = setting.GetTestMessage(); + const string& equivalent_wire_format, const ConformanceResponse& response, + bool need_report_success, bool require_same_wire_format) { + std::unique_ptr test_message(setting.NewTestMessage()); const ConformanceRequest& request = setting.GetRequest(); const string& test_name = setting.GetTestName(); ConformanceLevel level = setting.GetLevel(); - Message* reference_message = setting.GetTestMessage(); + std::unique_ptr reference_message = setting.NewTestMessage(); - GOOGLE_CHECK( - reference_message->ParseFromString(equivalent_wire_format)) - << "Failed to parse wire data for test case: " << test_name; + GOOGLE_CHECK(reference_message->ParseFromString(equivalent_wire_format)) + << "Failed to parse wire data for test case: " << test_name; switch (response.result_case()) { case ConformanceResponse::RESULT_NOT_SET: @@ -260,7 +274,7 @@ void ConformanceTestSuite::VerifyResponse( return; default: - if (!ParseResponse(response, setting, test_message)) return; + if (!ParseResponse(response, setting, test_message.get())) return; } MessageDifferencer differencer; @@ -270,8 +284,18 @@ void ConformanceTestSuite::VerifyResponse( string differences; differencer.ReportDifferencesToString(&differences); - bool check; - check = differencer.Compare(*reference_message, *test_message); + bool check = false; + + if (require_same_wire_format) { + GOOGLE_DCHECK_EQ(response.result_case(), ConformanceResponse::kProtobufPayload); + const string& protobuf_payload = response.protobuf_payload(); + check = equivalent_wire_format == protobuf_payload; + differences = StrCat("Expect: ", ToOctString(equivalent_wire_format), + ", but got: ", ToOctString(protobuf_payload)); + } else { + check = differencer.Compare(*reference_message, *test_message); + } + if (check) { if (need_report_success) { ReportSuccess(test_name); @@ -356,8 +380,7 @@ string ConformanceTestSuite::WireFormatToString( case conformance::UNSPECIFIED: return "UNSPECIFIED"; default: - GOOGLE_LOG(FATAL) << "unknown wire type: " - << wire_format; + GOOGLE_LOG(FATAL) << "unknown wire type: " << wire_format; } return ""; } @@ -420,8 +443,8 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, } StringAppendF(&output_, - "CONFORMANCE SUITE %s: %d successes, %d skipped, " - "%d expected failures, %d unexpected failures.\n", + "CONFORMANCE SUITE %s: %d successes, %zu skipped, " + "%d expected failures, %zu unexpected failures.\n", ok ? "PASSED" : "FAILED", successes_, skipped_.size(), expected_failures_, unexpected_failing_tests_.size()); StringAppendF(&output_, "\n"); diff --git a/third_party/protobuf/conformance/conformance_test.h b/third_party/protobuf/conformance/conformance_test.h index 4d741e7f..76bd1bc3 100644 --- a/third_party/protobuf/conformance/conformance_test.h +++ b/third_party/protobuf/conformance/conformance_test.h @@ -40,12 +40,11 @@ #include #include +#include #include -#include -#include #include - +#include #include "conformance.pb.h" namespace conformance { @@ -88,7 +87,13 @@ class ForkPipeRunner : public ConformanceTestRunner { static int Run(int argc, char *argv[], const std::vector& suites); - ForkPipeRunner(const std::string &executable) + ForkPipeRunner(const std::string& executable, + const std::vector& executable_args) + : child_pid_(-1), + executable_(executable), + executable_args_(executable_args) {} + + explicit ForkPipeRunner(const std::string& executable) : child_pid_(-1), executable_(executable) {} virtual ~ForkPipeRunner() {} @@ -108,6 +113,7 @@ class ForkPipeRunner : public ConformanceTestRunner { int read_fd_; pid_t child_pid_; std::string executable_; + const std::vector executable_args_; std::string current_test_name_; }; @@ -162,9 +168,7 @@ class ConformanceTestSuite { // Gets the flag name to the failure list file. // By default, this would return --failure_list - string GetFailureListFlagName() { - return failure_list_flag_name_; - } + std::string GetFailureListFlagName() { return failure_list_flag_name_; } void SetFailureListFlagName(const std::string& failure_list_flag_name) { failure_list_flag_name_ = failure_list_flag_name; @@ -185,7 +189,7 @@ class ConformanceTestSuite { // Test cases are classified into a few categories: // REQUIRED: the test case must be passed for an implementation to be // interoperable with other implementations. For example, a - // parser implementaiton must accept both packed and unpacked + // parser implementation must accept both packed and unpacked // form of repeated primitive fields. // RECOMMENDED: the test case is not required for the implementation to // be interoperable with other implementations, but is @@ -201,18 +205,18 @@ class ConformanceTestSuite { class ConformanceRequestSetting { public: - ConformanceRequestSetting( - ConformanceLevel level, - conformance::WireFormat input_format, - conformance::WireFormat output_format, - conformance::TestCategory test_category, - const Message& prototype_message, - const string& test_name, const string& input); + ConformanceRequestSetting(ConformanceLevel level, + conformance::WireFormat input_format, + conformance::WireFormat output_format, + conformance::TestCategory test_category, + const Message& prototype_message, + const std::string& test_name, + const std::string& input); virtual ~ConformanceRequestSetting() {} - Message* GetTestMessage() const; + std::unique_ptr NewTestMessage() const; - string GetTestName() const; + std::string GetTestName() const; const conformance::ConformanceRequest& GetRequest() const { return request_; @@ -222,7 +226,7 @@ class ConformanceTestSuite { return level_; } - string ConformanceLevelToString(ConformanceLevel level) const; + std::string ConformanceLevelToString(ConformanceLevel level) const; void SetPrintUnknownFields(bool print_unknown_fields) { request_.set_print_unknown_fields(true); @@ -233,8 +237,9 @@ class ConformanceTestSuite { } protected: - virtual string InputFormatString(conformance::WireFormat format) const; - virtual string OutputFormatString(conformance::WireFormat format) const; + virtual std::string InputFormatString(conformance::WireFormat format) const; + virtual std::string OutputFormatString( + conformance::WireFormat format) const; conformance::ConformanceRequest request_; private: @@ -243,12 +248,12 @@ class ConformanceTestSuite { ::conformance::WireFormat output_format_; const Message& prototype_message_; std::unique_ptr prototype_message_for_compare_; - string test_name_; + std::string test_name_; }; - bool CheckSetEmpty(const std::set& set_to_check, + bool CheckSetEmpty(const std::set& set_to_check, const std::string& write_to_file, const std::string& msg); - string WireFormatToString(conformance::WireFormat wire_format); + std::string WireFormatToString(conformance::WireFormat wire_format); // Parse payload in the response to the given message. Returns true on // success. @@ -257,26 +262,25 @@ class ConformanceTestSuite { const ConformanceRequestSetting& setting, Message* test_message) = 0; - void VerifyResponse( - const ConformanceRequestSetting& setting, - const string& equivalent_wire_format, - const conformance::ConformanceResponse& response, - bool need_report_success); + void VerifyResponse(const ConformanceRequestSetting& setting, + const std::string& equivalent_wire_format, + const conformance::ConformanceResponse& response, + bool need_report_success, bool require_same_wire_format); void ReportSuccess(const std::string& test_name); - void ReportFailure(const string& test_name, - ConformanceLevel level, + void ReportFailure(const std::string& test_name, ConformanceLevel level, const conformance::ConformanceRequest& request, const conformance::ConformanceResponse& response, const char* fmt, ...); - void ReportSkip(const string& test_name, + void ReportSkip(const std::string& test_name, const conformance::ConformanceRequest& request, const conformance::ConformanceResponse& response); void RunValidInputTest(const ConformanceRequestSetting& setting, - const string& equivalent_text_format); + const std::string& equivalent_text_format); void RunValidBinaryInputTest(const ConformanceRequestSetting& setting, - const string& equivalent_wire_format); + const std::string& equivalent_wire_format, + bool require_same_wire_format = false); void RunTest(const std::string& test_name, const conformance::ConformanceRequest& request, diff --git a/third_party/protobuf/conformance/conformance_test_runner.cc b/third_party/protobuf/conformance/conformance_test_runner.cc index e7aa0a55..9f893cb8 100644 --- a/third_party/protobuf/conformance/conformance_test_runner.cc +++ b/third_party/protobuf/conformance/conformance_test_runner.cc @@ -53,28 +53,27 @@ // 3. testee sends 4-byte length M (little endian) // 4. testee sends M bytes representing a ConformanceResponse proto -#include #include -#include #include #include #include + +#include +#include #include #include - #include "conformance.pb.h" #include "conformance_test.h" using conformance::ConformanceResponse; -using google::protobuf::StringAppendF; using google::protobuf::ConformanceTestSuite; using std::string; using std::vector; #define STRINGIFY(x) #x #define TOSTRING(x) STRINGIFY(x) -#define CHECK_SYSCALL(call) \ +#define GOOGLE_CHECK_SYSCALL(call) \ if (call < 0) { \ perror(#call " " __FILE__ ":" TOSTRING(__LINE__)); \ exit(1); \ @@ -195,7 +194,8 @@ int ForkPipeRunner::Run( } bool all_ok = true; for (ConformanceTestSuite* suite : suites) { - char *program; + string program; + std::vector program_args; string failure_list_filename; conformance::FailureSet failure_list; @@ -221,15 +221,15 @@ int ForkPipeRunner::Run( UsageError(); } } else { - if (arg != argc - 1) { - fprintf(stderr, "Too many arguments.\n"); - UsageError(); + program += argv[arg]; + while (arg < argc) { + program_args.push_back(argv[arg]); + arg++; } - program = argv[arg]; } } - ForkPipeRunner runner(program); + ForkPipeRunner runner(program, program_args); std::string output; all_ok = all_ok && @@ -274,37 +274,42 @@ void ForkPipeRunner::SpawnTestProgram() { if (pid) { // Parent. - CHECK_SYSCALL(close(toproc_pipe_fd[0])); - CHECK_SYSCALL(close(fromproc_pipe_fd[1])); + GOOGLE_CHECK_SYSCALL(close(toproc_pipe_fd[0])); + GOOGLE_CHECK_SYSCALL(close(fromproc_pipe_fd[1])); write_fd_ = toproc_pipe_fd[1]; read_fd_ = fromproc_pipe_fd[0]; child_pid_ = pid; } else { // Child. - CHECK_SYSCALL(close(STDIN_FILENO)); - CHECK_SYSCALL(close(STDOUT_FILENO)); - CHECK_SYSCALL(dup2(toproc_pipe_fd[0], STDIN_FILENO)); - CHECK_SYSCALL(dup2(fromproc_pipe_fd[1], STDOUT_FILENO)); + GOOGLE_CHECK_SYSCALL(close(STDIN_FILENO)); + GOOGLE_CHECK_SYSCALL(close(STDOUT_FILENO)); + GOOGLE_CHECK_SYSCALL(dup2(toproc_pipe_fd[0], STDIN_FILENO)); + GOOGLE_CHECK_SYSCALL(dup2(fromproc_pipe_fd[1], STDOUT_FILENO)); - CHECK_SYSCALL(close(toproc_pipe_fd[0])); - CHECK_SYSCALL(close(fromproc_pipe_fd[1])); - CHECK_SYSCALL(close(toproc_pipe_fd[1])); - CHECK_SYSCALL(close(fromproc_pipe_fd[0])); + GOOGLE_CHECK_SYSCALL(close(toproc_pipe_fd[0])); + GOOGLE_CHECK_SYSCALL(close(fromproc_pipe_fd[1])); + GOOGLE_CHECK_SYSCALL(close(toproc_pipe_fd[1])); + GOOGLE_CHECK_SYSCALL(close(fromproc_pipe_fd[0])); std::unique_ptr executable(new char[executable_.size() + 1]); memcpy(executable.get(), executable_.c_str(), executable_.size()); executable[executable_.size()] = '\0'; - char *const argv[] = {executable.get(), NULL}; - CHECK_SYSCALL(execv(executable.get(), argv)); // Never returns. + std::vector argv; + argv.push_back(executable.get()); + for (int i = 0; i < executable_args_.size(); ++i) { + argv.push_back(executable_args_[i].c_str()); + } + argv.push_back(nullptr); + // Never returns. + GOOGLE_CHECK_SYSCALL(execv(executable.get(), const_cast(argv.data()))); } } void ForkPipeRunner::CheckedWrite(int fd, const void *buf, size_t len) { if (write(fd, buf, len) != len) { GOOGLE_LOG(FATAL) << current_test_name_ - << ": error writing to test program: " - << strerror(errno); + << ": error writing to test program: " << strerror(errno); } } @@ -314,13 +319,11 @@ bool ForkPipeRunner::TryRead(int fd, void *buf, size_t len) { ssize_t bytes_read = read(fd, (char*)buf + ofs, len); if (bytes_read == 0) { - GOOGLE_LOG(ERROR) << current_test_name_ - << ": unexpected EOF from test program"; + GOOGLE_LOG(ERROR) << current_test_name_ << ": unexpected EOF from test program"; return false; } else if (bytes_read < 0) { GOOGLE_LOG(ERROR) << current_test_name_ - << ": error reading from test program: " - << strerror(errno); + << ": error reading from test program: " << strerror(errno); return false; } @@ -334,8 +337,7 @@ bool ForkPipeRunner::TryRead(int fd, void *buf, size_t len) { void ForkPipeRunner::CheckedRead(int fd, void *buf, size_t len) { if (!TryRead(fd, buf, len)) { GOOGLE_LOG(FATAL) << current_test_name_ - << ": error reading from test program: " - << strerror(errno); + << ": error reading from test program: " << strerror(errno); } } diff --git a/third_party/protobuf/conformance/failure_list_js.txt b/third_party/protobuf/conformance/failure_list_js.txt index f8f6a578..ef9131a7 100644 --- a/third_party/protobuf/conformance/failure_list_js.txt +++ b/third_party/protobuf/conformance/failure_list_js.txt @@ -1,13 +1,115 @@ -Required.Proto3.ProtobufInput.ValidDataRepeated.BOOL.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.INT32.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.INT64.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.SINT32.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.SINT64.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.UINT32.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.UINT64.ProtobufOutput + +Recommended.Proto2.ProtobufInput.ValidDataRepeated.BOOL.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.BOOL.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.BOOL.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.DOUBLE.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.DOUBLE.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.DOUBLE.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.ENUM.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.ENUM.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.ENUM.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.FIXED32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.FIXED32.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.FIXED32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.FIXED64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.FIXED64.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.FIXED64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.FLOAT.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.FLOAT.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.FLOAT.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.INT32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.INT32.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.INT32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.INT64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.INT64.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.INT64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.SFIXED32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.SFIXED32.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.SFIXED32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.SFIXED64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.SFIXED64.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.SFIXED64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.SINT32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.SINT32.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.SINT32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.SINT64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.SINT64.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.SINT64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.UINT32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.UINT32.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.UINT32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.UINT64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.UINT64.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto2.ProtobufInput.ValidDataRepeated.UINT64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.UnpackedInput.PackedOutput.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarMessageMerge.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataMap.STRING.MESSAGE.MergeValue.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.BOOL.PackedInput.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.DOUBLE.PackedInput.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.ENUM.PackedInput.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.FIXED32.PackedInput.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.FIXED64.PackedInput.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.FLOAT.PackedInput.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.INT32.PackedInput.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.INT64.PackedInput.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.SFIXED32.PackedInput.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.SFIXED64.PackedInput.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.SINT32.PackedInput.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.SINT64.PackedInput.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.UINT32.PackedInput.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.UINT64.PackedInput.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.BOOL.UnpackedInput.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.UnpackedInput.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.ENUM.UnpackedInput.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.UnpackedInput.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.UnpackedInput.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.UnpackedInput.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.INT32.UnpackedInput.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.INT64.UnpackedInput.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.UnpackedInput.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.UnpackedInput.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SINT32.UnpackedInput.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SINT64.UnpackedInput.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.UINT32.UnpackedInput.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.UINT64.UnpackedInput.ProtobufOutput diff --git a/third_party/protobuf/conformance/failure_list_php.txt b/third_party/protobuf/conformance/failure_list_php.txt index f76e9d73..7ee5b9aa 100644 --- a/third_party/protobuf/conformance/failure_list_php.txt +++ b/third_party/protobuf/conformance/failure_list_php.txt @@ -3,22 +3,80 @@ Recommended.FieldMaskPathsDontRoundTrip.JsonOutput Recommended.FieldMaskTooManyUnderscore.JsonOutput Recommended.Proto3.JsonInput.BytesFieldBase64Url.JsonOutput Recommended.Proto3.JsonInput.BytesFieldBase64Url.ProtobufOutput -Recommended.Proto3.JsonInput.DurationHas3FractionalDigits.Validator -Recommended.Proto3.JsonInput.DurationHas6FractionalDigits.Validator -Recommended.Proto3.JsonInput.DurationHas9FractionalDigits.Validator -Recommended.Proto3.JsonInput.DurationHasZeroFractionalDigit.Validator Recommended.Proto3.JsonInput.FieldMaskInvalidCharacter +Recommended.Proto3.ProtobufInput.ValidDataOneofBinary.MESSAGE.Merge.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.UnpackedInput.PackedOutput.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldTooSmall Required.Proto3.JsonInput.FloatFieldTooLarge Required.Proto3.JsonInput.FloatFieldTooSmall -Required.Proto3.JsonInput.DoubleFieldTooSmall Required.Proto3.JsonInput.Int32FieldNotInteger Required.Proto3.JsonInput.Int64FieldNotInteger +Required.Proto3.JsonInput.OneofFieldDuplicate Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotInt Required.Proto3.JsonInput.RepeatedListValue.JsonOutput Required.Proto3.JsonInput.RepeatedListValue.ProtobufOutput Required.Proto3.JsonInput.StringFieldNotAString Required.Proto3.JsonInput.Uint32FieldNotInteger Required.Proto3.JsonInput.Uint64FieldNotInteger -Required.Proto3.JsonInput.Int32FieldLeadingSpace -Required.Proto3.JsonInput.OneofFieldDuplicate -Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarMessageMerge.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarMessageMerge.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.PackedInput.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.UnpackedInput.JsonOutput +Required.Proto3.ProtobufInput.ValidDataScalar.FLOAT[2].JsonOutput +Required.Proto3.ProtobufInput.ValidDataOneof.MESSAGE.Merge.JsonOutput +Required.Proto3.ProtobufInput.ValidDataOneof.MESSAGE.Merge.ProtobufOutput diff --git a/third_party/protobuf/conformance/failure_list_php_c.txt b/third_party/protobuf/conformance/failure_list_php_c.txt index b0405618..6a6949fe 100644 --- a/third_party/protobuf/conformance/failure_list_php_c.txt +++ b/third_party/protobuf/conformance/failure_list_php_c.txt @@ -6,7 +6,6 @@ Recommended.Proto3.JsonInput.BytesFieldBase64Url.ProtobufOutput Recommended.Proto3.JsonInput.DurationHas3FractionalDigits.Validator Recommended.Proto3.JsonInput.DurationHas6FractionalDigits.Validator Recommended.Proto3.JsonInput.FieldMaskInvalidCharacter -Recommended.Proto3.JsonInput.Int64FieldBeString.Validator Recommended.Proto3.JsonInput.MapFieldValueIsNull Recommended.Proto3.JsonInput.OneofZeroBytes.JsonOutput Recommended.Proto3.JsonInput.RepeatedFieldMessageElementIsNull @@ -17,12 +16,69 @@ Recommended.Proto3.JsonInput.StringFieldUnpairedHighSurrogate Recommended.Proto3.JsonInput.StringFieldUnpairedLowSurrogate Recommended.Proto3.JsonInput.TimestampHas3FractionalDigits.Validator Recommended.Proto3.JsonInput.TimestampHas6FractionalDigits.Validator -Recommended.Proto3.JsonInput.Uint64FieldBeString.Validator Recommended.Proto3.ProtobufInput.OneofZeroBytes.JsonOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.UnpackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.ENUM[3].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.ENUM[4].ProtobufOutput Required.DurationProtoInputTooLarge.JsonOutput Required.DurationProtoInputTooSmall.JsonOutput -Required.TimestampProtoInputTooLarge.JsonOutput -Required.TimestampProtoInputTooSmall.JsonOutput Required.Proto3.JsonInput.DoubleFieldMaxNegativeValue.JsonOutput Required.Proto3.JsonInput.DoubleFieldMaxNegativeValue.ProtobufOutput Required.Proto3.JsonInput.DoubleFieldMinPositiveValue.JsonOutput @@ -34,12 +90,20 @@ Required.Proto3.JsonInput.FloatFieldInfinity.JsonOutput Required.Proto3.JsonInput.FloatFieldNan.JsonOutput Required.Proto3.JsonInput.FloatFieldNegativeInfinity.JsonOutput Required.Proto3.JsonInput.OneofFieldDuplicate -Required.Proto3.JsonInput.OptionalWrapperTypesWithNonDefaultValue.JsonOutput -Required.Proto3.JsonInput.OptionalWrapperTypesWithNonDefaultValue.ProtobufOutput +Required.Proto3.JsonInput.RejectTopLevelNull Required.Proto3.JsonInput.StringFieldSurrogatePair.JsonOutput Required.Proto3.JsonInput.StringFieldSurrogatePair.ProtobufOutput Required.Proto3.ProtobufInput.DoubleFieldNormalizeQuietNan.JsonOutput Required.Proto3.ProtobufInput.DoubleFieldNormalizeSignalingNan.JsonOutput Required.Proto3.ProtobufInput.FloatFieldNormalizeQuietNan.JsonOutput Required.Proto3.ProtobufInput.FloatFieldNormalizeSignalingNan.JsonOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput +Required.Proto3.ProtobufInput.ValidDataOneof.BYTES.DefaultValue.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.BYTES.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.BYTES.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.PackedInput.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.UnpackedInput.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.STRING.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.STRING.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataScalar.FLOAT[2].JsonOutput +Required.TimestampProtoInputTooLarge.JsonOutput +Required.TimestampProtoInputTooSmall.JsonOutput diff --git a/third_party/protobuf/conformance/failure_list_python.txt b/third_party/protobuf/conformance/failure_list_python.txt index e3ce7af7..f5512279 100644 --- a/third_party/protobuf/conformance/failure_list_python.txt +++ b/third_party/protobuf/conformance/failure_list_python.txt @@ -6,16 +6,26 @@ Recommended.Proto3.JsonInput.DoubleFieldNegativeInfinityNotQuoted Recommended.Proto3.JsonInput.FloatFieldInfinityNotQuoted Recommended.Proto3.JsonInput.FloatFieldNanNotQuoted Recommended.Proto3.JsonInput.FloatFieldNegativeInfinityNotQuoted +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.BOOL[0].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.BYTES[0].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.DOUBLE[0].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.ENUM[0].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.FIXED32[0].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.FIXED64[0].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.FLOAT[0].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.INT32[0].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.INT32[6].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.INT64[0].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.SFIXED32[0].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.SFIXED64[0].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.SINT32[0].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.SINT64[0].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.STRING[0].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.UINT32[0].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.UINT32[5].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.UINT64[0].ProtobufOutput Required.Proto3.JsonInput.DoubleFieldTooSmall Required.Proto3.JsonInput.FloatFieldTooLarge Required.Proto3.JsonInput.FloatFieldTooSmall Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotBool Required.Proto3.JsonInput.TimestampJsonInputLowercaseT -Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_0 -Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_1 -Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_2 -Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_3 -Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_0 -Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_1 -Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_2 -Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_3 diff --git a/third_party/protobuf/conformance/failure_list_ruby.txt b/third_party/protobuf/conformance/failure_list_ruby.txt index 651cb55f..f9533ae8 100644 --- a/third_party/protobuf/conformance/failure_list_ruby.txt +++ b/third_party/protobuf/conformance/failure_list_ruby.txt @@ -6,7 +6,6 @@ Recommended.Proto3.JsonInput.BytesFieldBase64Url.ProtobufOutput Recommended.Proto3.JsonInput.DurationHas3FractionalDigits.Validator Recommended.Proto3.JsonInput.DurationHas6FractionalDigits.Validator Recommended.Proto3.JsonInput.FieldMaskInvalidCharacter -Recommended.Proto3.JsonInput.Int64FieldBeString.Validator Recommended.Proto3.JsonInput.MapFieldValueIsNull Recommended.Proto3.JsonInput.RepeatedFieldMessageElementIsNull Recommended.Proto3.JsonInput.RepeatedFieldPrimitiveElementIsNull @@ -16,7 +15,66 @@ Recommended.Proto3.JsonInput.StringFieldUnpairedHighSurrogate Recommended.Proto3.JsonInput.StringFieldUnpairedLowSurrogate Recommended.Proto3.JsonInput.TimestampHas3FractionalDigits.Validator Recommended.Proto3.JsonInput.TimestampHas6FractionalDigits.Validator -Recommended.Proto3.JsonInput.Uint64FieldBeString.Validator +Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.PackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.UnpackedInput.UnpackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.PackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.PackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.UnpackedInput.DefaultOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.UnpackedInput.PackedOutput.ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.ENUM[3].ProtobufOutput +Recommended.Proto3.ProtobufInput.ValidDataScalarBinary.ENUM[4].ProtobufOutput Required.DurationProtoInputTooLarge.JsonOutput Required.DurationProtoInputTooSmall.JsonOutput Required.Proto3.JsonInput.DoubleFieldMaxNegativeValue.JsonOutput @@ -29,39 +87,23 @@ Required.Proto3.JsonInput.DurationRepeatedValue.JsonOutput Required.Proto3.JsonInput.FloatFieldInfinity.JsonOutput Required.Proto3.JsonInput.FloatFieldNan.JsonOutput Required.Proto3.JsonInput.FloatFieldNegativeInfinity.JsonOutput -Required.Proto3.JsonInput.OneofFieldDuplicate -Required.Proto3.JsonInput.OptionalBoolWrapper.JsonOutput -Required.Proto3.JsonInput.OptionalBytesWrapper.JsonOutput -Required.Proto3.JsonInput.OptionalDoubleWrapper.JsonOutput -Required.Proto3.JsonInput.OptionalFloatWrapper.JsonOutput -Required.Proto3.JsonInput.OptionalInt32Wrapper.JsonOutput -Required.Proto3.JsonInput.OptionalInt64Wrapper.JsonOutput -Required.Proto3.JsonInput.OptionalStringWrapper.JsonOutput -Required.Proto3.JsonInput.OptionalUint32Wrapper.JsonOutput -Required.Proto3.JsonInput.OptionalUint64Wrapper.JsonOutput -Required.Proto3.JsonInput.OptionalWrapperTypesWithNonDefaultValue.JsonOutput -Required.Proto3.JsonInput.OptionalWrapperTypesWithNonDefaultValue.ProtobufOutput -Required.Proto3.JsonInput.RepeatedBoolWrapper.JsonOutput -Required.Proto3.JsonInput.RepeatedBytesWrapper.JsonOutput -Required.Proto3.JsonInput.RepeatedDoubleWrapper.JsonOutput -Required.Proto3.JsonInput.RepeatedFloatWrapper.JsonOutput -Required.Proto3.JsonInput.RepeatedInt32Wrapper.JsonOutput -Required.Proto3.JsonInput.RepeatedInt64Wrapper.JsonOutput -Required.Proto3.JsonInput.RepeatedStringWrapper.JsonOutput -Required.Proto3.JsonInput.RepeatedUint32Wrapper.JsonOutput -Required.Proto3.JsonInput.RepeatedUint64Wrapper.JsonOutput -Required.Proto3.JsonInput.StringFieldSurrogatePair.JsonOutput -Required.Proto3.JsonInput.StringFieldSurrogatePair.ProtobufOutput -Required.Proto3.ProtobufInput.DoubleFieldNormalizeQuietNan.JsonOutput -Required.Proto3.ProtobufInput.DoubleFieldNormalizeSignalingNan.JsonOutput -Required.Proto3.ProtobufInput.FloatFieldNormalizeQuietNan.JsonOutput -Required.Proto3.ProtobufInput.FloatFieldNormalizeSignalingNan.JsonOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput -Required.TimestampProtoInputTooLarge.JsonOutput -Required.TimestampProtoInputTooSmall.JsonOutput Required.Proto3.JsonInput.IgnoreUnknownJsonFalse.ProtobufOutput Required.Proto3.JsonInput.IgnoreUnknownJsonNull.ProtobufOutput Required.Proto3.JsonInput.IgnoreUnknownJsonNumber.ProtobufOutput Required.Proto3.JsonInput.IgnoreUnknownJsonObject.ProtobufOutput Required.Proto3.JsonInput.IgnoreUnknownJsonString.ProtobufOutput Required.Proto3.JsonInput.IgnoreUnknownJsonTrue.ProtobufOutput +Required.Proto3.JsonInput.OneofFieldDuplicate +Required.Proto3.JsonInput.RejectTopLevelNull +Required.Proto3.JsonInput.StringFieldSurrogatePair.JsonOutput +Required.Proto3.JsonInput.StringFieldSurrogatePair.ProtobufOutput +Required.Proto3.ProtobufInput.DoubleFieldNormalizeQuietNan.JsonOutput +Required.Proto3.ProtobufInput.DoubleFieldNormalizeSignalingNan.JsonOutput +Required.Proto3.ProtobufInput.FloatFieldNormalizeQuietNan.JsonOutput +Required.Proto3.ProtobufInput.FloatFieldNormalizeSignalingNan.JsonOutput +Required.Proto3.ProtobufInput.ValidDataMap.STRING.MESSAGE.MissingDefault.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.PackedInput.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.UnpackedInput.JsonOutput +Required.Proto3.ProtobufInput.ValidDataScalar.FLOAT[2].JsonOutput +Required.TimestampProtoInputTooLarge.JsonOutput +Required.TimestampProtoInputTooSmall.JsonOutput diff --git a/third_party/protobuf/conformance/text_format_conformance_suite.cc b/third_party/protobuf/conformance/text_format_conformance_suite.cc index 97b7b907..6574b10c 100644 --- a/third_party/protobuf/conformance/text_format_conformance_suite.cc +++ b/third_party/protobuf/conformance/text_format_conformance_suite.cc @@ -30,20 +30,21 @@ #include "text_format_conformance_suite.h" -#include "conformance_test.h" - #include +#include +#include "conformance_test.h" #include #include -#include + +namespace proto2_messages = protobuf_test_messages::proto2; using conformance::ConformanceRequest; using conformance::ConformanceResponse; using conformance::WireFormat; using google::protobuf::Message; using google::protobuf::TextFormat; -using protobuf_test_messages::proto2::TestAllTypesProto2; -using protobuf_test_messages::proto2::UnknownToTestAllTypes; +using proto2_messages::TestAllTypesProto2; +using proto2_messages::UnknownToTestAllTypes; using protobuf_test_messages::proto3::TestAllTypesProto3; using std::string; @@ -64,8 +65,8 @@ bool TextFormatConformanceTestSuite::ParseTextFormatResponse( } if (!parser.ParseFromString(response.text_payload(), test_message)) { GOOGLE_LOG(ERROR) << "INTERNAL ERROR: internal text->protobuf transcode " - << "yielded unparseable proto. Text payload: " - << response.text_payload(); + << "yielded unparseable proto. Text payload: " + << response.text_payload(); return false; } @@ -83,11 +84,11 @@ bool TextFormatConformanceTestSuite::ParseResponse( switch (response.result_case()) { case ConformanceResponse::kProtobufPayload: { if (requested_output != conformance::PROTOBUF) { - ReportFailure( - test_name, level, request, response, - StrCat("Test was asked for ", WireFormatToString(requested_output), - " output but provided PROTOBUF instead.") - .c_str()); + ReportFailure(test_name, level, request, response, + StrCat("Test was asked for ", + WireFormatToString(requested_output), + " output but provided PROTOBUF instead.") + .c_str()); return false; } @@ -102,11 +103,11 @@ bool TextFormatConformanceTestSuite::ParseResponse( case ConformanceResponse::kTextPayload: { if (requested_output != conformance::TEXT_FORMAT) { - ReportFailure( - test_name, level, request, response, - StrCat("Test was asked for ", WireFormatToString(requested_output), - " output but provided TEXT_FORMAT instead.") - .c_str()); + ReportFailure(test_name, level, request, response, + StrCat("Test was asked for ", + WireFormatToString(requested_output), + " output but provided TEXT_FORMAT instead.") + .c_str()); return false; } @@ -122,7 +123,7 @@ bool TextFormatConformanceTestSuite::ParseResponse( default: GOOGLE_LOG(FATAL) << test_name - << ": unknown payload type: " << response.result_case(); + << ": unknown payload type: " << response.result_case(); } return true; @@ -139,8 +140,9 @@ void TextFormatConformanceTestSuite::ExpectParseFailure(const string& test_name, conformance::TEXT_FORMAT_TEST, prototype, test_name, input); const ConformanceRequest& request = setting.GetRequest(); ConformanceResponse response; - string effective_test_name = StrCat(setting.ConformanceLevelToString(level), - ".Proto3.TextFormatInput.", test_name); + string effective_test_name = + StrCat(setting.ConformanceLevelToString(level), + ".Proto3.TextFormatInput.", test_name); RunTest(effective_test_name, request, &response); if (response.result_case() == ConformanceResponse::kParseError) { @@ -311,6 +313,66 @@ void TextFormatConformanceTestSuite::RunSuiteImpl() { } } )"); + + // Map fields + TestAllTypesProto3 prototype; + (*prototype.mutable_map_string_string())["c"] = "value"; + (*prototype.mutable_map_string_string())["b"] = "value"; + (*prototype.mutable_map_string_string())["a"] = "value"; + RunValidTextFormatTestWithMessage("AlphabeticallySortedMapStringKeys", + REQUIRED, + R"( + map_string_string { + key: "a" + value: "value" + } + map_string_string { + key: "b" + value: "value" + } + map_string_string { + key: "c" + value: "value" + } + )", + prototype); + + prototype.Clear(); + (*prototype.mutable_map_int32_int32())[3] = 0; + (*prototype.mutable_map_int32_int32())[2] = 0; + (*prototype.mutable_map_int32_int32())[1] = 0; + RunValidTextFormatTestWithMessage("AlphabeticallySortedMapIntKeys", REQUIRED, + R"( + map_int32_int32 { + key: 1 + value: 0 + } + map_int32_int32 { + key: 2 + value: 0 + } + map_int32_int32 { + key: 3 + value: 0 + } + )", + prototype); + + prototype.Clear(); + (*prototype.mutable_map_bool_bool())[true] = false; + (*prototype.mutable_map_bool_bool())[false] = false; + RunValidTextFormatTestWithMessage("AlphabeticallySortedMapBoolKeys", REQUIRED, + R"( + map_bool_bool { + key: false + value: false + } + map_bool_bool { + key: true + value: false + } + )", + prototype); } } // namespace protobuf diff --git a/third_party/protobuf/conformance/text_format_conformance_suite.h b/third_party/protobuf/conformance/text_format_conformance_suite.h index dd258f50..d68f4aa3 100644 --- a/third_party/protobuf/conformance/text_format_conformance_suite.h +++ b/third_party/protobuf/conformance/text_format_conformance_suite.h @@ -42,19 +42,19 @@ class TextFormatConformanceTestSuite : public ConformanceTestSuite { private: void RunSuiteImpl(); - void RunValidTextFormatTest(const string& test_name, ConformanceLevel level, - const string& input); - void RunValidTextFormatTestProto2(const string& test_name, + void RunValidTextFormatTest(const std::string& test_name, + ConformanceLevel level, const std::string& input); + void RunValidTextFormatTestProto2(const std::string& test_name, ConformanceLevel level, - const string& input); - void RunValidTextFormatTestWithMessage(const string& test_name, + const std::string& input); + void RunValidTextFormatTestWithMessage(const std::string& test_name, ConformanceLevel level, - const string& input_text, + const std::string& input_text, const Message& prototype); - void RunValidUnknownTextFormatTest(const string& test_name, + void RunValidUnknownTextFormatTest(const std::string& test_name, const Message& message); - void ExpectParseFailure(const string& test_name, ConformanceLevel level, - const string& input); + void ExpectParseFailure(const std::string& test_name, ConformanceLevel level, + const std::string& input); bool ParseTextFormatResponse(const conformance::ConformanceResponse& response, const ConformanceRequestSetting& setting, Message* test_message); diff --git a/third_party/protobuf/conformance/third_party/jsoncpp/json.h b/third_party/protobuf/conformance/third_party/jsoncpp/json.h index 32fd0720..5639c924 100644 --- a/third_party/protobuf/conformance/third_party/jsoncpp/json.h +++ b/third_party/protobuf/conformance/third_party/jsoncpp/json.h @@ -1019,7 +1019,7 @@ private: * - ".name1.name2.name3" * - ".[0][1][2].name1[3]" * - ".%" => member name is provided as parameter - * - ".[%]" => index is provied as parameter + * - ".[%]" => index is provided as parameter */ class JSON_API Path { public: @@ -1371,7 +1371,7 @@ public: */ std::string getFormattedErrorMessages() const; - /** \brief Returns a vector of structured erros encounted while parsing. + /** \brief Returns a vector of structured errors encounted while parsing. * \return A (possibly empty) vector of StructuredError objects. Currently * only one error can be returned, but the caller should tolerate * multiple @@ -1816,7 +1816,7 @@ public: * * The JSON document is written in a single line. It is not intended for 'human' *consumption, - * but may be usefull to support feature such as RPC where bandwith is limited. + * but may be useful to support feature such as RPC where bandwidth is limited. * \sa Reader, Value * \deprecated Use StreamWriterBuilder. */ diff --git a/third_party/protobuf/conformance/third_party/jsoncpp/jsoncpp.cpp b/third_party/protobuf/conformance/third_party/jsoncpp/jsoncpp.cpp index 4d3e0f2f..d313d056 100644 --- a/third_party/protobuf/conformance/third_party/jsoncpp/jsoncpp.cpp +++ b/third_party/protobuf/conformance/third_party/jsoncpp/jsoncpp.cpp @@ -4112,7 +4112,7 @@ std::string valueToString(double value, bool useSpecialFloats, unsigned int prec sprintf(formatString, "%%.%dg", precision); // Print into the buffer. We need not request the alternative representation - // that always has a decimal point because JSON doesn't distingish the + // that always has a decimal point because JSON doesn't distinguish the // concepts of reals and integers. if (isfinite(value)) { len = snprintf(buffer, sizeof(buffer), formatString, value); diff --git a/third_party/protobuf/depcomp b/third_party/protobuf/depcomp index b39f98f9..6b391623 100755 --- a/third_party/protobuf/depcomp +++ b/third_party/protobuf/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2016-01-11.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ scriptversion=2016-01-11.22; # UTC # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -783,7 +783,7 @@ exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/third_party/protobuf/examples/BUILD b/third_party/protobuf/examples/BUILD index d5d5d9a5..7d15e83a 100644 --- a/third_party/protobuf/examples/BUILD +++ b/third_party/protobuf/examples/BUILD @@ -4,6 +4,10 @@ # the WORKSPACE file in the same directory with this BUILD file for an # example. +load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_proto_library") +load("@rules_java//java:defs.bzl", "java_binary", "java_lite_proto_library", "java_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") + # For each .proto file, a proto_library target should be defined. This target # is not bound to any particular language. Instead, it defines the dependency # graph of the .proto files (i.e., proto imports) and serves as the provider diff --git a/third_party/protobuf/examples/README.md b/third_party/protobuf/examples/README.md index 3eb63527..4bf7c17c 100644 --- a/third_party/protobuf/examples/README.md +++ b/third_party/protobuf/examples/README.md @@ -38,7 +38,7 @@ and the protobuf runtime for the language you want to build. You can simply run "make" to build the example for all languages (except for Go). However, since different language has different installation requirement, -it will likely fail. It's better to follow individual instrutions below to +it will likely fail. It's better to follow individual instructions below to build only the language you are interested in. ### C++ @@ -135,7 +135,7 @@ Build the Dart samples in this directory with `make dart`. To run the examples: ```sh -$ dart add_person.dart addessbook.data +$ dart add_person.dart addressbook.data $ dart list_people.dart addressbook.data ``` diff --git a/third_party/protobuf/examples/WORKSPACE b/third_party/protobuf/examples/WORKSPACE index 8b97e47f..fb36639a 100644 --- a/third_party/protobuf/examples/WORKSPACE +++ b/third_party/protobuf/examples/WORKSPACE @@ -1,50 +1,31 @@ +workspace(name = "com_google_protobuf_examples") + load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # This com_google_protobuf repository is required for proto_library rule. # It provides the protocol compiler binary (i.e., protoc). -http_archive( +# +# We declare it as local_repository so we can test changes +# before they get merged. You'll want to use the following instead: +# +# http_archive( +# name = "com_google_protobuf", +# strip_prefix = "protobuf-master", +# urls = ["https://github.com/protocolbuffers/protobuf/archive/master.zip"], +# ) +local_repository( name = "com_google_protobuf", - strip_prefix = "protobuf-master", - urls = ["https://github.com/protocolbuffers/protobuf/archive/master.zip"], + path = "..", ) -# This com_google_protobuf_cc repository is required for cc_proto_library -# rule. It provides protobuf C++ runtime. Note that it actually is the same -# repo as com_google_protobuf but has to be given a different name as -# required by bazel. -http_archive( - name = "com_google_protobuf_cc", - strip_prefix = "protobuf-master", - urls = ["https://github.com/protocolbuffers/protobuf/archive/master.zip"], -) - -# Similar to com_google_protobuf_cc but for Java (i.e., java_proto_library). -http_archive( - name = "com_google_protobuf_java", - strip_prefix = "protobuf-master", - urls = ["https://github.com/protocolbuffers/protobuf/archive/master.zip"], -) - -# Similar to com_google_protobuf_cc but for Java lite. If you are building -# for Android, the lite version should be prefered because it has a much +# Similar to com_google_protobuf but for Java lite. If you are building +# for Android, the lite version should be preferred because it has a much # smaller code size. -http_archive( +local_repository( name = "com_google_protobuf_javalite", - strip_prefix = "protobuf-javalite", - urls = ["https://github.com/protocolbuffers/protobuf/archive/javalite.zip"], -) - -http_archive( - name = "bazel_skylib", - sha256 = "bbccf674aa441c266df9894182d80de104cabd19be98be002f6d478aaa31574d", - strip_prefix = "bazel-skylib-2169ae1c374aab4a09aa90e65efe1a3aad4e279b", - urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"], + path = "..", ) load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") protobuf_deps() - -load("@bazel_skylib//lib:versions.bzl", "versions") - -versions.check(minimum_bazel_version = "0.5.4") diff --git a/third_party/protobuf/examples/add_person.dart b/third_party/protobuf/examples/add_person.dart index bb38901a..0352dc7e 100644 --- a/third_party/protobuf/examples/add_person.dart +++ b/third_party/protobuf/examples/add_person.dart @@ -2,34 +2,31 @@ import 'dart:io'; import 'dart_tutorial/addressbook.pb.dart'; -// This function fills in a Person message based on user input. +/// This function fills in a Person message based on user input. Person promptForAddress() { - Person person = Person(); + final person = Person(); print('Enter person ID: '); - String input = stdin.readLineSync(); + final input = stdin.readLineSync(); person.id = int.parse(input); print('Enter name'); person.name = stdin.readLineSync(); print('Enter email address (blank for none) : '); - String email = stdin.readLineSync(); - if (email.isNotEmpty) { - person.email = email; - } + final email = stdin.readLineSync(); + if (email.isNotEmpty) person.email = email; while (true) { print('Enter a phone number (or leave blank to finish): '); - String number = stdin.readLineSync(); + final number = stdin.readLineSync(); if (number.isEmpty) break; - Person_PhoneNumber phoneNumber = Person_PhoneNumber(); + final phoneNumber = Person_PhoneNumber()..number = number; - phoneNumber.number = number; print('Is this a mobile, home, or work phone? '); - String type = stdin.readLineSync(); + final type = stdin.readLineSync(); switch (type) { case 'mobile': phoneNumber.type = Person_PhoneType.MOBILE; @@ -49,15 +46,15 @@ Person promptForAddress() { return person; } -// Reads the entire address book from a file, adds one person based -// on user input, then writes it back out to the same file. -main(List arguments) { +/// Reads the entire address book from a file, adds one person based +/// on user input, then writes it back out to the same file. +void main(List arguments) { if (arguments.length != 1) { print('Usage: add_person ADDRESS_BOOK_FILE'); exit(-1); } - File file = File(arguments.first); + final file = File(arguments.first); AddressBook addressBook; if (!file.existsSync()) { print('File not found. Creating new file.'); diff --git a/third_party/protobuf/examples/list_people.dart b/third_party/protobuf/examples/list_people.dart index dd5bb410..8a96d823 100644 --- a/third_party/protobuf/examples/list_people.dart +++ b/third_party/protobuf/examples/list_people.dart @@ -3,16 +3,16 @@ import 'dart:io'; import 'dart_tutorial/addressbook.pb.dart'; import 'dart_tutorial/addressbook.pbenum.dart'; -// Iterates though all people in the AddressBook and prints info about them. +/// Iterates though all people in the AddressBook and prints info about them. void printAddressBook(AddressBook addressBook) { - for (Person person in addressBook.people) { + for (var person in addressBook.people) { print('Person ID: ${person.id}'); print(' Name: ${person.name}'); if (person.hasEmail()) { print(' E-mail address:${person.email}'); } - for (Person_PhoneNumber phoneNumber in person.phones) { + for (var phoneNumber in person.phones) { switch (phoneNumber.type) { case Person_PhoneType.MOBILE: print(' Mobile phone #: '); @@ -32,16 +32,16 @@ void printAddressBook(AddressBook addressBook) { } } -// Reads the entire address book from a file and prints all -// the information inside. -main(List arguments) { +/// Reads the entire address book from a file and prints all +/// the information inside. +void main(List arguments) { if (arguments.length != 1) { print('Usage: list_person ADDRESS_BOOK_FILE'); exit(-1); } // Read the existing address book. - File file = new File(arguments.first); - AddressBook addressBook = new AddressBook.fromBuffer(file.readAsBytesSync()); + final file = new File(arguments.first); + final addressBook = new AddressBook.fromBuffer(file.readAsBytesSync()); printAddressBook(addressBook); } diff --git a/third_party/protobuf/examples/third_party/zlib.BUILD b/third_party/protobuf/examples/third_party/zlib.BUILD deleted file mode 100644 index f9481174..00000000 --- a/third_party/protobuf/examples/third_party/zlib.BUILD +++ /dev/null @@ -1,60 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) # BSD/MIT-like license (for zlib) - -_ZLIB_HEADERS = [ - "crc32.h", - "deflate.h", - "gzguts.h", - "inffast.h", - "inffixed.h", - "inflate.h", - "inftrees.h", - "trees.h", - "zconf.h", - "zlib.h", - "zutil.h", -] - -_ZLIB_PREFIXED_HEADERS = ["zlib/include/" + hdr for hdr in _ZLIB_HEADERS] - -# In order to limit the damage from the `includes` propagation -# via `:zlib`, copy the public headers to a subdirectory and -# expose those. -genrule( - name = "copy_public_headers", - srcs = _ZLIB_HEADERS, - outs = _ZLIB_PREFIXED_HEADERS, - cmd = "cp $(SRCS) $(@D)/zlib/include/", - visibility = ["//visibility:private"], -) - -cc_library( - name = "zlib", - srcs = [ - "adler32.c", - "compress.c", - "crc32.c", - "deflate.c", - "gzclose.c", - "gzlib.c", - "gzread.c", - "gzwrite.c", - "infback.c", - "inffast.c", - "inflate.c", - "inftrees.c", - "trees.c", - "uncompr.c", - "zutil.c", - # Include the un-prefixed headers in srcs to work - # around the fact that zlib isn't consistent in its - # choice of <> or "" delimiter when including itself. - ] + _ZLIB_HEADERS, - hdrs = _ZLIB_PREFIXED_HEADERS, - copts = [ - "-Wno-unused-variable", - "-Wno-implicit-function-declaration", - ], - includes = ["zlib/include/"], -) diff --git a/third_party/protobuf/generate_descriptor_proto.sh b/third_party/protobuf/generate_descriptor_proto.sh index e533d05b..dc03fee0 100755 --- a/third_party/protobuf/generate_descriptor_proto.sh +++ b/third_party/protobuf/generate_descriptor_proto.sh @@ -62,7 +62,7 @@ do PROTOC=$BOOTSTRAP_PROTOC BOOTSTRAP_PROTOC="" else - make $@ protoc + make -j$(nproc) $@ protoc if test $? -ne 0; then echo "Failed to build protoc." exit 1 diff --git a/third_party/protobuf/install-sh b/third_party/protobuf/install-sh index 59990a10..20d8b2ea 100755 --- a/third_party/protobuf/install-sh +++ b/third_party/protobuf/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2014-09-12.12; # UTC +scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -271,15 +271,18 @@ do fi dst=$dst_arg - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. + # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst - dst=$dstdir/`basename "$src"` + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac dstdir_status=0 else dstdir=`dirname "$dst"` @@ -288,6 +291,11 @@ do fi fi + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + obsolete_mkdir_used=false if test $dstdir_status != 0; then @@ -324,14 +332,16 @@ do # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) - # $RANDOM is not portable (e.g. dash); use it when possible to - # lower collision chance + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - # As "mkdir -p" follows symlinks and we work in /tmp possibly; so - # create the $tmpdir first (and fail if unsuccessful) to make sure - # that nobody tries to guess the $tmpdir name. + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 @@ -434,14 +444,25 @@ do else # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -500,9 +521,9 @@ do done # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/third_party/protobuf/ltmain.sh b/third_party/protobuf/ltmain.sh index a736cf99..0cb7f90d 100644 --- a/third_party/protobuf/ltmain.sh +++ b/third_party/protobuf/ltmain.sh @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-2" +VERSION="2.4.6 Debian-2.4.6-14" package_revision=2.4.6 @@ -387,7 +387,7 @@ EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # -# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: @@ -1370,7 +1370,7 @@ func_lt_ver () #! /bin/sh # Set a version string for this script. -scriptversion=2014-01-07.03; # UTC +scriptversion=2015-10-07.11; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 @@ -1530,6 +1530,8 @@ func_run_hooks () { $debug_cmd + _G_rc_run_hooks=false + case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; @@ -1538,16 +1540,16 @@ func_run_hooks () eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift + if eval $_G_hook '"$@"'; then + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + _G_rc_run_hooks=: + fi done - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result + $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result } @@ -1557,10 +1559,16 @@ func_run_hooks () ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed +# full positional parameter list in your hook function, you may remove/edit +# any options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for -# 'eval'. Like this: +# 'eval'. In this case you also must return $EXIT_SUCCESS to let the +# hook's caller know that it should pay attention to +# '_result'. Returning $EXIT_FAILURE signalizes that +# arguments are left untouched by the hook and therefore caller will ignore the +# result variable. +# +# Like this: # # my_options_prep () # { @@ -1570,9 +1578,11 @@ func_run_hooks () # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result +# # No change in '$@' (ignored completely by this hook). There is +# # no need to do the equivalent (but slower) action: +# # func_quote_for_eval ${1+"$@"} +# # my_options_prep_result=$func_quote_for_eval_result +# false # } # func_add_hook func_options_prep my_options_prep # @@ -1581,25 +1591,37 @@ func_run_hooks () # { # $debug_cmd # +# args_changed=false +# # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: ;; +# --silent|-s) opt_silent=: +# args_changed=: +# ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift +# args_changed=: # ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@", we could need that later +# # if $args_changed is true. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result +# if $args_changed; then +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# fi +# +# $args_changed # } # func_add_hook func_parse_options my_silent_option # @@ -1611,16 +1633,32 @@ func_run_hooks () # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result +# false # } # func_add_hook func_validate_options my_option_validation # -# You'll alse need to manually amend $usage_message to reflect the extra +# You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. +# func_options_finish [ARG]... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + _G_func_options_finish_exit=false + if func_run_hooks func_options ${1+"$@"}; then + func_options_finish_result=$func_run_hooks_result + _G_func_options_finish_exit=: + fi + + $_G_func_options_finish_exit +} + + # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1630,17 +1668,28 @@ func_options () { $debug_cmd - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} + _G_rc_options=false - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} + for my_func in options_prep parse_options validate_options options_finish + do + if eval func_$my_func '${1+"$@"}'; then + eval _G_res_var='$'"func_${my_func}_result" + eval set dummy "$_G_res_var" ; shift + _G_rc_options=: + fi + done - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result + # Save modified positional parameters for caller. As a top-level + # options-parser function we always need to set the 'func_options_result' + # variable (regardless the $_G_rc_options value). + if $_G_rc_options; then + func_options_result=$_G_res_var + else + func_quote_for_eval ${1+"$@"} + func_options_result=$func_quote_for_eval_result + fi + + $_G_rc_options } @@ -1649,9 +1698,9 @@ func_options () # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete +# needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before -# returning. +# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). func_hookable func_options_prep func_options_prep () { @@ -1661,10 +1710,14 @@ func_options_prep () opt_verbose=false opt_warning_types= - func_run_hooks func_options_prep ${1+"$@"} + _G_rc_options_prep=false + if func_run_hooks func_options_prep ${1+"$@"}; then + _G_rc_options_prep=: + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result + fi - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result + $_G_rc_options_prep } @@ -1678,18 +1731,20 @@ func_parse_options () func_parse_options_result= + _G_rc_parse_options=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift + if func_run_hooks func_parse_options ${1+"$@"}; then + eval set dummy "$func_run_hooks_result"; shift + _G_rc_parse_options=: + fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break + _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -1704,7 +1759,10 @@ func_parse_options () ;; --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break + if test $# = 0 && func_missing_arg $_G_opt; then + _G_rc_parse_options=: + break + fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1757,15 +1815,25 @@ func_parse_options () shift ;; - --) break ;; + --) _G_rc_parse_options=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; esac + + $_G_match_parse_options && _G_rc_parse_options=: done - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + + if $_G_rc_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result + fi + + $_G_rc_parse_options } @@ -1778,16 +1846,21 @@ func_validate_options () { $debug_cmd + _G_rc_validate_options=false + # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - func_run_hooks func_validate_options ${1+"$@"} + if func_run_hooks func_validate_options ${1+"$@"}; then + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result + _G_rc_validate_options=: + fi # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result + $_G_rc_validate_options } @@ -2068,7 +2141,7 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-2 + version: $progname $scriptversion Debian-2.4.6-14 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2270,6 +2343,8 @@ libtool_options_prep () nonopt= preserve_args= + _G_rc_lt_options_prep=: + # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2293,11 +2368,18 @@ libtool_options_prep () uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; + *) + _G_rc_lt_options_prep=false + ;; esac - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result + fi + + $_G_rc_lt_options_prep } func_add_hook func_options_prep libtool_options_prep @@ -2309,9 +2391,12 @@ libtool_parse_options () { $debug_cmd + _G_rc_lt_parse_options=false + # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do + _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2386,15 +2471,22 @@ libtool_parse_options () func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result + fi - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result + $_G_rc_lt_parse_options } func_add_hook func_parse_options libtool_parse_options @@ -7275,10 +7367,13 @@ func_mode_link () # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC + # -static-* direct GCC to link specific libraries statically + # -fcilkplus Cilk Plus language extension features for C/C++ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*) + -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" diff --git a/third_party/protobuf/m4/libtool.m4 b/third_party/protobuf/m4/libtool.m4 index ee80844b..a6d21ae5 100644 --- a/third_party/protobuf/m4/libtool.m4 +++ b/third_party/protobuf/m4/libtool.m4 @@ -1041,8 +1041,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1492,7 +1492,7 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) @@ -4063,7 +4063,8 @@ _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -4703,6 +4704,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + # flang / f18. f95 an alias for gfortran or flang on Debian + flang* | f18* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -6438,7 +6445,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no @@ -6813,7 +6820,7 @@ if test yes != "$_lt_caught_CXX_error"; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -6878,7 +6885,7 @@ if test yes != "$_lt_caught_CXX_error"; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -7217,7 +7224,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support @@ -7301,7 +7308,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -7312,7 +7319,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' diff --git a/third_party/protobuf/missing b/third_party/protobuf/missing index f62bbae3..8d0eaad2 100755 --- a/third_party/protobuf/missing +++ b/third_party/protobuf/missing @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -101,9 +101,9 @@ else exit $st fi -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software program_details () { @@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/third_party/protobuf/objectivec/GPBProtocolBuffers.m b/third_party/protobuf/objectivec/GPBProtocolBuffers.m index d04c8be1..0545ae9b 100644 --- a/third_party/protobuf/objectivec/GPBProtocolBuffers.m +++ b/third_party/protobuf/objectivec/GPBProtocolBuffers.m @@ -54,13 +54,13 @@ #import "GPBWellKnownTypes.m" #import "GPBWireFormat.m" -#import "google/protobuf/Any.pbobjc.m" -#import "google/protobuf/Api.pbobjc.m" -#import "google/protobuf/Duration.pbobjc.m" -#import "google/protobuf/Empty.pbobjc.m" -#import "google/protobuf/FieldMask.pbobjc.m" -#import "google/protobuf/SourceContext.pbobjc.m" -#import "google/protobuf/Struct.pbobjc.m" -#import "google/protobuf/Timestamp.pbobjc.m" -#import "google/protobuf/Type.pbobjc.m" -#import "google/protobuf/Wrappers.pbobjc.m" +#import "GPBAny.pbobjc.m" +#import "GPBApi.pbobjc.m" +#import "GPBDuration.pbobjc.m" +#import "GPBEmpty.pbobjc.m" +#import "GPBFieldMask.pbobjc.m" +#import "GPBSourceContext.pbobjc.m" +#import "GPBStruct.pbobjc.m" +#import "GPBTimestamp.pbobjc.m" +#import "GPBType.pbobjc.m" +#import "GPBWrappers.pbobjc.m" diff --git a/third_party/protobuf/protobuf.bzl b/third_party/protobuf/protobuf.bzl index e764859b..e2821f5b 100644 --- a/third_party/protobuf/protobuf.bzl +++ b/third_party/protobuf/protobuf.bzl @@ -1,4 +1,7 @@ load("@bazel_skylib//lib:versions.bzl", "versions") +load("@rules_cc//cc:defs.bzl", "cc_library") +load("@rules_proto//proto:defs.bzl", "ProtoInfo") +load("@rules_python//python:defs.bzl", "py_library", "py_test") def _GetPath(ctx, path): if ctx.label.workspace_root: @@ -117,6 +120,7 @@ def _proto_gen_impl(ctx): outs = [ctx.actions.declare_file(out, sibling = src) for out in outs] inputs = [src] + deps + tools = [ctx.executable.protoc] if ctx.executable.plugin: plugin = ctx.executable.plugin lang = ctx.attr.plugin_language @@ -131,11 +135,12 @@ def _proto_gen_impl(ctx): outdir = ",".join(ctx.attr.plugin_options) + ":" + outdir args += [("--plugin=protoc-gen-%s=" + path_tpl) % (lang, plugin.path)] args += ["--%s_out=%s" % (lang, outdir)] - inputs += [plugin] + tools.append(plugin) if not in_gen_dir: ctx.actions.run( inputs = inputs, + tools = tools, outputs = outs, arguments = args + import_flags + [src.path], executable = ctx.executable.protoc, @@ -158,10 +163,11 @@ def _proto_gen_impl(ctx): if generated_out != out.path: command += ";mv %s %s" % (generated_out, out.path) ctx.actions.run_shell( - inputs = inputs + [ctx.executable.protoc], + inputs = inputs, outputs = [out], command = command, mnemonic = "ProtoCompile", + tools = tools, use_default_shell_env = True, ) @@ -219,6 +225,29 @@ Args: outs: a list of labels of the expected outputs from the protocol compiler. """ +def _adapt_proto_library_impl(ctx): + deps = [dep[ProtoInfo] for dep in ctx.attr.deps] + + srcs = [src for dep in deps for src in dep.direct_sources] + return struct( + proto = struct( + srcs = srcs, + import_flags = ["-I{}".format(path) for dep in deps for path in dep.transitive_proto_path.to_list()], + deps = srcs, + ), + ) + +adapt_proto_library = rule( + implementation = _adapt_proto_library_impl, + attrs = { + "deps": attr.label_list( + mandatory = True, + providers = [ProtoInfo], + ), + }, + doc = "Adapts `proto_library` from `@rules_proto` to be used with `{cc,py}_proto_library` from this file.", +) + def cc_proto_library( name, srcs = [], @@ -226,7 +255,6 @@ def cc_proto_library( cc_libs = [], include = None, protoc = "@com_google_protobuf//:protoc", - internal_bootstrap_hack = False, use_grpc_plugin = False, default_runtime = "@com_google_protobuf//:protobuf", **kargs): @@ -244,41 +272,17 @@ def cc_proto_library( cc_library. include: a string indicating the include path of the .proto files. protoc: the label of the protocol compiler to generate the sources. - internal_bootstrap_hack: a flag indicate the cc_proto_library is used only - for bootstraping. When it is set to True, no files will be generated. - The rule will simply be a provider for .proto files, so that other - cc_proto_library can depend on it. use_grpc_plugin: a flag to indicate whether to call the grpc C++ plugin when processing the proto files. default_runtime: the implicitly default runtime which will be depended on by the generated cc_library target. **kargs: other keyword arguments that are passed to cc_library. - """ includes = [] if include != None: includes = [include] - if internal_bootstrap_hack: - # For pre-checked-in generated files, we add the internal_bootstrap_hack - # which will skip the codegen action. - proto_gen( - name = name + "_genproto", - srcs = srcs, - deps = [s + "_genproto" for s in deps], - includes = includes, - protoc = protoc, - visibility = ["//visibility:public"], - ) - - # An empty cc_library to make rule dependency consistent. - native.cc_library( - name = name, - **kargs - ) - return - grpc_cpp_plugin = None if use_grpc_plugin: grpc_cpp_plugin = "//external:grpc_cpp_plugin" @@ -304,8 +308,7 @@ def cc_proto_library( cc_libs = cc_libs + [default_runtime] if use_grpc_plugin: cc_libs = cc_libs + ["//external:grpc_lib"] - - native.cc_library( + cc_library( name = name, srcs = gen_srcs, hdrs = gen_hdrs, @@ -314,29 +317,58 @@ def cc_proto_library( **kargs ) -def internal_gen_well_known_protos_java(srcs): - """Bazel rule to generate the gen_well_known_protos_java genrule +def _internal_gen_well_known_protos_java_impl(ctx): + args = ctx.actions.args() - Args: - srcs: the well known protos - """ - root = Label("%s//protobuf_java" % (native.repository_name())).workspace_root - pkg = native.package_name() + "/" if native.package_name() else "" - if root == "": - include = " -I%ssrc " % pkg - else: - include = " -I%s/%ssrc " % (root, pkg) - native.genrule( - name = "gen_well_known_protos_java", - srcs = srcs, - outs = [ - "wellknown.srcjar", - ], - cmd = "$(location :protoc) --java_out=$(@D)/wellknown.jar" + - " %s $(SRCS) " % include + - " && mv $(@D)/wellknown.jar $(@D)/wellknown.srcjar", - tools = [":protoc"], + deps = [d[ProtoInfo] for d in ctx.attr.deps] + + srcjar = ctx.actions.declare_file("{}.srcjar".format(ctx.attr.name)) + args.add("--java_out", srcjar) + + descriptors = depset( + transitive = [dep.transitive_descriptor_sets for dep in deps], ) + args.add_joined( + "--descriptor_set_in", + descriptors, + join_with = ctx.configuration.host_path_separator, + ) + + for dep in deps: + if "." == dep.proto_source_root: + args.add_all([src.path for src in dep.direct_sources]) + else: + source_root = dep.proto_source_root + offset = len(source_root) + 1 # + '/'. + args.add_all([src.path[offset:] for src in dep.direct_sources]) + + ctx.actions.run( + executable = ctx.executable._protoc, + inputs = descriptors, + outputs = [srcjar], + arguments = [args], + ) + + return [ + DefaultInfo( + files = depset([srcjar]), + ), + ] + +internal_gen_well_known_protos_java = rule( + implementation = _internal_gen_well_known_protos_java_impl, + attrs = { + "deps": attr.label_list( + mandatory = True, + providers = [ProtoInfo], + ), + "_protoc": attr.label( + executable = True, + cfg = "host", + default = "@com_google_protobuf//:protoc", + ), + }, +) def internal_copied_filegroup(name, srcs, strip_prefix, dest, **kwargs): """Macro to copy files to a different directory and then create a filegroup. @@ -431,8 +463,7 @@ def py_proto_library( if default_runtime and not default_runtime in py_libs + deps: py_libs = py_libs + [default_runtime] - - native.py_library( + py_library( name = name, srcs = outs + py_extra_srcs, deps = py_libs + deps, @@ -455,7 +486,7 @@ def internal_protobuf_py_tests( """ for m in modules: s = "python/google/protobuf/internal/%s.py" % m - native.py_test( + py_test( name = "py_%s" % m, srcs = [s], main = s, diff --git a/third_party/protobuf/protobuf.pc.in b/third_party/protobuf/protobuf.pc.in index 4e88b514..055a9d05 100644 --- a/third_party/protobuf/protobuf.pc.in +++ b/third_party/protobuf/protobuf.pc.in @@ -8,5 +8,6 @@ Description: Google's Data Interchange Format Version: @VERSION@ Libs: -L${libdir} -lprotobuf @PTHREAD_LIBS@ Libs.private: @LIBS@ + Cflags: -I${includedir} @PTHREAD_CFLAGS@ Conflicts: protobuf-lite diff --git a/third_party/protobuf/protobuf_deps.bzl b/third_party/protobuf/protobuf_deps.bzl new file mode 100644 index 00000000..fb0c4778 --- /dev/null +++ b/third_party/protobuf/protobuf_deps.bzl @@ -0,0 +1,65 @@ +"""Load dependencies needed to compile the protobuf library as a 3rd-party consumer.""" + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +def protobuf_deps(): + """Loads common dependencies needed to compile the protobuf library.""" + + if not native.existing_rule("bazel_skylib"): + http_archive( + name = "bazel_skylib", + sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz", + ], + ) + + if not native.existing_rule("zlib"): + http_archive( + name = "zlib", + build_file = "@com_google_protobuf//:third_party/zlib.BUILD", + sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff", + strip_prefix = "zlib-1.2.11", + urls = ["https://github.com/madler/zlib/archive/v1.2.11.tar.gz"], + ) + + if not native.existing_rule("six"): + http_archive( + name = "six", + build_file = "@com_google_protobuf//:third_party/six.BUILD", + sha256 = "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73", + urls = ["https://pypi.python.org/packages/source/s/six/six-1.12.0.tar.gz"], + ) + + if not native.existing_rule("rules_cc"): + http_archive( + name = "rules_cc", + sha256 = "29daf0159f0cf552fcff60b49d8bcd4f08f08506d2da6e41b07058ec50cfeaec", + strip_prefix = "rules_cc-b7fe9697c0c76ab2fd431a891dbb9a6a32ed7c3e", + urls = ["https://github.com/bazelbuild/rules_cc/archive/b7fe9697c0c76ab2fd431a891dbb9a6a32ed7c3e.tar.gz"], + ) + + if not native.existing_rule("rules_java"): + http_archive( + name = "rules_java", + sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3", + strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd", + urls = ["https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz"], + ) + + if not native.existing_rule("rules_proto"): + http_archive( + name = "rules_proto", + sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", + strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313", + urls = ["https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz"], + ) + + if not native.existing_rule("rules_python"): + http_archive( + name = "rules_python", + sha256 = "e5470e92a18aa51830db99a4d9c492cc613761d5bdb7131c04bd92b9834380f6", + strip_prefix = "rules_python-4b84ad270387a7c439ebdccfd530e2339601ef27", + urls = ["https://github.com/bazelbuild/rules_python/archive/4b84ad270387a7c439ebdccfd530e2339601ef27.tar.gz"], + ) diff --git a/third_party/protobuf/six.BUILD b/third_party/protobuf/six.BUILD deleted file mode 100644 index fb0b3604..00000000 --- a/third_party/protobuf/six.BUILD +++ /dev/null @@ -1,13 +0,0 @@ -genrule( - name = "copy_six", - srcs = ["six-1.10.0/six.py"], - outs = ["six.py"], - cmd = "cp $< $(@)", -) - -py_library( - name = "six", - srcs = ["six.py"], - srcs_version = "PY2AND3", - visibility = ["//visibility:public"], -) diff --git a/third_party/protobuf/src/Makefile.am b/third_party/protobuf/src/Makefile.am index be18ba76..f08c8f4b 100644 --- a/third_party/protobuf/src/Makefile.am +++ b/third_party/protobuf/src/Makefile.am @@ -18,7 +18,7 @@ else PTHREAD_DEF = endif -PROTOBUF_VERSION = 19:0:0 +PROTOBUF_VERSION = 23:4:0 if GCC # Turn on all warnings except for sign comparison (we ignore sign comparison @@ -72,6 +72,7 @@ nobase_include_HEADERS = \ google/protobuf/stubs/hash.h \ google/protobuf/stubs/logging.h \ google/protobuf/stubs/macros.h \ + google/protobuf/stubs/map_util.h \ google/protobuf/stubs/mutex.h \ google/protobuf/stubs/once.h \ google/protobuf/stubs/platform_macros.h \ @@ -104,6 +105,7 @@ nobase_include_HEADERS = \ google/protobuf/has_bits.h \ google/protobuf/implicit_weak_message.h \ google/protobuf/inlined_string_field.h \ + google/protobuf/io/io_win32.h \ google/protobuf/map_entry.h \ google/protobuf/map_entry_lite.h \ google/protobuf/map_field.h \ @@ -183,7 +185,6 @@ libprotobuf_lite_la_SOURCES = \ google/protobuf/stubs/int128.cc \ google/protobuf/stubs/int128.h \ google/protobuf/io/io_win32.cc \ - google/protobuf/io/io_win32.h \ google/protobuf/stubs/map_util.h \ google/protobuf/stubs/mathutil.h \ google/protobuf/stubs/status.cc \ @@ -202,6 +203,7 @@ libprotobuf_lite_la_SOURCES = \ google/protobuf/any_lite.cc \ google/protobuf/arena.cc \ google/protobuf/extension_set.cc \ + google/protobuf/generated_enum_util.cc \ google/protobuf/generated_message_util.cc \ google/protobuf/generated_message_table_driven_lite.h \ google/protobuf/generated_message_table_driven_lite.cc \ @@ -211,9 +213,9 @@ libprotobuf_lite_la_SOURCES = \ google/protobuf/repeated_field.cc \ google/protobuf/wire_format_lite.cc \ google/protobuf/io/coded_stream.cc \ - google/protobuf/io/coded_stream_inl.h \ google/protobuf/io/strtod.cc \ google/protobuf/io/zero_copy_stream.cc \ + google/protobuf/io/zero_copy_stream_impl.cc \ google/protobuf/io/zero_copy_stream_impl_lite.cc libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS) @@ -226,8 +228,6 @@ libprotobuf_la_SOURCES = \ $(libprotobuf_lite_la_SOURCES) \ google/protobuf/any.pb.cc \ google/protobuf/api.pb.cc \ - google/protobuf/stubs/mathlimits.cc \ - google/protobuf/stubs/mathlimits.h \ google/protobuf/any.cc \ google/protobuf/descriptor.cc \ google/protobuf/descriptor_database.cc \ @@ -258,7 +258,6 @@ libprotobuf_la_SOURCES = \ google/protobuf/io/gzip_stream.cc \ google/protobuf/io/printer.cc \ google/protobuf/io/tokenizer.cc \ - google/protobuf/io/zero_copy_stream_impl.cc \ google/protobuf/compiler/importer.cc \ google/protobuf/compiler/parser.cc \ google/protobuf/util/delimited_message_util.cc \ @@ -511,6 +510,7 @@ protoc_inputs = \ google/protobuf/unittest_proto3_arena.proto \ google/protobuf/unittest_proto3_arena_lite.proto \ google/protobuf/unittest_proto3_lite.proto \ + google/protobuf/unittest_proto3_optional.proto \ google/protobuf/unittest_well_known_types.proto \ google/protobuf/util/internal/testdata/anys.proto \ google/protobuf/util/internal/testdata/books.proto \ @@ -644,6 +644,8 @@ protoc_outputs = \ google/protobuf/unittest_proto3_arena_lite.pb.h \ google/protobuf/unittest_proto3_lite.pb.cc \ google/protobuf/unittest_proto3_lite.pb.h \ + google/protobuf/unittest_proto3_optional.pb.cc \ + google/protobuf/unittest_proto3_optional.pb.h \ google/protobuf/unittest_well_known_types.pb.cc \ google/protobuf/unittest_well_known_types.pb.h \ google/protobuf/util/internal/testdata/anys.pb.cc \ @@ -687,7 +689,7 @@ else # relative to srcdir, which may not be the same as the current directory when # building out-of-tree. unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs) - oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) ) + oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) --experimental_allow_proto3_optional ) touch unittest_proto_middleman endif @@ -697,7 +699,7 @@ $(protoc_outputs): unittest_proto_middleman COMMON_TEST_SOURCES = \ google/protobuf/arena_test_util.cc \ google/protobuf/arena_test_util.h \ - google/protobuf/map_test_util.cc \ + google/protobuf/map_test_util.inc \ google/protobuf/map_test_util.h \ google/protobuf/map_test_util_impl.h \ google/protobuf/test_util.cc \ @@ -726,6 +728,9 @@ protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \ # since test_util.cc takes forever to compile with optimization (with GCC). # See configure.ac for more info. protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) +# Doesn't pass on Windows with MSVC +NON_MSVC_TEST_SOURCES = \ + google/protobuf/compiler/command_line_interface_unittest.cc protobuf_test_SOURCES = \ google/protobuf/stubs/bytestream_unittest.cc \ google/protobuf/stubs/common_unittest.cc \ @@ -771,7 +776,6 @@ protobuf_test_SOURCES = \ google/protobuf/io/zero_copy_stream_unittest.cc \ google/protobuf/compiler/annotation_test_util.h \ google/protobuf/compiler/annotation_test_util.cc \ - google/protobuf/compiler/command_line_interface_unittest.cc \ google/protobuf/compiler/importer_unittest.cc \ google/protobuf/compiler/mock_code_generator.cc \ google/protobuf/compiler/mock_code_generator.h \ @@ -803,6 +807,7 @@ protobuf_test_SOURCES = \ google/protobuf/util/message_differencer_unittest.cc \ google/protobuf/util/time_util_test.cc \ google/protobuf/util/type_resolver_util_test.cc \ + $(NON_MSVC_TEST_SOURCES) \ $(COMMON_TEST_SOURCES) nodist_protobuf_test_SOURCES = $(protoc_outputs) $(am_protobuf_test_OBJECTS): unittest_proto_middleman diff --git a/third_party/protobuf/src/Makefile.in b/third_party/protobuf/src/Makefile.in index 13990a73..74ef6563 100644 --- a/third_party/protobuf/src/Makefile.in +++ b/third_party/protobuf/src/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -125,6 +125,10 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \ + "$(DESTDIR)$(protodir)" "$(DESTDIR)$(includedir)" +@HAVE_ZLIB_TRUE@am__EXEEXT_1 = zcgzip$(EXEEXT) zcgunzip$(EXEEXT) +PROGRAMS = $(bin_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -152,8 +156,6 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(protodir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libprotobuf_lite_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @@ -170,6 +172,7 @@ am_libprotobuf_lite_la_OBJECTS = google/protobuf/stubs/bytestream.lo \ google/protobuf/stubs/strutil.lo google/protobuf/stubs/time.lo \ google/protobuf/any_lite.lo google/protobuf/arena.lo \ google/protobuf/extension_set.lo \ + google/protobuf/generated_enum_util.lo \ google/protobuf/generated_message_util.lo \ google/protobuf/generated_message_table_driven_lite.lo \ google/protobuf/implicit_weak_message.lo \ @@ -180,6 +183,7 @@ am_libprotobuf_lite_la_OBJECTS = google/protobuf/stubs/bytestream.lo \ google/protobuf/io/coded_stream.lo \ google/protobuf/io/strtod.lo \ google/protobuf/io/zero_copy_stream.lo \ + google/protobuf/io/zero_copy_stream_impl.lo \ google/protobuf/io/zero_copy_stream_impl_lite.lo libprotobuf_lite_la_OBJECTS = $(am_libprotobuf_lite_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -203,6 +207,7 @@ am__objects_1 = google/protobuf/stubs/bytestream.lo \ google/protobuf/stubs/strutil.lo google/protobuf/stubs/time.lo \ google/protobuf/any_lite.lo google/protobuf/arena.lo \ google/protobuf/extension_set.lo \ + google/protobuf/generated_enum_util.lo \ google/protobuf/generated_message_util.lo \ google/protobuf/generated_message_table_driven_lite.lo \ google/protobuf/implicit_weak_message.lo \ @@ -213,10 +218,11 @@ am__objects_1 = google/protobuf/stubs/bytestream.lo \ google/protobuf/io/coded_stream.lo \ google/protobuf/io/strtod.lo \ google/protobuf/io/zero_copy_stream.lo \ + google/protobuf/io/zero_copy_stream_impl.lo \ google/protobuf/io/zero_copy_stream_impl_lite.lo am_libprotobuf_la_OBJECTS = $(am__objects_1) google/protobuf/any.pb.lo \ - google/protobuf/api.pb.lo google/protobuf/stubs/mathlimits.lo \ - google/protobuf/any.lo google/protobuf/descriptor.lo \ + google/protobuf/api.pb.lo google/protobuf/any.lo \ + google/protobuf/descriptor.lo \ google/protobuf/descriptor_database.lo \ google/protobuf/descriptor.pb.lo \ google/protobuf/duration.pb.lo \ @@ -236,7 +242,6 @@ am_libprotobuf_la_OBJECTS = $(am__objects_1) google/protobuf/any.pb.lo \ google/protobuf/wire_format.lo google/protobuf/wrappers.pb.lo \ google/protobuf/io/gzip_stream.lo \ google/protobuf/io/printer.lo google/protobuf/io/tokenizer.lo \ - google/protobuf/io/zero_copy_stream_impl.lo \ google/protobuf/compiler/importer.lo \ google/protobuf/compiler/parser.lo \ google/protobuf/util/delimited_message_util.lo \ @@ -353,8 +358,6 @@ libprotoc_la_OBJECTS = $(am_libprotoc_la_OBJECTS) libprotoc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libprotoc_la_LDFLAGS) $(LDFLAGS) -o $@ -@HAVE_ZLIB_TRUE@am__EXEEXT_1 = zcgzip$(EXEEXT) zcgunzip$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) am__objects_2 = google/protobuf/no_warning_test-map_lite_unittest.pb.$(OBJEXT) \ google/protobuf/no_warning_test-unittest_lite.pb.$(OBJEXT) \ google/protobuf/no_warning_test-unittest_no_arena_lite.pb.$(OBJEXT) \ @@ -392,6 +395,7 @@ am__objects_3 = $(am__objects_2) \ google/protobuf/no_warning_test-unittest_proto3_arena.pb.$(OBJEXT) \ google/protobuf/no_warning_test-unittest_proto3_arena_lite.pb.$(OBJEXT) \ google/protobuf/no_warning_test-unittest_proto3_lite.pb.$(OBJEXT) \ + google/protobuf/no_warning_test-unittest_proto3_optional.pb.$(OBJEXT) \ google/protobuf/no_warning_test-unittest_well_known_types.pb.$(OBJEXT) \ google/protobuf/util/internal/testdata/no_warning_test-anys.pb.$(OBJEXT) \ google/protobuf/util/internal/testdata/no_warning_test-books.pb.$(OBJEXT) \ @@ -417,7 +421,6 @@ no_warning_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(no_warning_test_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am__objects_4 = google/protobuf/protobuf_lazy_descriptor_test-arena_test_util.$(OBJEXT) \ - google/protobuf/protobuf_lazy_descriptor_test-map_test_util.$(OBJEXT) \ google/protobuf/protobuf_lazy_descriptor_test-test_util.$(OBJEXT) \ google/protobuf/testing/protobuf_lazy_descriptor_test-googletest.$(OBJEXT) \ google/protobuf/testing/protobuf_lazy_descriptor_test-file.$(OBJEXT) @@ -460,6 +463,7 @@ am__objects_6 = $(am__objects_5) \ google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_arena.pb.$(OBJEXT) \ google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_arena_lite.pb.$(OBJEXT) \ google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_lite.pb.$(OBJEXT) \ + google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.$(OBJEXT) \ google/protobuf/protobuf_lazy_descriptor_test-unittest_well_known_types.pb.$(OBJEXT) \ google/protobuf/util/internal/testdata/protobuf_lazy_descriptor_test-anys.pb.$(OBJEXT) \ google/protobuf/util/internal/testdata/protobuf_lazy_descriptor_test-books.pb.$(OBJEXT) \ @@ -533,9 +537,9 @@ protobuf_lite_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(protobuf_lite_test_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -am__objects_11 = \ +am__objects_11 = google/protobuf/compiler/protobuf_test-command_line_interface_unittest.$(OBJEXT) +am__objects_12 = \ google/protobuf/protobuf_test-arena_test_util.$(OBJEXT) \ - google/protobuf/protobuf_test-map_test_util.$(OBJEXT) \ google/protobuf/protobuf_test-test_util.$(OBJEXT) \ google/protobuf/testing/protobuf_test-googletest.$(OBJEXT) \ google/protobuf/testing/protobuf_test-file.$(OBJEXT) @@ -580,7 +584,6 @@ am_protobuf_test_OBJECTS = google/protobuf/stubs/protobuf_test-bytestream_unitte google/protobuf/io/protobuf_test-tokenizer_unittest.$(OBJEXT) \ google/protobuf/io/protobuf_test-zero_copy_stream_unittest.$(OBJEXT) \ google/protobuf/compiler/protobuf_test-annotation_test_util.$(OBJEXT) \ - google/protobuf/compiler/protobuf_test-command_line_interface_unittest.$(OBJEXT) \ google/protobuf/compiler/protobuf_test-importer_unittest.$(OBJEXT) \ google/protobuf/compiler/protobuf_test-mock_code_generator.$(OBJEXT) \ google/protobuf/compiler/protobuf_test-parser_unittest.$(OBJEXT) \ @@ -609,14 +612,14 @@ am_protobuf_test_OBJECTS = google/protobuf/stubs/protobuf_test-bytestream_unitte google/protobuf/util/protobuf_test-message_differencer_unittest.$(OBJEXT) \ google/protobuf/util/protobuf_test-time_util_test.$(OBJEXT) \ google/protobuf/util/protobuf_test-type_resolver_util_test.$(OBJEXT) \ - $(am__objects_11) -am__objects_12 = \ + $(am__objects_11) $(am__objects_12) +am__objects_13 = \ google/protobuf/protobuf_test-map_lite_unittest.pb.$(OBJEXT) \ google/protobuf/protobuf_test-unittest_lite.pb.$(OBJEXT) \ google/protobuf/protobuf_test-unittest_no_arena_lite.pb.$(OBJEXT) \ google/protobuf/protobuf_test-unittest_import_lite.pb.$(OBJEXT) \ google/protobuf/protobuf_test-unittest_import_public_lite.pb.$(OBJEXT) -am__objects_13 = $(am__objects_12) \ +am__objects_14 = $(am__objects_13) \ google/protobuf/protobuf_test-any_test.pb.$(OBJEXT) \ google/protobuf/compiler/cpp/protobuf_test-cpp_test_bad_identifiers.pb.$(OBJEXT) \ google/protobuf/compiler/cpp/protobuf_test-cpp_test_large_enum_value.pb.$(OBJEXT) \ @@ -648,6 +651,7 @@ am__objects_13 = $(am__objects_12) \ google/protobuf/protobuf_test-unittest_proto3_arena.pb.$(OBJEXT) \ google/protobuf/protobuf_test-unittest_proto3_arena_lite.pb.$(OBJEXT) \ google/protobuf/protobuf_test-unittest_proto3_lite.pb.$(OBJEXT) \ + google/protobuf/protobuf_test-unittest_proto3_optional.pb.$(OBJEXT) \ google/protobuf/protobuf_test-unittest_well_known_types.pb.$(OBJEXT) \ google/protobuf/util/internal/testdata/protobuf_test-anys.pb.$(OBJEXT) \ google/protobuf/util/internal/testdata/protobuf_test-books.pb.$(OBJEXT) \ @@ -663,7 +667,7 @@ am__objects_13 = $(am__objects_12) \ google/protobuf/util/protobuf_test-json_format.pb.$(OBJEXT) \ google/protobuf/util/protobuf_test-json_format_proto3.pb.$(OBJEXT) \ google/protobuf/util/protobuf_test-message_differencer_unittest.pb.$(OBJEXT) -nodist_protobuf_test_OBJECTS = $(am__objects_13) +nodist_protobuf_test_OBJECTS = $(am__objects_14) protobuf_test_OBJECTS = $(am_protobuf_test_OBJECTS) \ $(nodist_protobuf_test_OBJECTS) protobuf_test_DEPENDENCIES = $(am__DEPENDENCIES_1) libprotobuf.la \ @@ -710,7 +714,427 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/no_warning_test-no_warning_test.Po \ + google/protobuf/$(DEPDIR)/any.Plo \ + google/protobuf/$(DEPDIR)/any.pb.Plo \ + google/protobuf/$(DEPDIR)/any_lite.Plo \ + google/protobuf/$(DEPDIR)/api.pb.Plo \ + google/protobuf/$(DEPDIR)/arena.Plo \ + google/protobuf/$(DEPDIR)/descriptor.Plo \ + google/protobuf/$(DEPDIR)/descriptor.pb.Plo \ + google/protobuf/$(DEPDIR)/descriptor_database.Plo \ + google/protobuf/$(DEPDIR)/duration.pb.Plo \ + google/protobuf/$(DEPDIR)/dynamic_message.Plo \ + google/protobuf/$(DEPDIR)/empty.pb.Plo \ + google/protobuf/$(DEPDIR)/extension_set.Plo \ + google/protobuf/$(DEPDIR)/extension_set_heavy.Plo \ + google/protobuf/$(DEPDIR)/field_mask.pb.Plo \ + google/protobuf/$(DEPDIR)/generated_enum_util.Plo \ + google/protobuf/$(DEPDIR)/generated_message_reflection.Plo \ + google/protobuf/$(DEPDIR)/generated_message_table_driven.Plo \ + google/protobuf/$(DEPDIR)/generated_message_table_driven_lite.Plo \ + google/protobuf/$(DEPDIR)/generated_message_util.Plo \ + google/protobuf/$(DEPDIR)/implicit_weak_message.Plo \ + google/protobuf/$(DEPDIR)/map_field.Plo \ + google/protobuf/$(DEPDIR)/message.Plo \ + google/protobuf/$(DEPDIR)/message_lite.Plo \ + google/protobuf/$(DEPDIR)/no_warning_test-any_test.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-map_lite_unittest.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-map_proto2_unittest.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-map_unittest.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_arena.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_custom_options.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_drop_unknown_fields.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_embed_optimize_for.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_empty.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_enormous_descriptor.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_import.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_import_lite.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_import_public.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_import_public_lite.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_lazy_dependencies.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_lazy_dependencies_custom_option.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_lazy_dependencies_enum.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_lite.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_lite_imports_nonlite.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_mset.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_mset_wire_format.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_arena.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_arena_import.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_arena_lite.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_field_presence.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_generic_services.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_optimize_for.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_preserve_unknown_enum.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_preserve_unknown_enum2.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_arena.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_arena_lite.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_lite.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_optional.pb.Po \ + google/protobuf/$(DEPDIR)/no_warning_test-unittest_well_known_types.pb.Po \ + google/protobuf/$(DEPDIR)/parse_context.Plo \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-any_test.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-arena_test_util.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_lite_unittest.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_proto2_unittest.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_unittest.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-test_util.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_arena.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_custom_options.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_drop_unknown_fields.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_embed_optimize_for.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_empty.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_enormous_descriptor.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import_public.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import_public_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lazy_dependencies.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lazy_dependencies_custom_option.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lazy_dependencies_enum.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lite_imports_nonlite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_mset.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_mset_wire_format.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_arena.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_arena_import.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_arena_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_field_presence.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_generic_services.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_optimize_for.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_preserve_unknown_enum.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_preserve_unknown_enum2.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_arena.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_arena_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_well_known_types.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-arena_test_util.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-lite_arena_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-map_lite_test_util.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-map_lite_unittest.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-test_util_lite.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_import_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_import_public_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_no_arena_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_test-arena_test_util.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_test-lite_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_test-map_lite_test_util.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_test-map_lite_unittest.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_test-test_util_lite.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_import_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_import_public_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_no_arena_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-any_test.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-any_test.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-arena_test_util.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-arena_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-arenastring_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-descriptor_database_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-descriptor_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-drop_unknown_fields_test.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-dynamic_message_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-extension_set_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-generated_message_reflection_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-map_field_test.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-map_lite_unittest.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-map_proto2_unittest.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-map_test.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-map_unittest.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-message_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-no_field_presence_test.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-preserve_unknown_enum_test.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-proto3_arena_lite_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-proto3_arena_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-proto3_lite_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-reflection_ops_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-repeated_field_reflection_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-repeated_field_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-test_util.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-text_format_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_arena.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_custom_options.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_drop_unknown_fields.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_embed_optimize_for.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_empty.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_enormous_descriptor.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_import.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_import_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_import_public.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_import_public_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_lazy_dependencies.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_lazy_dependencies_custom_option.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_lazy_dependencies_enum.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_lite_imports_nonlite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_mset.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_mset_wire_format.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_arena.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_arena_import.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_arena_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_field_presence.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_generic_services.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_optimize_for.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_preserve_unknown_enum.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_preserve_unknown_enum2.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_arena.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_arena_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_lite.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_optional.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unittest_well_known_types.pb.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-unknown_field_set_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-well_known_types_unittest.Po \ + google/protobuf/$(DEPDIR)/protobuf_test-wire_format_unittest.Po \ + google/protobuf/$(DEPDIR)/reflection_ops.Plo \ + google/protobuf/$(DEPDIR)/repeated_field.Plo \ + google/protobuf/$(DEPDIR)/service.Plo \ + google/protobuf/$(DEPDIR)/source_context.pb.Plo \ + google/protobuf/$(DEPDIR)/struct.pb.Plo \ + google/protobuf/$(DEPDIR)/text_format.Plo \ + google/protobuf/$(DEPDIR)/timestamp.pb.Plo \ + google/protobuf/$(DEPDIR)/type.pb.Plo \ + google/protobuf/$(DEPDIR)/unknown_field_set.Plo \ + google/protobuf/$(DEPDIR)/wire_format.Plo \ + google/protobuf/$(DEPDIR)/wire_format_lite.Plo \ + google/protobuf/$(DEPDIR)/wrappers.pb.Plo \ + google/protobuf/compiler/$(DEPDIR)/code_generator.Plo \ + google/protobuf/compiler/$(DEPDIR)/command_line_interface.Plo \ + google/protobuf/compiler/$(DEPDIR)/importer.Plo \ + google/protobuf/compiler/$(DEPDIR)/main.Po \ + google/protobuf/compiler/$(DEPDIR)/parser.Plo \ + google/protobuf/compiler/$(DEPDIR)/plugin.Plo \ + google/protobuf/compiler/$(DEPDIR)/plugin.pb.Plo \ + google/protobuf/compiler/$(DEPDIR)/protobuf_test-annotation_test_util.Po \ + google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Po \ + google/protobuf/compiler/$(DEPDIR)/protobuf_test-importer_unittest.Po \ + google/protobuf/compiler/$(DEPDIR)/protobuf_test-mock_code_generator.Po \ + google/protobuf/compiler/$(DEPDIR)/protobuf_test-parser_unittest.Po \ + google/protobuf/compiler/$(DEPDIR)/subprocess.Plo \ + google/protobuf/compiler/$(DEPDIR)/test_plugin-mock_code_generator.Po \ + google/protobuf/compiler/$(DEPDIR)/test_plugin-test_plugin.Po \ + google/protobuf/compiler/$(DEPDIR)/zip_writer.Plo \ + google/protobuf/compiler/cpp/$(DEPDIR)/cpp_enum.Plo \ + google/protobuf/compiler/cpp/$(DEPDIR)/cpp_enum_field.Plo \ + google/protobuf/compiler/cpp/$(DEPDIR)/cpp_extension.Plo \ + google/protobuf/compiler/cpp/$(DEPDIR)/cpp_field.Plo \ + google/protobuf/compiler/cpp/$(DEPDIR)/cpp_file.Plo \ + google/protobuf/compiler/cpp/$(DEPDIR)/cpp_generator.Plo \ + google/protobuf/compiler/cpp/$(DEPDIR)/cpp_helpers.Plo \ + google/protobuf/compiler/cpp/$(DEPDIR)/cpp_map_field.Plo \ + google/protobuf/compiler/cpp/$(DEPDIR)/cpp_message.Plo \ + google/protobuf/compiler/cpp/$(DEPDIR)/cpp_message_field.Plo \ + google/protobuf/compiler/cpp/$(DEPDIR)/cpp_padding_optimizer.Plo \ + google/protobuf/compiler/cpp/$(DEPDIR)/cpp_primitive_field.Plo \ + google/protobuf/compiler/cpp/$(DEPDIR)/cpp_service.Plo \ + google/protobuf/compiler/cpp/$(DEPDIR)/cpp_string_field.Plo \ + google/protobuf/compiler/cpp/$(DEPDIR)/no_warning_test-cpp_test_bad_identifiers.pb.Po \ + google/protobuf/compiler/cpp/$(DEPDIR)/no_warning_test-cpp_test_large_enum_value.pb.Po \ + google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_lazy_descriptor_test-cpp_test_bad_identifiers.pb.Po \ + google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_lazy_descriptor_test-cpp_test_large_enum_value.pb.Po \ + google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_lazy_descriptor_test-cpp_unittest.Po \ + google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_bootstrap_unittest.Po \ + google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_move_unittest.Po \ + google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_plugin_unittest.Po \ + google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_test_bad_identifiers.pb.Po \ + google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_test_large_enum_value.pb.Po \ + google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_unittest.Po \ + google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-metadata_test.Po \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_doc_comment.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_enum.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_enum_field.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_field_base.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_generator.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_helpers.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_map_field.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_message.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_message_field.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_primitive_field.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_reflection_class.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_repeated_enum_field.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_repeated_message_field.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_repeated_primitive_field.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_source_generator_base.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/csharp_wrapper_field.Plo \ + google/protobuf/compiler/csharp/$(DEPDIR)/protobuf_test-csharp_bootstrap_unittest.Po \ + google/protobuf/compiler/csharp/$(DEPDIR)/protobuf_test-csharp_generator_unittest.Po \ + google/protobuf/compiler/java/$(DEPDIR)/java_context.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_doc_comment.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_enum.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_enum_field.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_enum_field_lite.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_enum_lite.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_extension.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_extension_lite.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_field.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_file.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_generator.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_generator_factory.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_helpers.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_map_field.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_map_field_lite.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_message.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_message_builder.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_message_builder_lite.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_message_field.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_message_field_lite.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_message_lite.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_name_resolver.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_primitive_field.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_primitive_field_lite.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_service.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_shared_code_generator.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_string_field.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/java_string_field_lite.Plo \ + google/protobuf/compiler/java/$(DEPDIR)/protobuf_test-java_doc_comment_unittest.Po \ + google/protobuf/compiler/java/$(DEPDIR)/protobuf_test-java_plugin_unittest.Po \ + google/protobuf/compiler/js/$(DEPDIR)/js_generator.Plo \ + google/protobuf/compiler/js/$(DEPDIR)/well_known_types_embed.Plo \ + google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_enum.Plo \ + google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_enum_field.Plo \ + google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_extension.Plo \ + google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_field.Plo \ + google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_file.Plo \ + google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_generator.Plo \ + google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_helpers.Plo \ + google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_map_field.Plo \ + google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_message.Plo \ + google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_message_field.Plo \ + google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_oneof.Plo \ + google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_primitive_field.Plo \ + google/protobuf/compiler/objectivec/$(DEPDIR)/protobuf_test-objectivec_helpers_unittest.Po \ + google/protobuf/compiler/php/$(DEPDIR)/php_generator.Plo \ + google/protobuf/compiler/python/$(DEPDIR)/protobuf_test-python_plugin_unittest.Po \ + google/protobuf/compiler/python/$(DEPDIR)/python_generator.Plo \ + google/protobuf/compiler/ruby/$(DEPDIR)/protobuf_test-ruby_generator_unittest.Po \ + google/protobuf/compiler/ruby/$(DEPDIR)/ruby_generator.Plo \ + google/protobuf/io/$(DEPDIR)/coded_stream.Plo \ + google/protobuf/io/$(DEPDIR)/gzip_stream.Plo \ + google/protobuf/io/$(DEPDIR)/io_win32.Plo \ + google/protobuf/io/$(DEPDIR)/printer.Plo \ + google/protobuf/io/$(DEPDIR)/protobuf_test-coded_stream_unittest.Po \ + google/protobuf/io/$(DEPDIR)/protobuf_test-io_win32_unittest.Po \ + google/protobuf/io/$(DEPDIR)/protobuf_test-printer_unittest.Po \ + google/protobuf/io/$(DEPDIR)/protobuf_test-tokenizer_unittest.Po \ + google/protobuf/io/$(DEPDIR)/protobuf_test-zero_copy_stream_unittest.Po \ + google/protobuf/io/$(DEPDIR)/strtod.Plo \ + google/protobuf/io/$(DEPDIR)/tokenizer.Plo \ + google/protobuf/io/$(DEPDIR)/zero_copy_stream.Plo \ + google/protobuf/io/$(DEPDIR)/zero_copy_stream_impl.Plo \ + google/protobuf/io/$(DEPDIR)/zero_copy_stream_impl_lite.Plo \ + google/protobuf/stubs/$(DEPDIR)/bytestream.Plo \ + google/protobuf/stubs/$(DEPDIR)/common.Plo \ + google/protobuf/stubs/$(DEPDIR)/int128.Plo \ + google/protobuf/stubs/$(DEPDIR)/protobuf_test-bytestream_unittest.Po \ + google/protobuf/stubs/$(DEPDIR)/protobuf_test-common_unittest.Po \ + google/protobuf/stubs/$(DEPDIR)/protobuf_test-int128_unittest.Po \ + google/protobuf/stubs/$(DEPDIR)/protobuf_test-status_test.Po \ + google/protobuf/stubs/$(DEPDIR)/protobuf_test-statusor_test.Po \ + google/protobuf/stubs/$(DEPDIR)/protobuf_test-stringpiece_unittest.Po \ + google/protobuf/stubs/$(DEPDIR)/protobuf_test-stringprintf_unittest.Po \ + google/protobuf/stubs/$(DEPDIR)/protobuf_test-structurally_valid_unittest.Po \ + google/protobuf/stubs/$(DEPDIR)/protobuf_test-strutil_unittest.Po \ + google/protobuf/stubs/$(DEPDIR)/protobuf_test-template_util_unittest.Po \ + google/protobuf/stubs/$(DEPDIR)/protobuf_test-time_test.Po \ + google/protobuf/stubs/$(DEPDIR)/status.Plo \ + google/protobuf/stubs/$(DEPDIR)/statusor.Plo \ + google/protobuf/stubs/$(DEPDIR)/stringpiece.Plo \ + google/protobuf/stubs/$(DEPDIR)/stringprintf.Plo \ + google/protobuf/stubs/$(DEPDIR)/structurally_valid.Plo \ + google/protobuf/stubs/$(DEPDIR)/strutil.Plo \ + google/protobuf/stubs/$(DEPDIR)/substitute.Plo \ + google/protobuf/stubs/$(DEPDIR)/time.Plo \ + google/protobuf/testing/$(DEPDIR)/protobuf_lazy_descriptor_test-file.Po \ + google/protobuf/testing/$(DEPDIR)/protobuf_lazy_descriptor_test-googletest.Po \ + google/protobuf/testing/$(DEPDIR)/protobuf_test-file.Po \ + google/protobuf/testing/$(DEPDIR)/protobuf_test-googletest.Po \ + google/protobuf/testing/$(DEPDIR)/test_plugin-file.Po \ + google/protobuf/testing/$(DEPDIR)/zcgunzip.Po \ + google/protobuf/testing/$(DEPDIR)/zcgzip.Po \ + google/protobuf/util/$(DEPDIR)/delimited_message_util.Plo \ + google/protobuf/util/$(DEPDIR)/field_comparator.Plo \ + google/protobuf/util/$(DEPDIR)/field_mask_util.Plo \ + google/protobuf/util/$(DEPDIR)/json_util.Plo \ + google/protobuf/util/$(DEPDIR)/message_differencer.Plo \ + google/protobuf/util/$(DEPDIR)/no_warning_test-json_format.pb.Po \ + google/protobuf/util/$(DEPDIR)/no_warning_test-json_format_proto3.pb.Po \ + google/protobuf/util/$(DEPDIR)/no_warning_test-message_differencer_unittest.pb.Po \ + google/protobuf/util/$(DEPDIR)/protobuf_lazy_descriptor_test-json_format.pb.Po \ + google/protobuf/util/$(DEPDIR)/protobuf_lazy_descriptor_test-json_format_proto3.pb.Po \ + google/protobuf/util/$(DEPDIR)/protobuf_lazy_descriptor_test-message_differencer_unittest.pb.Po \ + google/protobuf/util/$(DEPDIR)/protobuf_test-delimited_message_util_test.Po \ + google/protobuf/util/$(DEPDIR)/protobuf_test-field_comparator_test.Po \ + google/protobuf/util/$(DEPDIR)/protobuf_test-field_mask_util_test.Po \ + google/protobuf/util/$(DEPDIR)/protobuf_test-json_format.pb.Po \ + google/protobuf/util/$(DEPDIR)/protobuf_test-json_format_proto3.pb.Po \ + google/protobuf/util/$(DEPDIR)/protobuf_test-json_util_test.Po \ + google/protobuf/util/$(DEPDIR)/protobuf_test-message_differencer_unittest.Po \ + google/protobuf/util/$(DEPDIR)/protobuf_test-message_differencer_unittest.pb.Po \ + google/protobuf/util/$(DEPDIR)/protobuf_test-time_util_test.Po \ + google/protobuf/util/$(DEPDIR)/protobuf_test-type_resolver_util_test.Po \ + google/protobuf/util/$(DEPDIR)/time_util.Plo \ + google/protobuf/util/$(DEPDIR)/type_resolver_util.Plo \ + google/protobuf/util/internal/$(DEPDIR)/datapiece.Plo \ + google/protobuf/util/internal/$(DEPDIR)/default_value_objectwriter.Plo \ + google/protobuf/util/internal/$(DEPDIR)/error_listener.Plo \ + google/protobuf/util/internal/$(DEPDIR)/field_mask_utility.Plo \ + google/protobuf/util/internal/$(DEPDIR)/json_escaping.Plo \ + google/protobuf/util/internal/$(DEPDIR)/json_objectwriter.Plo \ + google/protobuf/util/internal/$(DEPDIR)/json_stream_parser.Plo \ + google/protobuf/util/internal/$(DEPDIR)/object_writer.Plo \ + google/protobuf/util/internal/$(DEPDIR)/proto_writer.Plo \ + google/protobuf/util/internal/$(DEPDIR)/protobuf_test-default_value_objectwriter_test.Po \ + google/protobuf/util/internal/$(DEPDIR)/protobuf_test-json_objectwriter_test.Po \ + google/protobuf/util/internal/$(DEPDIR)/protobuf_test-json_stream_parser_test.Po \ + google/protobuf/util/internal/$(DEPDIR)/protobuf_test-protostream_objectsource_test.Po \ + google/protobuf/util/internal/$(DEPDIR)/protobuf_test-protostream_objectwriter_test.Po \ + google/protobuf/util/internal/$(DEPDIR)/protobuf_test-type_info_test_helper.Po \ + google/protobuf/util/internal/$(DEPDIR)/protostream_objectsource.Plo \ + google/protobuf/util/internal/$(DEPDIR)/protostream_objectwriter.Plo \ + google/protobuf/util/internal/$(DEPDIR)/type_info.Plo \ + google/protobuf/util/internal/$(DEPDIR)/type_info_test_helper.Plo \ + google/protobuf/util/internal/$(DEPDIR)/utility.Plo \ + google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-anys.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-books.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-default_value.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-default_value_test.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-field_mask.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-maps.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-oneofs.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-proto3.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-struct.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-timestamp_duration.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-wrappers.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-anys.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-books.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-default_value.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-default_value_test.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-field_mask.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-maps.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-oneofs.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-proto3.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-struct.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-timestamp_duration.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-wrappers.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-anys.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-books.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-default_value.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-default_value_test.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-field_mask.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-maps.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-oneofs.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-proto3.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-struct.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-timestamp_duration.pb.Po \ + google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-wrappers.pb.Po am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -777,7 +1201,8 @@ am__nobase_include_HEADERS_DIST = google/protobuf/stubs/callback.h \ google/protobuf/stubs/casts.h google/protobuf/stubs/common.h \ google/protobuf/stubs/fastmem.h google/protobuf/stubs/hash.h \ google/protobuf/stubs/logging.h google/protobuf/stubs/macros.h \ - google/protobuf/stubs/mutex.h google/protobuf/stubs/once.h \ + google/protobuf/stubs/map_util.h google/protobuf/stubs/mutex.h \ + google/protobuf/stubs/once.h \ google/protobuf/stubs/platform_macros.h \ google/protobuf/stubs/port.h google/protobuf/stubs/status.h \ google/protobuf/stubs/stl_util.h \ @@ -802,8 +1227,9 @@ am__nobase_include_HEADERS_DIST = google/protobuf/stubs/callback.h \ google/protobuf/has_bits.h \ google/protobuf/implicit_weak_message.h \ google/protobuf/inlined_string_field.h \ - google/protobuf/map_entry.h google/protobuf/map_entry_lite.h \ - google/protobuf/map_field.h google/protobuf/map_field_inl.h \ + google/protobuf/io/io_win32.h google/protobuf/map_entry.h \ + google/protobuf/map_entry_lite.h google/protobuf/map_field.h \ + google/protobuf/map_field_inl.h \ google/protobuf/map_field_lite.h google/protobuf/map.h \ google/protobuf/map_type_handler.h google/protobuf/message.h \ google/protobuf/message_lite.h google/protobuf/metadata.h \ @@ -1218,7 +1644,7 @@ top_srcdir = @top_srcdir@ @HAVE_ZLIB_TRUE@ZLIB_DEF = -DHAVE_ZLIB=1 @HAVE_PTHREAD_FALSE@PTHREAD_DEF = @HAVE_PTHREAD_TRUE@PTHREAD_DEF = -DHAVE_PTHREAD=1 -PROTOBUF_VERSION = 19:0:0 +PROTOBUF_VERSION = 23:4:0 @GCC_FALSE@NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) # Turn on all warnings except for sign comparison (we ignore sign comparison @@ -1263,6 +1689,7 @@ nobase_include_HEADERS = \ google/protobuf/stubs/hash.h \ google/protobuf/stubs/logging.h \ google/protobuf/stubs/macros.h \ + google/protobuf/stubs/map_util.h \ google/protobuf/stubs/mutex.h \ google/protobuf/stubs/once.h \ google/protobuf/stubs/platform_macros.h \ @@ -1295,6 +1722,7 @@ nobase_include_HEADERS = \ google/protobuf/has_bits.h \ google/protobuf/implicit_weak_message.h \ google/protobuf/inlined_string_field.h \ + google/protobuf/io/io_win32.h \ google/protobuf/map_entry.h \ google/protobuf/map_entry_lite.h \ google/protobuf/map_field.h \ @@ -1371,7 +1799,6 @@ libprotobuf_lite_la_SOURCES = \ google/protobuf/stubs/int128.cc \ google/protobuf/stubs/int128.h \ google/protobuf/io/io_win32.cc \ - google/protobuf/io/io_win32.h \ google/protobuf/stubs/map_util.h \ google/protobuf/stubs/mathutil.h \ google/protobuf/stubs/status.cc \ @@ -1390,6 +1817,7 @@ libprotobuf_lite_la_SOURCES = \ google/protobuf/any_lite.cc \ google/protobuf/arena.cc \ google/protobuf/extension_set.cc \ + google/protobuf/generated_enum_util.cc \ google/protobuf/generated_message_util.cc \ google/protobuf/generated_message_table_driven_lite.h \ google/protobuf/generated_message_table_driven_lite.cc \ @@ -1399,9 +1827,9 @@ libprotobuf_lite_la_SOURCES = \ google/protobuf/repeated_field.cc \ google/protobuf/wire_format_lite.cc \ google/protobuf/io/coded_stream.cc \ - google/protobuf/io/coded_stream_inl.h \ google/protobuf/io/strtod.cc \ google/protobuf/io/zero_copy_stream.cc \ + google/protobuf/io/zero_copy_stream_impl.cc \ google/protobuf/io/zero_copy_stream_impl_lite.cc libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS) @@ -1412,8 +1840,6 @@ libprotobuf_la_SOURCES = \ $(libprotobuf_lite_la_SOURCES) \ google/protobuf/any.pb.cc \ google/protobuf/api.pb.cc \ - google/protobuf/stubs/mathlimits.cc \ - google/protobuf/stubs/mathlimits.h \ google/protobuf/any.cc \ google/protobuf/descriptor.cc \ google/protobuf/descriptor_database.cc \ @@ -1444,7 +1870,6 @@ libprotobuf_la_SOURCES = \ google/protobuf/io/gzip_stream.cc \ google/protobuf/io/printer.cc \ google/protobuf/io/tokenizer.cc \ - google/protobuf/io/zero_copy_stream_impl.cc \ google/protobuf/compiler/importer.cc \ google/protobuf/compiler/parser.cc \ google/protobuf/util/delimited_message_util.cc \ @@ -1692,6 +2117,7 @@ protoc_inputs = \ google/protobuf/unittest_proto3_arena.proto \ google/protobuf/unittest_proto3_arena_lite.proto \ google/protobuf/unittest_proto3_lite.proto \ + google/protobuf/unittest_proto3_optional.proto \ google/protobuf/unittest_well_known_types.proto \ google/protobuf/util/internal/testdata/anys.proto \ google/protobuf/util/internal/testdata/books.proto \ @@ -1825,6 +2251,8 @@ protoc_outputs = \ google/protobuf/unittest_proto3_arena_lite.pb.h \ google/protobuf/unittest_proto3_lite.pb.cc \ google/protobuf/unittest_proto3_lite.pb.h \ + google/protobuf/unittest_proto3_optional.pb.cc \ + google/protobuf/unittest_proto3_optional.pb.h \ google/protobuf/unittest_well_known_types.pb.cc \ google/protobuf/unittest_well_known_types.pb.h \ google/protobuf/util/internal/testdata/anys.pb.cc \ @@ -1859,7 +2287,7 @@ protoc_outputs = \ COMMON_TEST_SOURCES = \ google/protobuf/arena_test_util.cc \ google/protobuf/arena_test_util.h \ - google/protobuf/map_test_util.cc \ + google/protobuf/map_test_util.inc \ google/protobuf/map_test_util.h \ google/protobuf/map_test_util_impl.h \ google/protobuf/test_util.cc \ @@ -1887,6 +2315,10 @@ protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \ # since test_util.cc takes forever to compile with optimization (with GCC). # See configure.ac for more info. protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) +# Doesn't pass on Windows with MSVC +NON_MSVC_TEST_SOURCES = \ + google/protobuf/compiler/command_line_interface_unittest.cc + protobuf_test_SOURCES = \ google/protobuf/stubs/bytestream_unittest.cc \ google/protobuf/stubs/common_unittest.cc \ @@ -1932,7 +2364,6 @@ protobuf_test_SOURCES = \ google/protobuf/io/zero_copy_stream_unittest.cc \ google/protobuf/compiler/annotation_test_util.h \ google/protobuf/compiler/annotation_test_util.cc \ - google/protobuf/compiler/command_line_interface_unittest.cc \ google/protobuf/compiler/importer_unittest.cc \ google/protobuf/compiler/mock_code_generator.cc \ google/protobuf/compiler/mock_code_generator.h \ @@ -1964,6 +2395,7 @@ protobuf_test_SOURCES = \ google/protobuf/util/message_differencer_unittest.cc \ google/protobuf/util/time_util_test.cc \ google/protobuf/util/type_resolver_util_test.cc \ + $(NON_MSVC_TEST_SOURCES) \ $(COMMON_TEST_SOURCES) nodist_protobuf_test_SOURCES = $(protoc_outputs) @@ -2072,8 +2504,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -2084,6 +2516,64 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @@ -2174,6 +2664,9 @@ google/protobuf/arena.lo: google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) google/protobuf/extension_set.lo: google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) +google/protobuf/generated_enum_util.lo: \ + google/protobuf/$(am__dirstamp) \ + google/protobuf/$(DEPDIR)/$(am__dirstamp) google/protobuf/generated_message_util.lo: \ google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) @@ -2199,6 +2692,9 @@ google/protobuf/io/strtod.lo: google/protobuf/io/$(am__dirstamp) \ google/protobuf/io/zero_copy_stream.lo: \ google/protobuf/io/$(am__dirstamp) \ google/protobuf/io/$(DEPDIR)/$(am__dirstamp) +google/protobuf/io/zero_copy_stream_impl.lo: \ + google/protobuf/io/$(am__dirstamp) \ + google/protobuf/io/$(DEPDIR)/$(am__dirstamp) google/protobuf/io/zero_copy_stream_impl_lite.lo: \ google/protobuf/io/$(am__dirstamp) \ google/protobuf/io/$(DEPDIR)/$(am__dirstamp) @@ -2209,9 +2705,6 @@ google/protobuf/any.pb.lo: google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) google/protobuf/api.pb.lo: google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) -google/protobuf/stubs/mathlimits.lo: \ - google/protobuf/stubs/$(am__dirstamp) \ - google/protobuf/stubs/$(DEPDIR)/$(am__dirstamp) google/protobuf/any.lo: google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) google/protobuf/descriptor.lo: google/protobuf/$(am__dirstamp) \ @@ -2271,9 +2764,6 @@ google/protobuf/io/printer.lo: google/protobuf/io/$(am__dirstamp) \ google/protobuf/io/$(DEPDIR)/$(am__dirstamp) google/protobuf/io/tokenizer.lo: google/protobuf/io/$(am__dirstamp) \ google/protobuf/io/$(DEPDIR)/$(am__dirstamp) -google/protobuf/io/zero_copy_stream_impl.lo: \ - google/protobuf/io/$(am__dirstamp) \ - google/protobuf/io/$(DEPDIR)/$(am__dirstamp) google/protobuf/compiler/$(am__dirstamp): @$(MKDIR_P) google/protobuf/compiler @: > google/protobuf/compiler/$(am__dirstamp) @@ -2658,64 +3148,6 @@ google/protobuf/compiler/csharp/csharp_wrapper_field.lo: \ libprotoc.la: $(libprotoc_la_OBJECTS) $(libprotoc_la_DEPENDENCIES) $(EXTRA_libprotoc_la_DEPENDENCIES) $(AM_V_CXXLD)$(libprotoc_la_LINK) -rpath $(libdir) $(libprotoc_la_OBJECTS) $(libprotoc_la_LIBADD) $(LIBS) -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list google/protobuf/no_warning_test-map_lite_unittest.pb.$(OBJEXT): \ google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) @@ -2824,6 +3256,9 @@ google/protobuf/no_warning_test-unittest_proto3_arena_lite.pb.$(OBJEXT): \ google/protobuf/no_warning_test-unittest_proto3_lite.pb.$(OBJEXT): \ google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) +google/protobuf/no_warning_test-unittest_proto3_optional.pb.$(OBJEXT): \ + google/protobuf/$(am__dirstamp) \ + google/protobuf/$(DEPDIR)/$(am__dirstamp) google/protobuf/no_warning_test-unittest_well_known_types.pb.$(OBJEXT): \ google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) @@ -2885,9 +3320,6 @@ google/protobuf/compiler/cpp/protobuf_lazy_descriptor_test-cpp_unittest.$(OBJEXT google/protobuf/protobuf_lazy_descriptor_test-arena_test_util.$(OBJEXT): \ google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) -google/protobuf/protobuf_lazy_descriptor_test-map_test_util.$(OBJEXT): \ - google/protobuf/$(am__dirstamp) \ - google/protobuf/$(DEPDIR)/$(am__dirstamp) google/protobuf/protobuf_lazy_descriptor_test-test_util.$(OBJEXT): \ google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) @@ -3011,6 +3443,9 @@ google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_arena_lite.pb.$(OB google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_lite.pb.$(OBJEXT): \ google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) +google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.$(OBJEXT): \ + google/protobuf/$(am__dirstamp) \ + google/protobuf/$(DEPDIR)/$(am__dirstamp) google/protobuf/protobuf_lazy_descriptor_test-unittest_well_known_types.pb.$(OBJEXT): \ google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) @@ -3245,9 +3680,6 @@ google/protobuf/io/protobuf_test-zero_copy_stream_unittest.$(OBJEXT): \ google/protobuf/compiler/protobuf_test-annotation_test_util.$(OBJEXT): \ google/protobuf/compiler/$(am__dirstamp) \ google/protobuf/compiler/$(DEPDIR)/$(am__dirstamp) -google/protobuf/compiler/protobuf_test-command_line_interface_unittest.$(OBJEXT): \ - google/protobuf/compiler/$(am__dirstamp) \ - google/protobuf/compiler/$(DEPDIR)/$(am__dirstamp) google/protobuf/compiler/protobuf_test-importer_unittest.$(OBJEXT): \ google/protobuf/compiler/$(am__dirstamp) \ google/protobuf/compiler/$(DEPDIR)/$(am__dirstamp) @@ -3332,12 +3764,12 @@ google/protobuf/util/protobuf_test-time_util_test.$(OBJEXT): \ google/protobuf/util/protobuf_test-type_resolver_util_test.$(OBJEXT): \ google/protobuf/util/$(am__dirstamp) \ google/protobuf/util/$(DEPDIR)/$(am__dirstamp) +google/protobuf/compiler/protobuf_test-command_line_interface_unittest.$(OBJEXT): \ + google/protobuf/compiler/$(am__dirstamp) \ + google/protobuf/compiler/$(DEPDIR)/$(am__dirstamp) google/protobuf/protobuf_test-arena_test_util.$(OBJEXT): \ google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) -google/protobuf/protobuf_test-map_test_util.$(OBJEXT): \ - google/protobuf/$(am__dirstamp) \ - google/protobuf/$(DEPDIR)/$(am__dirstamp) google/protobuf/protobuf_test-test_util.$(OBJEXT): \ google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) @@ -3455,6 +3887,9 @@ google/protobuf/protobuf_test-unittest_proto3_arena_lite.pb.$(OBJEXT): \ google/protobuf/protobuf_test-unittest_proto3_lite.pb.$(OBJEXT): \ google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) +google/protobuf/protobuf_test-unittest_proto3_optional.pb.$(OBJEXT): \ + google/protobuf/$(am__dirstamp) \ + google/protobuf/$(DEPDIR)/$(am__dirstamp) google/protobuf/protobuf_test-unittest_well_known_types.pb.$(OBJEXT): \ google/protobuf/$(am__dirstamp) \ google/protobuf/$(DEPDIR)/$(am__dirstamp) @@ -3575,425 +4010,432 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/no_warning_test-no_warning_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/any.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/any.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/any_lite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/api.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/arena.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/descriptor.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/descriptor.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/descriptor_database.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/duration.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/dynamic_message.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/empty.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/extension_set.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/extension_set_heavy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/field_mask.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/generated_message_reflection.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/generated_message_table_driven.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/generated_message_table_driven_lite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/generated_message_util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/implicit_weak_message.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/map_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/message.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/message_lite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-any_test.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-map_lite_unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-map_proto2_unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-map_unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_arena.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_custom_options.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_drop_unknown_fields.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_embed_optimize_for.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_empty.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_enormous_descriptor.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_import.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_import_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_import_public.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_import_public_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_lazy_dependencies.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_lazy_dependencies_custom_option.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_lazy_dependencies_enum.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_lite_imports_nonlite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_mset.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_mset_wire_format.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_arena.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_arena_import.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_arena_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_field_presence.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_generic_services.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_optimize_for.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_preserve_unknown_enum.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_preserve_unknown_enum2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_arena.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_arena_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_well_known_types.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/parse_context.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-any_test.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-arena_test_util.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_lite_unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_proto2_unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_test_util.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-test_util.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_arena.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_custom_options.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_drop_unknown_fields.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_embed_optimize_for.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_empty.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_enormous_descriptor.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import_public.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import_public_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lazy_dependencies.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lazy_dependencies_custom_option.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lazy_dependencies_enum.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lite_imports_nonlite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_mset.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_mset_wire_format.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_arena.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_arena_import.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_arena_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_field_presence.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_generic_services.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_optimize_for.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_preserve_unknown_enum.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_preserve_unknown_enum2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_arena.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_arena_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_well_known_types.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-arena_test_util.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-lite_arena_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-map_lite_test_util.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-map_lite_unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-test_util_lite.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_import_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_import_public_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_no_arena_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-arena_test_util.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-lite_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-map_lite_test_util.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-map_lite_unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-test_util_lite.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_import_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_import_public_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_no_arena_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-any_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-any_test.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-arena_test_util.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-arena_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-arenastring_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-descriptor_database_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-descriptor_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-drop_unknown_fields_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-dynamic_message_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-extension_set_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-generated_message_reflection_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-map_field_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-map_lite_unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-map_proto2_unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-map_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-map_test_util.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-map_unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-message_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-no_field_presence_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-preserve_unknown_enum_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-proto3_arena_lite_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-proto3_arena_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-proto3_lite_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-reflection_ops_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-repeated_field_reflection_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-repeated_field_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-test_util.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-text_format_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_arena.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_custom_options.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_drop_unknown_fields.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_embed_optimize_for.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_empty.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_enormous_descriptor.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_import.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_import_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_import_public.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_import_public_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_lazy_dependencies.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_lazy_dependencies_custom_option.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_lazy_dependencies_enum.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_lite_imports_nonlite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_mset.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_mset_wire_format.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_arena.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_arena_import.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_arena_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_field_presence.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_generic_services.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_optimize_for.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_preserve_unknown_enum.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_preserve_unknown_enum2.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_arena.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_arena_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_lite.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_well_known_types.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unknown_field_set_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-well_known_types_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-wire_format_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/reflection_ops.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/repeated_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/service.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/source_context.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/struct.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/text_format.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/timestamp.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/type.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/unknown_field_set.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/wire_format.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/wire_format_lite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/wrappers.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/code_generator.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/command_line_interface.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/importer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/parser.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/plugin.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/plugin.pb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/protobuf_test-annotation_test_util.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/protobuf_test-importer_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/protobuf_test-mock_code_generator.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/protobuf_test-parser_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/subprocess.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/test_plugin-mock_code_generator.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/test_plugin-test_plugin.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/zip_writer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_enum.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_enum_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_extension.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_file.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_generator.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_helpers.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_map_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_message.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_message_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_padding_optimizer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_primitive_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_service.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_string_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/no_warning_test-cpp_test_bad_identifiers.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/no_warning_test-cpp_test_large_enum_value.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_lazy_descriptor_test-cpp_test_bad_identifiers.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_lazy_descriptor_test-cpp_test_large_enum_value.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_lazy_descriptor_test-cpp_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_bootstrap_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_move_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_plugin_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_test_bad_identifiers.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_test_large_enum_value.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-metadata_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_doc_comment.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_enum.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_enum_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_field_base.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_generator.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_helpers.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_map_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_message.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_message_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_primitive_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_reflection_class.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_repeated_enum_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_repeated_message_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_repeated_primitive_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_source_generator_base.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_wrapper_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/protobuf_test-csharp_bootstrap_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/protobuf_test-csharp_generator_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_context.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_doc_comment.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_enum.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_enum_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_enum_field_lite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_enum_lite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_extension.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_extension_lite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_file.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_generator.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_generator_factory.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_helpers.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_map_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_map_field_lite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_message.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_message_builder.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_message_builder_lite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_message_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_message_field_lite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_message_lite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_name_resolver.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_primitive_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_primitive_field_lite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_service.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_shared_code_generator.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_string_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_string_field_lite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/protobuf_test-java_doc_comment_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/protobuf_test-java_plugin_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/js/$(DEPDIR)/js_generator.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/js/$(DEPDIR)/well_known_types_embed.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_enum.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_enum_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_extension.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_file.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_generator.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_helpers.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_map_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_message.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_message_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_oneof.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_primitive_field.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/protobuf_test-objectivec_helpers_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/php/$(DEPDIR)/php_generator.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/python/$(DEPDIR)/protobuf_test-python_plugin_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/python/$(DEPDIR)/python_generator.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/ruby/$(DEPDIR)/protobuf_test-ruby_generator_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/ruby/$(DEPDIR)/ruby_generator.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/coded_stream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/gzip_stream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/io_win32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/printer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/protobuf_test-coded_stream_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/protobuf_test-io_win32_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/protobuf_test-printer_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/protobuf_test-tokenizer_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/protobuf_test-zero_copy_stream_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/strtod.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/tokenizer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/zero_copy_stream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/zero_copy_stream_impl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/zero_copy_stream_impl_lite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/bytestream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/common.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/int128.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/mathlimits.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-bytestream_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-common_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-int128_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-status_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-statusor_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-stringpiece_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-stringprintf_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-structurally_valid_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-strutil_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-template_util_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-time_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/status.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/statusor.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/stringpiece.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/stringprintf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/structurally_valid.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/strutil.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/substitute.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/time.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/testing/$(DEPDIR)/protobuf_lazy_descriptor_test-file.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/testing/$(DEPDIR)/protobuf_lazy_descriptor_test-googletest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/testing/$(DEPDIR)/protobuf_test-file.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/testing/$(DEPDIR)/protobuf_test-googletest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/testing/$(DEPDIR)/test_plugin-file.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/testing/$(DEPDIR)/zcgunzip.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/testing/$(DEPDIR)/zcgzip.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/delimited_message_util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/field_comparator.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/field_mask_util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/json_util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/message_differencer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/no_warning_test-json_format.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/no_warning_test-json_format_proto3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/no_warning_test-message_differencer_unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_lazy_descriptor_test-json_format.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_lazy_descriptor_test-json_format_proto3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_lazy_descriptor_test-message_differencer_unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-delimited_message_util_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-field_comparator_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-field_mask_util_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-json_format.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-json_format_proto3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-json_util_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-message_differencer_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-message_differencer_unittest.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-time_util_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-type_resolver_util_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/time_util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/type_resolver_util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/datapiece.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/default_value_objectwriter.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/error_listener.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/field_mask_utility.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/json_escaping.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/json_objectwriter.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/json_stream_parser.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/object_writer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/proto_writer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protobuf_test-default_value_objectwriter_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protobuf_test-json_objectwriter_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protobuf_test-json_stream_parser_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protobuf_test-protostream_objectsource_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protobuf_test-protostream_objectwriter_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protobuf_test-type_info_test_helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protostream_objectsource.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protostream_objectwriter.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/type_info.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/type_info_test_helper.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/utility.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-anys.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-books.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-default_value.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-default_value_test.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-field_mask.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-maps.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-oneofs.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-proto3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-struct.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-timestamp_duration.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-wrappers.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-anys.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-books.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-default_value.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-default_value_test.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-field_mask.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-maps.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-oneofs.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-proto3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-struct.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-timestamp_duration.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-wrappers.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-anys.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-books.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-default_value.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-default_value_test.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-field_mask.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-maps.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-oneofs.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-proto3.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-struct.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-timestamp_duration.pb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-wrappers.pb.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/no_warning_test-no_warning_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/any.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/any.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/any_lite.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/api.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/arena.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/descriptor.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/descriptor.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/descriptor_database.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/duration.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/dynamic_message.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/empty.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/extension_set.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/extension_set_heavy.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/field_mask.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/generated_enum_util.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/generated_message_reflection.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/generated_message_table_driven.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/generated_message_table_driven_lite.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/generated_message_util.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/implicit_weak_message.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/map_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/message.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/message_lite.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-any_test.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-map_lite_unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-map_proto2_unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-map_unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_arena.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_custom_options.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_drop_unknown_fields.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_embed_optimize_for.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_empty.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_enormous_descriptor.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_import.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_import_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_import_public.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_import_public_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_lazy_dependencies.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_lazy_dependencies_custom_option.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_lazy_dependencies_enum.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_lite_imports_nonlite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_mset.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_mset_wire_format.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_arena.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_arena_import.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_arena_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_field_presence.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_generic_services.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_optimize_for.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_preserve_unknown_enum.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_preserve_unknown_enum2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_arena.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_arena_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_optional.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/no_warning_test-unittest_well_known_types.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/parse_context.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-any_test.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-arena_test_util.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_lite_unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_proto2_unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-test_util.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_arena.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_custom_options.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_drop_unknown_fields.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_embed_optimize_for.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_empty.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_enormous_descriptor.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import_public.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import_public_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lazy_dependencies.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lazy_dependencies_custom_option.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lazy_dependencies_enum.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lite_imports_nonlite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_mset.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_mset_wire_format.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_arena.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_arena_import.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_arena_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_field_presence.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_generic_services.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_optimize_for.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_preserve_unknown_enum.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_preserve_unknown_enum2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_arena.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_arena_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_well_known_types.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-arena_test_util.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-lite_arena_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-map_lite_test_util.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-map_lite_unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-test_util_lite.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_import_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_import_public_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_no_arena_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-arena_test_util.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-lite_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-map_lite_test_util.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-map_lite_unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-test_util_lite.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_import_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_import_public_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_no_arena_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-any_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-any_test.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-arena_test_util.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-arena_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-arenastring_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-descriptor_database_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-descriptor_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-drop_unknown_fields_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-dynamic_message_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-extension_set_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-generated_message_reflection_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-map_field_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-map_lite_unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-map_proto2_unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-map_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-map_unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-message_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-no_field_presence_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-preserve_unknown_enum_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-proto3_arena_lite_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-proto3_arena_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-proto3_lite_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-reflection_ops_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-repeated_field_reflection_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-repeated_field_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-test_util.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-text_format_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_arena.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_custom_options.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_drop_unknown_fields.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_embed_optimize_for.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_empty.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_enormous_descriptor.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_import.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_import_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_import_public.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_import_public_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_lazy_dependencies.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_lazy_dependencies_custom_option.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_lazy_dependencies_enum.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_lite_imports_nonlite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_mset.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_mset_wire_format.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_arena.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_arena_import.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_arena_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_field_presence.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_generic_services.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_optimize_for.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_preserve_unknown_enum.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_preserve_unknown_enum2.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_arena.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_arena_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_lite.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_optional.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unittest_well_known_types.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-unknown_field_set_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-well_known_types_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/protobuf_test-wire_format_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/reflection_ops.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/repeated_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/service.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/source_context.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/struct.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/text_format.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/timestamp.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/type.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/unknown_field_set.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/wire_format.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/wire_format_lite.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/$(DEPDIR)/wrappers.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/code_generator.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/command_line_interface.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/importer.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/main.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/parser.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/plugin.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/plugin.pb.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/protobuf_test-annotation_test_util.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/protobuf_test-importer_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/protobuf_test-mock_code_generator.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/protobuf_test-parser_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/subprocess.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/test_plugin-mock_code_generator.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/test_plugin-test_plugin.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/$(DEPDIR)/zip_writer.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_enum.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_enum_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_extension.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_file.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_generator.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_helpers.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_map_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_message.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_message_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_padding_optimizer.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_primitive_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_service.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/cpp_string_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/no_warning_test-cpp_test_bad_identifiers.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/no_warning_test-cpp_test_large_enum_value.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_lazy_descriptor_test-cpp_test_bad_identifiers.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_lazy_descriptor_test-cpp_test_large_enum_value.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_lazy_descriptor_test-cpp_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_bootstrap_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_move_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_plugin_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_test_bad_identifiers.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_test_large_enum_value.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-metadata_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_doc_comment.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_enum.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_enum_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_field_base.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_generator.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_helpers.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_map_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_message.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_message_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_primitive_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_reflection_class.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_repeated_enum_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_repeated_message_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_repeated_primitive_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_source_generator_base.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/csharp_wrapper_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/protobuf_test-csharp_bootstrap_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/csharp/$(DEPDIR)/protobuf_test-csharp_generator_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_context.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_doc_comment.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_enum.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_enum_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_enum_field_lite.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_enum_lite.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_extension.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_extension_lite.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_file.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_generator.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_generator_factory.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_helpers.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_map_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_map_field_lite.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_message.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_message_builder.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_message_builder_lite.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_message_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_message_field_lite.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_message_lite.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_name_resolver.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_primitive_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_primitive_field_lite.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_service.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_shared_code_generator.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_string_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/java_string_field_lite.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/protobuf_test-java_doc_comment_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/java/$(DEPDIR)/protobuf_test-java_plugin_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/js/$(DEPDIR)/js_generator.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/js/$(DEPDIR)/well_known_types_embed.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_enum.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_enum_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_extension.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_file.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_generator.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_helpers.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_map_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_message.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_message_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_oneof.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_primitive_field.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/objectivec/$(DEPDIR)/protobuf_test-objectivec_helpers_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/php/$(DEPDIR)/php_generator.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/python/$(DEPDIR)/protobuf_test-python_plugin_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/python/$(DEPDIR)/python_generator.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/ruby/$(DEPDIR)/protobuf_test-ruby_generator_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/compiler/ruby/$(DEPDIR)/ruby_generator.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/coded_stream.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/gzip_stream.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/io_win32.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/printer.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/protobuf_test-coded_stream_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/protobuf_test-io_win32_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/protobuf_test-printer_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/protobuf_test-tokenizer_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/protobuf_test-zero_copy_stream_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/strtod.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/tokenizer.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/zero_copy_stream.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/zero_copy_stream_impl.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/io/$(DEPDIR)/zero_copy_stream_impl_lite.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/bytestream.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/common.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/int128.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-bytestream_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-common_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-int128_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-status_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-statusor_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-stringpiece_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-stringprintf_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-structurally_valid_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-strutil_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-template_util_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/protobuf_test-time_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/status.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/statusor.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/stringpiece.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/stringprintf.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/structurally_valid.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/strutil.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/substitute.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/stubs/$(DEPDIR)/time.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/testing/$(DEPDIR)/protobuf_lazy_descriptor_test-file.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/testing/$(DEPDIR)/protobuf_lazy_descriptor_test-googletest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/testing/$(DEPDIR)/protobuf_test-file.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/testing/$(DEPDIR)/protobuf_test-googletest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/testing/$(DEPDIR)/test_plugin-file.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/testing/$(DEPDIR)/zcgunzip.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/testing/$(DEPDIR)/zcgzip.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/delimited_message_util.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/field_comparator.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/field_mask_util.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/json_util.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/message_differencer.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/no_warning_test-json_format.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/no_warning_test-json_format_proto3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/no_warning_test-message_differencer_unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_lazy_descriptor_test-json_format.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_lazy_descriptor_test-json_format_proto3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_lazy_descriptor_test-message_differencer_unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-delimited_message_util_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-field_comparator_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-field_mask_util_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-json_format.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-json_format_proto3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-json_util_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-message_differencer_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-message_differencer_unittest.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-time_util_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/protobuf_test-type_resolver_util_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/time_util.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/$(DEPDIR)/type_resolver_util.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/datapiece.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/default_value_objectwriter.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/error_listener.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/field_mask_utility.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/json_escaping.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/json_objectwriter.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/json_stream_parser.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/object_writer.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/proto_writer.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protobuf_test-default_value_objectwriter_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protobuf_test-json_objectwriter_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protobuf_test-json_stream_parser_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protobuf_test-protostream_objectsource_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protobuf_test-protostream_objectwriter_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protobuf_test-type_info_test_helper.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protostream_objectsource.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/protostream_objectwriter.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/type_info.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/type_info_test_helper.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/$(DEPDIR)/utility.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-anys.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-books.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-default_value.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-default_value_test.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-field_mask.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-maps.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-oneofs.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-proto3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-struct.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-timestamp_duration.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-wrappers.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-anys.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-books.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-default_value.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-default_value_test.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-field_mask.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-maps.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-oneofs.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-proto3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-struct.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-timestamp_duration.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-wrappers.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-anys.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-books.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-default_value.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-default_value_test.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-field_mask.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-maps.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-oneofs.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-proto3.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-struct.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-timestamp_duration.pb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-wrappers.pb.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -4537,6 +4979,20 @@ google/protobuf/no_warning_test-unittest_proto3_lite.pb.obj: google/protobuf/uni @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(no_warning_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/no_warning_test-unittest_proto3_lite.pb.obj `if test -f 'google/protobuf/unittest_proto3_lite.pb.cc'; then $(CYGPATH_W) 'google/protobuf/unittest_proto3_lite.pb.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/unittest_proto3_lite.pb.cc'; fi` +google/protobuf/no_warning_test-unittest_proto3_optional.pb.o: google/protobuf/unittest_proto3_optional.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(no_warning_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/no_warning_test-unittest_proto3_optional.pb.o -MD -MP -MF google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_optional.pb.Tpo -c -o google/protobuf/no_warning_test-unittest_proto3_optional.pb.o `test -f 'google/protobuf/unittest_proto3_optional.pb.cc' || echo '$(srcdir)/'`google/protobuf/unittest_proto3_optional.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_optional.pb.Tpo google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_optional.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='google/protobuf/unittest_proto3_optional.pb.cc' object='google/protobuf/no_warning_test-unittest_proto3_optional.pb.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(no_warning_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/no_warning_test-unittest_proto3_optional.pb.o `test -f 'google/protobuf/unittest_proto3_optional.pb.cc' || echo '$(srcdir)/'`google/protobuf/unittest_proto3_optional.pb.cc + +google/protobuf/no_warning_test-unittest_proto3_optional.pb.obj: google/protobuf/unittest_proto3_optional.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(no_warning_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/no_warning_test-unittest_proto3_optional.pb.obj -MD -MP -MF google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_optional.pb.Tpo -c -o google/protobuf/no_warning_test-unittest_proto3_optional.pb.obj `if test -f 'google/protobuf/unittest_proto3_optional.pb.cc'; then $(CYGPATH_W) 'google/protobuf/unittest_proto3_optional.pb.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/unittest_proto3_optional.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_optional.pb.Tpo google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_optional.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='google/protobuf/unittest_proto3_optional.pb.cc' object='google/protobuf/no_warning_test-unittest_proto3_optional.pb.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(no_warning_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/no_warning_test-unittest_proto3_optional.pb.obj `if test -f 'google/protobuf/unittest_proto3_optional.pb.cc'; then $(CYGPATH_W) 'google/protobuf/unittest_proto3_optional.pb.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/unittest_proto3_optional.pb.cc'; fi` + google/protobuf/no_warning_test-unittest_well_known_types.pb.o: google/protobuf/unittest_well_known_types.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(no_warning_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/no_warning_test-unittest_well_known_types.pb.o -MD -MP -MF google/protobuf/$(DEPDIR)/no_warning_test-unittest_well_known_types.pb.Tpo -c -o google/protobuf/no_warning_test-unittest_well_known_types.pb.o `test -f 'google/protobuf/unittest_well_known_types.pb.cc' || echo '$(srcdir)/'`google/protobuf/unittest_well_known_types.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/no_warning_test-unittest_well_known_types.pb.Tpo google/protobuf/$(DEPDIR)/no_warning_test-unittest_well_known_types.pb.Po @@ -4775,20 +5231,6 @@ google/protobuf/protobuf_lazy_descriptor_test-arena_test_util.obj: google/protob @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_lazy_descriptor_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_lazy_descriptor_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/protobuf_lazy_descriptor_test-arena_test_util.obj `if test -f 'google/protobuf/arena_test_util.cc'; then $(CYGPATH_W) 'google/protobuf/arena_test_util.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/arena_test_util.cc'; fi` -google/protobuf/protobuf_lazy_descriptor_test-map_test_util.o: google/protobuf/map_test_util.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_lazy_descriptor_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_lazy_descriptor_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/protobuf_lazy_descriptor_test-map_test_util.o -MD -MP -MF google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_test_util.Tpo -c -o google/protobuf/protobuf_lazy_descriptor_test-map_test_util.o `test -f 'google/protobuf/map_test_util.cc' || echo '$(srcdir)/'`google/protobuf/map_test_util.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_test_util.Tpo google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_test_util.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='google/protobuf/map_test_util.cc' object='google/protobuf/protobuf_lazy_descriptor_test-map_test_util.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_lazy_descriptor_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_lazy_descriptor_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/protobuf_lazy_descriptor_test-map_test_util.o `test -f 'google/protobuf/map_test_util.cc' || echo '$(srcdir)/'`google/protobuf/map_test_util.cc - -google/protobuf/protobuf_lazy_descriptor_test-map_test_util.obj: google/protobuf/map_test_util.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_lazy_descriptor_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_lazy_descriptor_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/protobuf_lazy_descriptor_test-map_test_util.obj -MD -MP -MF google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_test_util.Tpo -c -o google/protobuf/protobuf_lazy_descriptor_test-map_test_util.obj `if test -f 'google/protobuf/map_test_util.cc'; then $(CYGPATH_W) 'google/protobuf/map_test_util.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/map_test_util.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_test_util.Tpo google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_test_util.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='google/protobuf/map_test_util.cc' object='google/protobuf/protobuf_lazy_descriptor_test-map_test_util.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_lazy_descriptor_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_lazy_descriptor_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/protobuf_lazy_descriptor_test-map_test_util.obj `if test -f 'google/protobuf/map_test_util.cc'; then $(CYGPATH_W) 'google/protobuf/map_test_util.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/map_test_util.cc'; fi` - google/protobuf/protobuf_lazy_descriptor_test-test_util.o: google/protobuf/test_util.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_lazy_descriptor_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_lazy_descriptor_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/protobuf_lazy_descriptor_test-test_util.o -MD -MP -MF google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-test_util.Tpo -c -o google/protobuf/protobuf_lazy_descriptor_test-test_util.o `test -f 'google/protobuf/test_util.cc' || echo '$(srcdir)/'`google/protobuf/test_util.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-test_util.Tpo google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-test_util.Po @@ -5335,6 +5777,20 @@ google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_lite.pb.obj: googl @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_lazy_descriptor_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_lazy_descriptor_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_lite.pb.obj `if test -f 'google/protobuf/unittest_proto3_lite.pb.cc'; then $(CYGPATH_W) 'google/protobuf/unittest_proto3_lite.pb.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/unittest_proto3_lite.pb.cc'; fi` +google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.o: google/protobuf/unittest_proto3_optional.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_lazy_descriptor_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_lazy_descriptor_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.o -MD -MP -MF google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.Tpo -c -o google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.o `test -f 'google/protobuf/unittest_proto3_optional.pb.cc' || echo '$(srcdir)/'`google/protobuf/unittest_proto3_optional.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.Tpo google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='google/protobuf/unittest_proto3_optional.pb.cc' object='google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_lazy_descriptor_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_lazy_descriptor_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.o `test -f 'google/protobuf/unittest_proto3_optional.pb.cc' || echo '$(srcdir)/'`google/protobuf/unittest_proto3_optional.pb.cc + +google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.obj: google/protobuf/unittest_proto3_optional.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_lazy_descriptor_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_lazy_descriptor_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.obj -MD -MP -MF google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.Tpo -c -o google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.obj `if test -f 'google/protobuf/unittest_proto3_optional.pb.cc'; then $(CYGPATH_W) 'google/protobuf/unittest_proto3_optional.pb.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/unittest_proto3_optional.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.Tpo google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='google/protobuf/unittest_proto3_optional.pb.cc' object='google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_lazy_descriptor_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_lazy_descriptor_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.obj `if test -f 'google/protobuf/unittest_proto3_optional.pb.cc'; then $(CYGPATH_W) 'google/protobuf/unittest_proto3_optional.pb.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/unittest_proto3_optional.pb.cc'; fi` + google/protobuf/protobuf_lazy_descriptor_test-unittest_well_known_types.pb.o: google/protobuf/unittest_well_known_types.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_lazy_descriptor_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_lazy_descriptor_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/protobuf_lazy_descriptor_test-unittest_well_known_types.pb.o -MD -MP -MF google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_well_known_types.pb.Tpo -c -o google/protobuf/protobuf_lazy_descriptor_test-unittest_well_known_types.pb.o `test -f 'google/protobuf/unittest_well_known_types.pb.cc' || echo '$(srcdir)/'`google/protobuf/unittest_well_known_types.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_well_known_types.pb.Tpo google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_well_known_types.pb.Po @@ -6371,20 +6827,6 @@ google/protobuf/compiler/protobuf_test-annotation_test_util.obj: google/protobuf @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/compiler/protobuf_test-annotation_test_util.obj `if test -f 'google/protobuf/compiler/annotation_test_util.cc'; then $(CYGPATH_W) 'google/protobuf/compiler/annotation_test_util.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/compiler/annotation_test_util.cc'; fi` -google/protobuf/compiler/protobuf_test-command_line_interface_unittest.o: google/protobuf/compiler/command_line_interface_unittest.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/compiler/protobuf_test-command_line_interface_unittest.o -MD -MP -MF google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Tpo -c -o google/protobuf/compiler/protobuf_test-command_line_interface_unittest.o `test -f 'google/protobuf/compiler/command_line_interface_unittest.cc' || echo '$(srcdir)/'`google/protobuf/compiler/command_line_interface_unittest.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Tpo google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='google/protobuf/compiler/command_line_interface_unittest.cc' object='google/protobuf/compiler/protobuf_test-command_line_interface_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/compiler/protobuf_test-command_line_interface_unittest.o `test -f 'google/protobuf/compiler/command_line_interface_unittest.cc' || echo '$(srcdir)/'`google/protobuf/compiler/command_line_interface_unittest.cc - -google/protobuf/compiler/protobuf_test-command_line_interface_unittest.obj: google/protobuf/compiler/command_line_interface_unittest.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/compiler/protobuf_test-command_line_interface_unittest.obj -MD -MP -MF google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Tpo -c -o google/protobuf/compiler/protobuf_test-command_line_interface_unittest.obj `if test -f 'google/protobuf/compiler/command_line_interface_unittest.cc'; then $(CYGPATH_W) 'google/protobuf/compiler/command_line_interface_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/compiler/command_line_interface_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Tpo google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='google/protobuf/compiler/command_line_interface_unittest.cc' object='google/protobuf/compiler/protobuf_test-command_line_interface_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/compiler/protobuf_test-command_line_interface_unittest.obj `if test -f 'google/protobuf/compiler/command_line_interface_unittest.cc'; then $(CYGPATH_W) 'google/protobuf/compiler/command_line_interface_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/compiler/command_line_interface_unittest.cc'; fi` - google/protobuf/compiler/protobuf_test-importer_unittest.o: google/protobuf/compiler/importer_unittest.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/compiler/protobuf_test-importer_unittest.o -MD -MP -MF google/protobuf/compiler/$(DEPDIR)/protobuf_test-importer_unittest.Tpo -c -o google/protobuf/compiler/protobuf_test-importer_unittest.o `test -f 'google/protobuf/compiler/importer_unittest.cc' || echo '$(srcdir)/'`google/protobuf/compiler/importer_unittest.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/compiler/$(DEPDIR)/protobuf_test-importer_unittest.Tpo google/protobuf/compiler/$(DEPDIR)/protobuf_test-importer_unittest.Po @@ -6777,6 +7219,20 @@ google/protobuf/util/protobuf_test-type_resolver_util_test.obj: google/protobuf/ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/util/protobuf_test-type_resolver_util_test.obj `if test -f 'google/protobuf/util/type_resolver_util_test.cc'; then $(CYGPATH_W) 'google/protobuf/util/type_resolver_util_test.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/util/type_resolver_util_test.cc'; fi` +google/protobuf/compiler/protobuf_test-command_line_interface_unittest.o: google/protobuf/compiler/command_line_interface_unittest.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/compiler/protobuf_test-command_line_interface_unittest.o -MD -MP -MF google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Tpo -c -o google/protobuf/compiler/protobuf_test-command_line_interface_unittest.o `test -f 'google/protobuf/compiler/command_line_interface_unittest.cc' || echo '$(srcdir)/'`google/protobuf/compiler/command_line_interface_unittest.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Tpo google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='google/protobuf/compiler/command_line_interface_unittest.cc' object='google/protobuf/compiler/protobuf_test-command_line_interface_unittest.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/compiler/protobuf_test-command_line_interface_unittest.o `test -f 'google/protobuf/compiler/command_line_interface_unittest.cc' || echo '$(srcdir)/'`google/protobuf/compiler/command_line_interface_unittest.cc + +google/protobuf/compiler/protobuf_test-command_line_interface_unittest.obj: google/protobuf/compiler/command_line_interface_unittest.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/compiler/protobuf_test-command_line_interface_unittest.obj -MD -MP -MF google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Tpo -c -o google/protobuf/compiler/protobuf_test-command_line_interface_unittest.obj `if test -f 'google/protobuf/compiler/command_line_interface_unittest.cc'; then $(CYGPATH_W) 'google/protobuf/compiler/command_line_interface_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/compiler/command_line_interface_unittest.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Tpo google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='google/protobuf/compiler/command_line_interface_unittest.cc' object='google/protobuf/compiler/protobuf_test-command_line_interface_unittest.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/compiler/protobuf_test-command_line_interface_unittest.obj `if test -f 'google/protobuf/compiler/command_line_interface_unittest.cc'; then $(CYGPATH_W) 'google/protobuf/compiler/command_line_interface_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/compiler/command_line_interface_unittest.cc'; fi` + google/protobuf/protobuf_test-arena_test_util.o: google/protobuf/arena_test_util.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/protobuf_test-arena_test_util.o -MD -MP -MF google/protobuf/$(DEPDIR)/protobuf_test-arena_test_util.Tpo -c -o google/protobuf/protobuf_test-arena_test_util.o `test -f 'google/protobuf/arena_test_util.cc' || echo '$(srcdir)/'`google/protobuf/arena_test_util.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/protobuf_test-arena_test_util.Tpo google/protobuf/$(DEPDIR)/protobuf_test-arena_test_util.Po @@ -6791,20 +7247,6 @@ google/protobuf/protobuf_test-arena_test_util.obj: google/protobuf/arena_test_ut @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/protobuf_test-arena_test_util.obj `if test -f 'google/protobuf/arena_test_util.cc'; then $(CYGPATH_W) 'google/protobuf/arena_test_util.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/arena_test_util.cc'; fi` -google/protobuf/protobuf_test-map_test_util.o: google/protobuf/map_test_util.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/protobuf_test-map_test_util.o -MD -MP -MF google/protobuf/$(DEPDIR)/protobuf_test-map_test_util.Tpo -c -o google/protobuf/protobuf_test-map_test_util.o `test -f 'google/protobuf/map_test_util.cc' || echo '$(srcdir)/'`google/protobuf/map_test_util.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/protobuf_test-map_test_util.Tpo google/protobuf/$(DEPDIR)/protobuf_test-map_test_util.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='google/protobuf/map_test_util.cc' object='google/protobuf/protobuf_test-map_test_util.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/protobuf_test-map_test_util.o `test -f 'google/protobuf/map_test_util.cc' || echo '$(srcdir)/'`google/protobuf/map_test_util.cc - -google/protobuf/protobuf_test-map_test_util.obj: google/protobuf/map_test_util.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/protobuf_test-map_test_util.obj -MD -MP -MF google/protobuf/$(DEPDIR)/protobuf_test-map_test_util.Tpo -c -o google/protobuf/protobuf_test-map_test_util.obj `if test -f 'google/protobuf/map_test_util.cc'; then $(CYGPATH_W) 'google/protobuf/map_test_util.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/map_test_util.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/protobuf_test-map_test_util.Tpo google/protobuf/$(DEPDIR)/protobuf_test-map_test_util.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='google/protobuf/map_test_util.cc' object='google/protobuf/protobuf_test-map_test_util.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/protobuf_test-map_test_util.obj `if test -f 'google/protobuf/map_test_util.cc'; then $(CYGPATH_W) 'google/protobuf/map_test_util.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/map_test_util.cc'; fi` - google/protobuf/protobuf_test-test_util.o: google/protobuf/test_util.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/protobuf_test-test_util.o -MD -MP -MF google/protobuf/$(DEPDIR)/protobuf_test-test_util.Tpo -c -o google/protobuf/protobuf_test-test_util.o `test -f 'google/protobuf/test_util.cc' || echo '$(srcdir)/'`google/protobuf/test_util.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/protobuf_test-test_util.Tpo google/protobuf/$(DEPDIR)/protobuf_test-test_util.Po @@ -7351,6 +7793,20 @@ google/protobuf/protobuf_test-unittest_proto3_lite.pb.obj: google/protobuf/unitt @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/protobuf_test-unittest_proto3_lite.pb.obj `if test -f 'google/protobuf/unittest_proto3_lite.pb.cc'; then $(CYGPATH_W) 'google/protobuf/unittest_proto3_lite.pb.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/unittest_proto3_lite.pb.cc'; fi` +google/protobuf/protobuf_test-unittest_proto3_optional.pb.o: google/protobuf/unittest_proto3_optional.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/protobuf_test-unittest_proto3_optional.pb.o -MD -MP -MF google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_optional.pb.Tpo -c -o google/protobuf/protobuf_test-unittest_proto3_optional.pb.o `test -f 'google/protobuf/unittest_proto3_optional.pb.cc' || echo '$(srcdir)/'`google/protobuf/unittest_proto3_optional.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_optional.pb.Tpo google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_optional.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='google/protobuf/unittest_proto3_optional.pb.cc' object='google/protobuf/protobuf_test-unittest_proto3_optional.pb.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/protobuf_test-unittest_proto3_optional.pb.o `test -f 'google/protobuf/unittest_proto3_optional.pb.cc' || echo '$(srcdir)/'`google/protobuf/unittest_proto3_optional.pb.cc + +google/protobuf/protobuf_test-unittest_proto3_optional.pb.obj: google/protobuf/unittest_proto3_optional.pb.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/protobuf_test-unittest_proto3_optional.pb.obj -MD -MP -MF google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_optional.pb.Tpo -c -o google/protobuf/protobuf_test-unittest_proto3_optional.pb.obj `if test -f 'google/protobuf/unittest_proto3_optional.pb.cc'; then $(CYGPATH_W) 'google/protobuf/unittest_proto3_optional.pb.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/unittest_proto3_optional.pb.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_optional.pb.Tpo google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_optional.pb.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='google/protobuf/unittest_proto3_optional.pb.cc' object='google/protobuf/protobuf_test-unittest_proto3_optional.pb.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -c -o google/protobuf/protobuf_test-unittest_proto3_optional.pb.obj `if test -f 'google/protobuf/unittest_proto3_optional.pb.cc'; then $(CYGPATH_W) 'google/protobuf/unittest_proto3_optional.pb.cc'; else $(CYGPATH_W) '$(srcdir)/google/protobuf/unittest_proto3_optional.pb.cc'; fi` + google/protobuf/protobuf_test-unittest_well_known_types.pb.o: google/protobuf/unittest_well_known_types.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(protobuf_test_CPPFLAGS) $(CPPFLAGS) $(protobuf_test_CXXFLAGS) $(CXXFLAGS) -MT google/protobuf/protobuf_test-unittest_well_known_types.pb.o -MD -MP -MF google/protobuf/$(DEPDIR)/protobuf_test-unittest_well_known_types.pb.Tpo -c -o google/protobuf/protobuf_test-unittest_well_known_types.pb.o `test -f 'google/protobuf/unittest_well_known_types.pb.cc' || echo '$(srcdir)/'`google/protobuf/unittest_well_known_types.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) google/protobuf/$(DEPDIR)/protobuf_test-unittest_well_known_types.pb.Tpo google/protobuf/$(DEPDIR)/protobuf_test-unittest_well_known_types.pb.Po @@ -7843,7 +8299,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) fi; \ $$success || exit 1 -check-TESTS: +check-TESTS: $(check_PROGRAMS) @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @@ -7928,7 +8384,10 @@ no-warning-test.log: no-warning-test$(EXEEXT) @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -7962,11 +8421,11 @@ check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) +all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(DATA) $(HEADERS) install-binPROGRAMS: install-libLTLIBRARIES installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(protodir)" "$(DESTDIR)$(includedir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(protodir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -8042,7 +8501,426 @@ clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ clean-libLTLIBRARIES clean-libtool clean-local mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) google/protobuf/$(DEPDIR) google/protobuf/compiler/$(DEPDIR) google/protobuf/compiler/cpp/$(DEPDIR) google/protobuf/compiler/csharp/$(DEPDIR) google/protobuf/compiler/java/$(DEPDIR) google/protobuf/compiler/js/$(DEPDIR) google/protobuf/compiler/objectivec/$(DEPDIR) google/protobuf/compiler/php/$(DEPDIR) google/protobuf/compiler/python/$(DEPDIR) google/protobuf/compiler/ruby/$(DEPDIR) google/protobuf/io/$(DEPDIR) google/protobuf/stubs/$(DEPDIR) google/protobuf/testing/$(DEPDIR) google/protobuf/util/$(DEPDIR) google/protobuf/util/internal/$(DEPDIR) google/protobuf/util/internal/testdata/$(DEPDIR) + -rm -f ./$(DEPDIR)/no_warning_test-no_warning_test.Po + -rm -f google/protobuf/$(DEPDIR)/any.Plo + -rm -f google/protobuf/$(DEPDIR)/any.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/any_lite.Plo + -rm -f google/protobuf/$(DEPDIR)/api.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/arena.Plo + -rm -f google/protobuf/$(DEPDIR)/descriptor.Plo + -rm -f google/protobuf/$(DEPDIR)/descriptor.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/descriptor_database.Plo + -rm -f google/protobuf/$(DEPDIR)/duration.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/dynamic_message.Plo + -rm -f google/protobuf/$(DEPDIR)/empty.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/extension_set.Plo + -rm -f google/protobuf/$(DEPDIR)/extension_set_heavy.Plo + -rm -f google/protobuf/$(DEPDIR)/field_mask.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/generated_enum_util.Plo + -rm -f google/protobuf/$(DEPDIR)/generated_message_reflection.Plo + -rm -f google/protobuf/$(DEPDIR)/generated_message_table_driven.Plo + -rm -f google/protobuf/$(DEPDIR)/generated_message_table_driven_lite.Plo + -rm -f google/protobuf/$(DEPDIR)/generated_message_util.Plo + -rm -f google/protobuf/$(DEPDIR)/implicit_weak_message.Plo + -rm -f google/protobuf/$(DEPDIR)/map_field.Plo + -rm -f google/protobuf/$(DEPDIR)/message.Plo + -rm -f google/protobuf/$(DEPDIR)/message_lite.Plo + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-any_test.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-map_lite_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-map_proto2_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-map_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_custom_options.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_drop_unknown_fields.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_embed_optimize_for.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_empty.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_enormous_descriptor.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_import.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_import_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_import_public.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_import_public_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_lazy_dependencies.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_lazy_dependencies_custom_option.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_lazy_dependencies_enum.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_lite_imports_nonlite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_mset.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_mset_wire_format.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_arena_import.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_field_presence.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_generic_services.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_optimize_for.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_preserve_unknown_enum.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_preserve_unknown_enum2.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_optional.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_well_known_types.pb.Po + -rm -f google/protobuf/$(DEPDIR)/parse_context.Plo + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-any_test.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-arena_test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_lite_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_proto2_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_custom_options.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_drop_unknown_fields.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_embed_optimize_for.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_empty.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_enormous_descriptor.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import_public.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import_public_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lazy_dependencies.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lazy_dependencies_custom_option.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lazy_dependencies_enum.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lite_imports_nonlite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_mset.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_mset_wire_format.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_arena_import.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_field_presence.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_generic_services.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_optimize_for.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_preserve_unknown_enum.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_preserve_unknown_enum2.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_well_known_types.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-arena_test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-lite_arena_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-map_lite_test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-map_lite_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-test_util_lite.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_import_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_import_public_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_no_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-arena_test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-lite_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-map_lite_test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-map_lite_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-test_util_lite.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_import_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_import_public_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_no_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-any_test.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-any_test.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-arena_test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-arena_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-arenastring_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-descriptor_database_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-descriptor_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-drop_unknown_fields_test.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-dynamic_message_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-extension_set_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-generated_message_reflection_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-map_field_test.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-map_lite_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-map_proto2_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-map_test.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-map_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-message_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-no_field_presence_test.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-preserve_unknown_enum_test.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-proto3_arena_lite_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-proto3_arena_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-proto3_lite_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-reflection_ops_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-repeated_field_reflection_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-repeated_field_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-text_format_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_custom_options.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_drop_unknown_fields.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_embed_optimize_for.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_empty.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_enormous_descriptor.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_import.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_import_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_import_public.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_import_public_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_lazy_dependencies.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_lazy_dependencies_custom_option.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_lazy_dependencies_enum.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_lite_imports_nonlite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_mset.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_mset_wire_format.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_arena_import.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_field_presence.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_generic_services.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_optimize_for.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_preserve_unknown_enum.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_preserve_unknown_enum2.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_optional.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_well_known_types.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unknown_field_set_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-well_known_types_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-wire_format_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/reflection_ops.Plo + -rm -f google/protobuf/$(DEPDIR)/repeated_field.Plo + -rm -f google/protobuf/$(DEPDIR)/service.Plo + -rm -f google/protobuf/$(DEPDIR)/source_context.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/struct.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/text_format.Plo + -rm -f google/protobuf/$(DEPDIR)/timestamp.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/type.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/unknown_field_set.Plo + -rm -f google/protobuf/$(DEPDIR)/wire_format.Plo + -rm -f google/protobuf/$(DEPDIR)/wire_format_lite.Plo + -rm -f google/protobuf/$(DEPDIR)/wrappers.pb.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/code_generator.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/command_line_interface.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/importer.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/main.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/parser.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/plugin.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/plugin.pb.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/protobuf_test-annotation_test_util.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/protobuf_test-importer_unittest.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/protobuf_test-mock_code_generator.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/protobuf_test-parser_unittest.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/subprocess.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/test_plugin-mock_code_generator.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/test_plugin-test_plugin.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/zip_writer.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_enum.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_enum_field.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_extension.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_field.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_file.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_generator.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_helpers.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_map_field.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_message.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_message_field.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_padding_optimizer.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_primitive_field.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_service.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_string_field.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/no_warning_test-cpp_test_bad_identifiers.pb.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/no_warning_test-cpp_test_large_enum_value.pb.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_lazy_descriptor_test-cpp_test_bad_identifiers.pb.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_lazy_descriptor_test-cpp_test_large_enum_value.pb.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_lazy_descriptor_test-cpp_unittest.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_bootstrap_unittest.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_move_unittest.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_plugin_unittest.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_test_bad_identifiers.pb.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_test_large_enum_value.pb.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_unittest.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-metadata_test.Po + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_doc_comment.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_enum.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_enum_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_field_base.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_generator.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_helpers.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_map_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_message.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_message_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_primitive_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_reflection_class.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_repeated_enum_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_repeated_message_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_repeated_primitive_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_source_generator_base.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_wrapper_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/protobuf_test-csharp_bootstrap_unittest.Po + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/protobuf_test-csharp_generator_unittest.Po + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_context.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_doc_comment.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_enum.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_enum_field.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_enum_field_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_enum_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_extension.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_extension_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_field.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_file.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_generator.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_generator_factory.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_helpers.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_map_field.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_map_field_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_message.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_message_builder.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_message_builder_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_message_field.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_message_field_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_message_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_name_resolver.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_primitive_field.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_primitive_field_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_service.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_shared_code_generator.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_string_field.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_string_field_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/protobuf_test-java_doc_comment_unittest.Po + -rm -f google/protobuf/compiler/java/$(DEPDIR)/protobuf_test-java_plugin_unittest.Po + -rm -f google/protobuf/compiler/js/$(DEPDIR)/js_generator.Plo + -rm -f google/protobuf/compiler/js/$(DEPDIR)/well_known_types_embed.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_enum.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_enum_field.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_extension.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_field.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_file.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_generator.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_helpers.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_map_field.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_message.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_message_field.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_oneof.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_primitive_field.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/protobuf_test-objectivec_helpers_unittest.Po + -rm -f google/protobuf/compiler/php/$(DEPDIR)/php_generator.Plo + -rm -f google/protobuf/compiler/python/$(DEPDIR)/protobuf_test-python_plugin_unittest.Po + -rm -f google/protobuf/compiler/python/$(DEPDIR)/python_generator.Plo + -rm -f google/protobuf/compiler/ruby/$(DEPDIR)/protobuf_test-ruby_generator_unittest.Po + -rm -f google/protobuf/compiler/ruby/$(DEPDIR)/ruby_generator.Plo + -rm -f google/protobuf/io/$(DEPDIR)/coded_stream.Plo + -rm -f google/protobuf/io/$(DEPDIR)/gzip_stream.Plo + -rm -f google/protobuf/io/$(DEPDIR)/io_win32.Plo + -rm -f google/protobuf/io/$(DEPDIR)/printer.Plo + -rm -f google/protobuf/io/$(DEPDIR)/protobuf_test-coded_stream_unittest.Po + -rm -f google/protobuf/io/$(DEPDIR)/protobuf_test-io_win32_unittest.Po + -rm -f google/protobuf/io/$(DEPDIR)/protobuf_test-printer_unittest.Po + -rm -f google/protobuf/io/$(DEPDIR)/protobuf_test-tokenizer_unittest.Po + -rm -f google/protobuf/io/$(DEPDIR)/protobuf_test-zero_copy_stream_unittest.Po + -rm -f google/protobuf/io/$(DEPDIR)/strtod.Plo + -rm -f google/protobuf/io/$(DEPDIR)/tokenizer.Plo + -rm -f google/protobuf/io/$(DEPDIR)/zero_copy_stream.Plo + -rm -f google/protobuf/io/$(DEPDIR)/zero_copy_stream_impl.Plo + -rm -f google/protobuf/io/$(DEPDIR)/zero_copy_stream_impl_lite.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/bytestream.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/common.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/int128.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-bytestream_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-common_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-int128_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-status_test.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-statusor_test.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-stringpiece_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-stringprintf_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-structurally_valid_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-strutil_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-template_util_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-time_test.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/status.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/statusor.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/stringpiece.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/stringprintf.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/structurally_valid.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/strutil.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/substitute.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/time.Plo + -rm -f google/protobuf/testing/$(DEPDIR)/protobuf_lazy_descriptor_test-file.Po + -rm -f google/protobuf/testing/$(DEPDIR)/protobuf_lazy_descriptor_test-googletest.Po + -rm -f google/protobuf/testing/$(DEPDIR)/protobuf_test-file.Po + -rm -f google/protobuf/testing/$(DEPDIR)/protobuf_test-googletest.Po + -rm -f google/protobuf/testing/$(DEPDIR)/test_plugin-file.Po + -rm -f google/protobuf/testing/$(DEPDIR)/zcgunzip.Po + -rm -f google/protobuf/testing/$(DEPDIR)/zcgzip.Po + -rm -f google/protobuf/util/$(DEPDIR)/delimited_message_util.Plo + -rm -f google/protobuf/util/$(DEPDIR)/field_comparator.Plo + -rm -f google/protobuf/util/$(DEPDIR)/field_mask_util.Plo + -rm -f google/protobuf/util/$(DEPDIR)/json_util.Plo + -rm -f google/protobuf/util/$(DEPDIR)/message_differencer.Plo + -rm -f google/protobuf/util/$(DEPDIR)/no_warning_test-json_format.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/no_warning_test-json_format_proto3.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/no_warning_test-message_differencer_unittest.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_lazy_descriptor_test-json_format.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_lazy_descriptor_test-json_format_proto3.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_lazy_descriptor_test-message_differencer_unittest.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-delimited_message_util_test.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-field_comparator_test.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-field_mask_util_test.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-json_format.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-json_format_proto3.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-json_util_test.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-message_differencer_unittest.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-message_differencer_unittest.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-time_util_test.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-type_resolver_util_test.Po + -rm -f google/protobuf/util/$(DEPDIR)/time_util.Plo + -rm -f google/protobuf/util/$(DEPDIR)/type_resolver_util.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/datapiece.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/default_value_objectwriter.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/error_listener.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/field_mask_utility.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/json_escaping.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/json_objectwriter.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/json_stream_parser.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/object_writer.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/proto_writer.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/protobuf_test-default_value_objectwriter_test.Po + -rm -f google/protobuf/util/internal/$(DEPDIR)/protobuf_test-json_objectwriter_test.Po + -rm -f google/protobuf/util/internal/$(DEPDIR)/protobuf_test-json_stream_parser_test.Po + -rm -f google/protobuf/util/internal/$(DEPDIR)/protobuf_test-protostream_objectsource_test.Po + -rm -f google/protobuf/util/internal/$(DEPDIR)/protobuf_test-protostream_objectwriter_test.Po + -rm -f google/protobuf/util/internal/$(DEPDIR)/protobuf_test-type_info_test_helper.Po + -rm -f google/protobuf/util/internal/$(DEPDIR)/protostream_objectsource.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/protostream_objectwriter.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/type_info.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/type_info_test_helper.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/utility.Plo + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-anys.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-books.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-default_value.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-default_value_test.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-field_mask.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-maps.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-oneofs.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-proto3.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-struct.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-timestamp_duration.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-wrappers.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-anys.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-books.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-default_value.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-default_value_test.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-field_mask.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-maps.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-oneofs.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-proto3.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-struct.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-timestamp_duration.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-wrappers.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-anys.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-books.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-default_value.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-default_value_test.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-field_mask.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-maps.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-oneofs.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-proto3.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-struct.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-timestamp_duration.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-wrappers.pb.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -8089,7 +8967,426 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) google/protobuf/$(DEPDIR) google/protobuf/compiler/$(DEPDIR) google/protobuf/compiler/cpp/$(DEPDIR) google/protobuf/compiler/csharp/$(DEPDIR) google/protobuf/compiler/java/$(DEPDIR) google/protobuf/compiler/js/$(DEPDIR) google/protobuf/compiler/objectivec/$(DEPDIR) google/protobuf/compiler/php/$(DEPDIR) google/protobuf/compiler/python/$(DEPDIR) google/protobuf/compiler/ruby/$(DEPDIR) google/protobuf/io/$(DEPDIR) google/protobuf/stubs/$(DEPDIR) google/protobuf/testing/$(DEPDIR) google/protobuf/util/$(DEPDIR) google/protobuf/util/internal/$(DEPDIR) google/protobuf/util/internal/testdata/$(DEPDIR) + -rm -f ./$(DEPDIR)/no_warning_test-no_warning_test.Po + -rm -f google/protobuf/$(DEPDIR)/any.Plo + -rm -f google/protobuf/$(DEPDIR)/any.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/any_lite.Plo + -rm -f google/protobuf/$(DEPDIR)/api.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/arena.Plo + -rm -f google/protobuf/$(DEPDIR)/descriptor.Plo + -rm -f google/protobuf/$(DEPDIR)/descriptor.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/descriptor_database.Plo + -rm -f google/protobuf/$(DEPDIR)/duration.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/dynamic_message.Plo + -rm -f google/protobuf/$(DEPDIR)/empty.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/extension_set.Plo + -rm -f google/protobuf/$(DEPDIR)/extension_set_heavy.Plo + -rm -f google/protobuf/$(DEPDIR)/field_mask.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/generated_enum_util.Plo + -rm -f google/protobuf/$(DEPDIR)/generated_message_reflection.Plo + -rm -f google/protobuf/$(DEPDIR)/generated_message_table_driven.Plo + -rm -f google/protobuf/$(DEPDIR)/generated_message_table_driven_lite.Plo + -rm -f google/protobuf/$(DEPDIR)/generated_message_util.Plo + -rm -f google/protobuf/$(DEPDIR)/implicit_weak_message.Plo + -rm -f google/protobuf/$(DEPDIR)/map_field.Plo + -rm -f google/protobuf/$(DEPDIR)/message.Plo + -rm -f google/protobuf/$(DEPDIR)/message_lite.Plo + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-any_test.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-map_lite_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-map_proto2_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-map_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_custom_options.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_drop_unknown_fields.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_embed_optimize_for.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_empty.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_enormous_descriptor.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_import.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_import_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_import_public.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_import_public_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_lazy_dependencies.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_lazy_dependencies_custom_option.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_lazy_dependencies_enum.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_lite_imports_nonlite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_mset.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_mset_wire_format.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_arena_import.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_field_presence.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_no_generic_services.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_optimize_for.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_preserve_unknown_enum.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_preserve_unknown_enum2.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_proto3_optional.pb.Po + -rm -f google/protobuf/$(DEPDIR)/no_warning_test-unittest_well_known_types.pb.Po + -rm -f google/protobuf/$(DEPDIR)/parse_context.Plo + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-any_test.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-arena_test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_lite_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_proto2_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-map_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_custom_options.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_drop_unknown_fields.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_embed_optimize_for.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_empty.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_enormous_descriptor.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import_public.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_import_public_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lazy_dependencies.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lazy_dependencies_custom_option.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lazy_dependencies_enum.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_lite_imports_nonlite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_mset.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_mset_wire_format.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_arena_import.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_field_presence.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_no_generic_services.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_optimize_for.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_preserve_unknown_enum.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_preserve_unknown_enum2.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_proto3_optional.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lazy_descriptor_test-unittest_well_known_types.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-arena_test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-lite_arena_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-map_lite_test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-map_lite_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-test_util_lite.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_import_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_import_public_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_arena_test-unittest_no_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-arena_test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-lite_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-map_lite_test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-map_lite_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-test_util_lite.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_import_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_import_public_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_lite_test-unittest_no_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-any_test.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-any_test.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-arena_test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-arena_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-arenastring_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-descriptor_database_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-descriptor_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-drop_unknown_fields_test.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-dynamic_message_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-extension_set_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-generated_message_reflection_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-map_field_test.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-map_lite_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-map_proto2_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-map_test.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-map_unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-message_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-no_field_presence_test.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-preserve_unknown_enum_test.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-proto3_arena_lite_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-proto3_arena_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-proto3_lite_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-reflection_ops_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-repeated_field_reflection_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-repeated_field_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-test_util.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-text_format_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_custom_options.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_drop_unknown_fields.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_embed_optimize_for.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_empty.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_enormous_descriptor.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_import.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_import_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_import_public.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_import_public_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_lazy_dependencies.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_lazy_dependencies_custom_option.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_lazy_dependencies_enum.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_lite_imports_nonlite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_mset.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_mset_wire_format.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_arena_import.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_field_presence.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_no_generic_services.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_optimize_for.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_preserve_unknown_enum.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_preserve_unknown_enum2.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_arena.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_arena_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_lite.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_proto3_optional.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unittest_well_known_types.pb.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-unknown_field_set_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-well_known_types_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/protobuf_test-wire_format_unittest.Po + -rm -f google/protobuf/$(DEPDIR)/reflection_ops.Plo + -rm -f google/protobuf/$(DEPDIR)/repeated_field.Plo + -rm -f google/protobuf/$(DEPDIR)/service.Plo + -rm -f google/protobuf/$(DEPDIR)/source_context.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/struct.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/text_format.Plo + -rm -f google/protobuf/$(DEPDIR)/timestamp.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/type.pb.Plo + -rm -f google/protobuf/$(DEPDIR)/unknown_field_set.Plo + -rm -f google/protobuf/$(DEPDIR)/wire_format.Plo + -rm -f google/protobuf/$(DEPDIR)/wire_format_lite.Plo + -rm -f google/protobuf/$(DEPDIR)/wrappers.pb.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/code_generator.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/command_line_interface.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/importer.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/main.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/parser.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/plugin.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/plugin.pb.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/protobuf_test-annotation_test_util.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/protobuf_test-command_line_interface_unittest.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/protobuf_test-importer_unittest.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/protobuf_test-mock_code_generator.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/protobuf_test-parser_unittest.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/subprocess.Plo + -rm -f google/protobuf/compiler/$(DEPDIR)/test_plugin-mock_code_generator.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/test_plugin-test_plugin.Po + -rm -f google/protobuf/compiler/$(DEPDIR)/zip_writer.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_enum.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_enum_field.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_extension.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_field.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_file.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_generator.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_helpers.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_map_field.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_message.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_message_field.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_padding_optimizer.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_primitive_field.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_service.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/cpp_string_field.Plo + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/no_warning_test-cpp_test_bad_identifiers.pb.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/no_warning_test-cpp_test_large_enum_value.pb.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_lazy_descriptor_test-cpp_test_bad_identifiers.pb.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_lazy_descriptor_test-cpp_test_large_enum_value.pb.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_lazy_descriptor_test-cpp_unittest.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_bootstrap_unittest.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_move_unittest.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_plugin_unittest.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_test_bad_identifiers.pb.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_test_large_enum_value.pb.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-cpp_unittest.Po + -rm -f google/protobuf/compiler/cpp/$(DEPDIR)/protobuf_test-metadata_test.Po + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_doc_comment.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_enum.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_enum_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_field_base.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_generator.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_helpers.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_map_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_message.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_message_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_primitive_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_reflection_class.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_repeated_enum_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_repeated_message_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_repeated_primitive_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_source_generator_base.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/csharp_wrapper_field.Plo + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/protobuf_test-csharp_bootstrap_unittest.Po + -rm -f google/protobuf/compiler/csharp/$(DEPDIR)/protobuf_test-csharp_generator_unittest.Po + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_context.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_doc_comment.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_enum.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_enum_field.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_enum_field_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_enum_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_extension.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_extension_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_field.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_file.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_generator.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_generator_factory.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_helpers.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_map_field.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_map_field_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_message.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_message_builder.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_message_builder_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_message_field.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_message_field_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_message_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_name_resolver.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_primitive_field.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_primitive_field_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_service.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_shared_code_generator.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_string_field.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/java_string_field_lite.Plo + -rm -f google/protobuf/compiler/java/$(DEPDIR)/protobuf_test-java_doc_comment_unittest.Po + -rm -f google/protobuf/compiler/java/$(DEPDIR)/protobuf_test-java_plugin_unittest.Po + -rm -f google/protobuf/compiler/js/$(DEPDIR)/js_generator.Plo + -rm -f google/protobuf/compiler/js/$(DEPDIR)/well_known_types_embed.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_enum.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_enum_field.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_extension.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_field.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_file.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_generator.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_helpers.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_map_field.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_message.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_message_field.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_oneof.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/objectivec_primitive_field.Plo + -rm -f google/protobuf/compiler/objectivec/$(DEPDIR)/protobuf_test-objectivec_helpers_unittest.Po + -rm -f google/protobuf/compiler/php/$(DEPDIR)/php_generator.Plo + -rm -f google/protobuf/compiler/python/$(DEPDIR)/protobuf_test-python_plugin_unittest.Po + -rm -f google/protobuf/compiler/python/$(DEPDIR)/python_generator.Plo + -rm -f google/protobuf/compiler/ruby/$(DEPDIR)/protobuf_test-ruby_generator_unittest.Po + -rm -f google/protobuf/compiler/ruby/$(DEPDIR)/ruby_generator.Plo + -rm -f google/protobuf/io/$(DEPDIR)/coded_stream.Plo + -rm -f google/protobuf/io/$(DEPDIR)/gzip_stream.Plo + -rm -f google/protobuf/io/$(DEPDIR)/io_win32.Plo + -rm -f google/protobuf/io/$(DEPDIR)/printer.Plo + -rm -f google/protobuf/io/$(DEPDIR)/protobuf_test-coded_stream_unittest.Po + -rm -f google/protobuf/io/$(DEPDIR)/protobuf_test-io_win32_unittest.Po + -rm -f google/protobuf/io/$(DEPDIR)/protobuf_test-printer_unittest.Po + -rm -f google/protobuf/io/$(DEPDIR)/protobuf_test-tokenizer_unittest.Po + -rm -f google/protobuf/io/$(DEPDIR)/protobuf_test-zero_copy_stream_unittest.Po + -rm -f google/protobuf/io/$(DEPDIR)/strtod.Plo + -rm -f google/protobuf/io/$(DEPDIR)/tokenizer.Plo + -rm -f google/protobuf/io/$(DEPDIR)/zero_copy_stream.Plo + -rm -f google/protobuf/io/$(DEPDIR)/zero_copy_stream_impl.Plo + -rm -f google/protobuf/io/$(DEPDIR)/zero_copy_stream_impl_lite.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/bytestream.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/common.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/int128.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-bytestream_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-common_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-int128_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-status_test.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-statusor_test.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-stringpiece_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-stringprintf_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-structurally_valid_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-strutil_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-template_util_unittest.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/protobuf_test-time_test.Po + -rm -f google/protobuf/stubs/$(DEPDIR)/status.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/statusor.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/stringpiece.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/stringprintf.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/structurally_valid.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/strutil.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/substitute.Plo + -rm -f google/protobuf/stubs/$(DEPDIR)/time.Plo + -rm -f google/protobuf/testing/$(DEPDIR)/protobuf_lazy_descriptor_test-file.Po + -rm -f google/protobuf/testing/$(DEPDIR)/protobuf_lazy_descriptor_test-googletest.Po + -rm -f google/protobuf/testing/$(DEPDIR)/protobuf_test-file.Po + -rm -f google/protobuf/testing/$(DEPDIR)/protobuf_test-googletest.Po + -rm -f google/protobuf/testing/$(DEPDIR)/test_plugin-file.Po + -rm -f google/protobuf/testing/$(DEPDIR)/zcgunzip.Po + -rm -f google/protobuf/testing/$(DEPDIR)/zcgzip.Po + -rm -f google/protobuf/util/$(DEPDIR)/delimited_message_util.Plo + -rm -f google/protobuf/util/$(DEPDIR)/field_comparator.Plo + -rm -f google/protobuf/util/$(DEPDIR)/field_mask_util.Plo + -rm -f google/protobuf/util/$(DEPDIR)/json_util.Plo + -rm -f google/protobuf/util/$(DEPDIR)/message_differencer.Plo + -rm -f google/protobuf/util/$(DEPDIR)/no_warning_test-json_format.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/no_warning_test-json_format_proto3.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/no_warning_test-message_differencer_unittest.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_lazy_descriptor_test-json_format.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_lazy_descriptor_test-json_format_proto3.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_lazy_descriptor_test-message_differencer_unittest.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-delimited_message_util_test.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-field_comparator_test.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-field_mask_util_test.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-json_format.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-json_format_proto3.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-json_util_test.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-message_differencer_unittest.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-message_differencer_unittest.pb.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-time_util_test.Po + -rm -f google/protobuf/util/$(DEPDIR)/protobuf_test-type_resolver_util_test.Po + -rm -f google/protobuf/util/$(DEPDIR)/time_util.Plo + -rm -f google/protobuf/util/$(DEPDIR)/type_resolver_util.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/datapiece.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/default_value_objectwriter.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/error_listener.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/field_mask_utility.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/json_escaping.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/json_objectwriter.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/json_stream_parser.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/object_writer.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/proto_writer.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/protobuf_test-default_value_objectwriter_test.Po + -rm -f google/protobuf/util/internal/$(DEPDIR)/protobuf_test-json_objectwriter_test.Po + -rm -f google/protobuf/util/internal/$(DEPDIR)/protobuf_test-json_stream_parser_test.Po + -rm -f google/protobuf/util/internal/$(DEPDIR)/protobuf_test-protostream_objectsource_test.Po + -rm -f google/protobuf/util/internal/$(DEPDIR)/protobuf_test-protostream_objectwriter_test.Po + -rm -f google/protobuf/util/internal/$(DEPDIR)/protobuf_test-type_info_test_helper.Po + -rm -f google/protobuf/util/internal/$(DEPDIR)/protostream_objectsource.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/protostream_objectwriter.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/type_info.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/type_info_test_helper.Plo + -rm -f google/protobuf/util/internal/$(DEPDIR)/utility.Plo + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-anys.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-books.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-default_value.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-default_value_test.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-field_mask.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-maps.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-oneofs.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-proto3.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-struct.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-timestamp_duration.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/no_warning_test-wrappers.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-anys.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-books.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-default_value.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-default_value_test.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-field_mask.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-maps.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-oneofs.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-proto3.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-struct.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-timestamp_duration.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_lazy_descriptor_test-wrappers.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-anys.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-books.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-default_value.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-default_value_test.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-field_mask.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-maps.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-oneofs.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-proto3.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-struct.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-timestamp_duration.pb.Po + -rm -f google/protobuf/util/internal/testdata/$(DEPDIR)/protobuf_test-wrappers.pb.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -8112,23 +9409,23 @@ uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ .MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-local cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-libLTLIBRARIES \ - install-man install-nobase_dist_protoDATA \ - install-nobase_includeHEADERS install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-binPROGRAMS clean-checkPROGRAMS \ + clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man \ + install-nobase_dist_protoDATA install-nobase_includeHEADERS \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am recheck tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ uninstall-nobase_dist_protoDATA \ uninstall-nobase_includeHEADERS @@ -8147,7 +9444,7 @@ clean-local: # relative to srcdir, which may not be the same as the current directory when # building out-of-tree. @USE_EXTERNAL_PROTOC_FALSE@unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs) -@USE_EXTERNAL_PROTOC_FALSE@ oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) ) +@USE_EXTERNAL_PROTOC_FALSE@ oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) --experimental_allow_proto3_optional ) @USE_EXTERNAL_PROTOC_FALSE@ touch unittest_proto_middleman $(protoc_outputs): unittest_proto_middleman diff --git a/third_party/protobuf/src/README.md b/third_party/protobuf/src/README.md index d84176e3..78d6bb5e 100644 --- a/third_party/protobuf/src/README.md +++ b/third_party/protobuf/src/README.md @@ -40,19 +40,20 @@ You can also get the source by "git clone" our git repository. Make sure you have also cloned the submodules and generated the configure script (skip this if you are using a release .tar.gz or .zip package): - $ git clone https://github.com/protocolbuffers/protobuf.git - $ cd protobuf - $ git submodule update --init --recursive - $ ./autogen.sh + git clone https://github.com/protocolbuffers/protobuf.git + cd protobuf + git submodule update --init --recursive + ./autogen.sh To build and install the C++ Protocol Buffer runtime and the Protocol Buffer compiler (protoc) execute the following: - $ ./configure - $ make - $ make check - $ sudo make install - $ sudo ldconfig # refresh shared library cache. + + ./configure + make + make check + sudo make install + sudo ldconfig # refresh shared library cache. If "make check" fails, you can still install, but it is likely that some features of this library will not work correctly on your system. @@ -83,10 +84,12 @@ Protocol Buffers integrates with pkg-config to manage this. If you have pkg-config installed, then you can invoke it to get a list of flags like so: + pkg-config --cflags protobuf # print compiler flags pkg-config --libs protobuf # print linker flags pkg-config --cflags --libs protobuf # print both + For example: c++ my_program.cc my_proto.pb.cc `pkg-config --cflags --libs protobuf` @@ -97,6 +100,7 @@ not pass the correct set of flags to correctly link against libprotobuf. If the package in question uses autoconf, you can often fix the problem by invoking its configure script like: + configure CXXFLAGS="$(pkg-config --cflags protobuf)" \ LIBS="$(pkg-config --libs protobuf)" @@ -119,13 +123,13 @@ For a Mac system, Unix tools are not available by default. You will first need to install Xcode from the Mac AppStore and then run the following command from a terminal: - $ sudo xcode-select --install + sudo xcode-select --install To install Unix tools, you can install "port" following the instructions at https://www.macports.org . This will reside in /opt/local/bin/port for most Mac installations. - $ sudo /opt/local/bin/port install autoconf automake libtool + sudo /opt/local/bin/port install autoconf automake libtool Then follow the Unix instructions above. diff --git a/third_party/protobuf/src/google/protobuf/any.h b/third_party/protobuf/src/google/protobuf/any.h index d7d43966..59dd50cb 100644 --- a/third_party/protobuf/src/google/protobuf/any.h +++ b/third_party/protobuf/src/google/protobuf/any.h @@ -73,7 +73,7 @@ class PROTOBUF_EXPORT AnyMetadata { // Packs a message using the given type URL prefix. The type URL will be // constructed by concatenating the message type's full name to the prefix - // with an optional "/" separator if the prefix doesn't already end up "/". + // with an optional "/" separator if the prefix doesn't already end with "/". // For example, both PackFrom(message, "type.googleapis.com") and // PackFrom(message, "type.googleapis.com/") yield the same result type // URL: "type.googleapis.com/". @@ -96,7 +96,7 @@ class PROTOBUF_EXPORT AnyMetadata { bool UnpackTo(Message* message) const; // Checks whether the type specified in the type URL matches the given type. - // A type is consdiered matching if its full name matches the full name after + // A type is considered matching if its full name matches the full name after // the last "/" in the type URL. template bool Is() const { diff --git a/third_party/protobuf/src/google/protobuf/any.pb.cc b/third_party/protobuf/src/google/protobuf/any.pb.cc index eea20a1b..1eba999e 100644 --- a/third_party/protobuf/src/google/protobuf/any.pb.cc +++ b/third_party/protobuf/src/google/protobuf/any.pb.cc @@ -5,7 +5,6 @@ #include -#include #include #include #include @@ -33,7 +32,7 @@ static void InitDefaultsscc_info_Any_google_2fprotobuf_2fany_2eproto() { } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Any_google_2fprotobuf_2fany_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Any_google_2fprotobuf_2fany_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Any_google_2fprotobuf_2fany_2eproto}, {}}; static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fany_2eproto[1]; static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fany_2eproto = nullptr; @@ -56,7 +55,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Any_default_instance_), }; -const char descriptor_table_protodef_google_2fprotobuf_2fany_2eproto[] = +const char descriptor_table_protodef_google_2fprotobuf_2fany_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\031google/protobuf/any.proto\022\017google.prot" "obuf\"&\n\003Any\022\020\n\010type_url\030\001 \001(\t\022\r\n\005value\030\002" " \001(\014Bo\n\023com.google.protobufB\010AnyProtoP\001Z" @@ -70,34 +69,21 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_goo &scc_info_Any_google_2fprotobuf_2fany_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fany_2eproto_once; -static bool descriptor_table_google_2fprotobuf_2fany_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fany_2eproto = { - &descriptor_table_google_2fprotobuf_2fany_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2fany_2eproto, "google/protobuf/any.proto", 205, + false, false, descriptor_table_protodef_google_2fprotobuf_2fany_2eproto, "google/protobuf/any.proto", 205, &descriptor_table_google_2fprotobuf_2fany_2eproto_once, descriptor_table_google_2fprotobuf_2fany_2eproto_sccs, descriptor_table_google_2fprotobuf_2fany_2eproto_deps, 1, 0, schemas, file_default_instances, TableStruct_google_2fprotobuf_2fany_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fany_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fany_2eproto, file_level_service_descriptors_google_2fprotobuf_2fany_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_google_2fprotobuf_2fany_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fany_2eproto), true); +static bool dynamic_init_dummy_google_2fprotobuf_2fany_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fany_2eproto)), true); PROTOBUF_NAMESPACE_OPEN // =================================================================== void Any::InitAsDefaultInstance() { } -void Any::PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message) { - _any_metadata_.PackFrom(message); -} - -void Any::PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message, - const std::string& type_url_prefix) { - _any_metadata_.PackFrom(message, type_url_prefix); -} - -bool Any::UnpackTo(::PROTOBUF_NAMESPACE_ID::Message* message) const { - return _any_metadata_.UnpackTo(message); -} bool Any::GetAnyFieldDescriptors( const ::PROTOBUF_NAMESPACE_ID::Message& message, const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** type_url_field, @@ -111,32 +97,30 @@ bool Any::ParseAnyTypeUrl(const string& type_url, full_type_name); } -class Any::HasBitSetters { +class Any::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Any::kTypeUrlFieldNumber; -const int Any::kValueFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Any::Any() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _any_metadata_(&type_url_, &value_) { +Any::Any(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena), + _any_metadata_(&type_url_, &value_) { SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.Any) + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:google.protobuf.Any) } Any::Any(const Any& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _any_metadata_(&type_url_, &value_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.type_url().size() > 0) { - type_url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.type_url_); + if (!from._internal_type_url().empty()) { + type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_type_url(), + GetArena()); } value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.value().size() > 0) { - value_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.value_); + if (!from._internal_value().empty()) { + value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_value(), + GetArena()); } // @@protoc_insertion_point(copy_constructor:google.protobuf.Any) } @@ -150,13 +134,21 @@ void Any::SharedCtor() { Any::~Any() { // @@protoc_insertion_point(destructor:google.protobuf.Any) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Any::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); type_url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } +void Any::ArenaDtor(void* object) { + Any* _this = reinterpret_cast< Any* >(object); + (void)_this; +} +void Any::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} void Any::SetCachedSize(int size) const { _cached_size_.Set(size); } @@ -172,14 +164,14 @@ void Any::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - type_url_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - value_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - _internal_metadata_.Clear(); + type_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Any::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -188,14 +180,17 @@ const char* Any::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern // string type_url = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_type_url(), ptr, ctx, "google.protobuf.Any.type_url"); + auto str = _internal_mutable_type_url(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Any.type_url")); CHK_(ptr); } else goto handle_unusual; continue; // bytes value = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_value(), ptr, ctx); + auto str = _internal_mutable_value(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); } else goto handle_unusual; continue; @@ -205,7 +200,9 @@ const char* Any::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -218,95 +215,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Any::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.Any) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string type_url = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_type_url())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->type_url().data(), static_cast(this->type_url().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Any.type_url")); - } else { - goto handle_unusual; - } - break; - } - // bytes value = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes( - input, this->mutable_value())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.Any) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.Any) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Any::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.Any) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string type_url = 1; - if (this->type_url().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->type_url().data(), static_cast(this->type_url().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Any.type_url"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->type_url(), output); - } - - // bytes value = 2; - if (this->value().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased( - 2, this->value(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.Any) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Any::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Any::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Any) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -314,24 +225,22 @@ void Any::SerializeWithCachedSizes( // string type_url = 1; if (this->type_url().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->type_url().data(), static_cast(this->type_url().length()), + this->_internal_type_url().data(), static_cast(this->_internal_type_url().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Any.type_url"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->type_url(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_type_url(), target); } // bytes value = 2; if (this->value().size() > 0) { - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray( - 2, this->value(), target); + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_value(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Any) return target; @@ -341,11 +250,6 @@ size_t Any::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Any) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -354,16 +258,20 @@ size_t Any::ByteSizeLong() const { if (this->type_url().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->type_url()); + this->_internal_type_url()); } // bytes value = 2; if (this->value().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->value()); + this->_internal_value()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -387,17 +295,15 @@ void Any::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Any::MergeFrom(const Any& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Any) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.type_url().size() > 0) { - - type_url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.type_url_); + _internal_set_type_url(from._internal_type_url()); } if (from.value().size() > 0) { - - value_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.value_); + _internal_set_value(from._internal_value()); } } @@ -419,17 +325,11 @@ bool Any::IsInitialized() const { return true; } -void Any::Swap(Any* other) { - if (other == this) return; - InternalSwap(other); -} void Any::InternalSwap(Any* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - type_url_.Swap(&other->type_url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - value_.Swap(&other->value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + type_url_.Swap(&other->type_url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + value_.Swap(&other->value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } ::PROTOBUF_NAMESPACE_ID::Metadata Any::GetMetadata() const { @@ -441,7 +341,7 @@ void Any::InternalSwap(Any* other) { PROTOBUF_NAMESPACE_CLOSE PROTOBUF_NAMESPACE_OPEN template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Any* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Any >(Arena* arena) { - return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::Any >(arena); + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Any >(arena); } PROTOBUF_NAMESPACE_CLOSE diff --git a/third_party/protobuf/src/google/protobuf/any.pb.h b/third_party/protobuf/src/google/protobuf/any.pb.h index 800211b7..0727c189 100644 --- a/third_party/protobuf/src/google/protobuf/any.pb.h +++ b/third_party/protobuf/src/google/protobuf/any.pb.h @@ -8,12 +8,12 @@ #include #include -#if PROTOBUF_VERSION < 3008000 +#if PROTOBUF_VERSION < 3012000 #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 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3012004 < 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. @@ -26,13 +26,12 @@ #include #include #include -#include +#include #include #include #include // IWYU pragma: export #include // IWYU pragma: export #include -#include // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto PROTOBUF_EXPORT @@ -67,10 +66,10 @@ PROTOBUF_NAMESPACE_OPEN // =================================================================== -class PROTOBUF_EXPORT Any : +class PROTOBUF_EXPORT Any PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ { public: - Any(); + inline Any() : Any(nullptr) {}; virtual ~Any(); Any(const Any& from); @@ -84,7 +83,7 @@ class PROTOBUF_EXPORT Any : return *this; } inline Any& operator=(Any&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -113,23 +112,53 @@ class PROTOBUF_EXPORT Any : // implements Any ----------------------------------------------- - void PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message); + void PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message) { + _any_metadata_.PackFrom(message); + } void PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message, - const std::string& type_url_prefix); - bool UnpackTo(::PROTOBUF_NAMESPACE_ID::Message* message) const; + const std::string& type_url_prefix) { + _any_metadata_.PackFrom(message, type_url_prefix); + } + bool UnpackTo(::PROTOBUF_NAMESPACE_ID::Message* message) const { + return _any_metadata_.UnpackTo(message); + } static bool GetAnyFieldDescriptors( const ::PROTOBUF_NAMESPACE_ID::Message& message, const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** type_url_field, const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** value_field); + template ::value>::type> + void PackFrom(const T& message) { + _any_metadata_.PackFrom(message); + } + template ::value>::type> + void PackFrom(const T& message, + const std::string& type_url_prefix) { + _any_metadata_.PackFrom(message, type_url_prefix);} + template ::value>::type> + bool UnpackTo(T* message) const { + return _any_metadata_.UnpackTo(message); + } template bool Is() const { return _any_metadata_.Is(); } static bool ParseAnyTypeUrl(const string& type_url, std::string* full_type_name); - void Swap(Any* other); friend void swap(Any& a, Any& b) { a.Swap(&b); } + inline void Swap(Any* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Any* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -148,16 +177,9 @@ class PROTOBUF_EXPORT Any : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -169,13 +191,11 @@ class PROTOBUF_EXPORT Any : static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.Any"; } + protected: + explicit Any(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -191,9 +211,12 @@ class PROTOBUF_EXPORT Any : // accessors ------------------------------------------------------- + enum : int { + kTypeUrlFieldNumber = 1, + kValueFieldNumber = 2, + }; // string type_url = 1; void clear_type_url(); - static const int kTypeUrlFieldNumber = 1; const std::string& type_url() const; void set_type_url(const std::string& value); void set_type_url(std::string&& value); @@ -202,10 +225,23 @@ class PROTOBUF_EXPORT Any : std::string* mutable_type_url(); std::string* release_type_url(); void set_allocated_type_url(std::string* type_url); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_type_url(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_type_url( + std::string* type_url); + private: + const std::string& _internal_type_url() const; + void _internal_set_type_url(const std::string& value); + std::string* _internal_mutable_type_url(); + public: // bytes value = 2; void clear_value(); - static const int kValueFieldNumber = 2; const std::string& value() const; void set_value(const std::string& value); void set_value(std::string&& value); @@ -214,12 +250,28 @@ class PROTOBUF_EXPORT Any : std::string* mutable_value(); std::string* release_value(); void set_allocated_value(std::string* value); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_value(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_value( + std::string* value); + private: + const std::string& _internal_value() const; + void _internal_set_value(const std::string& value); + std::string* _internal_mutable_value(); + public: // @@protoc_insertion_point(class_scope:google.protobuf.Any) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template 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_; @@ -239,44 +291,54 @@ class PROTOBUF_EXPORT Any : // string type_url = 1; inline void Any::clear_type_url() { - type_url_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + type_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Any::type_url() const { // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url) - return type_url_.GetNoArena(); + return _internal_type_url(); } inline void Any::set_type_url(const std::string& value) { - - type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_type_url(value); // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url) } +inline std::string* Any::mutable_type_url() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url) + return _internal_mutable_type_url(); +} +inline const std::string& Any::_internal_type_url() const { + return type_url_.Get(); +} +inline void Any::_internal_set_type_url(const std::string& value) { + + type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Any::set_type_url(std::string&& value) { - type_url_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + type_url_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.type_url) } inline void Any::set_type_url(const char* value) { GOOGLE_DCHECK(value != nullptr); - type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url) } -inline void Any::set_type_url(const char* value, size_t size) { +inline void Any::set_type_url(const char* value, + size_t size) { - type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url) } -inline std::string* Any::mutable_type_url() { +inline std::string* Any::_internal_mutable_type_url() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url) - return type_url_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return type_url_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Any::release_type_url() { // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url) - - return type_url_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return type_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Any::set_allocated_type_url(std::string* type_url) { if (type_url != nullptr) { @@ -284,50 +346,80 @@ inline void Any::set_allocated_type_url(std::string* type_url) { } else { } - type_url_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_url); + type_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_url, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url) } +inline std::string* Any::unsafe_arena_release_type_url() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Any.type_url) + GOOGLE_DCHECK(GetArena() != nullptr); + + return type_url_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Any::unsafe_arena_set_allocated_type_url( + std::string* type_url) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (type_url != nullptr) { + + } else { + + } + type_url_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + type_url, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Any.type_url) +} // bytes value = 2; inline void Any::clear_value() { - value_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Any::value() const { // @@protoc_insertion_point(field_get:google.protobuf.Any.value) - return value_.GetNoArena(); + return _internal_value(); } inline void Any::set_value(const std::string& value) { - - value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_value(value); // @@protoc_insertion_point(field_set:google.protobuf.Any.value) } +inline std::string* Any::mutable_value() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value) + return _internal_mutable_value(); +} +inline const std::string& Any::_internal_value() const { + return value_.Get(); +} +inline void Any::_internal_set_value(const std::string& value) { + + value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Any::set_value(std::string&& value) { - value_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + value_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.value) } inline void Any::set_value(const char* value) { GOOGLE_DCHECK(value != nullptr); - value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value) } -inline void Any::set_value(const void* value, size_t size) { +inline void Any::set_value(const void* value, + size_t size) { - value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value) } -inline std::string* Any::mutable_value() { +inline std::string* Any::_internal_mutable_value() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value) - return value_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Any::release_value() { // @@protoc_insertion_point(field_release:google.protobuf.Any.value) - - return value_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Any::set_allocated_value(std::string* value) { if (value != nullptr) { @@ -335,9 +427,29 @@ inline void Any::set_allocated_value(std::string* value) { } else { } - value_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value) } +inline std::string* Any::unsafe_arena_release_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Any.value) + GOOGLE_DCHECK(GetArena() != nullptr); + + return value_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Any::unsafe_arena_set_allocated_value( + std::string* value) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (value != nullptr) { + + } else { + + } + value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + value, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Any.value) +} #ifdef __GNUC__ #pragma GCC diagnostic pop diff --git a/third_party/protobuf/src/google/protobuf/any_lite.cc b/third_party/protobuf/src/google/protobuf/any_lite.cc index 7403ed3f..78393813 100644 --- a/third_party/protobuf/src/google/protobuf/any_lite.cc +++ b/third_party/protobuf/src/google/protobuf/any_lite.cc @@ -35,7 +35,6 @@ #include #include - namespace google { namespace protobuf { namespace internal { diff --git a/third_party/protobuf/src/google/protobuf/any_test.cc b/third_party/protobuf/src/google/protobuf/any_test.cc index 4fbf0b63..0d8893f7 100644 --- a/third_party/protobuf/src/google/protobuf/any_test.cc +++ b/third_party/protobuf/src/google/protobuf/any_test.cc @@ -33,7 +33,6 @@ #include - namespace google { namespace protobuf { namespace { diff --git a/third_party/protobuf/src/google/protobuf/api.pb.cc b/third_party/protobuf/src/google/protobuf/api.pb.cc index c979b568..816df120 100644 --- a/third_party/protobuf/src/google/protobuf/api.pb.cc +++ b/third_party/protobuf/src/google/protobuf/api.pb.cc @@ -5,7 +5,6 @@ #include -#include #include #include #include @@ -45,7 +44,7 @@ static void InitDefaultsscc_info_Api_google_2fprotobuf_2fapi_2eproto() { } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<4> scc_info_Api_google_2fprotobuf_2fapi_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsscc_info_Api_google_2fprotobuf_2fapi_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 4, 0, InitDefaultsscc_info_Api_google_2fprotobuf_2fapi_2eproto}, { &scc_info_Method_google_2fprotobuf_2fapi_2eproto.base, &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base, &scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base, @@ -63,7 +62,7 @@ static void InitDefaultsscc_info_Method_google_2fprotobuf_2fapi_2eproto() { } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Method_google_2fprotobuf_2fapi_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Method_google_2fprotobuf_2fapi_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Method_google_2fprotobuf_2fapi_2eproto}, { &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,}}; static void InitDefaultsscc_info_Mixin_google_2fprotobuf_2fapi_2eproto() { @@ -78,7 +77,7 @@ static void InitDefaultsscc_info_Mixin_google_2fprotobuf_2fapi_2eproto() { } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Mixin_google_2fprotobuf_2fapi_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Mixin_google_2fprotobuf_2fapi_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Mixin_google_2fprotobuf_2fapi_2eproto}, {}}; static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fapi_2eproto[3]; static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr; @@ -129,7 +128,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Mixin_default_instance_), }; -const char descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto[] = +const char descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\031google/protobuf/api.proto\022\017google.prot" "obuf\032$google/protobuf/source_context.pro" "to\032\032google/protobuf/type.proto\"\201\002\n\003Api\022\014" @@ -160,16 +159,15 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_goo &scc_info_Mixin_google_2fprotobuf_2fapi_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fapi_2eproto_once; -static bool descriptor_table_google_2fprotobuf_2fapi_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fapi_2eproto = { - &descriptor_table_google_2fprotobuf_2fapi_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto, "google/protobuf/api.proto", 750, + false, false, descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto, "google/protobuf/api.proto", 750, &descriptor_table_google_2fprotobuf_2fapi_2eproto_once, descriptor_table_google_2fprotobuf_2fapi_2eproto_sccs, descriptor_table_google_2fprotobuf_2fapi_2eproto_deps, 3, 2, schemas, file_default_instances, TableStruct_google_2fprotobuf_2fapi_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fapi_2eproto, 3, file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto, file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_google_2fprotobuf_2fapi_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fapi_2eproto), true); +static bool dynamic_init_dummy_google_2fprotobuf_2fapi_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fapi_2eproto)), true); PROTOBUF_NAMESPACE_OPEN // =================================================================== @@ -178,55 +176,50 @@ void Api::InitAsDefaultInstance() { PROTOBUF_NAMESPACE_ID::_Api_default_instance_._instance.get_mutable()->source_context_ = const_cast< PROTOBUF_NAMESPACE_ID::SourceContext*>( PROTOBUF_NAMESPACE_ID::SourceContext::internal_default_instance()); } -class Api::HasBitSetters { +class Api::_Internal { public: static const PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Api* msg); }; const PROTOBUF_NAMESPACE_ID::SourceContext& -Api::HasBitSetters::source_context(const Api* msg) { +Api::_Internal::source_context(const Api* msg) { return *msg->source_context_; } void Api::clear_options() { options_.Clear(); } void Api::clear_source_context() { - if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) { + if (GetArena() == nullptr && source_context_ != nullptr) { delete source_context_; } source_context_ = nullptr; } -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Api::kNameFieldNumber; -const int Api::kMethodsFieldNumber; -const int Api::kOptionsFieldNumber; -const int Api::kVersionFieldNumber; -const int Api::kSourceContextFieldNumber; -const int Api::kMixinsFieldNumber; -const int Api::kSyntaxFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Api::Api() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { +Api::Api(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena), + methods_(arena), + options_(arena), + mixins_(arena) { SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.Api) + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:google.protobuf.Api) } Api::Api(const Api& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), methods_(from.methods_), options_(from.options_), mixins_(from.mixins_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.name().size() > 0) { - name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); + if (!from._internal_name().empty()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.version().size() > 0) { - version_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.version_); + if (!from._internal_version().empty()) { + version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_version(), + GetArena()); } - if (from.has_source_context()) { + if (from._internal_has_source_context()) { source_context_ = new PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_); } else { source_context_ = nullptr; @@ -247,14 +240,22 @@ void Api::SharedCtor() { Api::~Api() { // @@protoc_insertion_point(destructor:google.protobuf.Api) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Api::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); version_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete source_context_; } +void Api::ArenaDtor(void* object) { + Api* _this = reinterpret_cast< Api* >(object); + (void)_this; +} +void Api::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} void Api::SetCachedSize(int size) const { _cached_size_.Set(size); } @@ -273,19 +274,19 @@ void Api::Clear() { methods_.Clear(); options_.Clear(); mixins_.Clear(); - name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - version_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) { + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + version_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + if (GetArena() == nullptr && source_context_ != nullptr) { delete source_context_; } source_context_ = nullptr; syntax_ = 0; - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -294,7 +295,9 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern // string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Api.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Api.name")); CHK_(ptr); } else goto handle_unusual; continue; @@ -304,10 +307,10 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_methods(), ptr); + ptr = ctx->ParseMessage(_internal_add_methods(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); } else goto handle_unusual; continue; // repeated .google.protobuf.Option options = 3; @@ -316,23 +319,25 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_options(), ptr); + ptr = ctx->ParseMessage(_internal_add_options(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); } else goto handle_unusual; continue; // string version = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_version(), ptr, ctx, "google.protobuf.Api.version"); + auto str = _internal_mutable_version(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Api.version")); CHK_(ptr); } else goto handle_unusual; continue; // .google.protobuf.SourceContext source_context = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { - ptr = ctx->ParseMessage(mutable_source_context(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -342,18 +347,18 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_mixins(), ptr); + ptr = ctx->ParseMessage(_internal_add_mixins(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 50); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); } else goto handle_unusual; continue; // .google.protobuf.Syntax syntax = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - set_syntax(static_cast(val)); + _internal_set_syntax(static_cast(val)); } else goto handle_unusual; continue; default: { @@ -362,7 +367,9 @@ const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::intern ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -375,200 +382,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Api::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.Api) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Api.name")); - } else { - goto handle_unusual; - } - break; - } - // repeated .google.protobuf.Method methods = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_methods())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.Option options = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_options())); - } else { - goto handle_unusual; - } - break; - } - - // string version = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_version())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->version().data(), static_cast(this->version().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Api.version")); - } else { - goto handle_unusual; - } - break; - } - - // .google.protobuf.SourceContext source_context = 5; - case 5: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_source_context())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.Mixin mixins = 6; - case 6: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_mixins())); - } else { - goto handle_unusual; - } - break; - } - - // .google.protobuf.Syntax syntax = 7; - case 7: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) { - int value = 0; - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_syntax(static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(value)); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.Api) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.Api) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Api::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.Api) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string name = 1; - if (this->name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Api.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // repeated .google.protobuf.Method methods = 2; - for (unsigned int i = 0, - n = static_cast(this->methods_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, - this->methods(static_cast(i)), - output); - } - - // repeated .google.protobuf.Option options = 3; - for (unsigned int i = 0, - n = static_cast(this->options_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, - this->options(static_cast(i)), - output); - } - - // string version = 4; - if (this->version().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->version().data(), static_cast(this->version().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Api.version"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 4, this->version(), output); - } - - // .google.protobuf.SourceContext source_context = 5; - if (this->has_source_context()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 5, HasBitSetters::source_context(this), output); - } - - // repeated .google.protobuf.Mixin mixins = 6; - for (unsigned int i = 0, - n = static_cast(this->mixins_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 6, - this->mixins(static_cast(i)), - output); - } - - // .google.protobuf.Syntax syntax = 7; - if (this->syntax() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( - 7, this->syntax(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.Api) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Api::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Api::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Api) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -576,65 +392,65 @@ void Api::SerializeWithCachedSizes( // string name = 1; if (this->name().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // repeated .google.protobuf.Method methods = 2; for (unsigned int i = 0, - n = static_cast(this->methods_size()); i < n; i++) { + n = static_cast(this->_internal_methods_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 2, this->methods(static_cast(i)), target); + InternalWriteMessage(2, this->_internal_methods(i), target, stream); } // repeated .google.protobuf.Option options = 3; for (unsigned int i = 0, - n = static_cast(this->options_size()); i < n; i++) { + n = static_cast(this->_internal_options_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 3, this->options(static_cast(i)), target); + InternalWriteMessage(3, this->_internal_options(i), target, stream); } // string version = 4; if (this->version().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->version().data(), static_cast(this->version().length()), + this->_internal_version().data(), static_cast(this->_internal_version().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.version"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 4, this->version(), target); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_version(), target); } // .google.protobuf.SourceContext source_context = 5; if (this->has_source_context()) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 5, HasBitSetters::source_context(this), target); + InternalWriteMessage( + 5, _Internal::source_context(this), target, stream); } // repeated .google.protobuf.Mixin mixins = 6; for (unsigned int i = 0, - n = static_cast(this->mixins_size()); i < n; i++) { + n = static_cast(this->_internal_mixins_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 6, this->mixins(static_cast(i)), target); + InternalWriteMessage(6, this->_internal_mixins(i), target, stream); } // .google.protobuf.Syntax syntax = 7; if (this->syntax() != 0) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 7, this->syntax(), target); + 7, this->_internal_syntax(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Api) return target; @@ -644,60 +460,43 @@ size_t Api::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Api) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.Method methods = 2; - { - unsigned int count = static_cast(this->methods_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->methods(static_cast(i))); - } + total_size += 1UL * this->_internal_methods_size(); + for (const auto& msg : this->methods_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated .google.protobuf.Option options = 3; - { - unsigned int count = static_cast(this->options_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->options(static_cast(i))); - } + total_size += 1UL * this->_internal_options_size(); + for (const auto& msg : this->options_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated .google.protobuf.Mixin mixins = 6; - { - unsigned int count = static_cast(this->mixins_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->mixins(static_cast(i))); - } + total_size += 1UL * this->_internal_mixins_size(); + for (const auto& msg : this->mixins_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // string name = 1; if (this->name().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // string version = 4; if (this->version().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->version()); + this->_internal_version()); } // .google.protobuf.SourceContext source_context = 5; @@ -710,9 +509,13 @@ size_t Api::ByteSizeLong() const { // .google.protobuf.Syntax syntax = 7; if (this->syntax() != 0) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->syntax()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_syntax()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -736,7 +539,7 @@ void Api::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Api::MergeFrom(const Api& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Api) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -744,18 +547,16 @@ void Api::MergeFrom(const Api& from) { options_.MergeFrom(from.options_); mixins_.MergeFrom(from.mixins_); if (from.name().size() > 0) { - - name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); + _internal_set_name(from._internal_name()); } if (from.version().size() > 0) { - - version_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.version_); + _internal_set_version(from._internal_version()); } if (from.has_source_context()) { - mutable_source_context()->PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from.source_context()); + _internal_mutable_source_context()->PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context()); } if (from.syntax() != 0) { - set_syntax(from.syntax()); + _internal_set_syntax(from._internal_syntax()); } } @@ -777,22 +578,20 @@ bool Api::IsInitialized() const { return true; } -void Api::Swap(Api* other) { - if (other == this) return; - InternalSwap(other); -} void Api::InternalSwap(Api* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - CastToBase(&methods_)->InternalSwap(CastToBase(&other->methods_)); - CastToBase(&options_)->InternalSwap(CastToBase(&other->options_)); - CastToBase(&mixins_)->InternalSwap(CastToBase(&other->mixins_)); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - version_.Swap(&other->version_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(source_context_, other->source_context_); - swap(syntax_, other->syntax_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + methods_.InternalSwap(&other->methods_); + options_.InternalSwap(&other->options_); + mixins_.InternalSwap(&other->mixins_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + version_.Swap(&other->version_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Api, syntax_) + + sizeof(Api::syntax_) + - PROTOBUF_FIELD_OFFSET(Api, source_context_)>( + reinterpret_cast(&source_context_), + reinterpret_cast(&other->source_context_)); } ::PROTOBUF_NAMESPACE_ID::Metadata Api::GetMetadata() const { @@ -804,44 +603,38 @@ void Api::InternalSwap(Api* other) { void Method::InitAsDefaultInstance() { } -class Method::HasBitSetters { +class Method::_Internal { public: }; void Method::clear_options() { options_.Clear(); } -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Method::kNameFieldNumber; -const int Method::kRequestTypeUrlFieldNumber; -const int Method::kRequestStreamingFieldNumber; -const int Method::kResponseTypeUrlFieldNumber; -const int Method::kResponseStreamingFieldNumber; -const int Method::kOptionsFieldNumber; -const int Method::kSyntaxFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Method::Method() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { +Method::Method(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena), + options_(arena) { SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.Method) + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:google.protobuf.Method) } Method::Method(const Method& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), options_(from.options_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.name().size() > 0) { - name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); + if (!from._internal_name().empty()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } request_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.request_type_url().size() > 0) { - request_type_url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.request_type_url_); + if (!from._internal_request_type_url().empty()) { + request_type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_request_type_url(), + GetArena()); } response_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.response_type_url().size() > 0) { - response_type_url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.response_type_url_); + if (!from._internal_response_type_url().empty()) { + response_type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_response_type_url(), + GetArena()); } ::memcpy(&request_streaming_, &from.request_streaming_, static_cast(reinterpret_cast(&syntax_) - @@ -862,14 +655,22 @@ void Method::SharedCtor() { Method::~Method() { // @@protoc_insertion_point(destructor:google.protobuf.Method) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Method::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); request_type_url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); response_type_url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } +void Method::ArenaDtor(void* object) { + Method* _this = reinterpret_cast< Method* >(object); + (void)_this; +} +void Method::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} void Method::SetCachedSize(int size) const { _cached_size_.Set(size); } @@ -886,18 +687,18 @@ void Method::Clear() { (void) cached_has_bits; options_.Clear(); - name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - request_type_url_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - response_type_url_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + request_type_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + response_type_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); ::memset(&request_streaming_, 0, static_cast( reinterpret_cast(&syntax_) - reinterpret_cast(&request_streaming_)) + sizeof(syntax_)); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -906,35 +707,41 @@ const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int // string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Method.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Method.name")); CHK_(ptr); } else goto handle_unusual; continue; // string request_type_url = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_request_type_url(), ptr, ctx, "google.protobuf.Method.request_type_url"); + auto str = _internal_mutable_request_type_url(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Method.request_type_url")); CHK_(ptr); } else goto handle_unusual; continue; // bool request_streaming = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - request_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + request_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // string response_type_url = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_response_type_url(), ptr, ctx, "google.protobuf.Method.response_type_url"); + auto str = _internal_mutable_response_type_url(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Method.response_type_url")); CHK_(ptr); } else goto handle_unusual; continue; // bool response_streaming = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - response_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + response_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -944,18 +751,18 @@ const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_options(), ptr); + ptr = ctx->ParseMessage(_internal_add_options(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 50); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); } else goto handle_unusual; continue; // .google.protobuf.Syntax syntax = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - set_syntax(static_cast(val)); + _internal_set_syntax(static_cast(val)); } else goto handle_unusual; continue; default: { @@ -964,7 +771,9 @@ const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -977,204 +786,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Method::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.Method) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Method.name")); - } else { - goto handle_unusual; - } - break; - } - // string request_type_url = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_request_type_url())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->request_type_url().data(), static_cast(this->request_type_url().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Method.request_type_url")); - } else { - goto handle_unusual; - } - break; - } - - // bool request_streaming = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &request_streaming_))); - } else { - goto handle_unusual; - } - break; - } - - // string response_type_url = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_response_type_url())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->response_type_url().data(), static_cast(this->response_type_url().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Method.response_type_url")); - } else { - goto handle_unusual; - } - break; - } - - // bool response_streaming = 5; - case 5: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &response_streaming_))); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.Option options = 6; - case 6: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_options())); - } else { - goto handle_unusual; - } - break; - } - - // .google.protobuf.Syntax syntax = 7; - case 7: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) { - int value = 0; - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_syntax(static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(value)); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.Method) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.Method) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Method::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.Method) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string name = 1; - if (this->name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Method.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // string request_type_url = 2; - if (this->request_type_url().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->request_type_url().data(), static_cast(this->request_type_url().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Method.request_type_url"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 2, this->request_type_url(), output); - } - - // bool request_streaming = 3; - if (this->request_streaming() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->request_streaming(), output); - } - - // string response_type_url = 4; - if (this->response_type_url().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->response_type_url().data(), static_cast(this->response_type_url().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Method.response_type_url"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 4, this->response_type_url(), output); - } - - // bool response_streaming = 5; - if (this->response_streaming() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(5, this->response_streaming(), output); - } - - // repeated .google.protobuf.Option options = 6; - for (unsigned int i = 0, - n = static_cast(this->options_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 6, - this->options(static_cast(i)), - output); - } - - // .google.protobuf.Syntax syntax = 7; - if (this->syntax() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( - 7, this->syntax(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.Method) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Method::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Method::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Method) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1182,63 +796,63 @@ void Method::SerializeWithCachedSizes( // string name = 1; if (this->name().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // string request_type_url = 2; if (this->request_type_url().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->request_type_url().data(), static_cast(this->request_type_url().length()), + this->_internal_request_type_url().data(), static_cast(this->_internal_request_type_url().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.request_type_url"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 2, this->request_type_url(), target); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_request_type_url(), target); } // bool request_streaming = 3; if (this->request_streaming() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->request_streaming(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_request_streaming(), target); } // string response_type_url = 4; if (this->response_type_url().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->response_type_url().data(), static_cast(this->response_type_url().length()), + this->_internal_response_type_url().data(), static_cast(this->_internal_response_type_url().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.response_type_url"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 4, this->response_type_url(), target); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_response_type_url(), target); } // bool response_streaming = 5; if (this->response_streaming() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->response_streaming(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_response_streaming(), target); } // repeated .google.protobuf.Option options = 6; for (unsigned int i = 0, - n = static_cast(this->options_size()); i < n; i++) { + n = static_cast(this->_internal_options_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 6, this->options(static_cast(i)), target); + InternalWriteMessage(6, this->_internal_options(i), target, stream); } // .google.protobuf.Syntax syntax = 7; if (this->syntax() != 0) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 7, this->syntax(), target); + 7, this->_internal_syntax(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Method) return target; @@ -1248,45 +862,36 @@ size_t Method::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Method) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.Option options = 6; - { - unsigned int count = static_cast(this->options_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->options(static_cast(i))); - } + total_size += 1UL * this->_internal_options_size(); + for (const auto& msg : this->options_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // string name = 1; if (this->name().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // string request_type_url = 2; if (this->request_type_url().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->request_type_url()); + this->_internal_request_type_url()); } // string response_type_url = 4; if (this->response_type_url().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->response_type_url()); + this->_internal_response_type_url()); } // bool request_streaming = 3; @@ -1302,9 +907,13 @@ size_t Method::ByteSizeLong() const { // .google.protobuf.Syntax syntax = 7; if (this->syntax() != 0) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->syntax()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_syntax()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -1328,31 +937,28 @@ void Method::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Method::MergeFrom(const Method& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Method) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; options_.MergeFrom(from.options_); if (from.name().size() > 0) { - - name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); + _internal_set_name(from._internal_name()); } if (from.request_type_url().size() > 0) { - - request_type_url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.request_type_url_); + _internal_set_request_type_url(from._internal_request_type_url()); } if (from.response_type_url().size() > 0) { - - response_type_url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.response_type_url_); + _internal_set_response_type_url(from._internal_response_type_url()); } if (from.request_streaming() != 0) { - set_request_streaming(from.request_streaming()); + _internal_set_request_streaming(from._internal_request_streaming()); } if (from.response_streaming() != 0) { - set_response_streaming(from.response_streaming()); + _internal_set_response_streaming(from._internal_response_streaming()); } if (from.syntax() != 0) { - set_syntax(from.syntax()); + _internal_set_syntax(from._internal_syntax()); } } @@ -1374,23 +980,19 @@ bool Method::IsInitialized() const { return true; } -void Method::Swap(Method* other) { - if (other == this) return; - InternalSwap(other); -} void Method::InternalSwap(Method* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - CastToBase(&options_)->InternalSwap(CastToBase(&other->options_)); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - request_type_url_.Swap(&other->request_type_url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - response_type_url_.Swap(&other->response_type_url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(request_streaming_, other->request_streaming_); - swap(response_streaming_, other->response_streaming_); - swap(syntax_, other->syntax_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + options_.InternalSwap(&other->options_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + request_type_url_.Swap(&other->request_type_url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + response_type_url_.Swap(&other->response_type_url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Method, syntax_) + + sizeof(Method::syntax_) + - PROTOBUF_FIELD_OFFSET(Method, request_streaming_)>( + reinterpret_cast(&request_streaming_), + reinterpret_cast(&other->request_streaming_)); } ::PROTOBUF_NAMESPACE_ID::Metadata Method::GetMetadata() const { @@ -1402,31 +1004,28 @@ void Method::InternalSwap(Method* other) { void Mixin::InitAsDefaultInstance() { } -class Mixin::HasBitSetters { +class Mixin::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Mixin::kNameFieldNumber; -const int Mixin::kRootFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Mixin::Mixin() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { +Mixin::Mixin(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.Mixin) + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:google.protobuf.Mixin) } Mixin::Mixin(const Mixin& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.name().size() > 0) { - name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); + if (!from._internal_name().empty()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } root_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.root().size() > 0) { - root_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.root_); + if (!from._internal_root().empty()) { + root_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_root(), + GetArena()); } // @@protoc_insertion_point(copy_constructor:google.protobuf.Mixin) } @@ -1440,13 +1039,21 @@ void Mixin::SharedCtor() { Mixin::~Mixin() { // @@protoc_insertion_point(destructor:google.protobuf.Mixin) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Mixin::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); root_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } +void Mixin::ArenaDtor(void* object) { + Mixin* _this = reinterpret_cast< Mixin* >(object); + (void)_this; +} +void Mixin::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} void Mixin::SetCachedSize(int size) const { _cached_size_.Set(size); } @@ -1462,14 +1069,14 @@ void Mixin::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - root_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - _internal_metadata_.Clear(); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + root_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Mixin::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -1478,14 +1085,18 @@ const char* Mixin::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte // string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Mixin.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Mixin.name")); CHK_(ptr); } else goto handle_unusual; continue; // string root = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_root(), ptr, ctx, "google.protobuf.Mixin.root"); + auto str = _internal_mutable_root(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Mixin.root")); CHK_(ptr); } else goto handle_unusual; continue; @@ -1495,7 +1106,9 @@ const char* Mixin::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -1508,103 +1121,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Mixin::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.Mixin) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Mixin.name")); - } else { - goto handle_unusual; - } - break; - } - // string root = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_root())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->root().data(), static_cast(this->root().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Mixin.root")); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.Mixin) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.Mixin) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Mixin::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.Mixin) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string name = 1; - if (this->name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Mixin.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // string root = 2; - if (this->root().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->root().data(), static_cast(this->root().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Mixin.root"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 2, this->root(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.Mixin) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Mixin::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Mixin::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Mixin) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1612,28 +1131,26 @@ void Mixin::SerializeWithCachedSizes( // string name = 1; if (this->name().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // string root = 2; if (this->root().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->root().data(), static_cast(this->root().length()), + this->_internal_root().data(), static_cast(this->_internal_root().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.root"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 2, this->root(), target); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_root(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Mixin) return target; @@ -1643,11 +1160,6 @@ size_t Mixin::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Mixin) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1656,16 +1168,20 @@ size_t Mixin::ByteSizeLong() const { if (this->name().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // string root = 2; if (this->root().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->root()); + this->_internal_root()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -1689,17 +1205,15 @@ void Mixin::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Mixin::MergeFrom(const Mixin& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Mixin) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.name().size() > 0) { - - name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); + _internal_set_name(from._internal_name()); } if (from.root().size() > 0) { - - root_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.root_); + _internal_set_root(from._internal_root()); } } @@ -1721,17 +1235,11 @@ bool Mixin::IsInitialized() const { return true; } -void Mixin::Swap(Mixin* other) { - if (other == this) return; - InternalSwap(other); -} void Mixin::InternalSwap(Mixin* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - root_.Swap(&other->root_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + root_.Swap(&other->root_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } ::PROTOBUF_NAMESPACE_ID::Metadata Mixin::GetMetadata() const { @@ -1743,13 +1251,13 @@ void Mixin::InternalSwap(Mixin* other) { PROTOBUF_NAMESPACE_CLOSE PROTOBUF_NAMESPACE_OPEN template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Api* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Api >(Arena* arena) { - return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::Api >(arena); + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Api >(arena); } template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Method* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Method >(Arena* arena) { - return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::Method >(arena); + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Method >(arena); } template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Mixin* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Mixin >(Arena* arena) { - return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::Mixin >(arena); + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Mixin >(arena); } PROTOBUF_NAMESPACE_CLOSE diff --git a/third_party/protobuf/src/google/protobuf/api.pb.h b/third_party/protobuf/src/google/protobuf/api.pb.h index 5d4f0007..31e106a1 100644 --- a/third_party/protobuf/src/google/protobuf/api.pb.h +++ b/third_party/protobuf/src/google/protobuf/api.pb.h @@ -8,12 +8,12 @@ #include #include -#if PROTOBUF_VERSION < 3008000 +#if PROTOBUF_VERSION < 3012000 #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 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3012004 < 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. @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include // IWYU pragma: export @@ -76,10 +76,10 @@ PROTOBUF_NAMESPACE_OPEN // =================================================================== -class PROTOBUF_EXPORT Api : +class PROTOBUF_EXPORT Api PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Api) */ { public: - Api(); + inline Api() : Api(nullptr) {}; virtual ~Api(); Api(const Api& from); @@ -93,7 +93,7 @@ class PROTOBUF_EXPORT Api : return *this; } inline Api& operator=(Api&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -120,10 +120,22 @@ class PROTOBUF_EXPORT Api : static constexpr int kIndexInFileMessages = 0; - void Swap(Api* other); friend void swap(Api& a, Api& b) { a.Swap(&b); } + inline void Swap(Api* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Api* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -142,16 +154,9 @@ class PROTOBUF_EXPORT Api : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -163,13 +168,11 @@ class PROTOBUF_EXPORT Api : static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.Api"; } + protected: + explicit Api(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -185,13 +188,28 @@ class PROTOBUF_EXPORT Api : // accessors ------------------------------------------------------- + enum : int { + kMethodsFieldNumber = 2, + kOptionsFieldNumber = 3, + kMixinsFieldNumber = 6, + kNameFieldNumber = 1, + kVersionFieldNumber = 4, + kSourceContextFieldNumber = 5, + kSyntaxFieldNumber = 7, + }; // repeated .google.protobuf.Method methods = 2; int methods_size() const; + private: + int _internal_methods_size() const; + public: void clear_methods(); - static const int kMethodsFieldNumber = 2; PROTOBUF_NAMESPACE_ID::Method* mutable_methods(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Method >* mutable_methods(); + private: + const PROTOBUF_NAMESPACE_ID::Method& _internal_methods(int index) const; + PROTOBUF_NAMESPACE_ID::Method* _internal_add_methods(); + public: const PROTOBUF_NAMESPACE_ID::Method& methods(int index) const; PROTOBUF_NAMESPACE_ID::Method* add_methods(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Method >& @@ -199,11 +217,17 @@ class PROTOBUF_EXPORT Api : // repeated .google.protobuf.Option options = 3; int options_size() const; + private: + int _internal_options_size() const; + public: void clear_options(); - static const int kOptionsFieldNumber = 3; PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >* mutable_options(); + private: + const PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const; + PROTOBUF_NAMESPACE_ID::Option* _internal_add_options(); + public: const PROTOBUF_NAMESPACE_ID::Option& options(int index) const; PROTOBUF_NAMESPACE_ID::Option* add_options(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& @@ -211,11 +235,17 @@ class PROTOBUF_EXPORT Api : // repeated .google.protobuf.Mixin mixins = 6; int mixins_size() const; + private: + int _internal_mixins_size() const; + public: void clear_mixins(); - static const int kMixinsFieldNumber = 6; PROTOBUF_NAMESPACE_ID::Mixin* mutable_mixins(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Mixin >* mutable_mixins(); + private: + const PROTOBUF_NAMESPACE_ID::Mixin& _internal_mixins(int index) const; + PROTOBUF_NAMESPACE_ID::Mixin* _internal_add_mixins(); + public: const PROTOBUF_NAMESPACE_ID::Mixin& mixins(int index) const; PROTOBUF_NAMESPACE_ID::Mixin* add_mixins(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Mixin >& @@ -223,7 +253,6 @@ class PROTOBUF_EXPORT Api : // string name = 1; void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -232,10 +261,23 @@ class PROTOBUF_EXPORT Api : std::string* mutable_name(); std::string* release_name(); void set_allocated_name(std::string* name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_name( + std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // string version = 4; void clear_version(); - static const int kVersionFieldNumber = 4; const std::string& version() const; void set_version(const std::string& value); void set_version(std::string&& value); @@ -244,27 +286,55 @@ class PROTOBUF_EXPORT Api : std::string* mutable_version(); std::string* release_version(); void set_allocated_version(std::string* version); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_version(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_version( + std::string* version); + private: + const std::string& _internal_version() const; + void _internal_set_version(const std::string& value); + std::string* _internal_mutable_version(); + public: // .google.protobuf.SourceContext source_context = 5; bool has_source_context() const; + private: + bool _internal_has_source_context() const; + public: void clear_source_context(); - static const int kSourceContextFieldNumber = 5; const PROTOBUF_NAMESPACE_ID::SourceContext& source_context() const; PROTOBUF_NAMESPACE_ID::SourceContext* release_source_context(); PROTOBUF_NAMESPACE_ID::SourceContext* mutable_source_context(); void set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context); + private: + const PROTOBUF_NAMESPACE_ID::SourceContext& _internal_source_context() const; + PROTOBUF_NAMESPACE_ID::SourceContext* _internal_mutable_source_context(); + public: + void unsafe_arena_set_allocated_source_context( + PROTOBUF_NAMESPACE_ID::SourceContext* source_context); + PROTOBUF_NAMESPACE_ID::SourceContext* unsafe_arena_release_source_context(); // .google.protobuf.Syntax syntax = 7; void clear_syntax(); - static const int kSyntaxFieldNumber = 7; PROTOBUF_NAMESPACE_ID::Syntax syntax() const; void set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value); + private: + PROTOBUF_NAMESPACE_ID::Syntax _internal_syntax() const; + void _internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.Api) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template 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_; @@ -277,10 +347,10 @@ class PROTOBUF_EXPORT Api : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT Method : +class PROTOBUF_EXPORT Method PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Method) */ { public: - Method(); + inline Method() : Method(nullptr) {}; virtual ~Method(); Method(const Method& from); @@ -294,7 +364,7 @@ class PROTOBUF_EXPORT Method : return *this; } inline Method& operator=(Method&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -321,10 +391,22 @@ class PROTOBUF_EXPORT Method : static constexpr int kIndexInFileMessages = 1; - void Swap(Method* other); friend void swap(Method& a, Method& b) { a.Swap(&b); } + inline void Swap(Method* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Method* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -343,16 +425,9 @@ class PROTOBUF_EXPORT Method : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -364,13 +439,11 @@ class PROTOBUF_EXPORT Method : static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.Method"; } + protected: + explicit Method(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -386,13 +459,28 @@ class PROTOBUF_EXPORT Method : // accessors ------------------------------------------------------- + enum : int { + kOptionsFieldNumber = 6, + kNameFieldNumber = 1, + kRequestTypeUrlFieldNumber = 2, + kResponseTypeUrlFieldNumber = 4, + kRequestStreamingFieldNumber = 3, + kResponseStreamingFieldNumber = 5, + kSyntaxFieldNumber = 7, + }; // repeated .google.protobuf.Option options = 6; int options_size() const; + private: + int _internal_options_size() const; + public: void clear_options(); - static const int kOptionsFieldNumber = 6; PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >* mutable_options(); + private: + const PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const; + PROTOBUF_NAMESPACE_ID::Option* _internal_add_options(); + public: const PROTOBUF_NAMESPACE_ID::Option& options(int index) const; PROTOBUF_NAMESPACE_ID::Option* add_options(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& @@ -400,7 +488,6 @@ class PROTOBUF_EXPORT Method : // string name = 1; void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -409,10 +496,23 @@ class PROTOBUF_EXPORT Method : std::string* mutable_name(); std::string* release_name(); void set_allocated_name(std::string* name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_name( + std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // string request_type_url = 2; void clear_request_type_url(); - static const int kRequestTypeUrlFieldNumber = 2; const std::string& request_type_url() const; void set_request_type_url(const std::string& value); void set_request_type_url(std::string&& value); @@ -421,10 +521,23 @@ class PROTOBUF_EXPORT Method : std::string* mutable_request_type_url(); std::string* release_request_type_url(); void set_allocated_request_type_url(std::string* request_type_url); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_request_type_url(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_request_type_url( + std::string* request_type_url); + private: + const std::string& _internal_request_type_url() const; + void _internal_set_request_type_url(const std::string& value); + std::string* _internal_mutable_request_type_url(); + public: // string response_type_url = 4; void clear_response_type_url(); - static const int kResponseTypeUrlFieldNumber = 4; const std::string& response_type_url() const; void set_response_type_url(const std::string& value); void set_response_type_url(std::string&& value); @@ -433,30 +546,55 @@ class PROTOBUF_EXPORT Method : std::string* mutable_response_type_url(); std::string* release_response_type_url(); void set_allocated_response_type_url(std::string* response_type_url); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_response_type_url(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_response_type_url( + std::string* response_type_url); + private: + const std::string& _internal_response_type_url() const; + void _internal_set_response_type_url(const std::string& value); + std::string* _internal_mutable_response_type_url(); + public: // bool request_streaming = 3; void clear_request_streaming(); - static const int kRequestStreamingFieldNumber = 3; bool request_streaming() const; void set_request_streaming(bool value); + private: + bool _internal_request_streaming() const; + void _internal_set_request_streaming(bool value); + public: // bool response_streaming = 5; void clear_response_streaming(); - static const int kResponseStreamingFieldNumber = 5; bool response_streaming() const; void set_response_streaming(bool value); + private: + bool _internal_response_streaming() const; + void _internal_set_response_streaming(bool value); + public: // .google.protobuf.Syntax syntax = 7; void clear_syntax(); - static const int kSyntaxFieldNumber = 7; PROTOBUF_NAMESPACE_ID::Syntax syntax() const; void set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value); + private: + PROTOBUF_NAMESPACE_ID::Syntax _internal_syntax() const; + void _internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.Method) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template 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_; @@ -469,10 +607,10 @@ class PROTOBUF_EXPORT Method : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT Mixin : +class PROTOBUF_EXPORT Mixin PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Mixin) */ { public: - Mixin(); + inline Mixin() : Mixin(nullptr) {}; virtual ~Mixin(); Mixin(const Mixin& from); @@ -486,7 +624,7 @@ class PROTOBUF_EXPORT Mixin : return *this; } inline Mixin& operator=(Mixin&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -513,10 +651,22 @@ class PROTOBUF_EXPORT Mixin : static constexpr int kIndexInFileMessages = 2; - void Swap(Mixin* other); friend void swap(Mixin& a, Mixin& b) { a.Swap(&b); } + inline void Swap(Mixin* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Mixin* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -535,16 +685,9 @@ class PROTOBUF_EXPORT Mixin : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -556,13 +699,11 @@ class PROTOBUF_EXPORT Mixin : static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.Mixin"; } + protected: + explicit Mixin(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -578,9 +719,12 @@ class PROTOBUF_EXPORT Mixin : // accessors ------------------------------------------------------- + enum : int { + kNameFieldNumber = 1, + kRootFieldNumber = 2, + }; // string name = 1; void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -589,10 +733,23 @@ class PROTOBUF_EXPORT Mixin : std::string* mutable_name(); std::string* release_name(); void set_allocated_name(std::string* name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_name( + std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // string root = 2; void clear_root(); - static const int kRootFieldNumber = 2; const std::string& root() const; void set_root(const std::string& value); void set_root(std::string&& value); @@ -601,12 +758,28 @@ class PROTOBUF_EXPORT Mixin : std::string* mutable_root(); std::string* release_root(); void set_allocated_root(std::string* root); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_root(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_root( + std::string* root); + private: + const std::string& _internal_root() const; + void _internal_set_root(const std::string& value); + std::string* _internal_mutable_root(); + public: // @@protoc_insertion_point(class_scope:google.protobuf.Mixin) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template 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_; @@ -625,44 +798,54 @@ class PROTOBUF_EXPORT Mixin : // string name = 1; inline void Api::clear_name() { - name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Api::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Api.name) - return name_.GetNoArena(); + return _internal_name(); } inline void Api::set_name(const std::string& value) { - - name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.Api.name) } +inline std::string* Api::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Api.name) + return _internal_mutable_name(); +} +inline const std::string& Api::_internal_name() const { + return name_.Get(); +} +inline void Api::_internal_set_name(const std::string& value) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Api::set_name(std::string&& value) { - name_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Api.name) } inline void Api::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Api.name) } -inline void Api::set_name(const char* value, size_t size) { +inline void Api::set_name(const char* value, + size_t size) { - name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Api.name) } -inline std::string* Api::mutable_name() { +inline std::string* Api::_internal_mutable_name() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Api.name) - return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Api::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Api.name) - - return name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Api::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -670,14 +853,37 @@ inline void Api::set_allocated_name(std::string* name) { } else { } - name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name); + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.name) } +inline std::string* Api::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Api.name) + GOOGLE_DCHECK(GetArena() != nullptr); + + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Api::unsafe_arena_set_allocated_name( + std::string* name) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (name != nullptr) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + name, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Api.name) +} // repeated .google.protobuf.Method methods = 2; -inline int Api::methods_size() const { +inline int Api::_internal_methods_size() const { return methods_.size(); } +inline int Api::methods_size() const { + return _internal_methods_size(); +} inline void Api::clear_methods() { methods_.Clear(); } @@ -690,13 +896,19 @@ Api::mutable_methods() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.methods) return &methods_; } +inline const PROTOBUF_NAMESPACE_ID::Method& Api::_internal_methods(int index) const { + return methods_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::Method& Api::methods(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Api.methods) - return methods_.Get(index); + return _internal_methods(index); +} +inline PROTOBUF_NAMESPACE_ID::Method* Api::_internal_add_methods() { + return methods_.Add(); } inline PROTOBUF_NAMESPACE_ID::Method* Api::add_methods() { // @@protoc_insertion_point(field_add:google.protobuf.Api.methods) - return methods_.Add(); + return _internal_add_methods(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Method >& Api::methods() const { @@ -705,9 +917,12 @@ Api::methods() const { } // repeated .google.protobuf.Option options = 3; -inline int Api::options_size() const { +inline int Api::_internal_options_size() const { return 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); @@ -717,13 +932,19 @@ Api::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.options) return &options_; } +inline const PROTOBUF_NAMESPACE_ID::Option& Api::_internal_options(int index) const { + return options_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::Option& Api::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Api.options) - return options_.Get(index); + return _internal_options(index); +} +inline PROTOBUF_NAMESPACE_ID::Option* Api::_internal_add_options() { + return options_.Add(); } inline PROTOBUF_NAMESPACE_ID::Option* Api::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Api.options) - return options_.Add(); + return _internal_add_options(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& Api::options() const { @@ -733,44 +954,54 @@ Api::options() const { // string version = 4; inline void Api::clear_version() { - version_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + version_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Api::version() const { // @@protoc_insertion_point(field_get:google.protobuf.Api.version) - return version_.GetNoArena(); + return _internal_version(); } inline void Api::set_version(const std::string& value) { - - version_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_version(value); // @@protoc_insertion_point(field_set:google.protobuf.Api.version) } +inline std::string* Api::mutable_version() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Api.version) + return _internal_mutable_version(); +} +inline const std::string& Api::_internal_version() const { + return version_.Get(); +} +inline void Api::_internal_set_version(const std::string& value) { + + version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Api::set_version(std::string&& value) { - version_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + version_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Api.version) } inline void Api::set_version(const char* value) { GOOGLE_DCHECK(value != nullptr); - version_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Api.version) } -inline void Api::set_version(const char* value, size_t size) { +inline void Api::set_version(const char* value, + size_t size) { - version_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Api.version) } -inline std::string* Api::mutable_version() { +inline std::string* Api::_internal_mutable_version() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Api.version) - return version_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return version_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Api::release_version() { // @@protoc_insertion_point(field_release:google.protobuf.Api.version) - - return version_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return version_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Api::set_allocated_version(std::string* version) { if (version != nullptr) { @@ -778,43 +1009,93 @@ inline void Api::set_allocated_version(std::string* version) { } else { } - version_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), version); + version_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), version, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.version) } +inline std::string* Api::unsafe_arena_release_version() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Api.version) + GOOGLE_DCHECK(GetArena() != nullptr); + + return version_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Api::unsafe_arena_set_allocated_version( + std::string* version) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (version != nullptr) { + + } else { + + } + version_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + version, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Api.version) +} // .google.protobuf.SourceContext source_context = 5; -inline bool Api::has_source_context() const { +inline bool Api::_internal_has_source_context() const { return this != internal_default_instance() && source_context_ != nullptr; } -inline const PROTOBUF_NAMESPACE_ID::SourceContext& Api::source_context() const { +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_; - // @@protoc_insertion_point(field_get:google.protobuf.Api.source_context) return p != nullptr ? *p : *reinterpret_cast( &PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_); } +inline const PROTOBUF_NAMESPACE_ID::SourceContext& Api::source_context() const { + // @@protoc_insertion_point(field_get:google.protobuf.Api.source_context) + return _internal_source_context(); +} +inline void Api::unsafe_arena_set_allocated_source_context( + PROTOBUF_NAMESPACE_ID::SourceContext* source_context) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_); + } + source_context_ = source_context; + if (source_context) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Api.source_context) +} inline PROTOBUF_NAMESPACE_ID::SourceContext* Api::release_source_context() { + auto temp = unsafe_arena_release_source_context(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +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; return temp; } -inline PROTOBUF_NAMESPACE_ID::SourceContext* Api::mutable_source_context() { +inline PROTOBUF_NAMESPACE_ID::SourceContext* Api::_internal_mutable_source_context() { if (source_context_ == nullptr) { - auto* p = CreateMaybeMessage(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArena()); source_context_ = p; } - // @@protoc_insertion_point(field_mutable:google.protobuf.Api.source_context) return source_context_; } +inline PROTOBUF_NAMESPACE_ID::SourceContext* Api::mutable_source_context() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Api.source_context) + return _internal_mutable_source_context(); +} inline void Api::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_); } if (source_context) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context)->GetArena(); if (message_arena != submessage_arena) { source_context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, source_context, submessage_arena); @@ -828,9 +1109,12 @@ inline void Api::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceConte } // repeated .google.protobuf.Mixin mixins = 6; -inline int Api::mixins_size() const { +inline int Api::_internal_mixins_size() const { return mixins_.size(); } +inline int Api::mixins_size() const { + return _internal_mixins_size(); +} inline void Api::clear_mixins() { mixins_.Clear(); } @@ -843,13 +1127,19 @@ Api::mutable_mixins() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.mixins) return &mixins_; } +inline const PROTOBUF_NAMESPACE_ID::Mixin& Api::_internal_mixins(int index) const { + return mixins_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::Mixin& Api::mixins(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Api.mixins) - return mixins_.Get(index); + return _internal_mixins(index); +} +inline PROTOBUF_NAMESPACE_ID::Mixin* Api::_internal_add_mixins() { + return mixins_.Add(); } inline PROTOBUF_NAMESPACE_ID::Mixin* Api::add_mixins() { // @@protoc_insertion_point(field_add:google.protobuf.Api.mixins) - return mixins_.Add(); + return _internal_add_mixins(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Mixin >& Api::mixins() const { @@ -861,13 +1151,19 @@ Api::mixins() const { inline void Api::clear_syntax() { syntax_ = 0; } -inline PROTOBUF_NAMESPACE_ID::Syntax Api::syntax() const { - // @@protoc_insertion_point(field_get:google.protobuf.Api.syntax) +inline PROTOBUF_NAMESPACE_ID::Syntax Api::_internal_syntax() const { return static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(syntax_); } -inline void Api::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { +inline PROTOBUF_NAMESPACE_ID::Syntax Api::syntax() const { + // @@protoc_insertion_point(field_get:google.protobuf.Api.syntax) + return _internal_syntax(); +} +inline void Api::_internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { syntax_ = value; +} +inline void Api::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { + _internal_set_syntax(value); // @@protoc_insertion_point(field_set:google.protobuf.Api.syntax) } @@ -877,44 +1173,54 @@ inline void Api::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { // string name = 1; inline void Method::clear_name() { - name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Method::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Method.name) - return name_.GetNoArena(); + return _internal_name(); } inline void Method::set_name(const std::string& value) { - - name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.Method.name) } +inline std::string* Method::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Method.name) + return _internal_mutable_name(); +} +inline const std::string& Method::_internal_name() const { + return name_.Get(); +} +inline void Method::_internal_set_name(const std::string& value) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Method::set_name(std::string&& value) { - name_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.name) } inline void Method::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Method.name) } -inline void Method::set_name(const char* value, size_t size) { +inline void Method::set_name(const char* value, + size_t size) { - name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Method.name) } -inline std::string* Method::mutable_name() { +inline std::string* Method::_internal_mutable_name() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Method.name) - return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Method::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Method.name) - - return name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Method::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -922,50 +1228,80 @@ inline void Method::set_allocated_name(std::string* name) { } else { } - name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name); + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.name) } +inline std::string* Method::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Method.name) + GOOGLE_DCHECK(GetArena() != nullptr); + + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Method::unsafe_arena_set_allocated_name( + std::string* name) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (name != nullptr) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + name, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Method.name) +} // string request_type_url = 2; inline void Method::clear_request_type_url() { - request_type_url_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + request_type_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Method::request_type_url() const { // @@protoc_insertion_point(field_get:google.protobuf.Method.request_type_url) - return request_type_url_.GetNoArena(); + return _internal_request_type_url(); } inline void Method::set_request_type_url(const std::string& value) { - - request_type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_request_type_url(value); // @@protoc_insertion_point(field_set:google.protobuf.Method.request_type_url) } +inline std::string* Method::mutable_request_type_url() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Method.request_type_url) + return _internal_mutable_request_type_url(); +} +inline const std::string& Method::_internal_request_type_url() const { + return request_type_url_.Get(); +} +inline void Method::_internal_set_request_type_url(const std::string& value) { + + request_type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Method::set_request_type_url(std::string&& value) { - request_type_url_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + request_type_url_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.request_type_url) } inline void Method::set_request_type_url(const char* value) { GOOGLE_DCHECK(value != nullptr); - request_type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + request_type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Method.request_type_url) } -inline void Method::set_request_type_url(const char* value, size_t size) { +inline void Method::set_request_type_url(const char* value, + size_t size) { - request_type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + request_type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Method.request_type_url) } -inline std::string* Method::mutable_request_type_url() { +inline std::string* Method::_internal_mutable_request_type_url() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Method.request_type_url) - return request_type_url_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return request_type_url_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Method::release_request_type_url() { // @@protoc_insertion_point(field_release:google.protobuf.Method.request_type_url) - - return request_type_url_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return request_type_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Method::set_allocated_request_type_url(std::string* request_type_url) { if (request_type_url != nullptr) { @@ -973,64 +1309,100 @@ inline void Method::set_allocated_request_type_url(std::string* request_type_url } else { } - request_type_url_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), request_type_url); + request_type_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), request_type_url, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.request_type_url) } +inline std::string* Method::unsafe_arena_release_request_type_url() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Method.request_type_url) + GOOGLE_DCHECK(GetArena() != nullptr); + + return request_type_url_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Method::unsafe_arena_set_allocated_request_type_url( + std::string* request_type_url) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (request_type_url != nullptr) { + + } else { + + } + request_type_url_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + request_type_url, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Method.request_type_url) +} // bool request_streaming = 3; inline void Method::clear_request_streaming() { request_streaming_ = false; } -inline bool Method::request_streaming() const { - // @@protoc_insertion_point(field_get:google.protobuf.Method.request_streaming) +inline bool Method::_internal_request_streaming() const { return request_streaming_; } -inline void Method::set_request_streaming(bool value) { +inline bool Method::request_streaming() const { + // @@protoc_insertion_point(field_get:google.protobuf.Method.request_streaming) + return _internal_request_streaming(); +} +inline void Method::_internal_set_request_streaming(bool value) { request_streaming_ = value; +} +inline void Method::set_request_streaming(bool value) { + _internal_set_request_streaming(value); // @@protoc_insertion_point(field_set:google.protobuf.Method.request_streaming) } // string response_type_url = 4; inline void Method::clear_response_type_url() { - response_type_url_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + response_type_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Method::response_type_url() const { // @@protoc_insertion_point(field_get:google.protobuf.Method.response_type_url) - return response_type_url_.GetNoArena(); + return _internal_response_type_url(); } inline void Method::set_response_type_url(const std::string& value) { - - response_type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_response_type_url(value); // @@protoc_insertion_point(field_set:google.protobuf.Method.response_type_url) } +inline std::string* Method::mutable_response_type_url() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Method.response_type_url) + return _internal_mutable_response_type_url(); +} +inline const std::string& Method::_internal_response_type_url() const { + return response_type_url_.Get(); +} +inline void Method::_internal_set_response_type_url(const std::string& value) { + + response_type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Method::set_response_type_url(std::string&& value) { - response_type_url_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + response_type_url_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.response_type_url) } inline void Method::set_response_type_url(const char* value) { GOOGLE_DCHECK(value != nullptr); - response_type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + response_type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Method.response_type_url) } -inline void Method::set_response_type_url(const char* value, size_t size) { +inline void Method::set_response_type_url(const char* value, + size_t size) { - response_type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + response_type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Method.response_type_url) } -inline std::string* Method::mutable_response_type_url() { +inline std::string* Method::_internal_mutable_response_type_url() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Method.response_type_url) - return response_type_url_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return response_type_url_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Method::release_response_type_url() { // @@protoc_insertion_point(field_release:google.protobuf.Method.response_type_url) - - return response_type_url_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return response_type_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Method::set_allocated_response_type_url(std::string* response_type_url) { if (response_type_url != nullptr) { @@ -1038,28 +1410,57 @@ inline void Method::set_allocated_response_type_url(std::string* response_type_u } else { } - response_type_url_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), response_type_url); + response_type_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), response_type_url, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.response_type_url) } +inline std::string* Method::unsafe_arena_release_response_type_url() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Method.response_type_url) + GOOGLE_DCHECK(GetArena() != nullptr); + + return response_type_url_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Method::unsafe_arena_set_allocated_response_type_url( + std::string* response_type_url) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (response_type_url != nullptr) { + + } else { + + } + response_type_url_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + response_type_url, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Method.response_type_url) +} // bool response_streaming = 5; inline void Method::clear_response_streaming() { response_streaming_ = false; } -inline bool Method::response_streaming() const { - // @@protoc_insertion_point(field_get:google.protobuf.Method.response_streaming) +inline bool Method::_internal_response_streaming() const { return response_streaming_; } -inline void Method::set_response_streaming(bool value) { +inline bool Method::response_streaming() const { + // @@protoc_insertion_point(field_get:google.protobuf.Method.response_streaming) + return _internal_response_streaming(); +} +inline void Method::_internal_set_response_streaming(bool value) { response_streaming_ = value; +} +inline void Method::set_response_streaming(bool value) { + _internal_set_response_streaming(value); // @@protoc_insertion_point(field_set:google.protobuf.Method.response_streaming) } // repeated .google.protobuf.Option options = 6; -inline int Method::options_size() const { +inline int Method::_internal_options_size() const { return 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); @@ -1069,13 +1470,19 @@ Method::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Method.options) return &options_; } +inline const PROTOBUF_NAMESPACE_ID::Option& Method::_internal_options(int index) const { + return options_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::Option& Method::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Method.options) - return options_.Get(index); + return _internal_options(index); +} +inline PROTOBUF_NAMESPACE_ID::Option* Method::_internal_add_options() { + return options_.Add(); } inline PROTOBUF_NAMESPACE_ID::Option* Method::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Method.options) - return options_.Add(); + return _internal_add_options(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& Method::options() const { @@ -1087,13 +1494,19 @@ Method::options() const { inline void Method::clear_syntax() { syntax_ = 0; } -inline PROTOBUF_NAMESPACE_ID::Syntax Method::syntax() const { - // @@protoc_insertion_point(field_get:google.protobuf.Method.syntax) +inline PROTOBUF_NAMESPACE_ID::Syntax Method::_internal_syntax() const { return static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(syntax_); } -inline void Method::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { +inline PROTOBUF_NAMESPACE_ID::Syntax Method::syntax() const { + // @@protoc_insertion_point(field_get:google.protobuf.Method.syntax) + return _internal_syntax(); +} +inline void Method::_internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { syntax_ = value; +} +inline void Method::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { + _internal_set_syntax(value); // @@protoc_insertion_point(field_set:google.protobuf.Method.syntax) } @@ -1103,44 +1516,54 @@ inline void Method::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { // string name = 1; inline void Mixin::clear_name() { - name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Mixin::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Mixin.name) - return name_.GetNoArena(); + return _internal_name(); } inline void Mixin::set_name(const std::string& value) { - - name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.Mixin.name) } +inline std::string* Mixin::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Mixin.name) + return _internal_mutable_name(); +} +inline const std::string& Mixin::_internal_name() const { + return name_.Get(); +} +inline void Mixin::_internal_set_name(const std::string& value) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Mixin::set_name(std::string&& value) { - name_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Mixin.name) } inline void Mixin::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Mixin.name) } -inline void Mixin::set_name(const char* value, size_t size) { +inline void Mixin::set_name(const char* value, + size_t size) { - name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Mixin.name) } -inline std::string* Mixin::mutable_name() { +inline std::string* Mixin::_internal_mutable_name() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Mixin.name) - return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Mixin::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Mixin.name) - - return name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Mixin::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -1148,50 +1571,80 @@ inline void Mixin::set_allocated_name(std::string* name) { } else { } - name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name); + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Mixin.name) } +inline std::string* Mixin::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Mixin.name) + GOOGLE_DCHECK(GetArena() != nullptr); + + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Mixin::unsafe_arena_set_allocated_name( + std::string* name) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (name != nullptr) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + name, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Mixin.name) +} // string root = 2; inline void Mixin::clear_root() { - root_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + root_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Mixin::root() const { // @@protoc_insertion_point(field_get:google.protobuf.Mixin.root) - return root_.GetNoArena(); + return _internal_root(); } inline void Mixin::set_root(const std::string& value) { - - root_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_root(value); // @@protoc_insertion_point(field_set:google.protobuf.Mixin.root) } +inline std::string* Mixin::mutable_root() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Mixin.root) + return _internal_mutable_root(); +} +inline const std::string& Mixin::_internal_root() const { + return root_.Get(); +} +inline void Mixin::_internal_set_root(const std::string& value) { + + root_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Mixin::set_root(std::string&& value) { - root_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + root_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Mixin.root) } inline void Mixin::set_root(const char* value) { GOOGLE_DCHECK(value != nullptr); - root_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + root_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Mixin.root) } -inline void Mixin::set_root(const char* value, size_t size) { +inline void Mixin::set_root(const char* value, + size_t size) { - root_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + root_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Mixin.root) } -inline std::string* Mixin::mutable_root() { +inline std::string* Mixin::_internal_mutable_root() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Mixin.root) - return root_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return root_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Mixin::release_root() { // @@protoc_insertion_point(field_release:google.protobuf.Mixin.root) - - return root_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return root_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Mixin::set_allocated_root(std::string* root) { if (root != nullptr) { @@ -1199,9 +1652,29 @@ inline void Mixin::set_allocated_root(std::string* root) { } else { } - root_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), root); + root_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), root, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Mixin.root) } +inline std::string* Mixin::unsafe_arena_release_root() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Mixin.root) + GOOGLE_DCHECK(GetArena() != nullptr); + + return root_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Mixin::unsafe_arena_set_allocated_root( + std::string* root) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (root != nullptr) { + + } else { + + } + root_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + root, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Mixin.root) +} #ifdef __GNUC__ #pragma GCC diagnostic pop diff --git a/third_party/protobuf/src/google/protobuf/arena.cc b/third_party/protobuf/src/google/protobuf/arena.cc index 0171c561..069dcdfa 100644 --- a/third_party/protobuf/src/google/protobuf/arena.cc +++ b/third_party/protobuf/src/google/protobuf/arena.cc @@ -144,16 +144,6 @@ void ArenaImpl::SerialArena::AddCleanupFallback(void* elem, AddCleanup(elem, cleanup); } -PROTOBUF_FUNC_ALIGN(32) -void* ArenaImpl::AllocateAligned(size_t n) { - SerialArena* arena; - if (PROTOBUF_PREDICT_TRUE(GetSerialArenaFast(&arena))) { - return arena->AllocateAligned(n); - } else { - return AllocateAlignedFallback(n); - } -} - void* ArenaImpl::AllocateAlignedAndAddCleanup(size_t n, void (*cleanup)(void*)) { SerialArena* arena; @@ -189,28 +179,6 @@ void ArenaImpl::AddCleanupFallback(void* elem, void (*cleanup)(void*)) { GetSerialArena()->AddCleanup(elem, cleanup); } -inline PROTOBUF_ALWAYS_INLINE bool ArenaImpl::GetSerialArenaFast( - ArenaImpl::SerialArena** arena) { - // If this thread already owns a block in this arena then try to use that. - // This fast path optimizes the case where multiple threads allocate from the - // same arena. - ThreadCache* tc = &thread_cache(); - if (PROTOBUF_PREDICT_TRUE(tc->last_lifecycle_id_seen == lifecycle_id_)) { - *arena = tc->last_serial_arena; - return true; - } - - // Check whether we own the last accessed SerialArena on this arena. This - // fast path optimizes the case where a single thread uses multiple arenas. - SerialArena* serial = hint_.load(std::memory_order_acquire); - if (PROTOBUF_PREDICT_TRUE(serial != NULL && serial->owner() == tc)) { - *arena = serial; - return true; - } - - return false; -} - ArenaImpl::SerialArena* ArenaImpl::GetSerialArena() { SerialArena* arena; if (PROTOBUF_PREDICT_TRUE(GetSerialArenaFast(&arena))) { @@ -391,6 +359,11 @@ ArenaImpl::SerialArena* ArenaImpl::GetSerialArenaFallback(void* me) { } // namespace internal +PROTOBUF_FUNC_ALIGN(32) +void* Arena::AllocateAlignedNoHook(size_t n) { + return impl_.AllocateAligned(n); +} + void Arena::CallDestructorHooks() { uint64 space_allocated = impl_.SpaceAllocated(); // Call the reset hook diff --git a/third_party/protobuf/src/google/protobuf/arena.h b/third_party/protobuf/src/google/protobuf/arena.h index 52f3fb95..038553c8 100644 --- a/third_party/protobuf/src/google/protobuf/arena.h +++ b/third_party/protobuf/src/google/protobuf/arena.h @@ -33,6 +33,7 @@ #ifndef GOOGLE_PROTOBUF_ARENA_H__ #define GOOGLE_PROTOBUF_ARENA_H__ + #include #include #include @@ -50,9 +51,9 @@ using type_info = ::type_info; #include #endif +#include #include #include -#include #include @@ -68,13 +69,14 @@ struct ArenaOptions; // defined below } // namespace protobuf } // namespace google - namespace google { namespace protobuf { class Arena; // defined below class Message; // defined in message.h class MessageLite; +template +class Map; namespace arena_metrics { @@ -86,6 +88,7 @@ namespace internal { struct ArenaStringPtr; // defined in arenastring.h class LazyField; // defined in lazy_field.h +class EpsCopyInputStream; // defined in parse_context.h template class GenericTypeHandler; // defined in repeated_field.h @@ -216,14 +219,15 @@ struct ArenaOptions { // any special requirements on the type T, and will invoke the object's // destructor when the arena is destroyed. // -// The arena message allocation protocol, required by CreateMessage, is as -// follows: +// The arena message allocation protocol, required by +// CreateMessage(Arena* arena, Args&&... args), is as follows: // -// - The type T must have (at least) two constructors: a constructor with no -// arguments, called when a T is allocated on the heap; and a constructor with -// a Arena* argument, called when a T is allocated on an arena. If the -// second constructor is called with a NULL arena pointer, it must be -// equivalent to invoking the first (no-argument) constructor. +// - The type T must have (at least) two constructors: a constructor callable +// with `args` (without `arena`), called when a T is allocated on the heap; +// and a constructor callable with `Arena* arena, Args&&... args`, called when +// a T is allocated on an arena. If the second constructor is called with a +// NULL arena pointer, it must be equivalent to invoking the first +// (`args`-only) constructor. // // - The type T must have a particular type trait: a nested type // |InternalArenaConstructable_|. This is usually a typedef to |void|. If no @@ -236,16 +240,11 @@ struct ArenaOptions { // present on the type, then its destructor is always called when the // containing arena is destroyed. // -// - One- and two-user-argument forms of CreateMessage() also exist that -// forward these constructor arguments to T's constructor: for example, -// CreateMessage(Arena*, arg1, arg2) forwards to a constructor T(Arena*, -// arg1, arg2). -// // This protocol is implemented by all arena-enabled proto2 message classes as // well as protobuf container types like RepeatedPtrField and Map. The protocol // is internal to protobuf and is not guaranteed to be stable. Non-proto types // should not rely on this protocol. -class PROTOBUF_EXPORT Arena final { +class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { public: // Arena constructor taking custom options. See ArenaOptions below for // descriptions of the options available. @@ -357,14 +356,6 @@ class PROTOBUF_EXPORT Arena final { // may not include space used by other threads executing concurrently with // the call to this method. uint64 SpaceUsed() const { return impl_.SpaceUsed(); } - // DEPRECATED. Please use SpaceAllocated() and SpaceUsed(). - // - // Combines SpaceAllocated and SpaceUsed. Returns a pair of - // . - PROTOBUF_DEPRECATED_MSG("Please use SpaceAllocated() and SpaceUsed()") - std::pair SpaceAllocatedAndUsed() const { - return std::make_pair(SpaceAllocated(), SpaceUsed()); - } // Frees all storage allocated by this arena after calling destructors // registered with OwnDestructor() and freeing objects registered with Own(). @@ -458,7 +449,7 @@ class PROTOBUF_EXPORT Arena final { return new (ptr) T(std::forward(args)...); } - static Arena* GetArena(const T* p) { return p->GetArenaNoVirtual(); } + static Arena* GetArena(const T* p) { return p->GetArena(); } friend class Arena; }; @@ -537,11 +528,12 @@ class PROTOBUF_EXPORT Arena final { // the cookie is not null. template PROTOBUF_ALWAYS_INLINE void* AllocateInternal(bool skip_explicit_ownership) { + static_assert(alignof(T) <= 8, "T is overaligned, see b/151247138"); const size_t n = internal::AlignUpTo8(sizeof(T)); AllocHook(RTTI_TYPE_ID(T), n); // Monitor allocation if needed. if (skip_explicit_ownership) { - return impl_.AllocateAligned(n); + return AllocateAlignedNoHook(n); } else { return impl_.AllocateAlignedAndAddCleanup( n, &internal::arena_destruct_object); @@ -602,7 +594,7 @@ class PROTOBUF_EXPORT Arena final { const size_t n = internal::AlignUpTo8(sizeof(T) * num_elements); // Monitor allocation if needed. AllocHook(RTTI_TYPE_ID(T), n); - return static_cast(impl_.AllocateAligned(n)); + return static_cast(AllocateAlignedNoHook(n)); } template @@ -621,24 +613,25 @@ class PROTOBUF_EXPORT Arena final { // CreateInArenaStorage is used to implement map field. Without it, // Map need to call generated message's protected arena constructor, // which needs to declare Map as friend of generated message. - template - static void CreateInArenaStorage(T* ptr, Arena* arena) { + template + static void CreateInArenaStorage(T* ptr, Arena* arena, Args&&... args) { CreateInArenaStorageInternal(ptr, arena, - typename is_arena_constructable::type()); + typename is_arena_constructable::type(), + std::forward(args)...); RegisterDestructorInternal( ptr, arena, typename InternalHelper::is_destructor_skippable::type()); } - template + template static void CreateInArenaStorageInternal(T* ptr, Arena* arena, - std::true_type) { - InternalHelper::Construct(ptr, arena); + std::true_type, Args&&... args) { + InternalHelper::Construct(ptr, arena, std::forward(args)...); } - template + template static void CreateInArenaStorageInternal(T* ptr, Arena* /* arena */, - std::false_type) { - new (ptr) T(); + std::false_type, Args&&... args) { + new (ptr) T(std::forward(args)...); } template @@ -670,7 +663,7 @@ class PROTOBUF_EXPORT Arena final { // Implementation for GetArena(). Only message objects with // InternalArenaConstructable_ tags can be associated with an arena, and such - // objects must implement a GetArenaNoVirtual() method. + // objects must implement a GetArena() method. template ::value, int>::type = 0> PROTOBUF_ALWAYS_INLINE static Arena* GetArenaInternal(const T* value) { @@ -688,14 +681,28 @@ class PROTOBUF_EXPORT Arena final { !has_get_arena::value, int>::type = 0> PROTOBUF_ALWAYS_INLINE static Arena* GetArenaInternal(const T* value) { + (void)value; return nullptr; } // For friends of arena. void* AllocateAligned(size_t n) { AllocHook(NULL, n); - return impl_.AllocateAligned(internal::AlignUpTo8(n)); + return AllocateAlignedNoHook(internal::AlignUpTo8(n)); } + template + void* AllocateAlignedTo(size_t n) { + static_assert(Align > 0, "Alignment must be greater than 0"); + static_assert((Align & (Align - 1)) == 0, "Alignment must be power of two"); + if (Align <= 8) return AllocateAligned(n); + // TODO(b/151247138): if the pointer would have been aligned already, + // this is wasting space. We should pass the alignment down. + uintptr_t ptr = reinterpret_cast(AllocateAligned(n + Align - 8)); + ptr = (ptr + Align - 1) & -Align; + return reinterpret_cast(ptr); + } + + void* AllocateAlignedNoHook(size_t n); internal::ArenaImpl impl_; @@ -712,6 +719,7 @@ class PROTOBUF_EXPORT Arena final { friend class internal::GenericTypeHandler; friend struct internal::ArenaStringPtr; // For AllocateAligned. friend class internal::LazyField; // For CreateMaybeMessage. + friend class internal::EpsCopyInputStream; // For parser performance friend class MessageLite; template friend class Map; diff --git a/third_party/protobuf/src/google/protobuf/arena_impl.h b/third_party/protobuf/src/google/protobuf/arena_impl.h index 0beec171..5a95124c 100644 --- a/third_party/protobuf/src/google/protobuf/arena_impl.h +++ b/third_party/protobuf/src/google/protobuf/arena_impl.h @@ -107,7 +107,27 @@ class PROTOBUF_EXPORT ArenaImpl { uint64 SpaceAllocated() const; uint64 SpaceUsed() const; - void* AllocateAligned(size_t n); + void* AllocateAligned(size_t n) { + SerialArena* arena; + if (PROTOBUF_PREDICT_TRUE(GetSerialArenaFast(&arena))) { + return arena->AllocateAligned(n); + } else { + return AllocateAlignedFallback(n); + } + } + + // This function allocates n bytes if the common happy case is true and + // returns true. Otherwise does nothing and returns false. This strange + // semantics is necessary to allow callers to program functions that only + // have fallback function calls in tail position. This substantially improves + // code for the happy path. + PROTOBUF_ALWAYS_INLINE bool MaybeAllocateAligned(size_t n, void** out) { + SerialArena* a; + if (PROTOBUF_PREDICT_TRUE(GetSerialArenaFromThreadCache(&a))) { + return a->MaybeAllocateAligned(n, out); + } + return false; + } void* AllocateAlignedAndAddCleanup(size_t n, void (*cleanup)(void*)); @@ -115,6 +135,8 @@ class PROTOBUF_EXPORT ArenaImpl { void AddCleanup(void* elem, void (*cleanup)(void*)); private: + friend class ArenaBenchmark; + void* AllocateAlignedFallback(size_t n); void* AllocateAlignedAndAddCleanupFallback(size_t n, void (*cleanup)(void*)); void AddCleanupFallback(void* elem, void (*cleanup)(void*)); @@ -156,10 +178,12 @@ class PROTOBUF_EXPORT ArenaImpl { void CleanupList(); uint64 SpaceUsed() const; + bool HasSpace(size_t n) { return n <= static_cast(limit_ - ptr_); } + void* AllocateAligned(size_t n) { GOOGLE_DCHECK_EQ(internal::AlignUpTo8(n), n); // Must be already aligned. GOOGLE_DCHECK_GE(limit_, ptr_); - if (PROTOBUF_PREDICT_FALSE(static_cast(limit_ - ptr_) < n)) { + if (PROTOBUF_PREDICT_FALSE(!HasSpace(n))) { return AllocateAlignedFallback(n); } void* ret = ptr_; @@ -170,6 +194,20 @@ class PROTOBUF_EXPORT ArenaImpl { return ret; } + // Allocate space if the current region provides enough space. + bool MaybeAllocateAligned(size_t n, void** out) { + GOOGLE_DCHECK_EQ(internal::AlignUpTo8(n), n); // Must be already aligned. + GOOGLE_DCHECK_GE(limit_, ptr_); + if (PROTOBUF_PREDICT_FALSE(!HasSpace(n))) return false; + void* ret = ptr_; + ptr_ += n; +#ifdef ADDRESS_SANITIZER + ASAN_UNPOISON_MEMORY_REGION(ret, n); +#endif // ADDRESS_SANITIZER + *out = ret; + return true; + } + void AddCleanup(void* elem, void (*cleanup)(void*)) { if (PROTOBUF_PREDICT_FALSE(cleanup_ptr_ == cleanup_limit_)) { AddCleanupFallback(elem, cleanup); @@ -292,7 +330,32 @@ class PROTOBUF_EXPORT ArenaImpl { Block* NewBlock(Block* last_block, size_t min_bytes); SerialArena* GetSerialArena(); - bool GetSerialArenaFast(SerialArena** arena); + PROTOBUF_ALWAYS_INLINE bool GetSerialArenaFast(SerialArena** arena) { + if (GetSerialArenaFromThreadCache(arena)) return true; + + // Check whether we own the last accessed SerialArena on this arena. This + // 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)) { + *arena = serial; + return true; + } + return false; + } + + PROTOBUF_ALWAYS_INLINE bool GetSerialArenaFromThreadCache( + SerialArena** arena) { + // If this thread already owns a block in this arena then try to use that. + // This fast path optimizes the case where multiple threads allocate from + // the same arena. + ThreadCache* tc = &thread_cache(); + if (PROTOBUF_PREDICT_TRUE(tc->last_lifecycle_id_seen == lifecycle_id_)) { + *arena = tc->last_serial_arena; + return true; + } + return false; + } SerialArena* GetSerialArenaFallback(void* me); LifecycleId lifecycle_id_; // Unique for each arena. Changes on Reset(). diff --git a/third_party/protobuf/src/google/protobuf/arena_unittest.cc b/third_party/protobuf/src/google/protobuf/arena_unittest.cc index 7e5b1156..dd73d792 100644 --- a/third_party/protobuf/src/google/protobuf/arena_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/arena_unittest.cc @@ -58,6 +58,9 @@ #include +// Must be included last +#include + using proto2_arena_unittest::ArenaMessage; using protobuf_unittest::TestAllExtensions; using protobuf_unittest::TestAllTypes; diff --git a/third_party/protobuf/src/google/protobuf/arenastring.h b/third_party/protobuf/src/google/protobuf/arenastring.h index f4ff07dc..122f391e 100644 --- a/third_party/protobuf/src/google/protobuf/arenastring.h +++ b/third_party/protobuf/src/google/protobuf/arenastring.h @@ -32,22 +32,29 @@ #define GOOGLE_PROTOBUF_ARENASTRING_H__ #include +#include +#include -#include +#include #include #include -#include -#include +#include +#include #include +#ifdef SWIG +#error "You cannot SWIG proto headers" +#endif + + // This is the implementation of arena string fields written for the open-source // release. The ArenaStringPtr struct below is an internal implementation class // and *should not be used* by user code. It is used to collect string // operations together into one place and abstract away the underlying // string-field pointer representation, so that (for example) an alternate -// implementation that knew more about ::std::string's internals could integrate more -// closely with the arena allocator. +// implementation that knew more about ::std::string's internals could integrate +// more closely with the arena allocator. namespace google { namespace protobuf { @@ -115,14 +122,14 @@ struct PROTOBUF_EXPORT ArenaStringPtr { } else { released = ptr_; } - ptr_ = const_cast< ::std::string* >(default_value); + ptr_ = const_cast< ::std::string*>(default_value); return released; } - // UnsafeArenaRelease returns a ::std::string*, but it may be arena-owned (i.e. - // have its destructor already registered) if arena != NULL. If the field was - // not set, this returns NULL. This method clears this field back to NULL - // state. Used to implement unsafe_arena_release_() methods on + // UnsafeArenaRelease returns a ::std::string*, but it may be arena-owned + // (i.e. have its destructor already registered) if arena != NULL. If the + // field was not set, this returns NULL. This method clears this field back to + // NULL state. Used to implement unsafe_arena_release_() methods on // generated classes. inline ::std::string* UnsafeArenaRelease(const ::std::string* default_value, Arena* /* arena */) { @@ -130,7 +137,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { return NULL; } ::std::string* released = ptr_; - ptr_ = const_cast< ::std::string* >(default_value); + ptr_ = const_cast< ::std::string*>(default_value); return released; } @@ -148,7 +155,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { arena->Own(value); } } else { - ptr_ = const_cast< ::std::string* >(default_value); + ptr_ = const_cast< ::std::string*>(default_value); } } @@ -162,7 +169,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { if (value != NULL) { ptr_ = value; } else { - ptr_ = const_cast< ::std::string* >(default_value); + ptr_ = const_cast< ::std::string*>(default_value); } } @@ -221,12 +228,8 @@ struct PROTOBUF_EXPORT ArenaStringPtr { // Clears content, assuming that the current value is not the empty string // default. - inline void ClearNonDefaultToEmpty() { - ptr_->clear(); - } - inline void ClearNonDefaultToEmptyNoArena() { - ptr_->clear(); - } + inline void ClearNonDefaultToEmpty() { ptr_->clear(); } + inline void ClearNonDefaultToEmptyNoArena() { ptr_->clear(); } // Clears content, but keeps allocated string if arena != NULL, to avoid the // overhead of heap operations. After this returns, the content (as seen by @@ -251,7 +254,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { inline void UnsafeSetDefault(const ::std::string* default_value) { // Casting away 'const' is safe here: accessors ensure that ptr_ is only // returned as a const if it is equal to default_value. - ptr_ = const_cast< ::std::string* >(default_value); + ptr_ = const_cast< ::std::string*>(default_value); } // The 'NoArena' variants of methods below assume arena == NULL and are @@ -270,7 +273,6 @@ struct PROTOBUF_EXPORT ArenaStringPtr { } } -#if LANG_CXX11 void SetNoArena(const ::std::string* default_value, ::std::string&& value) { if (IsDefault(default_value)) { ptr_ = new ::std::string(std::move(value)); @@ -278,9 +280,9 @@ struct PROTOBUF_EXPORT ArenaStringPtr { *ptr_ = std::move(value); } } -#endif - void AssignWithDefault(const ::std::string* default_value, ArenaStringPtr value); + void AssignWithDefault(const ::std::string* default_value, + ArenaStringPtr value); inline const ::std::string& GetNoArena() const { return *ptr_; } @@ -303,11 +305,10 @@ struct PROTOBUF_EXPORT ArenaStringPtr { const ::std::string* default_value) { GOOGLE_DCHECK(!IsDefault(default_value)); ::std::string* released = ptr_; - ptr_ = const_cast< ::std::string* >(default_value); + ptr_ = const_cast< ::std::string*>(default_value); return released; } - inline void SetAllocatedNoArena(const ::std::string* default_value, ::std::string* value) { if (ptr_ != default_value) { @@ -316,7 +317,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { if (value != NULL) { ptr_ = value; } else { - ptr_ = const_cast< ::std::string* >(default_value); + ptr_ = const_cast< ::std::string*>(default_value); } } @@ -347,9 +348,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { // raw pointer from the shared parse routine (in the non-arenas case). The // parse routine does the string allocation in order to save code size in the // generated parsing code. - inline ::std::string** UnsafeRawStringPointer() { - return &ptr_; - } + inline ::std::string** UnsafeRawStringPointer() { return &ptr_; } inline bool IsDefault(const ::std::string* default_value) const { return ptr_ == default_value; @@ -371,7 +370,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { void CreateInstance(Arena* arena, const ::std::string* initial_value) { GOOGLE_DCHECK(initial_value != NULL); // uses "new ::std::string" when arena is nullptr - ptr_ = Arena::Create< ::std::string >(arena, *initial_value); + ptr_ = Arena::Create< ::std::string>(arena, *initial_value); } PROTOBUF_NOINLINE void CreateInstanceNoArena(const ::std::string* initial_value) { @@ -383,13 +382,11 @@ struct PROTOBUF_EXPORT ArenaStringPtr { } // namespace internal } // namespace protobuf - - namespace protobuf { namespace internal { -inline void ArenaStringPtr::AssignWithDefault(const ::std::string* default_value, - ArenaStringPtr value) { +inline void ArenaStringPtr::AssignWithDefault( + const ::std::string* default_value, ArenaStringPtr value) { const ::std::string* me = *UnsafeRawStringPointer(); const ::std::string* other = *value.UnsafeRawStringPointer(); // If the pointers are the same then do nothing. @@ -402,6 +399,7 @@ inline void ArenaStringPtr::AssignWithDefault(const ::std::string* default_value } // namespace protobuf } // namespace google + #include #endif // GOOGLE_PROTOBUF_ARENASTRING_H__ diff --git a/third_party/protobuf/src/google/protobuf/arenastring_unittest.cc b/third_party/protobuf/src/google/protobuf/arenastring_unittest.cc index 70a3f767..c5da4476 100644 --- a/third_party/protobuf/src/google/protobuf/arenastring_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/arenastring_unittest.cc @@ -43,6 +43,7 @@ #include #include #include +#include namespace google { @@ -50,7 +51,6 @@ namespace protobuf { using internal::ArenaStringPtr; - static std::string WrapString(const char* value) { return value; } // Test ArenaStringPtr with arena == NULL. diff --git a/third_party/protobuf/src/google/protobuf/compiler/annotation_test_util.h b/third_party/protobuf/src/google/protobuf/compiler/annotation_test_util.h index 7c131918..fa87c6cc 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/annotation_test_util.h +++ b/third_party/protobuf/src/google/protobuf/compiler/annotation_test_util.h @@ -60,7 +60,7 @@ struct ExpectedOutput { // directory. void AddFile(const std::string& filename, const std::string& data); -// Runs proto compiler. Captures proto file structrue in FileDescriptorProto. +// Runs proto compiler. Captures proto file structure in FileDescriptorProto. // Files will be generated in TestTempDir() folder. Callers of this // function must read generated files themselves. // diff --git a/third_party/protobuf/src/google/protobuf/compiler/code_generator.cc b/third_party/protobuf/src/google/protobuf/compiler/code_generator.cc index 428ec469..693300df 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/code_generator.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/code_generator.cc @@ -50,7 +50,7 @@ bool CodeGenerator::GenerateAll(const std::vector& files, const std::string& parameter, GeneratorContext* generator_context, std::string* error) const { - // Default implemenation is just to call the per file method, and prefix any + // Default implementation is just to call the per file method, and prefix any // error string with the file to provide context. bool succeeded = true; for (int i = 0; i < files.size(); i++) { diff --git a/third_party/protobuf/src/google/protobuf/compiler/code_generator.h b/third_party/protobuf/src/google/protobuf/compiler/code_generator.h index 528dc764..1bc8dfca 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/code_generator.h +++ b/third_party/protobuf/src/google/protobuf/compiler/code_generator.h @@ -102,6 +102,16 @@ class PROTOC_EXPORT CodeGenerator { GeneratorContext* generator_context, std::string* error) const; + // Sync with plugin.proto. + enum Feature { + FEATURE_PROTO3_OPTIONAL = 1, + }; + + // Implement this to indicate what features this code generator supports. + // This should be a bitwise OR of features from the Features enum in + // plugin.proto. + virtual uint64 GetSupportedFeatures() const { return 0; } + // This is no longer used, but this class is part of the opensource protobuf // library, so it has to remain to keep vtables the same for the current // version of the library. When protobufs does a api breaking change, the diff --git a/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc b/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc index a74aaefd..b55070fa 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc @@ -34,7 +34,6 @@ #include - #include #include @@ -71,7 +70,6 @@ #include #include #include -#include #include #include #include @@ -80,6 +78,7 @@ #include #include #include +#include #include #include @@ -264,8 +263,8 @@ void AddDefaultProtoPaths( } } -string PluginName(const std::string& plugin_prefix, - const std::string& directive) { +std::string PluginName(const std::string& plugin_prefix, + const std::string& directive) { // Assuming the directive starts with "--" and ends with "_out" or "_opt", // strip the "--" and "_out/_opt" and add the plugin prefix. return plugin_prefix + "gen-" + directive.substr(2, directive.size() - 6); @@ -366,7 +365,6 @@ class CommandLineInterface::ErrorPrinter class CommandLineInterface::GeneratorContextImpl : public GeneratorContext { public: GeneratorContextImpl(const std::vector& parsed_files); - ~GeneratorContextImpl(); // Write all files in the directory to disk at the given output location, // which must end in a '/'. @@ -397,7 +395,7 @@ class CommandLineInterface::GeneratorContextImpl : public GeneratorContext { // map instead of unordered_map so that files are written in order (good when // writing zips). - std::map files_; + std::map files_; const std::vector& parsed_files_; bool had_error_; }; @@ -413,9 +411,11 @@ class CommandLineInterface::MemoryOutputStream virtual ~MemoryOutputStream(); // implements ZeroCopyOutputStream --------------------------------- - virtual bool Next(void** data, int* size) { return inner_->Next(data, size); } - virtual void BackUp(int count) { inner_->BackUp(count); } - virtual int64 ByteCount() const { return inner_->ByteCount(); } + bool Next(void** data, int* size) override { + return inner_->Next(data, size); + } + void BackUp(int count) override { inner_->BackUp(count); } + int64_t ByteCount() const override { return inner_->ByteCount(); } private: // Checks to see if "filename_.meta" exists in directory_; if so, fixes the @@ -446,10 +446,6 @@ CommandLineInterface::GeneratorContextImpl::GeneratorContextImpl( const std::vector& parsed_files) : parsed_files_(parsed_files), had_error_(false) {} -CommandLineInterface::GeneratorContextImpl::~GeneratorContextImpl() { - STLDeleteValues(&files_); -} - bool CommandLineInterface::GeneratorContextImpl::WriteAllToDisk( const std::string& prefix) { if (had_error_) { @@ -460,12 +456,10 @@ bool CommandLineInterface::GeneratorContextImpl::WriteAllToDisk( return false; } - for (std::map::const_iterator iter = - files_.begin(); - iter != files_.end(); ++iter) { - const std::string& relative_filename = iter->first; - const char* data = iter->second->data(); - int size = iter->second->size(); + for (const auto& pair : files_) { + const std::string& relative_filename = pair.first; + const char* data = pair.second.data(); + int size = pair.second.size(); if (!TryCreateParentDirectory(prefix, relative_filename)) { return false; @@ -549,10 +543,8 @@ bool CommandLineInterface::GeneratorContextImpl::WriteAllToZip( io::FileOutputStream stream(file_descriptor); ZipWriter zip_writer(&stream); - for (std::map::const_iterator iter = - files_.begin(); - iter != files_.end(); ++iter) { - zip_writer.Write(iter->first, *iter->second); + for (const auto& pair : files_) { + zip_writer.Write(pair.first, pair.second); } zip_writer.WriteDirectory(); @@ -569,20 +561,19 @@ bool CommandLineInterface::GeneratorContextImpl::WriteAllToZip( } void CommandLineInterface::GeneratorContextImpl::AddJarManifest() { - std::string** map_slot = &files_["META-INF/MANIFEST.MF"]; - if (*map_slot == NULL) { - *map_slot = new std::string( + auto pair = files_.insert({"META-INF/MANIFEST.MF", ""}); + if (pair.second) { + pair.first->second = "Manifest-Version: 1.0\n" "Created-By: 1.6.0 (protoc)\n" - "\n"); + "\n"; } } void CommandLineInterface::GeneratorContextImpl::GetOutputFilenames( std::vector* output_filenames) { - for (std::map::iterator iter = files_.begin(); - iter != files_.end(); ++iter) { - output_filenames->push_back(iter->first); + for (const auto& pair : files_) { + output_filenames->push_back(pair.first); } } @@ -623,17 +614,16 @@ CommandLineInterface::MemoryOutputStream::MemoryOutputStream( void CommandLineInterface::MemoryOutputStream::UpdateMetadata( size_t insertion_offset, size_t insertion_length) { - std::map::iterator meta_file = - directory_->files_.find(filename_ + ".meta"); - if (meta_file == directory_->files_.end() || !meta_file->second) { + auto it = directory_->files_.find(filename_ + ".meta"); + if (it == directory_->files_.end()) { // No metadata was recorded for this file. return; } - std::string* encoded_data = meta_file->second; + std::string& encoded_data = it->second; GeneratedCodeInfo metadata; bool is_text_format = false; - if (!metadata.ParseFromString(*encoded_data)) { - if (!TextFormat::ParseFromString(*encoded_data, &metadata)) { + if (!metadata.ParseFromString(encoded_data)) { + if (!TextFormat::ParseFromString(encoded_data, &metadata)) { // The metadata is invalid. std::cerr << filename_ << ".meta: Could not parse metadata as wire or text format." @@ -653,9 +643,9 @@ void CommandLineInterface::MemoryOutputStream::UpdateMetadata( } } if (is_text_format) { - TextFormat::PrintToString(metadata, encoded_data); + TextFormat::PrintToString(metadata, &encoded_data); } else { - metadata.SerializeToString(encoded_data); + metadata.SerializeToString(&encoded_data); } } @@ -664,13 +654,15 @@ CommandLineInterface::MemoryOutputStream::~MemoryOutputStream() { inner_.reset(); // Insert into the directory. - std::string** map_slot = &directory_->files_[filename_]; + auto pair = directory_->files_.insert({filename_, ""}); + auto it = pair.first; + bool already_present = !pair.second; if (insertion_point_.empty()) { // This was just a regular Open(). - if (*map_slot != NULL) { + if (already_present) { if (append_mode_) { - (*map_slot)->append(data_); + it->second.append(data_); } else { std::cerr << filename_ << ": Tried to write the same file twice." << std::endl; @@ -679,8 +671,7 @@ CommandLineInterface::MemoryOutputStream::~MemoryOutputStream() { return; } - *map_slot = new std::string; - (*map_slot)->swap(data_); + it->second.swap(data_); } else { // This was an OpenForInsert(). @@ -690,14 +681,14 @@ CommandLineInterface::MemoryOutputStream::~MemoryOutputStream() { } // Find the file we are going to insert into. - if (*map_slot == NULL) { + if (!already_present) { std::cerr << filename_ << ": Tried to insert into file that doesn't exist." << std::endl; directory_->had_error_ = true; return; } - std::string* target = *map_slot; + std::string* target = &it->second; // Find the insertion point. std::string magic_string = @@ -782,16 +773,9 @@ const char* const CommandLineInterface::kPathSeparator = ":"; #endif CommandLineInterface::CommandLineInterface() - : mode_(MODE_COMPILE), - print_mode_(PRINT_NONE), - error_format_(ERROR_FORMAT_GCC), - direct_dependencies_explicitly_set_(false), - direct_dependencies_violation_msg_( - kDefaultDirectDependenciesViolationMsg), - imports_in_descriptor_set_(false), - source_info_in_descriptor_set_(false), - disallow_services_(false) { -} + : direct_dependencies_violation_msg_( + kDefaultDirectDependenciesViolationMsg) {} + CommandLineInterface::~CommandLineInterface() {} void CommandLineInterface::RegisterGenerator(const std::string& flag_name, @@ -820,6 +804,40 @@ void CommandLineInterface::AllowPlugins(const std::string& exe_name_prefix) { plugin_prefix_ = exe_name_prefix; } +namespace { + +bool ContainsProto3Optional(const Descriptor* desc) { + for (int i = 0; i < desc->field_count(); i++) { + if (desc->field(i)->has_optional_keyword()) { + return true; + } + } + for (int i = 0; i < desc->nested_type_count(); i++) { + if (ContainsProto3Optional(desc->nested_type(i))) { + return true; + } + } + return false; +} + +bool ContainsProto3Optional(const FileDescriptor* file) { + if (file->syntax() == FileDescriptor::SYNTAX_PROTO3) { + for (int i = 0; i < file->message_type_count(); i++) { + if (ContainsProto3Optional(file->message_type(i))) { + return true; + } + } + } + return false; +} + +} // namespace + +namespace { +std::unique_ptr +PopulateSingleSimpleDescriptorDatabase(const std::string& descriptor_set_name); +} + int CommandLineInterface::Run(int argc, const char* const argv[]) { Clear(); switch (ParseArguments(argc, argv)) { @@ -835,16 +853,38 @@ int CommandLineInterface::Run(int argc, const char* const argv[]) { std::unique_ptr disk_source_tree; std::unique_ptr error_collector; std::unique_ptr descriptor_pool; - std::unique_ptr descriptor_set_in_database; + + // The SimpleDescriptorDatabases here are the constituents of the + // MergedDescriptorDatabase descriptor_set_in_database, so this vector is for + // managing their lifetimes. Its scope should match descriptor_set_in_database + std::vector> + databases_per_descriptor_set; + std::unique_ptr descriptor_set_in_database; + std::unique_ptr source_tree_database; // Any --descriptor_set_in FileDescriptorSet objects will be used as a // fallback to input_files on command line, so create that db first. if (!descriptor_set_in_names_.empty()) { - descriptor_set_in_database.reset(new SimpleDescriptorDatabase()); - if (!PopulateSimpleDescriptorDatabase(descriptor_set_in_database.get())) { - return 1; + for (const std::string& name : descriptor_set_in_names_) { + std::unique_ptr database_for_descriptor_set = + PopulateSingleSimpleDescriptorDatabase(name); + if (!database_for_descriptor_set) { + return EXIT_FAILURE; + } + databases_per_descriptor_set.push_back( + std::move(database_for_descriptor_set)); } + + std::vector raw_databases_per_descriptor_set; + raw_databases_per_descriptor_set.reserve( + databases_per_descriptor_set.size()); + for (const std::unique_ptr& db : + databases_per_descriptor_set) { + raw_databases_per_descriptor_set.push_back(db.get()); + } + descriptor_set_in_database.reset( + new MergedDescriptorDatabase(raw_databases_per_descriptor_set)); } if (proto_path_.empty()) { @@ -878,11 +918,22 @@ int CommandLineInterface::Run(int argc, const char* const argv[]) { } descriptor_pool->EnforceWeakDependencies(true); - if (!ParseInputFiles(descriptor_pool.get(), &parsed_files)) { + if (!ParseInputFiles(descriptor_pool.get(), disk_source_tree.get(), + &parsed_files)) { return 1; } + for (auto fd : parsed_files) { + if (!AllowProto3Optional(*fd) && ContainsProto3Optional(fd)) { + std::cerr << fd->name() + << ": This file contains proto3 optional fields, but " + "--experimental_allow_proto3_optional was not set." + << std::endl; + return 1; + } + } + // We construct a separate GeneratorContext for each output location. Note // that two code generators may output to the same location, in which case // they should share a single GeneratorContext so that OpenForInsert() works. @@ -893,31 +944,31 @@ int CommandLineInterface::Run(int argc, const char* const argv[]) { for (int i = 0; i < output_directives_.size(); i++) { std::string output_location = output_directives_[i].output_location; if (!HasSuffixString(output_location, ".zip") && - !HasSuffixString(output_location, ".jar")) { + !HasSuffixString(output_location, ".jar") && + !HasSuffixString(output_location, ".srcjar")) { AddTrailingSlash(&output_location); } - GeneratorContextImpl** map_slot = &output_directories[output_location]; - if (*map_slot == NULL) { + auto& generator = output_directories[output_location]; + + if (!generator) { // First time we've seen this output location. - *map_slot = new GeneratorContextImpl(parsed_files); + generator.reset(new GeneratorContextImpl(parsed_files)); } - if (!GenerateOutput(parsed_files, output_directives_[i], *map_slot)) { - STLDeleteValues(&output_directories); + if (!GenerateOutput(parsed_files, output_directives_[i], + generator.get())) { return 1; } } } // Write all output to disk. - for (GeneratorContextMap::iterator iter = output_directories.begin(); - iter != output_directories.end(); ++iter) { - const std::string& location = iter->first; - GeneratorContextImpl* directory = iter->second; + for (const auto& pair : output_directories) { + const std::string& location = pair.first; + GeneratorContextImpl* directory = pair.second.get(); if (HasSuffixString(location, "/")) { if (!directory->WriteAllToDisk(location)) { - STLDeleteValues(&output_directories); return 1; } } else { @@ -926,7 +977,6 @@ int CommandLineInterface::Run(int argc, const char* const argv[]) { } if (!directory->WriteAllToZip(location)) { - STLDeleteValues(&output_directories); return 1; } } @@ -940,8 +990,6 @@ int CommandLineInterface::Run(int argc, const char* const argv[]) { } } - STLDeleteValues(&output_directories); - if (!descriptor_set_out_name_.empty()) { if (!WriteDescriptorSet(parsed_files)) { return 1; @@ -1010,46 +1058,66 @@ bool CommandLineInterface::InitializeDiskSourceTree( return true; } -bool CommandLineInterface::PopulateSimpleDescriptorDatabase( - SimpleDescriptorDatabase* database) { - for (int i = 0; i < descriptor_set_in_names_.size(); i++) { - int fd; - do { - fd = open(descriptor_set_in_names_[i].c_str(), O_RDONLY | O_BINARY); - } while (fd < 0 && errno == EINTR); - if (fd < 0) { - std::cerr << descriptor_set_in_names_[i] << ": " << strerror(ENOENT) - << std::endl; - return false; - } +namespace { +std::unique_ptr +PopulateSingleSimpleDescriptorDatabase(const std::string& descriptor_set_name) { + int fd; + do { + fd = open(descriptor_set_name.c_str(), O_RDONLY | O_BINARY); + } while (fd < 0 && errno == EINTR); + if (fd < 0) { + std::cerr << descriptor_set_name << ": " << strerror(ENOENT) << std::endl; + return nullptr; + } - FileDescriptorSet file_descriptor_set; - bool parsed = file_descriptor_set.ParseFromFileDescriptor(fd); - if (close(fd) != 0) { - std::cerr << descriptor_set_in_names_[i] << ": close: " << strerror(errno) - << std::endl; - return false; - } + FileDescriptorSet file_descriptor_set; + bool parsed = file_descriptor_set.ParseFromFileDescriptor(fd); + if (close(fd) != 0) { + std::cerr << descriptor_set_name << ": close: " << strerror(errno) + << std::endl; + return nullptr; + } - if (!parsed) { - std::cerr << descriptor_set_in_names_[i] << ": Unable to parse." - << std::endl; - return false; - } + if (!parsed) { + std::cerr << descriptor_set_name << ": Unable to parse." << std::endl; + return nullptr; + } - for (int j = 0; j < file_descriptor_set.file_size(); j++) { - FileDescriptorProto previously_added_file_descriptor_proto; - if (database->FindFileByName(file_descriptor_set.file(j).name(), - &previously_added_file_descriptor_proto)) { - // already present - skip - continue; - } - if (!database->Add(file_descriptor_set.file(j))) { - return false; - } + std::unique_ptr database{ + new SimpleDescriptorDatabase()}; + + for (int j = 0; j < file_descriptor_set.file_size(); j++) { + FileDescriptorProto previously_added_file_descriptor_proto; + if (database->FindFileByName(file_descriptor_set.file(j).name(), + &previously_added_file_descriptor_proto)) { + // already present - skip + continue; + } + if (!database->Add(file_descriptor_set.file(j))) { + return nullptr; } } - return true; + return database; +} + +} // namespace + +bool CommandLineInterface::AllowProto3Optional( + const FileDescriptor& file) const { + if (allow_proto3_optional_) return true; + + // Whitelist all ads protos. Ads is an early adopter of this feature. + if (file.name().find("google/ads/googleads") != std::string::npos) { + return true; + } + + // Whitelist all protos testing proto3 optional. + if (file.name().find("test_proto3_optional") != std::string::npos) { + return true; + } + + + return false; } bool CommandLineInterface::VerifyInputFilesInDescriptors( @@ -1057,7 +1125,8 @@ bool CommandLineInterface::VerifyInputFilesInDescriptors( for (const auto& input_file : input_files_) { FileDescriptorProto file_descriptor; if (!database->FindFileByName(input_file, &file_descriptor)) { - std::cerr << input_file << ": " << strerror(ENOENT) << std::endl; + std::cerr << "Could not find file in descriptor database: " << input_file + << ": " << strerror(ENOENT) << std::endl; return false; } @@ -1074,18 +1143,38 @@ bool CommandLineInterface::VerifyInputFilesInDescriptors( } bool CommandLineInterface::ParseInputFiles( - DescriptorPool* descriptor_pool, + DescriptorPool* descriptor_pool, DiskSourceTree* source_tree, std::vector* parsed_files) { + if (!proto_path_.empty()) { + // Track unused imports in all source files that were loaded from the + // filesystem. We do not track unused imports for files loaded from + // descriptor sets as they may be programmatically generated in which case + // exerting this level of rigor is less desirable. We're also making the + // assumption that the initial parse of the proto from the filesystem + // was rigorous in checking unused imports and that the descriptor set + // being parsed was produced then and that it was subsequent mutations + // of that descriptor set that left unused imports. + // + // Note that relying on proto_path exclusively is limited in that we may + // be loading descriptors from both the filesystem and descriptor sets + // depending on the invocation. At least for invocations that are + // exclusively reading from descriptor sets, we can eliminate this failure + // condition. + for (const auto& input_file : input_files_) { + descriptor_pool->AddUnusedImportTrackFile(input_file); + } + } + + bool result = true; // Parse each file. for (const auto& input_file : input_files_) { // Import the file. - descriptor_pool->AddUnusedImportTrackFile(input_file); const FileDescriptor* parsed_file = descriptor_pool->FindFileByName(input_file); - descriptor_pool->ClearUnusedImportTrackFiles(); if (parsed_file == NULL) { - return false; + result = false; + break; } parsed_files->push_back(parsed_file); @@ -1095,7 +1184,8 @@ bool CommandLineInterface::ParseInputFiles( << ": This file contains services, but " "--disallow_services was used." << std::endl; - return false; + result = false; + break; } // Enforce --direct_dependencies @@ -1113,11 +1203,13 @@ bool CommandLineInterface::ParseInputFiles( } } if (indirect_imports) { - return false; + result = false; + break; } } } - return true; + descriptor_pool->ClearUnusedImportTrackFiles(); + return result; } void CommandLineInterface::Clear() { @@ -1141,6 +1233,7 @@ void CommandLineInterface::Clear() { source_info_in_descriptor_set_ = false; disallow_services_ = false; direct_dependencies_explicitly_set_ = false; + allow_proto3_optional_ = false; } bool CommandLineInterface::MakeProtoProtoPathRelative( @@ -1160,7 +1253,8 @@ bool CommandLineInterface::MakeProtoProtoPathRelative( in_fallback_database) { return true; } else { - std::cerr << *proto << ": " << strerror(ENOENT) << std::endl; + std::cerr << "Could not make proto path relative: " << *proto << ": " + << strerror(ENOENT) << std::endl; return false; } } @@ -1183,7 +1277,8 @@ bool CommandLineInterface::MakeProtoProtoPathRelative( if (in_fallback_database) { return true; } - std::cerr << *proto << ": " << strerror(errno) << std::endl; + std::cerr << "Could not map to virtual file: " << *proto << ": " + << strerror(errno) << std::endl; return false; case DiskSourceTree::NO_MAPPING: { // Try to interpret the path as a virtual path. @@ -1414,7 +1509,8 @@ bool CommandLineInterface::ParseArgument(const char* arg, std::string* name, if (*name == "-h" || *name == "--help" || *name == "--disallow_services" || *name == "--include_imports" || *name == "--include_source_info" || *name == "--version" || *name == "--decode_raw" || - *name == "--print_free_field_numbers") { + *name == "--print_free_field_numbers" || + *name == "--experimental_allow_proto3_optional") { // HACK: These are the only flags that don't take a value. // They probably should not be hard-coded like this but for now it's // not worth doing better. @@ -1442,7 +1538,31 @@ CommandLineInterface::InterpretArgument(const std::string& name, return PARSE_ARGUMENT_FAIL; } +#if defined(_WIN32) + // On Windows, the shell (typically cmd.exe) does not expand wildcards in + // file names (e.g. foo\*.proto), so we do it ourselves. + switch (google::protobuf::io::win32::ExpandWildcards( + value, + [this](const string& path) { this->input_files_.push_back(path); })) { + case google::protobuf::io::win32::ExpandWildcardsResult::kSuccess: + break; + case google::protobuf::io::win32::ExpandWildcardsResult:: + kErrorNoMatchingFile: + // Path does not exist, is not a file, or it's longer than MAX_PATH and + // long path handling is disabled. + std::cerr << "Invalid file name pattern or missing input file \"" + << value << "\"" << std::endl; + return PARSE_ARGUMENT_FAIL; + default: + std::cerr << "Cannot convert path \"" << value + << "\" to or from Windows style" << std::endl; + return PARSE_ARGUMENT_FAIL; + } +#else // not _WIN32 + // On other platforms than Windows (e.g. Linux, Mac OS) the shell (typically + // Bash) expands wildcards. input_files_.push_back(value); +#endif // _WIN32 } else if (name == "-I" || name == "--proto_path") { // Java's -classpath (and some other languages) delimits path components @@ -1597,6 +1717,9 @@ CommandLineInterface::InterpretArgument(const std::string& name, } else if (name == "--disallow_services") { disallow_services_ = true; + } else if (name == "--experimental_allow_proto3_optional") { + allow_proto3_optional_ = true; + } else if (name == "--encode" || name == "--decode" || name == "--decode_raw") { if (mode_ != MODE_COMPILE) { @@ -1897,6 +2020,28 @@ void CommandLineInterface::PrintHelpText() { << std::endl; } +bool CommandLineInterface::EnforceProto3OptionalSupport( + const std::string& codegen_name, uint64 supported_features, + const std::vector& parsed_files) const { + bool supports_proto3_optional = + supported_features & CodeGenerator::FEATURE_PROTO3_OPTIONAL; + if (!supports_proto3_optional) { + for (const auto fd : parsed_files) { + if (ContainsProto3Optional(fd)) { + std::cerr << fd->name() + << ": is a proto3 file that contains optional fields, but " + "code generator " + << codegen_name + << " hasn't been updated to support optional fields in " + "proto3. Please ask the owner of this code generator to " + "support proto3 optional."; + return false; + } + } + } + return true; +} + bool CommandLineInterface::GenerateOutput( const std::vector& parsed_files, const OutputDirective& output_directive, @@ -1931,6 +2076,12 @@ bool CommandLineInterface::GenerateOutput( } parameters.append(generator_parameters_[output_directive.name]); } + if (!EnforceProto3OptionalSupport( + output_directive.name, + output_directive.generator->GetSupportedFeatures(), parsed_files)) { + return false; + } + if (!output_directive.generator->GenerateAll(parsed_files, parameters, generator_context, &error)) { // Generator returned an error. @@ -1955,10 +2106,9 @@ bool CommandLineInterface::GenerateDependencyManifestFile( } std::vector output_filenames; - for (GeneratorContextMap::const_iterator iter = output_directories.begin(); - iter != output_directories.end(); ++iter) { - const std::string& location = iter->first; - GeneratorContextImpl* directory = iter->second; + for (const auto& pair : output_directories) { + const std::string& location = pair.first; + GeneratorContextImpl* directory = pair.second.get(); std::vector relative_output_filenames; directory->GetOutputFilenames(&relative_output_filenames); for (int i = 0; i < relative_output_filenames.size(); i++) { @@ -2096,6 +2246,9 @@ bool CommandLineInterface::GeneratePluginOutput( // Generator returned an error. *error = response.error(); return false; + } else if (!EnforceProto3OptionalSupport( + plugin_name, response.supported_features(), parsed_files)) { + return false; } return true; @@ -2206,12 +2359,20 @@ bool CommandLineInterface::WriteDescriptorSet( } io::FileOutputStream out(fd); - if (!file_set.SerializeToZeroCopyStream(&out)) { - std::cerr << descriptor_set_out_name_ << ": " << strerror(out.GetErrno()) - << std::endl; - out.Close(); - return false; + + { + io::CodedOutputStream coded_out(&out); + // Determinism is useful here because build outputs are sometimes checked + // into version control. + coded_out.SetSerializationDeterministic(true); + if (!file_set.SerializeToCodedStream(&coded_out)) { + std::cerr << descriptor_set_out_name_ << ": " << strerror(out.GetErrno()) + << std::endl; + out.Close(); + return false; + } } + if (!out.Close()) { std::cerr << descriptor_set_out_name_ << ": " << strerror(out.GetErrno()) << std::endl; @@ -2258,7 +2419,7 @@ namespace { // Nested Messages: // Note that it only stores the nested message type, iff the nested type is // either a direct child of the given descriptor, or the nested type is a -// decendent of the given descriptor and all the nodes between the +// descendant of the given descriptor and all the nodes between the // nested type and the given descriptor are group types. e.g. // // message Foo { diff --git a/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.h b/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.h index 6c9893fa..3c95cd6e 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.h +++ b/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.h @@ -39,14 +39,15 @@ #define GOOGLE_PROTOBUF_COMPILER_COMMAND_LINE_INTERFACE_H__ #include +#include #include #include #include +#include #include #include #include - #include namespace google { @@ -96,7 +97,7 @@ class DiskSourceTree; // importer.h // protoc --cpp_out=outdir --foo_out=outdir --proto_path=src src/foo.proto // // The .proto file to compile can be specified on the command line using either -// its physical file path, or a virtual path relative to a diretory specified +// its physical file path, or a virtual path relative to a directory specified // in --proto_path. For example, for src/foo.proto, the following two protoc // invocations work the same way: // 1. protoc --proto_path=src src/foo.proto (physical file path) @@ -153,7 +154,7 @@ class PROTOC_EXPORT CommandLineInterface { // The compiler determines the executable name to search for by concatenating // exe_name_prefix with the unrecognized flag name, removing "_out". So, for // example, if exe_name_prefix is "protoc-" and you pass the flag --foo_out, - // the compiler will try to run the program "protoc-foo". + // the compiler will try to run the program "protoc-gen-foo". // // The plugin program should implement the following usage: // plugin [--out=OUTDIR] [--parameter=PARAMETER] PROTO_FILES < DESCRIPTORS @@ -193,7 +194,7 @@ class PROTOC_EXPORT CommandLineInterface { // DEPRECATED. Calling this method has no effect. Protocol compiler now // always try to find the .proto file relative to the current directory // first and if the file is not found, it will then treat the input path - // as a virutal path. + // as a virtual path. void SetInputsAreProtoPathRelative(bool /* enable */) {} // Provides some text which will be printed when the --version flag is @@ -208,7 +209,7 @@ class PROTOC_EXPORT CommandLineInterface { class ErrorPrinter; class GeneratorContextImpl; class MemoryOutputStream; - typedef std::unordered_map + typedef std::unordered_map> GeneratorContextMap; // Clear state from previous Run(). @@ -225,6 +226,17 @@ class PROTOC_EXPORT CommandLineInterface { bool MakeInputsBeProtoPathRelative(DiskSourceTree* source_tree, DescriptorDatabase* fallback_database); + // Is this .proto file whitelisted, or do we have a command-line flag allowing + // us to use proto3 optional? This is a temporary control to avoid people from + // using proto3 optional until code generators have implemented it. + bool AllowProto3Optional(const FileDescriptor& file) const; + + // Fails if these files use proto3 optional and the code generator doesn't + // support it. This is a permanent check. + bool EnforceProto3OptionalSupport( + const std::string& codegen_name, uint64 supported_features, + const std::vector& parsed_files) const; + // Return status for ParseArguments() and InterpretArgument(). enum ParseArgumentStatus { @@ -268,11 +280,9 @@ class PROTOC_EXPORT CommandLineInterface { // Verify that all the input files exist in the given database. bool VerifyInputFilesInDescriptors(DescriptorDatabase* fallback_database); - // Loads descriptor_set_in into the provided database - bool PopulateSimpleDescriptorDatabase(SimpleDescriptorDatabase* database); - // Parses input_files_ into parsed_files bool ParseInputFiles(DescriptorPool* descriptor_pool, + DiskSourceTree* source_tree, std::vector* parsed_files); // Generate the given output file from the given input. @@ -371,21 +381,21 @@ class PROTOC_EXPORT CommandLineInterface { MODE_PRINT, // Print mode: print info of the given .proto files and exit. }; - Mode mode_; + Mode mode_ = MODE_COMPILE; enum PrintMode { PRINT_NONE, // Not in MODE_PRINT PRINT_FREE_FIELDS, // --print_free_fields }; - PrintMode print_mode_; + PrintMode print_mode_ = PRINT_NONE; enum ErrorFormat { ERROR_FORMAT_GCC, // GCC error output format (default). ERROR_FORMAT_MSVS // Visual Studio output (--error_format=msvs). }; - ErrorFormat error_format_; + ErrorFormat error_format_ = ERROR_FORMAT_GCC; std::vector > proto_path_; // Search path for proto files. @@ -394,7 +404,7 @@ class PROTOC_EXPORT CommandLineInterface { // Names of proto files which are allowed to be imported. Used by build // systems to enforce depend-on-what-you-import. std::set direct_dependencies_; - bool direct_dependencies_explicitly_set_; + bool direct_dependencies_explicitly_set_ = false; // If there's a violation of depend-on-what-you-import, this string will be // presented to the user. "%s" will be replaced with the violating import. @@ -433,10 +443,13 @@ class PROTOC_EXPORT CommandLineInterface { // True if --include_source_info was given, meaning that we should not strip // SourceCodeInfo from the DescriptorSet. - bool source_info_in_descriptor_set_; + bool source_info_in_descriptor_set_ = false; // Was the --disallow_services flag used? - bool disallow_services_; + bool disallow_services_ = false; + + // Was the --experimental_allow_proto3_optional flag used? + bool allow_proto3_optional_ = false; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CommandLineInterface); }; diff --git a/third_party/protobuf/src/google/protobuf/compiler/command_line_interface_unittest.cc b/third_party/protobuf/src/google/protobuf/compiler/command_line_interface_unittest.cc index 6ab5aff2..a51ad92d 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/command_line_interface_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/command_line_interface_unittest.cc @@ -45,22 +45,22 @@ #include #include #include +#include #include #include #include #include #include #include -#include +#include #include #include #include #include -#include - -#include #include #include +#include +#include #include @@ -143,6 +143,10 @@ class CommandLineInterfaceTest : public testing::Test { // substring. void ExpectErrorSubstring(const std::string& expected_substring); + // Checks that Run() returned zero and the stderr contains the given + // substring. + void ExpectWarningSubstring(const std::string& expected_substring); + // Checks that the captured stdout is the same as the expected_text. void ExpectCapturedStdout(const std::string& expected_text); @@ -201,6 +205,17 @@ class CommandLineInterfaceTest : public testing::Test { void ExpectFileContent(const std::string& filename, const std::string& content); + // The default code generators support all features. Use this to create a + // code generator that omits the given feature(s). + void CreateGeneratorWithMissingFeatures(const std::string& name, + const std::string& description, + uint64 features) { + MockCodeGenerator* generator = new MockCodeGenerator(name); + generator->SuppressFeatures(features); + mock_generators_to_delete_.push_back(generator); + cli_.RegisterGenerator(name, generator, description); + } + private: // The object we are testing. CommandLineInterface cli_; @@ -407,6 +422,12 @@ void CommandLineInterfaceTest::ExpectErrorSubstring( EXPECT_PRED_FORMAT2(testing::IsSubstring, expected_substring, error_text_); } +void CommandLineInterfaceTest::ExpectWarningSubstring( + const std::string& expected_substring) { + EXPECT_EQ(0, return_code_); + EXPECT_PRED_FORMAT2(testing::IsSubstring, expected_substring, error_text_); +} + #if defined(_WIN32) && !defined(__CYGWIN__) bool CommandLineInterfaceTest::HasAlternateErrorSubstring( const std::string& expected_substring) { @@ -650,6 +671,73 @@ TEST_F(CommandLineInterfaceTest, MultipleInputs_DescriptorSetIn) { "bar.proto", "Bar"); } +TEST_F(CommandLineInterfaceTest, MultipleInputs_UnusedImport_DescriptorSetIn) { + // Test unused import warning is not raised when descriptor_set_in is called + // and custom options are in unknown field instead of uninterpreted_options. + FileDescriptorSet file_descriptor_set; + + const FileDescriptor* descriptor_file = + FileDescriptorProto::descriptor()->file(); + descriptor_file->CopyTo(file_descriptor_set.add_file()); + + const FileDescriptor* custom_file = + protobuf_unittest::AggregateMessage::descriptor()->file(); + FileDescriptorProto* file_descriptor_proto = file_descriptor_set.add_file(); + custom_file->CopyTo(file_descriptor_proto); + file_descriptor_proto->set_name("custom_options.proto"); + // Add a custom message option. + FieldDescriptorProto* extension_option = + file_descriptor_proto->add_extension(); + extension_option->set_name("unknown_option"); + extension_option->set_extendee(".google.protobuf.MessageOptions"); + extension_option->set_number(1111); + extension_option->set_label(FieldDescriptorProto::LABEL_OPTIONAL); + extension_option->set_type(FieldDescriptorProto::TYPE_INT64); + + file_descriptor_proto = file_descriptor_set.add_file(); + file_descriptor_proto->set_name("import_custom_unknown_options.proto"); + file_descriptor_proto->add_dependency("custom_options.proto"); + // Add custom message option to unknown field. This custom option is + // not known in generated pool, thus option will be in unknown fields. + file_descriptor_proto->add_message_type()->set_name("Bar"); + file_descriptor_proto->mutable_message_type(0) + ->mutable_options() + ->mutable_unknown_fields() + ->AddVarint(1111, 2222); + + WriteDescriptorSet("foo.bin", &file_descriptor_set); + + Run("protocol_compiler --test_out=$tmpdir --plug_out=$tmpdir " + "--descriptor_set_in=$tmpdir/foo.bin " + "import_custom_unknown_options.proto"); + + // TODO(jieluo): Fix this test. This test case only happens when + // CommandLineInterface::Run() is used instead of invoke protoc combined + // with descriptor_set_in, and same custom options are defined in both + // generated pool and descriptor_set_in. There's no such uages for now but + // still need to be fixed. + /* + file_descriptor_proto = file_descriptor_set.add_file(); + file_descriptor_proto->set_name("import_custom_extension_options.proto"); + file_descriptor_proto->add_dependency("custom_options.proto"); + // Add custom message option to unknown field. This custom option is + // also defined in generated pool, thus option will be in extensions. + file_descriptor_proto->add_message_type()->set_name("Foo"); + file_descriptor_proto->mutable_message_type(0) + ->mutable_options() + ->mutable_unknown_fields() + ->AddVarint(protobuf_unittest::message_opt1.number(), 2222); + + WriteDescriptorSet("foo.bin", &file_descriptor_set); + + Run("protocol_compiler --test_out=$tmpdir --plug_out=$tmpdir " + "--descriptor_set_in=$tmpdir/foo.bin import_custom_unknown_options.proto " + "import_custom_extension_options.proto"); + */ + + ExpectNoErrors(); +} + TEST_F(CommandLineInterfaceTest, MultipleInputsWithImport) { // Test parsing multiple input files with an import of a separate file. @@ -836,6 +924,120 @@ TEST_F(CommandLineInterfaceTest, ExpectErrorSubstring("bar.proto: \"Baz\" is not defined."); } +TEST_F(CommandLineInterfaceTest, + InputsOnlyFromDescriptorSetIn_UnusedImportIsNotReported) { + FileDescriptorSet file_descriptor_set; + + FileDescriptorProto* file_descriptor_proto = file_descriptor_set.add_file(); + file_descriptor_proto->set_name("unused.proto"); + file_descriptor_proto->add_message_type()->set_name("Unused"); + + file_descriptor_proto = file_descriptor_set.add_file(); + file_descriptor_proto->set_name("bar.proto"); + file_descriptor_proto->add_dependency("unused.proto"); + file_descriptor_proto->add_message_type()->set_name("Bar"); + + WriteDescriptorSet("unused_and_bar.bin", &file_descriptor_set); + + Run("protocol_compiler --test_out=$tmpdir --plug_out=$tmpdir " + "--descriptor_set_in=$tmpdir/unused_and_bar.bin unused.proto bar.proto"); + ExpectNoErrors(); +} + +TEST_F(CommandLineInterfaceTest, + InputsFromDescriptorSetInAndFileSystem_UnusedImportIsReported) { + FileDescriptorSet file_descriptor_set; + + FileDescriptorProto* file_descriptor_proto = file_descriptor_set.add_file(); + file_descriptor_proto->set_name("unused.proto"); + file_descriptor_proto->add_message_type()->set_name("Unused"); + + file_descriptor_proto = file_descriptor_set.add_file(); + file_descriptor_proto->set_name("bar.proto"); + file_descriptor_proto->add_dependency("unused.proto"); + file_descriptor_proto->add_message_type()->set_name("Bar"); + + WriteDescriptorSet("unused_and_bar.bin", &file_descriptor_set); + + CreateTempFile("foo.proto", + "syntax = \"proto2\";\n" + "import \"bar.proto\";\n" + "message Foo {\n" + " optional Bar bar = 1;\n" + "}\n"); + + Run("protocol_compiler --test_out=$tmpdir --plug_out=$tmpdir " + "--descriptor_set_in=$tmpdir/unused_and_bar.bin " + "--proto_path=$tmpdir unused.proto bar.proto foo.proto"); + // Reporting unused imports here is unfair, since it's unactionable. Notice + // the lack of a line number. + // TODO(b/144853061): If the file with unused import is from the descriptor + // set and not from the file system, suppress the warning. + ExpectWarningSubstring("bar.proto: warning: Import unused.proto is unused."); +} + +TEST_F(CommandLineInterfaceTest, + OnlyReportsUnusedImportsForFilesBeingGenerated) { + CreateTempFile("unused.proto", + "syntax = \"proto2\";\n" + "message Unused {}\n"); + CreateTempFile("bar.proto", + "syntax = \"proto2\";\n" + "import \"unused.proto\";\n" + "message Bar {}\n"); + CreateTempFile("foo.proto", + "syntax = \"proto2\";\n" + "import \"bar.proto\";\n" + "message Foo {\n" + " optional Bar bar = 1;\n" + "}\n"); + + Run("protocol_compiler --test_out=$tmpdir " + "--proto_path=$tmpdir foo.proto"); + ExpectNoErrors(); +} + +TEST_F(CommandLineInterfaceTest, ReportsTransitiveMisingImports_LeafFirst) { + CreateTempFile("unused.proto", + "syntax = \"proto2\";\n" + "message Unused {}\n"); + CreateTempFile("bar.proto", + "syntax = \"proto2\";\n" + "import \"unused.proto\";\n" + "message Bar {}\n"); + CreateTempFile("foo.proto", + "syntax = \"proto2\";\n" + "import \"bar.proto\";\n" + "message Foo {\n" + " optional Bar bar = 1;\n" + "}\n"); + + Run("protocol_compiler --test_out=$tmpdir " + "--proto_path=$tmpdir bar.proto foo.proto"); + ExpectWarningSubstring( + "bar.proto:2:1: warning: Import unused.proto is unused."); +} + +TEST_F(CommandLineInterfaceTest, ReportsTransitiveMisingImports_LeafLast) { + CreateTempFile("unused.proto", + "syntax = \"proto2\";\n" + "message Unused {}\n"); + CreateTempFile("bar.proto", + "syntax = \"proto2\";\n" + "import \"unused.proto\";\n" + "message Bar {}\n"); + CreateTempFile("foo.proto", + "syntax = \"proto2\";\n" + "import \"bar.proto\";\n" + "message Foo {\n" + " optional Bar bar = 1;\n" + "}\n"); + + Run("protocol_compiler --test_out=$tmpdir " + "--proto_path=$tmpdir foo.proto bar.proto"); + ExpectWarningSubstring( + "bar.proto:2:1: warning: Import unused.proto is unused."); +} TEST_F(CommandLineInterfaceTest, CreateDirectory) { // Test that when we output to a sub-directory, it is created. @@ -934,7 +1136,7 @@ TEST_F(CommandLineInterfaceTest, UnrecognizedExtraParameters) { } TEST_F(CommandLineInterfaceTest, ExtraPluginParametersForOutParameters) { - // This doesn't rely on the plugin having been registred and instead that + // This doesn't rely on the plugin having been registered and instead that // the existence of --[name]_out is enough to make the --[name]_opt valid. // However, running out of process plugins found via the search path (i.e. - // not pre registered with --plugin) isn't support in this test suite, so we @@ -1638,7 +1840,9 @@ TEST_F(CommandLineInterfaceTest, InputNotFoundError) { Run("protocol_compiler --test_out=$tmpdir " "--proto_path=$tmpdir foo.proto"); - ExpectErrorText("foo.proto: No such file or directory\n"); + ExpectErrorText( + "Could not make proto path relative: foo.proto: No such file or " + "directory\n"); } TEST_F(CommandLineInterfaceTest, InputNotFoundError_DescriptorSetIn) { @@ -1657,7 +1861,9 @@ TEST_F(CommandLineInterfaceTest, CwdRelativeInputNotFoundError) { Run("protocol_compiler --test_out=$tmpdir " "--proto_path=$tmpdir $tmpdir/foo.proto"); - ExpectErrorText("$tmpdir/foo.proto: No such file or directory\n"); + ExpectErrorText( + "Could not make proto path relative: $tmpdir/foo.proto: No such file or " + "directory\n"); } TEST_F(CommandLineInterfaceTest, CwdRelativeInputNotMappedError) { @@ -1694,7 +1900,9 @@ TEST_F(CommandLineInterfaceTest, CwdRelativeInputNotFoundAndNotMappedError) { Run("protocol_compiler --test_out=$tmpdir " "--proto_path=$tmpdir/bar $tmpdir/foo.proto"); - ExpectErrorText("$tmpdir/foo.proto: No such file or directory\n"); + ExpectErrorText( + "Could not make proto path relative: $tmpdir/foo.proto: No such file or " + "directory\n"); } TEST_F(CommandLineInterfaceTest, CwdRelativeInputShadowedError) { @@ -1727,7 +1935,8 @@ TEST_F(CommandLineInterfaceTest, ProtoPathNotFoundError) { ExpectErrorText( "$tmpdir/foo: warning: directory does not exist.\n" - "foo.proto: No such file or directory\n"); + "Could not make proto path relative: foo.proto: No such file or " + "directory\n"); } TEST_F(CommandLineInterfaceTest, ProtoPathAndDescriptorSetIn) { @@ -2023,6 +2232,10 @@ TEST_F(CommandLineInterfaceTest, GeneratorPluginNotFound) { // Error written to stdout by child process after exec() fails. ExpectErrorSubstring("no_such_file: program not found or is not executable"); + ExpectErrorSubstring( + "Please specify a program using absolute path or make sure " + "the program is available in your PATH system variable"); + // Error written by parent process when child fails. ExpectErrorSubstring( "--badplug_out: prefix-gen-badplug: Plugin failed with status code 1."); @@ -2159,6 +2372,78 @@ TEST_F(CommandLineInterfaceTest, MissingValueAtEndError) { ExpectErrorText("Missing value for flag: --test_out\n"); } +TEST_F(CommandLineInterfaceTest, Proto3OptionalDisallowed) { + CreateTempFile("foo.proto", + "syntax = \"proto3\";\n" + "message Foo {\n" + " optional int32 i = 1;\n" + "}\n"); + + Run("protocol_compiler --proto_path=$tmpdir foo.proto -odescriptor.pb"); + + ExpectErrorSubstring("--experimental_allow_proto3_optional was not set"); +} + +TEST_F(CommandLineInterfaceTest, Proto3OptionalDisallowedDescriptor) { + CreateTempFile("foo.proto", + "syntax = \"proto3\";\n" + "message Foo {\n" + " optional int32 i = 1;\n" + "}\n"); + + Run("protocol_compiler --experimental_allow_proto3_optional " + "--proto_path=$tmpdir foo.proto " + " -o$tmpdir/descriptor.pb"); + ExpectNoErrors(); + + Run("protocol_compiler --descriptor_set_in=$tmpdir/descriptor.pb foo.proto " + "--test_out=$tmpdir"); + ExpectErrorSubstring("--experimental_allow_proto3_optional was not set"); +} + +TEST_F(CommandLineInterfaceTest, Proto3OptionalDisallowedGenCode) { + CreateTempFile("foo.proto", + "syntax = \"proto3\";\n" + "message Foo {\n" + " optional int32 i = 1;\n" + "}\n"); + + Run("protocol_compiler --proto_path=$tmpdir foo.proto --test_out=$tmpdir"); + + ExpectErrorSubstring("--experimental_allow_proto3_optional was not set"); +} + +TEST_F(CommandLineInterfaceTest, Proto3OptionalDisallowedNoCodegenSupport) { + CreateTempFile("foo.proto", + "syntax = \"proto3\";\n" + "message Foo {\n" + " optional int32 i = 1;\n" + "}\n"); + + CreateGeneratorWithMissingFeatures("--no_proto3_optional_out", + "Doesn't support proto3 optional", + CodeGenerator::FEATURE_PROTO3_OPTIONAL); + + Run("protocol_compiler --experimental_allow_proto3_optional " + "--proto_path=$tmpdir foo.proto --no_proto3_optional_out=$tmpdir"); + + ExpectErrorSubstring( + "code generator --no_proto3_optional_out hasn't been updated to support " + "optional fields in proto3"); +} + +TEST_F(CommandLineInterfaceTest, Proto3OptionalAllowWithFlag) { + CreateTempFile("foo.proto", + "syntax = \"proto3\";\n" + "message Foo {\n" + " optional int32 i = 1;\n" + "}\n"); + + Run("protocol_compiler --experimental_allow_proto3_optional " + "--proto_path=$tmpdir foo.proto --test_out=$tmpdir"); + ExpectNoErrors(); +} + TEST_F(CommandLineInterfaceTest, PrintFreeFieldNumbers) { CreateTempFile("foo.proto", "syntax = \"proto2\";\n" @@ -2335,6 +2620,11 @@ class EncodeDecodeTest : public testing::TestWithParam { EXPECT_EQ(StripCR(expected_text), StripCR(captured_stderr_)); } + void ExpectStderrContainsText(const std::string& expected_text) { + EXPECT_NE(StripCR(captured_stderr_).find(StripCR(expected_text)), + std::string::npos); + } + private: void WriteUnittestProtoDescriptorSet() { unittest_proto_descriptor_set_filename_ = @@ -2425,7 +2715,7 @@ TEST_P(EncodeDecodeTest, ProtoParseError) { Run("net/proto2/internal/no_such_file.proto " "--encode=NoSuchType")); ExpectStdoutMatchesText(""); - ExpectStderrMatchesText( + ExpectStderrContainsText( "net/proto2/internal/no_such_file.proto: No such file or directory\n"); } diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc index debd9a06..31fe5a68 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc @@ -44,6 +44,8 @@ #include +#include +#include #include #include #include @@ -51,15 +53,12 @@ #include #include #include +#include +#include #include #include #include -#include -#include -#include -#include - namespace google { namespace protobuf { namespace compiler { @@ -77,23 +76,20 @@ class MockErrorCollector : public MultiFileErrorCollector { // implements ErrorCollector --------------------------------------- void AddError(const std::string& filename, int line, int column, const std::string& message) { - strings::SubstituteAndAppend(&text_, "$0:$1:$2: $3\n", filename, line, - column, message); + strings::SubstituteAndAppend(&text_, "$0:$1:$2: $3\n", filename, line, column, + message); } }; class MockGeneratorContext : public GeneratorContext { public: - MockGeneratorContext() {} - ~MockGeneratorContext() { STLDeleteValues(&files_); } - void ExpectFileMatches(const std::string& virtual_filename, const std::string& physical_filename) { - std::string* expected_contents = - FindPtrOrNull(files_, virtual_filename); - ASSERT_TRUE(expected_contents != NULL) + auto it = files_.find(virtual_filename); + ASSERT_TRUE(it != files_.end()) << "Generator failed to generate file: " << virtual_filename; + std::string expected_contents = *it->second; std::string actual_contents; GOOGLE_CHECK_OK( File::GetContents(TestUtil::TestSourceDir() + "/" + physical_filename, @@ -102,13 +98,13 @@ class MockGeneratorContext : public GeneratorContext { CleanStringLineEndings(&actual_contents, false); #ifdef WRITE_FILES // Define to debug mismatched files. - GOOGLE_CHECK_OK(File::SetContents("/tmp/expected.cc", *expected_contents, + GOOGLE_CHECK_OK(File::SetContents("/tmp/expected.cc", expected_contents, true)); GOOGLE_CHECK_OK( File::SetContents("/tmp/actual.cc", actual_contents, true)); #endif - ASSERT_EQ(*expected_contents, actual_contents) + ASSERT_EQ(expected_contents, actual_contents) << physical_filename << " needs to be regenerated. Please run " "generate_descriptor_proto.sh. " @@ -118,15 +114,13 @@ class MockGeneratorContext : public GeneratorContext { // implements GeneratorContext -------------------------------------- virtual io::ZeroCopyOutputStream* Open(const std::string& filename) { - std::string** map_slot = &files_[filename]; - delete *map_slot; - *map_slot = new std::string; - - return new io::StringOutputStream(*map_slot); + auto& map_slot = files_[filename]; + map_slot.reset(new std::string); + return new io::StringOutputStream(map_slot.get()); } private: - std::map files_; + std::map> files_; }; const char kDescriptorParameter[] = "dllexport_decl=PROTOBUF_EXPORT"; @@ -163,7 +157,8 @@ TEST(BootstrapTest, GeneratedFilesMatch) { const FileDescriptor* file = importer.Import(file_parameter[0] + std::string(".proto")); ASSERT_TRUE(file != nullptr) - << "Can't import file " << file_parameter[0] + string(".proto") << "\n"; + << "Can't import file " << file_parameter[0] + std::string(".proto") + << "\n"; EXPECT_EQ("", error_collector.text_); CppGenerator generator; MockGeneratorContext context; @@ -183,6 +178,19 @@ TEST(BootstrapTest, GeneratedFilesMatch) { } } +// test Generate in cpp_generator.cc +TEST(BootstrapTest, OptionNotExist) { + cpp::CppGenerator generator; + DescriptorPool pool; + GeneratorContext* generator_context = nullptr; + std::string parameter = "aaa"; + std::string error; + ASSERT_FALSE(generator.Generate( + pool.FindFileByName("google/protobuf/descriptor.proto"), parameter, + generator_context, &error)); + EXPECT_EQ(error, "Unknown generator option: " + parameter); +} + } // namespace } // namespace cpp diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc index 5e2ac253..c0a03ad4 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc @@ -57,6 +57,17 @@ bool ShouldGenerateArraySize(const EnumDescriptor* descriptor) { } return max_value != kint32max; } + +// Returns the number of unique numeric enum values. This is less than +// descriptor->value_count() when there are aliased values. +int CountUniqueValues(const EnumDescriptor* descriptor) { + std::set values; + for (int i = 0; i < descriptor->value_count(); ++i) { + values.insert(descriptor->value(i)->number()); + } + return values.size(); +} + } // namespace EnumGenerator::EnumGenerator(const EnumDescriptor* descriptor, @@ -93,10 +104,8 @@ void EnumGenerator::GenerateDefinition(io::Printer* printer) { // 2147483648, and since 2147483648 can't fit in an integer, this produces a // compiler warning. This works around that issue. format_value.Set("number", Int32ToString(descriptor_->value(i)->number())); - format_value.Set( - "deprecation", - DeprecatedAttribute(options_, - descriptor_->value(i)->options().deprecated())); + format_value.Set("deprecation", + DeprecatedAttribute(options_, descriptor_->value(i))); if (i > 0) format_value(",\n"); format_value("${1$$prefix$$name$$}$ $deprecation$= $number$", @@ -143,25 +152,42 @@ void EnumGenerator::GenerateDefinition(io::Printer* printer) { format( "$dllexport_decl $const ::$proto_ns$::EnumDescriptor* " "$classname$_descriptor();\n"); - // The _Name and _Parse methods - // Support a stricter, type-checked enum-to-string method that - // statically checks whether the parameter is the exact enum type or is - // an integral type. + } + + // The _Name and _Parse functions. The lite implementation is table-based, so + // we make sure to keep the tables hidden in the .cc file. + if (!HasDescriptorMethods(descriptor_->file(), options_)) { + format("const std::string& $classname$_Name($classname$ value);\n"); + } + // The _Name() function accepts the enum type itself but also any integral + // type. + format( + "template\n" + "inline const std::string& $classname$_Name(T enum_t_value) {\n" + " static_assert(::std::is_same::value ||\n" + " ::std::is_integral::value,\n" + " \"Incorrect type passed to function $classname$_Name.\");\n"); + if (HasDescriptorMethods(descriptor_->file(), options_)) { format( - "template\n" - "inline const std::string& $classname$_Name(T enum_t_value) {\n" - " static_assert(::std::is_same::value ||\n" - " ::std::is_integral::value,\n" - " \"Incorrect type passed to function $classname$_Name.\");\n" " return ::$proto_ns$::internal::NameOfEnum(\n" - " $classname$_descriptor(), enum_t_value);\n" - "}\n"); + " $classname$_descriptor(), enum_t_value);\n"); + } else { + format( + " return $classname$_Name(static_cast<$classname$>(enum_t_value));\n"); + } + format("}\n"); + + if (HasDescriptorMethods(descriptor_->file(), options_)) { format( "inline bool $classname$_Parse(\n" " const std::string& name, $classname$* value) {\n" " return ::$proto_ns$::internal::ParseNamedEnum<$classname$>(\n" " $classname$_descriptor(), name, value);\n" "}\n"); + } else { + format( + "bool $classname$_Parse(\n" + " const std::string& name, $classname$* value);\n"); } } @@ -185,8 +211,8 @@ void EnumGenerator::GenerateSymbolImports(io::Printer* printer) const { format("typedef $classname$ $resolved_name$;\n"); for (int j = 0; j < descriptor_->value_count(); j++) { - std::string deprecated_attr = DeprecatedAttribute( - options_, descriptor_->value(j)->options().deprecated()); + std::string deprecated_attr = + DeprecatedAttribute(options_, descriptor_->value(j)); format( "$1$static constexpr $resolved_name$ ${2$$3$$}$ =\n" " $classname$_$3$;\n", @@ -216,24 +242,21 @@ void EnumGenerator::GenerateSymbolImports(io::Printer* printer) const { "$nested_name$_descriptor() {\n" " return $classname$_descriptor();\n" "}\n"); - // Support a stricter, type-checked enum-to-string method that - // statically checks whether the parameter is the exact enum type or is - // an integral type. - format( - "template\n" - "static inline const std::string& $nested_name$_Name(T enum_t_value) " - "{\n" - " static_assert(::std::is_same::value ||\n" - " ::std::is_integral::value,\n" - " \"Incorrect type passed to function $nested_name$_Name.\");\n" - " return $classname$_Name(enum_t_value);\n" - "}\n"); - format( - "static inline bool $nested_name$_Parse(const std::string& name,\n" - " $resolved_name$* value) {\n" - " return $classname$_Parse(name, value);\n" - "}\n"); } + + format( + "template\n" + "static inline const std::string& $nested_name$_Name(T enum_t_value) {\n" + " static_assert(::std::is_same::value ||\n" + " ::std::is_integral::value,\n" + " \"Incorrect type passed to function $nested_name$_Name.\");\n" + " return $classname$_Name(enum_t_value);\n" + "}\n"); + format( + "static inline bool $nested_name$_Parse(const std::string& name,\n" + " $resolved_name$* value) {\n" + " return $classname$_Parse(name, value);\n" + "}\n"); } void EnumGenerator::GenerateMethods(int idx, io::Printer* printer) { @@ -274,6 +297,104 @@ void EnumGenerator::GenerateMethods(int idx, io::Printer* printer) { "}\n" "\n"); + if (!HasDescriptorMethods(descriptor_->file(), options_)) { + // In lite mode (where descriptors are unavailable), we generate separate + // tables for mapping between enum names and numbers. The _entries table + // contains the bulk of the data and is sorted by name, while + // _entries_by_number is sorted by number and just contains pointers into + // _entries. The two tables allow mapping from name to number and number to + // name, both in time logarithmic in the number of enum entries. This could + // probably be made faster, but for now the tables are intended to be simple + // and compact. + // + // Enums with allow_alias = true support multiple entries with the same + // numerical value. In cases where there are multiple names for the same + // number, we treat the first name appearing in the .proto file as the + // canonical one. + std::map name_to_number; + std::map number_to_canonical_name; + for (int i = 0; i < descriptor_->value_count(); i++) { + const EnumValueDescriptor* value = descriptor_->value(i); + name_to_number.emplace(value->name(), value->number()); + // The same number may appear with multiple names, so we use emplace() to + // let the first name win. + number_to_canonical_name.emplace(value->number(), value->name()); + } + + format( + "static ::$proto_ns$::internal::ExplicitlyConstructed " + "$classname$_strings[$1$] = {};\n\n", + CountUniqueValues(descriptor_)); + + // We concatenate all the names for a given enum into one big string + // literal. If instead we store an array of string literals, the linker + // seems to put all enum strings for a given .proto file in the same + // section, which hinders its ability to strip out unused strings. + format("static const char $classname$_names[] ="); + for (const auto& p : name_to_number) { + format("\n \"$1$\"", p.first); + } + format(";\n\n"); + + format( + "static const ::$proto_ns$::internal::EnumEntry $classname$_entries[] " + "= {\n"); + int i = 0; + std::map number_to_index; + int data_index = 0; + for (const auto& p : name_to_number) { + format(" { {$classname$_names + $1$, $2$}, $3$ },\n", data_index, + p.first.size(), p.second); + if (number_to_canonical_name[p.second] == p.first) { + number_to_index.emplace(p.second, i); + } + ++i; + data_index += p.first.size(); + } + + format( + "};\n" + "\n" + "static const int $classname$_entries_by_number[] = {\n"); + for (const auto& p : number_to_index) { + format(" $1$, // $2$ -> $3$\n", p.second, p.first, + number_to_canonical_name[p.first]); + } + format( + "};\n" + "\n"); + + format( + "const std::string& $classname$_Name(\n" + " $classname$ value) {\n" + " static const bool dummy =\n" + " ::$proto_ns$::internal::InitializeEnumStrings(\n" + " $classname$_entries,\n" + " $classname$_entries_by_number,\n" + " $1$, $classname$_strings);\n" + " (void) dummy;\n" + " int idx = ::$proto_ns$::internal::LookUpEnumName(\n" + " $classname$_entries,\n" + " $classname$_entries_by_number,\n" + " $1$, value);\n" + " return idx == -1 ? ::$proto_ns$::internal::GetEmptyString() :\n" + " $classname$_strings[idx].get();\n" + "}\n", + CountUniqueValues(descriptor_)); + format( + "bool $classname$_Parse(\n" + " const std::string& name, $classname$* value) {\n" + " int int_value;\n" + " bool success = ::$proto_ns$::internal::LookUpEnumValue(\n" + " $classname$_entries, $1$, name, &int_value);\n" + " if (success) {\n" + " *value = static_cast<$classname$>(int_value);\n" + " }\n" + " return success;\n" + "}\n", + descriptor_->value_count()); + } + if (descriptor_->containing_type() != NULL) { std::string parent = ClassName(descriptor_->containing_type(), false); // Before C++17, we must define the static constants which were diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc index 10eed3df..7602e9fe 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc @@ -77,7 +77,11 @@ void EnumFieldGenerator::GenerateAccessorDeclarations( Formatter format(printer, variables_); format( "$deprecated_attr$$type$ ${1$$name$$}$() const;\n" - "$deprecated_attr$void ${1$set_$name$$}$($type$ value);\n", + "$deprecated_attr$void ${1$set_$name$$}$($type$ value);\n" + "private:\n" + "$type$ ${1$_internal_$name$$}$() const;\n" + "void ${1$_internal_set_$name$$}$($type$ value);\n" + "public:\n", descriptor_); } @@ -85,17 +89,25 @@ void EnumFieldGenerator::GenerateInlineAccessorDefinitions( io::Printer* printer) const { Formatter format(printer, variables_); format( - "inline $type$ $classname$::$name$() const {\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" + "inline $type$ $classname$::_internal_$name$() const {\n" " return static_cast< $type$ >($name$_);\n" "}\n" - "inline void $classname$::set_$name$($type$ value) {\n"); + "inline $type$ $classname$::$name$() const {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_get:$full_name$)\n" + " return _internal_$name$();\n" + "}\n" + "inline void $classname$::_internal_set_$name$($type$ value) {\n"); if (!HasPreservingUnknownEnumSemantics(descriptor_)) { format(" assert($type$_IsValid(value));\n"); } format( " $set_hasbit$\n" " $name$_ = value;\n" + "}\n" + "inline void $classname$::set_$name$($type$ value) {\n" + "$annotate_accessor$" + " _internal_set_$name$(value);\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n"); } @@ -107,7 +119,7 @@ void EnumFieldGenerator::GenerateClearingCode(io::Printer* printer) const { void EnumFieldGenerator::GenerateMergingCode(io::Printer* printer) const { Formatter format(printer, variables_); - format("set_$name$(from.$name$());\n"); + format("_internal_set_$name$(from._internal_$name$());\n"); } void EnumFieldGenerator::GenerateSwappingCode(io::Printer* printer) const { @@ -126,58 +138,22 @@ void EnumFieldGenerator::GenerateCopyConstructorCode( format("$name$_ = from.$name$_;\n"); } -void EnumFieldGenerator::GenerateMergeFromCodedStream( - io::Printer* printer) const { - Formatter format(printer, variables_); - format( - "int value = 0;\n" - "DO_((::$proto_ns$::internal::WireFormatLite::ReadPrimitive<\n" - " int, ::$proto_ns$::internal::WireFormatLite::TYPE_ENUM>(\n" - " input, &value)));\n"); - if (HasPreservingUnknownEnumSemantics(descriptor_)) { - format("set_$name$(static_cast< $type$ >(value));\n"); - } else { - format( - "if ($type$_IsValid(value)) {\n" - " set_$name$(static_cast< $type$ >(value));\n"); - if (UseUnknownFieldSet(descriptor_->file(), options_)) { - format( - "} else {\n" - " mutable_unknown_fields()->AddVarint(\n" - " $number$, static_cast<$uint64$>(value));\n"); - } else { - format( - "} else {\n" - " unknown_fields_stream.WriteVarint32($1$u);\n" - " unknown_fields_stream.WriteVarint32(\n" - " static_cast<$uint32$>(value));\n", - internal::WireFormat::MakeTag(descriptor_)); - } - format("}\n"); - } -} - -void EnumFieldGenerator::GenerateSerializeWithCachedSizes( - io::Printer* printer) const { - Formatter format(printer, variables_); - format( - "::$proto_ns$::internal::WireFormatLite::WriteEnum(\n" - " $number$, this->$name$(), output);\n"); -} - void EnumFieldGenerator::GenerateSerializeWithCachedSizesToArray( io::Printer* printer) const { Formatter format(printer, variables_); format( + "target = stream->EnsureSpace(target);\n" "target = ::$proto_ns$::internal::WireFormatLite::WriteEnumToArray(\n" - " $number$, this->$name$(), target);\n"); + " $number$, this->_internal_$name$(), target);\n"); } void EnumFieldGenerator::GenerateByteSize(io::Printer* printer) const { Formatter format(printer, variables_); format( "total_size += $tag_size$ +\n" - " ::$proto_ns$::internal::WireFormatLite::EnumSize(this->$name$());\n"); + " " + "::$proto_ns$::internal::WireFormatLite::EnumSize(this->_internal_$name$(" + "));\n"); } // =================================================================== @@ -194,24 +170,32 @@ void EnumOneofFieldGenerator::GenerateInlineAccessorDefinitions( io::Printer* printer) const { Formatter format(printer, variables_); format( - "inline $type$ $classname$::$name$() const {\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" - " if (has_$name$()) {\n" + "inline $type$ $classname$::_internal_$name$() const {\n" + " if (_internal_has_$name$()) {\n" " return static_cast< $type$ >($field_member$);\n" " }\n" " return static_cast< $type$ >($default$);\n" "}\n" - "inline void $classname$::set_$name$($type$ value) {\n"); + "inline $type$ $classname$::$name$() const {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_get:$full_name$)\n" + " return _internal_$name$();\n" + "}\n" + "inline void $classname$::_internal_set_$name$($type$ value) {\n"); if (!HasPreservingUnknownEnumSemantics(descriptor_)) { format(" assert($type$_IsValid(value));\n"); } format( - " if (!has_$name$()) {\n" + " if (!_internal_has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" " }\n" " $field_member$ = value;\n" + "}\n" + "inline void $classname$::set_$name$($type$ value) {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_set:$full_name$)\n" + " _internal_set_$name$(value);\n" "}\n"); } @@ -254,6 +238,12 @@ void RepeatedEnumFieldGenerator::GenerateAccessorDeclarations( io::Printer* printer) const { Formatter format(printer, variables_); format( + "private:\n" + "$type$ ${1$_internal_$name$$}$(int index) const;\n" + "void ${1$_internal_add_$name$$}$($type$ value);\n" + "::$proto_ns$::RepeatedField* " + "${1$_internal_mutable_$name$$}$();\n" + "public:\n" "$deprecated_attr$$type$ ${1$$name$$}$(int index) const;\n" "$deprecated_attr$void ${1$set_$name$$}$(int index, $type$ value);\n" "$deprecated_attr$void ${1$add_$name$$}$($type$ value);\n" @@ -268,11 +258,16 @@ void RepeatedEnumFieldGenerator::GenerateInlineAccessorDefinitions( io::Printer* printer) const { Formatter format(printer, variables_); format( - "inline $type$ $classname$::$name$(int index) const {\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" + "inline $type$ $classname$::_internal_$name$(int index) const {\n" " return static_cast< $type$ >($name$_.Get(index));\n" "}\n" - "inline void $classname$::set_$name$(int index, $type$ value) {\n"); + "inline $type$ $classname$::$name$(int index) const {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_get:$full_name$)\n" + " return _internal_$name$(index);\n" + "}\n" + "inline void $classname$::set_$name$(int index, $type$ value) {\n" + "$annotate_accessor$"); if (!HasPreservingUnknownEnumSemantics(descriptor_)) { format(" assert($type$_IsValid(value));\n"); } @@ -280,23 +275,33 @@ void RepeatedEnumFieldGenerator::GenerateInlineAccessorDefinitions( " $name$_.Set(index, value);\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n" - "inline void $classname$::add_$name$($type$ value) {\n"); + "inline void $classname$::_internal_add_$name$($type$ value) {\n"); if (!HasPreservingUnknownEnumSemantics(descriptor_)) { format(" assert($type$_IsValid(value));\n"); } format( " $name$_.Add(value);\n" + "}\n" + "inline void $classname$::add_$name$($type$ value) {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_add:$full_name$)\n" + " _internal_add_$name$(value);\n" "}\n" "inline const ::$proto_ns$::RepeatedField&\n" "$classname$::$name$() const {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_list:$full_name$)\n" " return $name$_;\n" "}\n" "inline ::$proto_ns$::RepeatedField*\n" - "$classname$::mutable_$name$() {\n" - " // @@protoc_insertion_point(field_mutable_list:$full_name$)\n" + "$classname$::_internal_mutable_$name$() {\n" " return &$name$_;\n" + "}\n" + "inline ::$proto_ns$::RepeatedField*\n" + "$classname$::mutable_$name$() {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_mutable_list:$full_name$)\n" + " return _internal_mutable_$name$();\n" "}\n"); } @@ -367,7 +372,7 @@ void RepeatedEnumFieldGenerator::GenerateMergeFromCodedStreamWithPacking( " $number$,\n" " nullptr,\n" " nullptr,\n" - " this->mutable_$name$())));\n"); + " this->_internal_mutable_$name$())));\n"); } else if (UseUnknownFieldSet(descriptor_->file(), options_)) { format( "DO_((::$proto_ns$::internal::WireFormat::" @@ -376,7 +381,7 @@ void RepeatedEnumFieldGenerator::GenerateMergeFromCodedStreamWithPacking( " $number$,\n" " $type$_IsValid,\n" " mutable_unknown_fields(),\n" - " this->mutable_$name$())));\n"); + " this->_internal_mutable_$name$())));\n"); } else { format( "DO_((::$proto_ns$::internal::" @@ -385,7 +390,7 @@ void RepeatedEnumFieldGenerator::GenerateMergeFromCodedStreamWithPacking( " $number$,\n" " $type$_IsValid,\n" " &unknown_fields_stream,\n" - " this->mutable_$name$())));\n"); + " this->_internal_mutable_$name$())));\n"); } } else { format( @@ -403,7 +408,7 @@ void RepeatedEnumFieldGenerator::GenerateMergeFromCodedStreamWithPacking( } else { format( " if ($type$_IsValid(value)) {\n" - " add_$name$(static_cast< $type$ >(value));\n" + " _internal_add_$name$(static_cast< $type$ >(value));\n" " } else {\n"); if (UseUnknownFieldSet(descriptor_->file(), options_)) { format( @@ -423,58 +428,27 @@ void RepeatedEnumFieldGenerator::GenerateMergeFromCodedStreamWithPacking( } } -void RepeatedEnumFieldGenerator::GenerateSerializeWithCachedSizes( - io::Printer* printer) const { - Formatter format(printer, variables_); - if (descriptor_->is_packed()) { - // Write the tag and the size. - format( - "if (this->$name$_size() > 0) {\n" - " ::$proto_ns$::internal::WireFormatLite::WriteTag(\n" - " $number$,\n" - " " - "::$proto_ns$::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,\n" - " output);\n" - " output->WriteVarint32(_$name$_cached_byte_size_.load(\n" - " std::memory_order_relaxed));\n" - "}\n"); - } - format("for (int i = 0, n = this->$name$_size(); i < n; i++) {\n"); - if (descriptor_->is_packed()) { - format( - " ::$proto_ns$::internal::WireFormatLite::WriteEnumNoTag(\n" - " this->$name$(i), output);\n"); - } else { - format( - " ::$proto_ns$::internal::WireFormatLite::WriteEnum(\n" - " $number$, this->$name$(i), output);\n"); - } - format("}\n"); -} - void RepeatedEnumFieldGenerator::GenerateSerializeWithCachedSizesToArray( io::Printer* printer) const { Formatter format(printer, variables_); if (descriptor_->is_packed()) { // Write the tag and the size. format( - "if (this->$name$_size() > 0) {\n" - " target = ::$proto_ns$::internal::WireFormatLite::WriteTagToArray(\n" - " $number$,\n" - " " - "::$proto_ns$::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,\n" - " target);\n" - " target = ::$proto_ns$::io::CodedOutputStream::WriteVarint32ToArray(" - " _$name$_cached_byte_size_.load(std::memory_order_relaxed),\n" - " target);\n" - " target = " - "::$proto_ns$::internal::WireFormatLite::WriteEnumNoTagToArray(\n" - " this->$name$_, target);\n" + "{\n" + " int byte_size = " + "_$name$_cached_byte_size_.load(std::memory_order_relaxed);\n" + " if (byte_size > 0) {\n" + " target = stream->WriteEnumPacked(\n" + " $number$, $name$_, byte_size, target);\n" + " }\n" "}\n"); } else { format( - "target = ::$proto_ns$::internal::WireFormatLite::WriteEnumToArray(\n" - " $number$, this->$name$_, target);\n"); + "for (int i = 0, n = this->_internal_$name$_size(); i < n; i++) {\n" + " target = stream->EnsureSpace(target);\n" + " target = ::$proto_ns$::internal::WireFormatLite::WriteEnumToArray(\n" + " $number$, this->_internal_$name$(i), target);\n" + "}\n"); } } @@ -483,12 +457,13 @@ void RepeatedEnumFieldGenerator::GenerateByteSize(io::Printer* printer) const { format( "{\n" " size_t data_size = 0;\n" - " unsigned int count = static_cast(this->$name$_size());"); + " unsigned int count = static_cast(this->_internal_$name$_size());"); format.Indent(); format( "for (unsigned int i = 0; i < count; i++) {\n" " data_size += ::$proto_ns$::internal::WireFormatLite::EnumSize(\n" - " this->$name$(static_cast(i)));\n" + " this->_internal_$name$(static_cast(i)));\n" "}\n"); if (descriptor_->is_packed()) { diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h index b43d402b..3b97608e 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h @@ -58,8 +58,6 @@ class EnumFieldGenerator : public FieldGenerator { void GenerateSwappingCode(io::Printer* printer) const; void GenerateConstructorCode(io::Printer* printer) const; void GenerateCopyConstructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; void GenerateByteSize(io::Printer* printer) const; @@ -100,7 +98,6 @@ class RepeatedEnumFieldGenerator : public FieldGenerator { void GenerateCopyConstructorCode(io::Printer* printer) const {} void GenerateMergeFromCodedStream(io::Printer* printer) const; void GenerateMergeFromCodedStreamWithPacking(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; void GenerateByteSize(io::Printer* printer) const; diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc index 97be5e64..06da3f37 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc @@ -39,8 +39,6 @@ #include #include - - namespace google { namespace protobuf { namespace compiler { @@ -96,7 +94,7 @@ ExtensionGenerator::ExtensionGenerator(const FieldDescriptor* descriptor, variables_["constant_name"] = FieldConstantName(descriptor_); variables_["field_type"] = StrCat(static_cast(descriptor_->type())); - variables_["packed"] = descriptor_->options().packed() ? "true" : "false"; + variables_["packed"] = descriptor_->is_packed() ? "true" : "false"; std::string scope = IsScoped() ? ClassName(descriptor_->extension_scope(), false) + "::" : ""; @@ -159,6 +157,11 @@ void ExtensionGenerator::GenerateDefinition(io::Printer* printer) { StringReplace(variables_["scoped_name"], "::", "_", true) + "_default"; format("const std::string $1$($2$);\n", default_str, DefaultValue(options_, descriptor_)); + } else if (descriptor_->message_type()) { + // We have to initialize the default instance for extensions at registration + // time. + default_str = + FieldMessageTypeName(descriptor_, options_) + "::default_instance()"; } else { default_str = DefaultValue(options_, descriptor_); } diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc index 411136f3..f95e14e5 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc @@ -38,7 +38,6 @@ #include #include #include - #include #include #include @@ -70,17 +69,17 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor, (*variables)["tag_size"] = StrCat( WireFormat::TagSize(descriptor->number(), descriptor->type())); - (*variables)["deprecated_attr"] = - DeprecatedAttribute(options, descriptor->options().deprecated()); + (*variables)["deprecated_attr"] = DeprecatedAttribute(options, descriptor); (*variables)["set_hasbit"] = ""; (*variables)["clear_hasbit"] = ""; - if (HasFieldPresence(descriptor->file())) { + if (HasHasbit(descriptor)) { (*variables)["set_hasbit_io"] = - "HasBitSetters::set_has_" + FieldName(descriptor) + "(&_has_bits_);"; + "_Internal::set_has_" + FieldName(descriptor) + "(&_has_bits_);"; } else { (*variables)["set_hasbit_io"] = ""; } + (*variables)["annotate_accessor"] = ""; // These variables are placeholders to pick out the beginning and ends of // identifiers for annotations (when doing so with existing variables would @@ -91,7 +90,8 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor, } void FieldGenerator::SetHasBitIndex(int32 has_bit_index) { - if (!HasFieldPresence(descriptor_->file()) || has_bit_index == -1) { + if (!HasHasbit(descriptor_)) { + GOOGLE_CHECK_EQ(has_bit_index, -1); return; } variables_["set_hasbit"] = StrCat( @@ -113,17 +113,6 @@ void SetCommonOneofFieldVariables( FieldGenerator::~FieldGenerator() {} -void FieldGenerator::GenerateMergeFromCodedStreamWithPacking( - io::Printer* printer) const { - // Reaching here indicates a bug. Cases are: - // - This FieldGenerator should support packing, but this method should be - // overridden. - // - This FieldGenerator doesn't support packing, and this method should - // never have been called. - GOOGLE_LOG(FATAL) << "GenerateMergeFromCodedStreamWithPacking() " - << "called on field generator that does not support packing."; -} - FieldGeneratorMap::FieldGeneratorMap(const Descriptor* descriptor, const Options& options, MessageSCCAnalyzer* scc_analyzer) @@ -167,7 +156,7 @@ FieldGenerator* FieldGeneratorMap::MakeGenerator( default: return new RepeatedPrimitiveFieldGenerator(field, options); } - } else if (field->containing_oneof()) { + } else if (field->real_containing_oneof()) { switch (field->cpp_type()) { case FieldDescriptor::CPPTYPE_MESSAGE: return new MessageOneofFieldGenerator(field, options, scc_analyzer); diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h index c66bddc4..aef9aaf3 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h @@ -74,7 +74,8 @@ class FieldGenerator { const Options& options) : descriptor_(descriptor), options_(options) {} virtual ~FieldGenerator(); - + virtual void GenerateSerializeWithCachedSizes( + io::Printer* printer) const final{}; // Generate lines of code declaring members fields of the message class // needed to represent this field. These are placed inside the message // class. @@ -167,23 +168,6 @@ class FieldGenerator { virtual void GenerateDefaultInstanceAllocator( io::Printer* /*printer*/) const {} - // Generate lines to decode this field, which will be placed inside the - // message's MergeFromCodedStream() method. - virtual void GenerateMergeFromCodedStream(io::Printer* printer) const = 0; - - // Returns true if this field's "MergeFromCodedStream" code needs the arena - // to be defined as a variable. - virtual bool MergeFromCodedStreamNeedsArena() const { return false; } - - // Generate lines to decode this field from a packed value, which will be - // placed inside the message's MergeFromCodedStream() method. - virtual void GenerateMergeFromCodedStreamWithPacking( - io::Printer* printer) const; - - // Generate lines to serialize this field, which are placed within the - // message's SerializeWithCachedSizes() method. - virtual void GenerateSerializeWithCachedSizes(io::Printer* printer) const = 0; - // Generate lines to serialize this field directly to the array "target", // which are placed within the message's SerializeWithCachedSizesToArray() // method. This must also advance "target" past the written bytes. diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc index 08b9f288..e2961e50 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc @@ -33,9 +33,12 @@ // Sanjay Ghemawat, Jeff Dean, and others. #include + +#include #include #include #include +#include #include #include @@ -49,8 +52,6 @@ #include #include - - #include namespace google { @@ -395,10 +396,6 @@ void FileGenerator::GenerateSourceIncludes(io::Printer* printer) { "\n", CreateHeaderInclude(target_basename, file_)); - if (options_.opensource_runtime) { - DoIncludeFile("net/proto2/public/stubs/common.h", false, printer); - } - IncludeFile("net/proto2/io/public/coded_stream.h", printer); // TODO(gerbens) This is to include parse_context.h, we need a better way IncludeFile("net/proto2/public/extension_set.h", printer); @@ -415,11 +412,6 @@ void FileGenerator::GenerateSourceIncludes(io::Printer* printer) { IncludeFile("net/proto2/public/reflection_ops.h", printer); IncludeFile("net/proto2/public/wire_format.h", printer); } - if (IsProto2MessageSetFile(file_, options_)) { - format( - // Implementation of proto1 MessageSet API methods. - "#include \"net/proto2/bridge/internal/message_set_util.h\"\n"); - } if (options_.proto_h) { // Use the smaller .proto.h files. @@ -442,17 +434,22 @@ void FileGenerator::GenerateSourceIncludes(io::Printer* printer) { void FileGenerator::GenerateSourceDefaultInstance(int idx, io::Printer* printer) { Formatter format(printer, variables_); + MessageGenerator* generator = message_generators_[idx].get(); format( "class $1$ {\n" " public:\n" " ::$proto_ns$::internal::ExplicitlyConstructed<$2$> _instance;\n", - DefaultInstanceType(message_generators_[idx]->descriptor_, options_), - message_generators_[idx]->classname_); + DefaultInstanceType(generator->descriptor_, options_), + generator->classname_); format.Indent(); - message_generators_[idx]->GenerateExtraDefaultFields(printer); + generator->GenerateExtraDefaultFields(printer); format.Outdent(); - format("} $1$;\n", - DefaultInstanceName(message_generators_[idx]->descriptor_, options_)); + format("} $1$;\n", DefaultInstanceName(generator->descriptor_, options_)); + if (options_.lite_implicit_weak_fields) { + format("$1$DefaultTypeInternal* $2$ = &$3$;\n", generator->classname_, + DefaultInstancePtr(generator->descriptor_, options_), + DefaultInstanceName(generator->descriptor_, options_)); + } } // A list of things defined in one .pb.cc file that we need to reference from @@ -515,19 +512,43 @@ void FileGenerator::GenerateInternalForwardDeclarations( } for (auto scc : Sorted(refs.weak_sccs)) { - format( - "extern __attribute__((weak)) ::$proto_ns$::internal::SCCInfo<$1$> " - "$2$;\n", - scc->children.size(), SccInfoSymbol(scc, options_)); + // We do things a little bit differently for proto1-style weak fields versus + // lite implicit weak fields, even though they are trying to accomplish + // similar things. We need to support implicit weak fields on iOS, and the + // Apple linker only supports weak definitions, not weak declarations. For + // that reason we need a pointer type which we can weakly define to be null. + // However, code size considerations prevent us from using the same approach + // for proto1-style weak fields. + if (options_.lite_implicit_weak_fields) { + format("extern ::$proto_ns$::internal::SCCInfo<$1$> $2$;\n", + scc->children.size(), SccInfoSymbol(scc, options_)); + format( + "__attribute__((weak)) ::$proto_ns$::internal::SCCInfo<$1$>*\n" + " $2$ = nullptr;\n", + scc->children.size(), SccInfoPtrSymbol(scc, options_)); + } else { + format( + "extern __attribute__((weak)) ::$proto_ns$::internal::SCCInfo<$1$> " + "$2$;\n", + scc->children.size(), SccInfoSymbol(scc, options_)); + } } { NamespaceOpener ns(format); for (auto instance : Sorted(refs.weak_default_instances)) { ns.ChangeTo(Namespace(instance, options_)); - format("extern __attribute__((weak)) $1$ $2$;\n", - DefaultInstanceType(instance, options_), - DefaultInstanceName(instance, options_)); + if (options_.lite_implicit_weak_fields) { + format("extern $1$ $2$;\n", DefaultInstanceType(instance, options_), + DefaultInstanceName(instance, options_)); + format("__attribute__((weak)) $1$* $2$ = nullptr;\n", + DefaultInstanceType(instance, options_), + DefaultInstancePtr(instance, options_)); + } else { + format("extern __attribute__((weak)) $1$ $2$;\n", + DefaultInstanceType(instance, options_), + DefaultInstanceName(instance, options_)); + } } } @@ -557,7 +578,8 @@ void FileGenerator::GenerateSourceForMessage(int idx, io::Printer* printer) { GenerateInternalForwardDeclarations(refs, printer); if (IsSCCRepresentative(message_generators_[idx]->descriptor_)) { - GenerateInitForSCC(GetSCC(message_generators_[idx]->descriptor_), printer); + GenerateInitForSCC(GetSCC(message_generators_[idx]->descriptor_), refs, + printer); } { // package namespace @@ -565,10 +587,6 @@ void FileGenerator::GenerateSourceForMessage(int idx, io::Printer* printer) { // Define default instances GenerateSourceDefaultInstance(idx, printer); - if (options_.lite_implicit_weak_fields) { - format("void $1$_ReferenceStrong() {}\n", - message_generators_[idx]->classname_); - } // Generate classes. format("\n"); @@ -639,10 +657,6 @@ void FileGenerator::GenerateSource(io::Printer* printer) { // Define default instances for (int i = 0; i < message_generators_.size(); i++) { GenerateSourceDefaultInstance(i, printer); - if (options_.lite_implicit_weak_fields) { - format("void $1$_ReferenceStrong() {}\n", - message_generators_[i]->classname_); - } } } @@ -651,7 +665,7 @@ void FileGenerator::GenerateSource(io::Printer* printer) { // Now generate the InitDefaults for each SCC. for (auto scc : sccs_) { - GenerateInitForSCC(scc, printer); + GenerateInitForSCC(scc, refs, printer); } if (HasDescriptorMethods(file_, options_)) { @@ -812,7 +826,8 @@ void FileGenerator::GenerateReflectionInitializationCode(io::Printer* printer) { // built into real descriptors at initialization time. const std::string protodef_name = UniqueName("descriptor_table_protodef", file_, options_); - format("const char $1$[] =\n", protodef_name); + format("const char $1$[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =\n", + protodef_name); format.Indent(); FileDescriptorProto file_proto; file_->CopyTo(&file_proto); @@ -879,27 +894,38 @@ void FileGenerator::GenerateReflectionInitializationCode(io::Printer* printer) { format("};\n"); // The DescriptorTable itself. + // Should be "bool eager = NeedsEagerDescriptorAssignment(file_, options_);" + // however this might cause a tsan failure in superroot b/148382879, + // so disable for now. + bool eager = false; format( "static ::$proto_ns$::internal::once_flag $desc_table$_once;\n" - "static bool $desc_table$_initialized = false;\n" "const ::$proto_ns$::internal::DescriptorTable $desc_table$ = {\n" - " &$desc_table$_initialized, $1$, \"$filename$\", $2$,\n" - " &$desc_table$_once, $desc_table$_sccs, $desc_table$_deps, $3$, $4$,\n" + " false, $1$, $2$, \"$filename$\", $3$,\n" + " &$desc_table$_once, $desc_table$_sccs, $desc_table$_deps, $4$, $5$,\n" " schemas, file_default_instances, $tablename$::offsets,\n" - " $file_level_metadata$, $5$, $file_level_enum_descriptors$, " + " $file_level_metadata$, $6$, $file_level_enum_descriptors$, " "$file_level_service_descriptors$,\n" "};\n\n", - protodef_name, file_data.size(), sccs_.size(), num_deps, - message_generators_.size()); + eager ? "true" : "false", protodef_name, file_data.size(), sccs_.size(), + num_deps, message_generators_.size()); - format( - "// Force running AddDescriptors() at dynamic initialization time.\n" - "static bool $1$ = (" - " ::$proto_ns$::internal::AddDescriptors(&$desc_table$), true);\n", - UniqueName("dynamic_init_dummy", file_, options_)); + // For descriptor.proto we want to avoid doing any dynamic initialization, + // because in some situations that would otherwise pull in a lot of + // unnecessary code that can't be stripped by --gc-sections. Descriptor + // initialization will still be performed lazily when it's needed. + if (file_->name() != "net/proto2/proto/descriptor.proto") { + format( + "// Force running AddDescriptors() at dynamic initialization time.\n" + "static bool $1$ = (static_cast(" + "::$proto_ns$::internal::AddDescriptors(&$desc_table$)), true);\n", + UniqueName("dynamic_init_dummy", file_, options_)); + } } -void FileGenerator::GenerateInitForSCC(const SCC* scc, io::Printer* printer) { +void FileGenerator::GenerateInitForSCC(const SCC* scc, + const CrossFileReferences& refs, + io::Printer* printer) { Formatter format(printer, variables_); // We use static and not anonymous namespace because symbol names are // substantially shorter. @@ -949,17 +975,46 @@ void FileGenerator::GenerateInitForSCC(const SCC* scc, io::Printer* printer) { format.Outdent(); format("}\n\n"); + // If we are using lite implicit weak fields then we need to distinguish + // between regular SCC dependencies and ones that we need to reference weakly + // through an extra pointer indirection. + std::vector regular_sccs; + std::vector implicit_weak_sccs; + for (const SCC* child : scc->children) { + if (options_.lite_implicit_weak_fields && + refs.weak_sccs.find(child) != refs.weak_sccs.end()) { + implicit_weak_sccs.push_back(child); + } else { + regular_sccs.push_back(child); + } + } + format( "$dllexport_decl $::$proto_ns$::internal::SCCInfo<$1$> $2$ =\n" " " "{{ATOMIC_VAR_INIT(::$proto_ns$::internal::SCCInfoBase::kUninitialized), " - "$1$, InitDefaults$2$}, {", + "$3$, $4$, InitDefaults$2$}, {", scc->children.size(), // 1 - SccInfoSymbol(scc, options_)); - for (const SCC* child : scc->children) { + SccInfoSymbol(scc, options_), regular_sccs.size(), + implicit_weak_sccs.size()); + for (const SCC* child : regular_sccs) { format("\n &$1$.base,", SccInfoSymbol(child, options_)); } + for (const SCC* child : implicit_weak_sccs) { + format( + "\n reinterpret_cast<::$proto_ns$::internal::SCCInfoBase**>(" + "\n &$1$),", + SccInfoPtrSymbol(child, options_)); + } format("}};\n\n"); + + if (options_.lite_implicit_weak_fields) { + format( + "$dllexport_decl $::$proto_ns$::internal::SCCInfo<$1$>*\n" + " $2$ = &$3$;\n\n", + scc->children.size(), SccInfoPtrSymbol(scc, options_), + SccInfoSymbol(scc, options_)); + } } void FileGenerator::GenerateTables(io::Printer* printer) { @@ -1095,9 +1150,6 @@ class FileGenerator::ForwardDeclarations { "$dllexport_decl $extern $3$ $4$;\n", class_desc, classname, DefaultInstanceType(class_desc, options), DefaultInstanceName(class_desc, options)); - if (options.lite_implicit_weak_fields) { - format("void $1$_ReferenceStrong();\n", classname); - } } } @@ -1132,7 +1184,7 @@ void FileGenerator::GenerateForwardDeclarations(io::Printer* printer) { FlattenMessagesInFile(file_, &classes); // All messages need forward decls. if (options_.proto_h) { // proto.h needs extra forward declarations. - // All classes / enums refered to as field members + // All classes / enums referred to as field members std::vector fields; ListAllFields(file_, &fields); for (int i = 0; i < fields.size(); i++) { @@ -1244,12 +1296,10 @@ void FileGenerator::GenerateLibraryIncludes(io::Printer* printer) { IncludeFile("net/proto2/public/generated_message_table_driven.h", printer); IncludeFile("net/proto2/public/generated_message_util.h", printer); IncludeFile("net/proto2/public/inlined_string_field.h", printer); + IncludeFile("net/proto2/public/metadata_lite.h", printer); if (HasDescriptorMethods(file_, options_)) { - IncludeFile("net/proto2/public/metadata.h", printer); IncludeFile("net/proto2/public/generated_message_reflection.h", printer); - } else { - IncludeFile("net/proto2/public/metadata_lite.h", printer); } if (!message_generators_.empty()) { @@ -1304,10 +1354,6 @@ void FileGenerator::GenerateLibraryIncludes(io::Printer* printer) { if (UseUnknownFieldSet(file_, options_) && !message_generators_.empty()) { IncludeFile("net/proto2/public/unknown_field_set.h", printer); } - - if (IsAnyMessage(file_, options_)) { - IncludeFile("net/proto2/internal/any.h", printer); - } } void FileGenerator::GenerateMetadataPragma(io::Printer* printer, diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h index 33734c54..da5e1dec 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h @@ -113,7 +113,8 @@ class FileGenerator { void GenerateSourceIncludes(io::Printer* printer); void GenerateSourceDefaultInstance(int idx, io::Printer* printer); - void GenerateInitForSCC(const SCC* scc, io::Printer* printer); + void GenerateInitForSCC(const SCC* scc, const CrossFileReferences& refs, + io::Printer* printer); void GenerateTables(io::Printer* printer); void GenerateReflectionInitializationCode(io::Printer* printer); @@ -147,7 +148,7 @@ class FileGenerator { // Generates extension identifiers. void GenerateExtensionIdentifiers(io::Printer* printer); - // Generates inline function defintions. + // Generates inline function definitions. void GenerateInlineFunctionDefinitions(io::Printer* printer); void GenerateProto2NamespaceEnumSpecializations(io::Printer* printer); diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc index 7de07652..2c45ca8f 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc @@ -45,8 +45,6 @@ #include #include - - namespace google { namespace protobuf { namespace compiler { @@ -95,6 +93,8 @@ bool CppGenerator::Generate(const FileDescriptor* file, file_options.annotation_guard_name = options[i].second; } else if (options[i].first == "speed") { file_options.enforce_mode = EnforceOptimizeMode::kSpeed; + } else if (options[i].first == "code_size") { + file_options.enforce_mode = EnforceOptimizeMode::kCodeSize; } else if (options[i].first == "lite") { file_options.enforce_mode = EnforceOptimizeMode::kLiteRuntime; } else if (options[i].first == "lite_implicit_weak_fields") { diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h index dafc6e60..85a5aab1 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h @@ -62,7 +62,7 @@ class PROTOC_EXPORT CppGenerator : public CodeGenerator { // Use the open-source runtime with google3 #include paths. We make these // absolute to avoid ambiguity, so the runtime will be #included like: - // #include "third_party/protobuf/<...>/google/protobuf/message.h" + // #include "third_party/protobuf/.../google/protobuf/message.h" kOpensourceGoogle3 }; @@ -81,7 +81,14 @@ class PROTOC_EXPORT CppGenerator : public CodeGenerator { // implements CodeGenerator ---------------------------------------- bool Generate(const FileDescriptor* file, const std::string& parameter, - GeneratorContext* generator_context, std::string* error) const; + GeneratorContext* generator_context, + std::string* error) const override; + + uint64 GetSupportedFeatures() const override { + // We don't fully support this yet, but this is needed to unblock the tests, + // and we will have full support before the experimental flag is removed. + return FEATURE_PROTO3_OPTIONAL; + } private: bool opensource_runtime_ = true; diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc index 6a32c564..976823af 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc @@ -43,17 +43,17 @@ #include #include +#include +#include #include - #include #include #include +#include #include #include #include #include - - #include #include @@ -204,6 +204,10 @@ void SetIntVar(const Options& options, const std::string& type, (*variables)[type] = IntTypeName(options, type); } +bool HasInternalAccessors(const FieldOptions::CType ctype) { + return ctype == FieldOptions::STRING || ctype == FieldOptions::CORD; +} + } // namespace void SetCommonVars(const Options& options, @@ -243,6 +247,31 @@ void SetCommonVars(const Options& options, (*variables)["string"] = "std::string"; } +void SetUnknkownFieldsVariable(const Descriptor* descriptor, + const Options& options, + std::map* variables) { + std::string proto_ns = ProtobufNamespace(options); + std::string unknown_fields_type; + if (UseUnknownFieldSet(descriptor->file(), options)) { + unknown_fields_type = "::" + proto_ns + "::UnknownFieldSet"; + (*variables)["unknown_fields"] = + "_internal_metadata_.unknown_fields<" + unknown_fields_type + ">(" + + unknown_fields_type + "::default_instance)"; + } else { + unknown_fields_type = + PrimitiveTypeName(options, FieldDescriptor::CPPTYPE_STRING); + (*variables)["unknown_fields"] = "_internal_metadata_.unknown_fields<" + + unknown_fields_type + ">(::" + proto_ns + + "::internal::GetEmptyString)"; + } + (*variables)["unknown_fields_type"] = unknown_fields_type; + (*variables)["have_unknown_fields"] = + "_internal_metadata_.have_unknown_fields()"; + (*variables)["mutable_unknown_fields"] = + "_internal_metadata_.mutable_unknown_fields<" + unknown_fields_type + + ">()"; +} + std::string UnderscoresToCamelCase(const std::string& input, bool cap_next_letter) { std::string result; @@ -333,6 +362,16 @@ std::string QualifiedClassName(const EnumDescriptor* d) { return QualifiedClassName(d, Options()); } +std::string QualifiedExtensionName(const FieldDescriptor* d, + const Options& options) { + GOOGLE_DCHECK(d->is_extension()); + return QualifiedFileLevelSymbol(d->file(), FieldName(d), options); +} + +std::string QualifiedExtensionName(const FieldDescriptor* d) { + return QualifiedExtensionName(d, Options()); +} + std::string Namespace(const std::string& package) { if (package.empty()) return ""; return "::" + DotsToColons(package); @@ -373,12 +412,22 @@ std::string DefaultInstanceName(const Descriptor* descriptor, return "_" + ClassName(descriptor, false) + "_default_instance_"; } +std::string DefaultInstancePtr(const Descriptor* descriptor, + const Options& options) { + return DefaultInstanceName(descriptor, options) + "ptr_"; +} + std::string QualifiedDefaultInstanceName(const Descriptor* descriptor, const Options& options) { return QualifiedFileLevelSymbol( descriptor->file(), DefaultInstanceName(descriptor, options), options); } +std::string QualifiedDefaultInstancePtr(const Descriptor* descriptor, + const Options& options) { + return QualifiedDefaultInstanceName(descriptor, options) + "ptr_"; +} + std::string DescriptorTableName(const FileDescriptor* file, const Options& options) { return UniqueName("descriptor_table", file, options); @@ -388,11 +437,6 @@ std::string FileDllExport(const FileDescriptor* file, const Options& options) { return UniqueName("PROTOBUF_INTERNAL_EXPORT", file, options); } -std::string ReferenceFunctionName(const Descriptor* descriptor, - const Options& options) { - return QualifiedClassName(descriptor, options) + "_ReferenceStrong"; -} - std::string SuperClassName(const Descriptor* descriptor, const Options& options) { return "::" + ProtobufNamespace(options) + @@ -400,7 +444,7 @@ std::string SuperClassName(const Descriptor* descriptor, : "::MessageLite"); } -std::string ResolveKeyword(const string& name) { +std::string ResolveKeyword(const std::string& name) { if (kKeywords.count(name) > 0) { return name + "_"; } @@ -659,7 +703,7 @@ std::string DefaultValue(const Options& options, const FieldDescriptor* field) { // If floating point value contains a period (.) or an exponent // (either E or e), then append suffix 'f' to make it a float // literal. - if (float_value.find_first_of(".eE") != string::npos) { + if (float_value.find_first_of(".eE") != std::string::npos) { float_value.push_back('f'); } return float_value; @@ -703,8 +747,8 @@ std::string FilenameIdentifier(const std::string& filename) { return result; } -string UniqueName(const std::string& name, const std::string& filename, - const Options& options) { +std::string UniqueName(const std::string& name, const std::string& filename, + const Options& options) { return name + "_" + FilenameIdentifier(filename); } @@ -751,10 +795,10 @@ bool IsStringInlined(const FieldDescriptor* descriptor, if (IsAnyMessage(descriptor->containing_type(), options)) return false; if (descriptor->containing_type()->options().map_entry()) return false; - // Limit to proto2, as we rely on has bits to distinguish field presence for - // release_$name$. On proto3, we cannot use the address of the string - // instance when the field has been inlined. - if (!HasFieldPresence(descriptor->file())) return false; + // We rely on has bits to distinguish field presence for release_$name$. When + // there is no hasbit, we cannot use the address of the string instance when + // the field has been inlined. + if (!HasHasbit(descriptor)) return false; if (options.access_info_map) { if (descriptor->is_required()) return true; @@ -977,12 +1021,6 @@ bool IsWellKnownMessage(const FileDescriptor* file) { return well_known_files.find(file->name()) != well_known_files.end(); } -enum Utf8CheckMode { - STRICT = 0, // Parsing will fail if non UTF-8 data is in string fields. - VERIFY = 1, // Only log an error but parsing will succeed. - NONE = 2, // No UTF-8 check. -}; - static bool FieldEnforceUtf8(const FieldDescriptor* field, const Options& options) { return true; @@ -994,8 +1032,8 @@ static bool FileUtf8Verification(const FileDescriptor* file, } // Which level of UTF-8 enforcemant is placed on this file. -static Utf8CheckMode GetUtf8CheckMode(const FieldDescriptor* field, - const Options& options) { +Utf8CheckMode GetUtf8CheckMode(const FieldDescriptor* field, + const Options& options) { if (field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 && FieldEnforceUtf8(field, options)) { return STRICT; @@ -1008,19 +1046,6 @@ static Utf8CheckMode GetUtf8CheckMode(const FieldDescriptor* field, } } -std::string GetUtf8Suffix(const FieldDescriptor* field, - const Options& options) { - switch (GetUtf8CheckMode(field, options)) { - case STRICT: - return "UTF8"; - case VERIFY: - return "UTF8Verify"; - case NONE: - default: // Some build configs warn on missing return without default. - return ""; - } -} - static void GenerateUtf8CheckCode(const FieldDescriptor* field, const Options& options, bool for_parse, const char* parameters, @@ -1125,8 +1150,8 @@ bool IsImplicitWeakField(const FieldDescriptor* field, const Options& options, MessageSCCAnalyzer* scc_analyzer) { return UsingImplicitWeakFields(field->file(), options) && field->type() == FieldDescriptor::TYPE_MESSAGE && - !field->is_required() && !field->is_map() && - field->containing_oneof() == nullptr && + !field->is_required() && !field->is_map() && !field->is_extension() && + !field->real_containing_oneof() && !IsWellKnownMessage(field->message_type()->file()) && field->message_type()->file()->name() != "net/proto2/proto/descriptor.proto" && @@ -1358,11 +1383,14 @@ class ParseLoopGenerator { format_.Set("GOOGLE_PROTOBUF", MacroPrefix(options_)); std::map vars; SetCommonVars(options_, &vars); + SetUnknkownFieldsVariable(descriptor, options_, &vars); format_.AddMap(vars); std::vector ordered_fields; for (auto field : FieldRange(descriptor)) { - ordered_fields.push_back(field); + if (IsFieldUsed(field, options_)) { + ordered_fields.push_back(field); + } } std::sort(ordered_fields.begin(), ordered_fields.end(), [](const FieldDescriptor* a, const FieldDescriptor* b) { @@ -1375,25 +1403,26 @@ class ParseLoopGenerator { "#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure\n"); format_.Indent(); int hasbits_size = 0; - if (HasFieldPresence(descriptor->file())) { + if (num_hasbits_ > 0) { hasbits_size = (num_hasbits_ + 31) / 32; } // For now only optimize small hasbits. if (hasbits_size != 1) hasbits_size = 0; if (hasbits_size) { - format_("HasBitSetters::HasBits has_bits{};\n"); + format_("_Internal::HasBits has_bits{};\n"); format_.Set("has_bits", "has_bits"); } else { format_.Set("has_bits", "_has_bits_"); } if (descriptor->file()->options().cc_enable_arenas()) { - format_("$p_ns$::Arena* arena = GetArenaNoVirtual(); (void)arena;\n"); + format_("$p_ns$::Arena* arena = GetArena(); (void)arena;\n"); } GenerateParseLoop(descriptor, ordered_fields); format_.Outdent(); format_("success:\n"); if (hasbits_size) format_(" _has_bits_.Or(has_bits);\n"); + format_( " return ptr;\n" "failure:\n" @@ -1412,17 +1441,11 @@ class ParseLoopGenerator { using WireFormat = internal::WireFormat; using WireFormatLite = internal::WireFormatLite; - void GenerateArenaString(const FieldDescriptor* field, - const std::string& utf8, std::string field_name) { - if (!field_name.empty()) { - format_("static const char kFieldName[] = $1$;\n", - field_name.substr(2)); // remove ", " - field_name = ", kFieldName"; + void GenerateArenaString(const FieldDescriptor* field) { + if (HasHasbit(field)) { + format_("_Internal::set_has_$1$(&$has_bits$);\n", FieldName(field)); } - if (HasFieldPresence(field->file())) { - format_("HasBitSetters::set_has_$1$(&$has_bits$);\n", FieldName(field)); - } - string default_string = + std::string default_string = field->default_value_string().empty() ? "::" + ProtobufNamespace(options_) + "::internal::GetEmptyStringAlreadyInited()" @@ -1430,28 +1453,17 @@ class ParseLoopGenerator { "::" + MakeDefaultName(field) + ".get()"; format_( "if (arena != nullptr) {\n" - " ptr = $pi_ns$::InlineCopyIntoArenaString$1$(&$2$_, ptr, ctx, " - " arena$3$);\n" + " ptr = ctx->ReadArenaString(ptr, &$1$_, arena);\n" "} else {\n" " ptr = " - "$pi_ns$::InlineGreedyStringParser$1$($2$_.MutableNoArenaNoDefault(&$4$" - "), ptr, ctx$3$);" - "\n}\n", - utf8, FieldName(field), field_name, default_string); + "$pi_ns$::InlineGreedyStringParser($1$_.MutableNoArenaNoDefault(&$2$" + "), ptr, ctx);" + "\n}\n" + "const std::string* str = &$1$_.Get(); (void)str;\n", + FieldName(field), default_string); } void GenerateStrings(const FieldDescriptor* field, bool check_utf8) { - std::string utf8; - std::string field_name; - if (check_utf8) { - utf8 = GetUtf8Suffix(field, options_); - if (!utf8.empty()) { - field_name = ", nullptr"; - if (HasDescriptorMethods(field->file(), options_)) { - field_name = StrCat(", \"", field->full_name(), "\""); - } - } - } FieldOptions::CType ctype = FieldOptions::STRING; if (!options_.opensource_runtime) { // Open source doesn't support other ctypes; @@ -1462,26 +1474,59 @@ class ParseLoopGenerator { GetOptimizeFor(field->file(), options_) != FileOptions::LITE_RUNTIME && // For now only use arena string for strings with empty defaults. field->default_value_string().empty() && - !IsStringInlined(field, options_) && - field->containing_oneof() == nullptr && ctype == FieldOptions::STRING) { - GenerateArenaString(field, utf8, field_name); - return; + !IsStringInlined(field, options_) && !field->real_containing_oneof() && + ctype == FieldOptions::STRING) { + GenerateArenaString(field); + } else { + std::string name; + switch (ctype) { + case FieldOptions::STRING: + name = "GreedyStringParser"; + break; + case FieldOptions::CORD: + name = "CordParser"; + break; + case FieldOptions::STRING_PIECE: + name = "StringPieceParser"; + break; + } + format_( + "auto str = $1$$2$_$3$();\n" + "ptr = $pi_ns$::Inline$4$(str, ptr, ctx);\n", + HasInternalAccessors(ctype) ? "_internal_" : "", + field->is_repeated() && !field->is_packable() ? "add" : "mutable", + FieldName(field), name); } - std::string name; - switch (ctype) { - case FieldOptions::STRING: - name = "GreedyStringParser" + utf8; + if (!check_utf8) return; // return if this is a bytes field + auto level = GetUtf8CheckMode(field, options_); + switch (level) { + case NONE: + return; + case VERIFY: + format_("#ifndef NDEBUG\n"); break; - case FieldOptions::CORD: - name = "CordParser" + utf8; - break; - case FieldOptions::STRING_PIECE: - name = "StringPieceParser" + utf8; + case STRICT: + format_("CHK_("); + break; + } + std::string field_name; + field_name = "nullptr"; + if (HasDescriptorMethods(field->file(), options_)) { + field_name = StrCat("\"", field->full_name(), "\""); + } + format_("$pi_ns$::VerifyUTF8(str, $1$)", field_name); + switch (level) { + case NONE: + return; + case VERIFY: + format_( + ";\n" + "#endif // !NDEBUG\n"); + break; + case STRICT: + format_(");\n"); break; } - format_("ptr = $pi_ns$::Inline$1$($2$_$3$(), ptr, ctx$4$);\n", name, - field->is_repeated() && !field->is_packable() ? "add" : "mutable", - FieldName(field), field_name); } void GenerateLengthDelim(const FieldDescriptor* field) { @@ -1489,13 +1534,23 @@ class ParseLoopGenerator { std::string enum_validator; if (field->type() == FieldDescriptor::TYPE_ENUM && !HasPreservingUnknownEnumSemantics(field)) { - enum_validator = StrCat( - ", ", QualifiedClassName(field->enum_type(), options_), - "_IsValid, mutable_unknown_fields(), ", field->number()); + enum_validator = + StrCat(", ", QualifiedClassName(field->enum_type(), options_), + "_IsValid, &_internal_metadata_, ", field->number()); + format_( + "ptr = " + "$pi_ns$::Packed$1$Parser<$unknown_fields_type$>(_internal_mutable_" + "$2$(), ptr, " + "ctx$3$);\n", + DeclaredTypeMethodName(field->type()), FieldName(field), + enum_validator); + } else { + format_( + "ptr = $pi_ns$::Packed$1$Parser(_internal_mutable_$2$(), ptr, " + "ctx$3$);\n", + DeclaredTypeMethodName(field->type()), FieldName(field), + enum_validator); } - format_("ptr = $pi_ns$::Packed$1$Parser(mutable_$2$(), ptr, ctx$3$);\n", - DeclaredTypeMethodName(field->type()), FieldName(field), - enum_validator); } else { auto field_type = field->type(); switch (field_type) { @@ -1510,10 +1565,12 @@ class ParseLoopGenerator { const FieldDescriptor* val = field->message_type()->FindFieldByName("value"); GOOGLE_CHECK(val); - if (HasFieldPresence(field->file()) && - val->type() == FieldDescriptor::TYPE_ENUM) { + if (val->type() == FieldDescriptor::TYPE_ENUM && + !HasPreservingUnknownEnumSemantics(field)) { format_( - "auto object = ::$proto_ns$::internal::InitEnumParseWrapper(" + "auto object = " + "::$proto_ns$::internal::InitEnumParseWrapper<$unknown_" + "fields_type$>(" "&$1$_, $2$_IsValid, $3$, &_internal_metadata_);\n" "ptr = ctx->ParseMessage(&object, ptr);\n", FieldName(field), QualifiedClassName(val->enum_type()), @@ -1523,20 +1580,19 @@ class ParseLoopGenerator { FieldName(field)); } } else if (IsLazy(field, options_)) { - if (field->containing_oneof() != nullptr) { + if (field->real_containing_oneof()) { format_( - "if (!has_$1$()) {\n" - " clear_$1$();\n" + "if (!_internal_has_$1$()) {\n" + " clear_$2$();\n" " $2$_.$1$_ = ::$proto_ns$::Arena::CreateMessage<\n" - " $pi_ns$::LazyField>(" - "GetArenaNoVirtual());\n" + " $pi_ns$::LazyField>(GetArena());\n" " set_has_$1$();\n" "}\n" "ptr = ctx->ParseMessage($2$_.$1$_, ptr);\n", FieldName(field), field->containing_oneof()->name()); - } else if (HasFieldPresence(field->file())) { + } else if (HasHasbit(field)) { format_( - "HasBitSetters::set_has_$1$(&$has_bits$);\n" + "_Internal::set_has_$1$(&$has_bits$);\n" "ptr = ctx->ParseMessage(&$1$_, ptr);\n", FieldName(field)); } else { @@ -1546,15 +1602,14 @@ class ParseLoopGenerator { } else if (IsImplicitWeakField(field, options_, scc_analyzer_)) { if (!field->is_repeated()) { format_( - "ptr = ctx->ParseMessage(HasBitSetters::mutable_$1$(this), " + "ptr = ctx->ParseMessage(_Internal::mutable_$1$(this), " "ptr);\n", FieldName(field)); } else { format_( - "ptr = ctx->ParseMessage(" - "CastToBase(&$1$_)->AddWeak(reinterpret_cast(&$2$::_$3$_default_instance_)), " - "ptr);\n", + "ptr = ctx->ParseMessage($1$_.AddWeak(reinterpret_cast($2$::_$3$_default_instance_ptr_)" + "), ptr);\n", FieldName(field), Namespace(field->message_type(), options_), ClassName(field->message_type())); } @@ -1564,7 +1619,7 @@ class ParseLoopGenerator { " _$classname$_default_instance_.$2$_), ptr);\n", field->number(), FieldName(field)); } else { - format_("ptr = ctx->ParseMessage($1$_$2$(), ptr);\n", + format_("ptr = ctx->ParseMessage(_internal_$1$_$2$(), ptr);\n", field->is_repeated() ? "add" : "mutable", FieldName(field)); } break; @@ -1601,14 +1656,15 @@ class ParseLoopGenerator { std::string prefix = field->is_repeated() ? "add" : "set"; if (field->type() == FieldDescriptor::TYPE_ENUM) { format_( - "$uint64$ val = $pi_ns$::ReadVarint(&ptr);\n" + "$uint64$ val = $pi_ns$::ReadVarint64(&ptr);\n" "CHK_(ptr);\n"); if (!HasPreservingUnknownEnumSemantics(field)) { format_("if (PROTOBUF_PREDICT_TRUE($1$_IsValid(val))) {\n", QualifiedClassName(field->enum_type(), options_)); format_.Indent(); } - format_("$1$_$2$(static_cast<$3$>(val));\n", prefix, FieldName(field), + format_("_internal_$1$_$2$(static_cast<$3$>(val));\n", prefix, + FieldName(field), QualifiedClassName(field->enum_type(), options_)); if (!HasPreservingUnknownEnumSemantics(field)) { format_.Outdent(); @@ -1619,27 +1675,30 @@ class ParseLoopGenerator { field->number()); } } else { - int size = field->type() == FieldDescriptor::TYPE_SINT32 ? 32 : 64; + std::string size = (field->type() == FieldDescriptor::TYPE_SINT32 || + field->type() == FieldDescriptor::TYPE_UINT32) + ? "32" + : "64"; std::string zigzag; if ((field->type() == FieldDescriptor::TYPE_SINT32 || field->type() == FieldDescriptor::TYPE_SINT64)) { - zigzag = StrCat("ZigZag", size); + zigzag = "ZigZag"; } - if (field->is_repeated() || field->containing_oneof()) { - string prefix = field->is_repeated() ? "add" : "set"; + if (field->is_repeated() || field->real_containing_oneof()) { + std::string prefix = field->is_repeated() ? "add" : "set"; format_( - "$1$_$2$($pi_ns$::ReadVarint$3$(&ptr));\n" + "_internal_$1$_$2$($pi_ns$::ReadVarint$3$$4$(&ptr));\n" "CHK_(ptr);\n", - prefix, FieldName(field), zigzag); + prefix, FieldName(field), zigzag, size); } else { - if (HasFieldPresence(field->file())) { - format_("HasBitSetters::set_has_$1$(&$has_bits$);\n", + if (HasHasbit(field)) { + format_("_Internal::set_has_$1$(&$has_bits$);\n", FieldName(field)); } format_( - "$1$_ = $pi_ns$::ReadVarint$2$(&ptr);\n" + "$1$_ = $pi_ns$::ReadVarint$2$$3$(&ptr);\n" "CHK_(ptr);\n", - FieldName(field), zigzag); + FieldName(field), zigzag, size); } } break; @@ -1647,16 +1706,15 @@ class ParseLoopGenerator { case WireFormatLite::WIRETYPE_FIXED32: case WireFormatLite::WIRETYPE_FIXED64: { std::string type = PrimitiveTypeName(options_, field->cpp_type()); - if (field->is_repeated() || field->containing_oneof()) { - string prefix = field->is_repeated() ? "add" : "set"; + if (field->is_repeated() || field->real_containing_oneof()) { + std::string prefix = field->is_repeated() ? "add" : "set"; format_( - "$1$_$2$($pi_ns$::UnalignedLoad<$3$>(ptr));\n" + "_internal_$1$_$2$($pi_ns$::UnalignedLoad<$3$>(ptr));\n" "ptr += sizeof($3$);\n", prefix, FieldName(field), type); } else { - if (HasFieldPresence(field->file())) { - format_("HasBitSetters::set_has_$1$(&$has_bits$);\n", - FieldName(field)); + if (HasHasbit(field)) { + format_("_Internal::set_has_$1$(&$has_bits$);\n", FieldName(field)); } format_( "$1$_ = $pi_ns$::UnalignedLoad<$2$>(ptr);\n" @@ -1672,7 +1730,7 @@ class ParseLoopGenerator { } case WireFormatLite::WIRETYPE_START_GROUP: { format_( - "ptr = ctx->ParseGroup($1$_$2$(), ptr, $3$);\n" + "ptr = ctx->ParseGroup(_internal_$1$_$2$(), ptr, $3$);\n" "CHK_(ptr);\n", field->is_repeated() ? "add" : "mutable", FieldName(field), tag); break; @@ -1715,28 +1773,15 @@ class ParseLoopGenerator { "while (!ctx->Done(&ptr)) {\n" " $uint32$ tag;\n" " ptr = $pi_ns$::ReadTag(ptr, &tag);\n" - " CHK_(ptr);\n" - " switch (tag >> 3) {\n"); + " CHK_(ptr);\n"); + if (!ordered_fields.empty()) format_(" switch (tag >> 3) {\n"); format_.Indent(); format_.Indent(); for (const auto* field : ordered_fields) { - // 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. - std::string def; - { - DebugStringOptions options; - options.elide_group_body = true; - options.elide_oneof_body = true; - def = field->DebugStringWithOptions(options); - def = def.substr(0, def.find_first_of('\n')); - } - format_( - "// $1$\n" - "case $2$:\n", - def, field->number()); + PrintFieldComment(format_, field); + format_("case $1$:\n", field->number()); format_.Indent(); uint32 fallback_tag = 0; uint32 expected_tag = ExpectedTag(field, &fallback_tag); @@ -1758,12 +1803,11 @@ class ParseLoopGenerator { } GenerateFieldBody(wiretype, field); if (is_repeat) { - string type = tag_size == 2 ? "uint16" : "uint8"; format_.Outdent(); format_( " if (!ctx->DataAvailable(ptr)) break;\n" - "} while ($pi_ns$::UnalignedLoad<$1$>(ptr) == $2$);\n", - IntTypeName(options_, type), SmallVarintValue(tag)); + "} while ($pi_ns$::ExpectTag<$1$>(ptr));\n", + tag); } format_.Outdent(); if (fallback_tag) { @@ -1780,7 +1824,7 @@ class ParseLoopGenerator { } // for loop over ordered fields // Default case - format_("default: {\n"); + if (!ordered_fields.empty()) format_("default: {\n"); if (!ordered_fields.empty()) format_("handle_unusual:\n"); format_( " if ((tag & 7) == 4 || tag == 0) {\n" @@ -1817,16 +1861,18 @@ class ParseLoopGenerator { "}\n"); } format_( - " ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);\n" + " ptr = UnknownFieldParse(tag,\n" + " _internal_metadata_.mutable_unknown_fields<$unknown_" + "fields_type$>(),\n" + " ptr, ctx);\n" " CHK_(ptr != nullptr);\n" " continue;\n"); } - format_("}\n"); // default case + if (!ordered_fields.empty()) format_("}\n"); // default case format_.Outdent(); format_.Outdent(); - format_( - " } // switch\n" - "} // while\n"); + if (!ordered_fields.empty()) format_(" } // switch\n"); + format_("} // while\n"); } }; @@ -1838,6 +1884,130 @@ void GenerateParserLoop(const Descriptor* descriptor, int num_hasbits, generator.GenerateParserLoop(descriptor); } +static bool HasExtensionFromFile(const Message& msg, const FileDescriptor* file, + const Options& options, + bool* has_opt_codesize_extension) { + std::vector fields; + auto reflection = msg.GetReflection(); + reflection->ListFields(msg, &fields); + for (auto field : fields) { + const auto* field_msg = field->message_type(); + if (field_msg == nullptr) { + // It so happens that enums Is_Valid are still generated so enums work. + // Only messages have potential problems. + continue; + } + // If this option has an extension set AND that extension is defined in the + // same file we have bootstrap problem. + if (field->is_extension()) { + const auto* msg_extension_file = field->message_type()->file(); + if (msg_extension_file == file) return true; + if (has_opt_codesize_extension && + GetOptimizeFor(msg_extension_file, options) == + FileOptions::CODE_SIZE) { + *has_opt_codesize_extension = true; + } + } + // Recurse in this field to see if there is a problem in there + if (field->is_repeated()) { + for (int i = 0; i < reflection->FieldSize(msg, field); i++) { + if (HasExtensionFromFile(reflection->GetRepeatedMessage(msg, field, i), + file, options, has_opt_codesize_extension)) { + return true; + } + } + } else { + if (HasExtensionFromFile(reflection->GetMessage(msg, field), file, + options, has_opt_codesize_extension)) { + return true; + } + } + } + return false; +} + +static bool HasBootstrapProblem(const FileDescriptor* file, + const Options& options, + bool* has_opt_codesize_extension) { + static auto& cache = *new std::unordered_map; + auto it = cache.find(file); + if (it != cache.end()) return it->second; + // In order to build the data structures for the reflective parse, it needs + // to parse the serialized descriptor describing all the messages defined in + // this file. Obviously this presents a bootstrap problem for descriptor + // messages. + if (file->name() == "net/proto2/proto/descriptor.proto" || + file->name() == "google/protobuf/descriptor.proto") { + return true; + } + // Unfortunately we're not done yet. The descriptor option messages allow + // for extensions. So we need to be able to parse these extensions in order + // to parse the file descriptor for a file that has custom options. This is a + // problem when these custom options extensions are defined in the same file. + FileDescriptorProto linkedin_fd_proto; + const DescriptorPool* pool = file->pool(); + const Descriptor* fd_proto_descriptor = + pool->FindMessageTypeByName(linkedin_fd_proto.GetTypeName()); + // Not all pools have descriptor.proto in them. In these cases there for sure + // are no custom options. + if (fd_proto_descriptor == nullptr) return false; + + // It's easier to inspect file as a proto, because we can use reflection on + // the proto to iterate over all content. + file->CopyTo(&linkedin_fd_proto); + + // linkedin_fd_proto is a generated proto linked in the proto compiler. As + // such it doesn't know the extensions that are potentially present in the + // descriptor pool constructed from the protos that are being compiled. These + // custom options are therefore in the unknown fields. + // By building the corresponding FileDescriptorProto in the pool constructed + // by the protos that are being compiled, ie. file's pool, the unknown fields + // are converted to extensions. + DynamicMessageFactory factory(pool); + Message* fd_proto = factory.GetPrototype(fd_proto_descriptor)->New(); + fd_proto->ParseFromString(linkedin_fd_proto.SerializeAsString()); + + bool& res = cache[file]; + res = HasExtensionFromFile(*fd_proto, file, options, + has_opt_codesize_extension); + delete fd_proto; + return res; +} + +FileOptions_OptimizeMode GetOptimizeFor(const FileDescriptor* file, + const Options& options, + bool* has_opt_codesize_extension) { + if (has_opt_codesize_extension) *has_opt_codesize_extension = false; + switch (options.enforce_mode) { + case EnforceOptimizeMode::kSpeed: + return FileOptions::SPEED; + case EnforceOptimizeMode::kLiteRuntime: + return FileOptions::LITE_RUNTIME; + case EnforceOptimizeMode::kCodeSize: + if (file->options().optimize_for() == FileOptions::LITE_RUNTIME) { + return FileOptions::LITE_RUNTIME; + } + if (HasBootstrapProblem(file, options, has_opt_codesize_extension)) { + return FileOptions::SPEED; + } + return FileOptions::CODE_SIZE; + case EnforceOptimizeMode::kNoEnforcement: + if (file->options().optimize_for() == FileOptions::CODE_SIZE) { + if (HasBootstrapProblem(file, options, has_opt_codesize_extension)) { + GOOGLE_LOG(WARNING) << "Proto states optimize_for = CODE_SIZE, but we " + "cannot honor that because it contains custom option " + "extensions defined in the same proto."; + return FileOptions::SPEED; + } + } + return file->options().optimize_for(); + } + + GOOGLE_LOG(FATAL) << "Unknown optimization enforcement requested."; + // The phony return below serves to silence a warning from GCC 8. + return FileOptions::SPEED; +} + } // namespace cpp } // namespace compiler } // namespace protobuf diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h index 52ecd6cf..988e6092 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h @@ -49,7 +49,7 @@ #include #include - +// Must be included last. #include namespace google { @@ -66,8 +66,13 @@ inline std::string MacroPrefix(const Options& options) { } inline std::string DeprecatedAttribute(const Options& options, - bool deprecated) { - return deprecated ? "PROTOBUF_DEPRECATED " : ""; + const FieldDescriptor* d) { + return d->options().deprecated() ? "PROTOBUF_DEPRECATED " : ""; +} + +inline std::string 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 @@ -78,6 +83,10 @@ extern const char kThinSeparator[]; void SetCommonVars(const Options& options, std::map* variables); +void SetUnknkownFieldsVariable(const Descriptor* descriptor, + const Options& options, + std::map* variables); + bool GetBootstrapBasename(const Options& options, const std::string& basename, std::string* bootstrap_basename); bool MaybeBootstrap(const Options& options, GeneratorContext* generator_context, @@ -125,6 +134,10 @@ inline std::string ClassName(const EnumDescriptor* descriptor, bool qualified) { : ClassName(descriptor); } +std::string QualifiedExtensionName(const FieldDescriptor* d, + const Options& options); +std::string QualifiedExtensionName(const FieldDescriptor* d); + // Type name of default instance. std::string DefaultInstanceType(const Descriptor* descriptor, const Options& options); @@ -133,10 +146,19 @@ std::string DefaultInstanceType(const Descriptor* descriptor, std::string 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. +std::string DefaultInstancePtr(const Descriptor* descriptor, + const Options& options); + // Fully qualified name of the default_instance of this message. std::string QualifiedDefaultInstanceName(const Descriptor* descriptor, const Options& options); +// Fully qualified name of the default instance pointer. +std::string QualifiedDefaultInstancePtr(const Descriptor* descriptor, + const Options& options); + // DescriptorTable variable name. std::string DescriptorTableName(const FileDescriptor* file, const Options& options); @@ -145,18 +167,12 @@ std::string DescriptorTableName(const FileDescriptor* file, // dllexport needed for the target file, if any. std::string FileDllExport(const FileDescriptor* file, const Options& options); -// Returns the name of a no-op function that we can call to introduce a linker -// dependency on the given message type. This is used to implement implicit weak -// fields. -std::string ReferenceFunctionName(const Descriptor* descriptor, - const Options& options); - // Name of the base class: google::protobuf::Message or google::protobuf::MessageLite. std::string SuperClassName(const Descriptor* descriptor, const Options& options); // Adds an underscore if necessary to prevent conflicting with a keyword. -std::string ResolveKeyword(const string& name); +std::string ResolveKeyword(const std::string& 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 @@ -331,6 +347,12 @@ inline bool IsLazy(const FieldDescriptor* field, const Options& options) { !options.opensource_runtime; } +// Returns true if "field" is used. +inline bool IsFieldUsed(const FieldDescriptor* /*field*/, + const Options& /*options*/) { + return true; +} + // Does the file contain any definitions that need extension_set.h? bool HasExtensionsOrExtendableMessage(const FileDescriptor* file); @@ -375,14 +397,6 @@ inline bool HasGenericServices(const FileDescriptor* file, file->options().cc_generic_services(); } -// Should we generate a separate, super-optimized code path for serializing to -// flat arrays? We don't do this in Lite mode because we'd rather reduce code -// size. -inline bool HasFastArraySerialization(const FileDescriptor* file, - const Options& options) { - return GetOptimizeFor(file, options) == FileOptions::SPEED; -} - inline bool IsProto2MessageSet(const Descriptor* descriptor, const Options& options) { return !options.opensource_runtime && @@ -414,6 +428,22 @@ inline bool HasFieldPresence(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) { @@ -475,16 +505,32 @@ inline std::string IncludeGuard(const FileDescriptor* file, bool pb_h, } } +// 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) { - switch (options.enforce_mode) { - case EnforceOptimizeMode::kSpeed: - return FileOptions::SPEED; - case EnforceOptimizeMode::kLiteRuntime: - return FileOptions::LITE_RUNTIME; - case EnforceOptimizeMode::kNoEnforcement: - default: - return file->options().optimize_for(); + 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; } } @@ -557,6 +603,11 @@ inline std::string SccInfoSymbol(const SCC* scc, const Options& options) { scc->GetRepresentative(), options); } +inline std::string SccInfoPtrSymbol(const SCC* scc, const Options& options) { + return UniqueName("scc_info_ptr_" + ClassName(scc->GetRepresentative()), + scc->GetRepresentative(), options); +} + void ListAllFields(const Descriptor* d, std::vector* fields); void ListAllFields(const FileDescriptor* d, @@ -703,6 +754,18 @@ class PROTOC_EXPORT Formatter { } }; +template +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; + std::string 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) @@ -744,7 +807,15 @@ class PROTOC_EXPORT NamespaceOpener { std::vector name_stack_; }; -std::string GetUtf8Suffix(const FieldDescriptor* field, const Options& options); +enum Utf8CheckMode { + STRICT = 0, // Parsing will fail if non UTF-8 data is in string fields. + VERIFY = 1, // Only log an error but parsing will succeed. + NONE = 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, @@ -818,7 +889,9 @@ struct OneOfRangeImpl { }; Iterator begin() const { return {0, descriptor}; } - Iterator end() const { return {descriptor->oneof_decl_count(), descriptor}; } + Iterator end() const { + return {descriptor->real_oneof_decl_count(), descriptor}; + } const Descriptor* descriptor; }; diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc index 0738b91e..630c97e9 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc @@ -29,6 +29,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include + #include #include #include @@ -50,11 +51,6 @@ void SetMessageVariables(const FieldDescriptor* descriptor, const Options& options) { SetCommonFieldVariables(descriptor, variables, options); (*variables)["type"] = ClassName(descriptor->message_type(), false); - (*variables)["stream_writer"] = - (*variables)["declared_type"] + - (HasFastArraySerialization(descriptor->message_type()->file(), options) - ? "MaybeToArray" - : ""); (*variables)["full_name"] = descriptor->full_name(); const FieldDescriptor* key = @@ -65,15 +61,12 @@ void SetMessageVariables(const FieldDescriptor* descriptor, switch (val->cpp_type()) { case FieldDescriptor::CPPTYPE_MESSAGE: (*variables)["val_cpp"] = FieldMessageTypeName(val, options); - (*variables)["wrapper"] = "MapEntryWrapper"; break; case FieldDescriptor::CPPTYPE_ENUM: (*variables)["val_cpp"] = ClassName(val->enum_type(), true); - (*variables)["wrapper"] = "MapEnumEntryWrapper"; break; default: (*variables)["val_cpp"] = PrimitiveTypeName(options, val->cpp_type()); - (*variables)["wrapper"] = "MapEntryWrapper"; } (*variables)["key_wire_type"] = "TYPE_" + ToUpper(DeclaredTypeMethodName(key->type())); @@ -120,6 +113,12 @@ void MapFieldGenerator::GenerateAccessorDeclarations( io::Printer* printer) const { Formatter format(printer, variables_); format( + "private:\n" + "const ::$proto_ns$::Map< $key_cpp$, $val_cpp$ >&\n" + " ${1$_internal_$name$$}$() const;\n" + "::$proto_ns$::Map< $key_cpp$, $val_cpp$ >*\n" + " ${1$_internal_mutable_$name$$}$();\n" + "public:\n" "$deprecated_attr$const ::$proto_ns$::Map< $key_cpp$, $val_cpp$ >&\n" " ${1$$name$$}$() const;\n" "$deprecated_attr$::$proto_ns$::Map< $key_cpp$, $val_cpp$ >*\n" @@ -132,14 +131,24 @@ void MapFieldGenerator::GenerateInlineAccessorDefinitions( Formatter format(printer, variables_); format( "inline const ::$proto_ns$::Map< $key_cpp$, $val_cpp$ >&\n" - "$classname$::$name$() const {\n" - " // @@protoc_insertion_point(field_map:$full_name$)\n" + "$classname$::_internal_$name$() const {\n" " return $name$_.GetMap();\n" "}\n" + "inline const ::$proto_ns$::Map< $key_cpp$, $val_cpp$ >&\n" + "$classname$::$name$() const {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_map:$full_name$)\n" + " return _internal_$name$();\n" + "}\n" + "inline ::$proto_ns$::Map< $key_cpp$, $val_cpp$ >*\n" + "$classname$::_internal_mutable_$name$() {\n" + " return $name$_.MutableMap();\n" + "}\n" "inline ::$proto_ns$::Map< $key_cpp$, $val_cpp$ >*\n" "$classname$::mutable_$name$() {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_mutable_map:$full_name$)\n" - " return $name$_.MutableMap();\n" + " return _internal_mutable_$name$();\n" "}\n"); } @@ -164,77 +173,8 @@ void MapFieldGenerator::GenerateCopyConstructorCode( GenerateMergingCode(printer); } -void MapFieldGenerator::GenerateMergeFromCodedStream( - io::Printer* printer) const { - Formatter format(printer, variables_); - const FieldDescriptor* key_field = - descriptor_->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_field = - descriptor_->message_type()->FindFieldByName("value"); - std::string key; - std::string value; - format( - "$map_classname$::Parser< ::$proto_ns$::internal::MapField$lite$<\n" - " $map_classname$,\n" - " $key_cpp$, $val_cpp$,\n" - " ::$proto_ns$::internal::WireFormatLite::$key_wire_type$,\n" - " ::$proto_ns$::internal::WireFormatLite::$val_wire_type$,\n" - " $default_enum_value$ >,\n" - " ::$proto_ns$::Map< $key_cpp$, $val_cpp$ > >" - " parser(&$name$_);\n"); - if (IsProto3Field(descriptor_) || - value_field->type() != FieldDescriptor::TYPE_ENUM) { - format( - "DO_(::$proto_ns$::internal::WireFormatLite::ReadMessageNoVirtual(\n" - " input, &parser));\n"); - key = "parser.key()"; - value = "parser.value()"; - } else { - key = "entry->key()"; - value = "entry->value()"; - format("auto entry = parser.NewEntry();\n"); - format( - "std::string data;\n" - "DO_(::$proto_ns$::internal::WireFormatLite::ReadString(input, " - "&data));\n" - "DO_(entry->ParseFromString(data));\n" - "if ($val_cpp$_IsValid(*entry->mutable_value())) {\n" - " (*mutable_$name$())[entry->key()] =\n" - " static_cast< $val_cpp$ >(*entry->mutable_value());\n" - "} else {\n"); - if (HasDescriptorMethods(descriptor_->file(), options_)) { - format( - " mutable_unknown_fields()" - "->AddLengthDelimited($number$, data);\n"); - } else { - format( - " unknown_fields_stream.WriteVarint32($tag$u);\n" - " unknown_fields_stream.WriteVarint32(\n" - " static_cast< ::google::protobuf::uint32>(data.size()));\n" - " unknown_fields_stream.WriteString(data);\n"); - } - format("}\n"); - } - - if (key_field->type() == FieldDescriptor::TYPE_STRING) { - GenerateUtf8CheckCodeForString( - key_field, options_, true, - StrCat(key, ".data(), static_cast(", key, ".length()),\n") - .data(), - format); - } - if (value_field->type() == FieldDescriptor::TYPE_STRING) { - GenerateUtf8CheckCodeForString( - value_field, options_, true, - StrCat(value, ".data(), static_cast(", value, - ".length()),\n") - .data(), - format); - } -} - static void GenerateSerializationLoop(const Formatter& format, bool string_key, - bool string_value, bool to_array, + bool string_value, bool is_deterministic) { std::string ptr; if (is_deterministic) { @@ -244,24 +184,16 @@ static void GenerateSerializationLoop(const Formatter& format, bool string_key, } else { format( "for (::$proto_ns$::Map< $key_cpp$, $val_cpp$ >::const_iterator\n" - " it = this->$name$().begin();\n" - " it != this->$name$().end(); ++it) {\n"); + " it = this->_internal_$name$().begin();\n" + " it != this->_internal_$name$().end(); ++it) {\n"); ptr = "it"; } format.Indent(); format( - "$map_classname$::$wrapper$ entry(nullptr, $1$->first, $1$->second);\n", + "target = $map_classname$::Funcs::InternalSerialize($number$, " + "$1$->first, $1$->second, target, stream);\n", ptr); - if (to_array) { - format( - "target = ::$proto_ns$::internal::WireFormatLite::InternalWrite" - "$declared_type$NoVirtualToArray($number$, entry, target);\n"); - } else { - format( - "::$proto_ns$::internal::WireFormatLite::Write$stream_writer$($number$," - " entry, output);\n"); - } if (string_key || string_value) { // ptr is either an actual pointer or an iterator, either way we can @@ -273,20 +205,10 @@ static void GenerateSerializationLoop(const Formatter& format, bool string_key, format("}\n"); } -void MapFieldGenerator::GenerateSerializeWithCachedSizes( - io::Printer* printer) const { - GenerateSerializeWithCachedSizes(printer, false); -} - void MapFieldGenerator::GenerateSerializeWithCachedSizesToArray( io::Printer* printer) const { - GenerateSerializeWithCachedSizes(printer, true); -} - -void MapFieldGenerator::GenerateSerializeWithCachedSizes(io::Printer* printer, - bool to_array) const { Formatter format(printer, variables_); - format("if (!this->$name$().empty()) {\n"); + format("if (!this->_internal_$name$().empty()) {\n"); format.Indent(); const FieldDescriptor* key_field = descriptor_->message_type()->FindFieldByName("key"); @@ -336,26 +258,25 @@ void MapFieldGenerator::GenerateSerializeWithCachedSizes(io::Printer* printer, format( "\n" - "if ($1$ &&\n" - " this->$name$().size() > 1) {\n" + "if (stream->IsSerializationDeterministic() &&\n" + " this->_internal_$name$().size() > 1) {\n" " ::std::unique_ptr items(\n" - " new SortItem[this->$name$().size()]);\n" + " new SortItem[this->_internal_$name$().size()]);\n" " typedef ::$proto_ns$::Map< $key_cpp$, $val_cpp$ >::size_type " "size_type;\n" " size_type n = 0;\n" " for (::$proto_ns$::Map< $key_cpp$, $val_cpp$ >::const_iterator\n" - " it = this->$name$().begin();\n" - " it != this->$name$().end(); ++it, ++n) {\n" + " it = this->_internal_$name$().begin();\n" + " it != this->_internal_$name$().end(); ++it, ++n) {\n" " items[static_cast(n)] = SortItem(&*it);\n" " }\n" - " ::std::sort(&items[0], &items[static_cast(n)], Less());\n", - to_array ? "false" : "output->IsSerializationDeterministic()"); + " ::std::sort(&items[0], &items[static_cast(n)], Less());\n"); format.Indent(); - GenerateSerializationLoop(format, string_key, string_value, to_array, true); + GenerateSerializationLoop(format, string_key, string_value, true); format.Outdent(); format("} else {\n"); format.Indent(); - GenerateSerializationLoop(format, string_key, string_value, to_array, false); + GenerateSerializationLoop(format, string_key, string_value, false); format.Outdent(); format("}\n"); format.Outdent(); @@ -366,13 +287,13 @@ void MapFieldGenerator::GenerateByteSize(io::Printer* printer) const { Formatter format(printer, variables_); format( "total_size += $tag_size$ *\n" - " ::$proto_ns$::internal::FromIntSize(this->$name$_size());\n" + " " + "::$proto_ns$::internal::FromIntSize(this->_internal_$name$_size());\n" "for (::$proto_ns$::Map< $key_cpp$, $val_cpp$ >::const_iterator\n" - " it = this->$name$().begin();\n" - " it != this->$name$().end(); ++it) {\n" - " $map_classname$::$wrapper$ entry(nullptr, it->first, it->second);\n" - " total_size += ::$proto_ns$::internal::WireFormatLite::\n" - " $declared_type$SizeNoVirtual(entry);\n" + " it = this->_internal_$name$().begin();\n" + " it != this->_internal_$name$().end(); ++it) {\n" + " total_size += $map_classname$::Funcs::ByteSizeLong(it->first, " + "it->second);\n" "}\n"); } diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.h index 95eecc07..e0c14f3c 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.h @@ -55,16 +55,10 @@ class MapFieldGenerator : public FieldGenerator { void GenerateSwappingCode(io::Printer* printer) const; void GenerateConstructorCode(io::Printer* printer) const {} void GenerateCopyConstructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; void GenerateByteSize(io::Printer* printer) const; private: - // A helper for GenerateSerializeWithCachedSizes{,ToArray}. - void GenerateSerializeWithCachedSizes(io::Printer* printer, - bool to_array) const; - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapFieldGenerator); }; diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc index 74a24402..1cc08919 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc @@ -35,6 +35,7 @@ #include #include +#include #include #include #include @@ -55,8 +56,6 @@ #include #include #include - - #include @@ -70,26 +69,40 @@ using internal::WireFormatLite; namespace { -template -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; - std::string def = field->DebugStringWithOptions(options); - format("// $1$\n", def.substr(0, def.find_first_of('\n'))); +static constexpr int kNoHasbit = -1; + +// Create an expression that evaluates to +// "for all i, (_has_bits_[i] & masks[i]) == masks[i]" +// masks is allowed to be shorter than _has_bits_, but at least one element of +// masks must be non-zero. +std::string ConditionalToCheckBitmasks( + const std::vector& masks, bool return_success = true, + StringPiece has_bits_var = "_has_bits_") { + std::vector parts; + for (int i = 0; i < masks.size(); i++) { + if (masks[i] == 0) continue; + std::string m = StrCat("0x", strings::Hex(masks[i], strings::ZERO_PAD_8)); + // Each xor evaluates to 0 if the expected bits are present. + parts.push_back( + StrCat("((", has_bits_var, "[", i, "] & ", m, ") ^ ", m, ")")); + } + GOOGLE_CHECK(!parts.empty()); + // If we have multiple parts, each expected to be 0, then bitwise-or them. + std::string result = + parts.size() == 1 + ? parts[0] + : StrCat("(", Join(parts, "\n | "), ")"); + return result + (return_success ? " == 0" : " != 0"); } void PrintPresenceCheck(const Formatter& format, const FieldDescriptor* field, const std::vector& has_bit_indices, - io::Printer* printer, int* cached_has_bit_index) { + io::Printer* printer, int* cached_has_word_index) { if (!field->options().weak()) { int has_bit_index = has_bit_indices[field->index()]; - if (*cached_has_bit_index != (has_bit_index / 32)) { - *cached_has_bit_index = (has_bit_index / 32); - format("cached_has_bits = _has_bits_[$1$];\n", *cached_has_bit_index); + if (*cached_has_word_index != (has_bit_index / 32)) { + *cached_has_word_index = (has_bit_index / 32); + format("cached_has_bits = _has_bits_[$1$];\n", *cached_has_word_index); } const std::string mask = StrCat(strings::Hex(1u << (has_bit_index % 32), strings::ZERO_PAD_8)); @@ -146,26 +159,53 @@ bool IsPOD(const FieldDescriptor* field) { } } -// Helper for the code that emits the SharedCtor() method. -bool CanConstructByZeroing(const FieldDescriptor* field, - const Options& options) { +// Helper for the code that emits the SharedCtor() and InternalSwap() methods. +// Anything that is a POD or a "normal" message (represented by a pointer) can +// be manipulated as raw bytes. +bool CanBeManipulatedAsRawBytes(const FieldDescriptor* field, + const Options& options) { bool ret = CanInitializeByZeroing(field); // Non-repeated, non-lazy message fields are simply raw pointers, so we can - // use memset to initialize these in SharedCtor. We cannot use this in - // Clear, as we need to potentially delete the existing value. + // swap them or use memset to initialize these in SharedCtor. We cannot use + // this in Clear, as we need to potentially delete the existing value. ret = ret || (!field->is_repeated() && !IsLazy(field, options) && field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE); return ret; } +// Finds runs of fields for which `predicate` is true. +// RunMap maps from fields that start each run to the number of fields in that +// run. This is optimized for the common case that there are very few runs in +// a message and that most of the eligible fields appear together. +using RunMap = std::unordered_map; +RunMap FindRuns(const std::vector& fields, + const std::function& predicate) { + RunMap runs; + const FieldDescriptor* last_start = nullptr; + + for (auto field : fields) { + if (predicate(field)) { + if (last_start == nullptr) { + last_start = field; + } + + runs[last_start]++; + } else { + last_start = nullptr; + } + } + return runs; +} + // Emits an if-statement with a condition that evaluates to true if |field| is // considered non-default (will be sent over the wire), for message types // without true field presence. Should only be called if -// !HasFieldPresence(message_descriptor). +// !HasHasbit(field). bool EmitFieldNonDefaultCondition(io::Printer* printer, const std::string& prefix, const FieldDescriptor* field) { + GOOGLE_CHECK(!HasHasbit(field)); Formatter format(printer); format.Set("prefix", prefix); format.Set("name", FieldName(field)); @@ -186,8 +226,8 @@ bool EmitFieldNonDefaultCondition(io::Printer* printer, } format.Indent(); return true; - } else if (field->containing_oneof()) { - format("if (has_$name$()) {\n"); + } else if (field->real_containing_oneof()) { + format("if (_internal_has_$name$()) {\n"); format.Indent(); return true; } @@ -202,7 +242,8 @@ bool HasHasMethod(const FieldDescriptor* field) { } // For message types without true field presence, only fields with a message // type have a has_$name$() method. - return field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE; + return field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE || + field->has_optional_keyword(); } // Collects map entry message type information. @@ -241,16 +282,15 @@ void CollectMapInfo(const Options& options, const Descriptor* descriptor, bool HasPrivateHasMethod(const FieldDescriptor* field) { // Only for oneofs in message types with no field presence. has_$name$(), // based on the oneof case, is still useful internally for generated code. - return (!HasFieldPresence(field->file()) && - field->containing_oneof() != NULL); + return (!HasFieldPresence(field->file()) && field->real_containing_oneof()); } // TODO(ckennelly): Cull these exclusions if/when these protos do not have -// their methods overriden by subclasses. +// their methods overridden by subclasses. bool ShouldMarkClassAsFinal(const Descriptor* descriptor, const Options& options) { - return false; + return true; } bool ShouldMarkClearAsFinal(const Descriptor* descriptor, @@ -292,10 +332,16 @@ bool TableDrivenParsingEnabled(const Descriptor* descriptor, // Consider table-driven parsing. We only do this if: // - We have has_bits for fields. This avoids a check on every field we set // when are present (the common case). - if (!HasFieldPresence(descriptor->file())) { - return false; + bool has_hasbit = false; + for (int i = 0; i < descriptor->field_count(); i++) { + if (HasHasbit(descriptor->field(i))) { + has_hasbit = true; + break; + } } + if (!has_hasbit) return false; + const double table_sparseness = 0.5; int max_field_number = 0; for (auto field : FieldRange(descriptor)) { @@ -334,23 +380,6 @@ bool TableDrivenParsingEnabled(const Descriptor* descriptor, return true; } -void SetUnknkownFieldsVariable(const Descriptor* descriptor, - const Options& options, - std::map* variables) { - std::string proto_ns = ProtobufNamespace(options); - if (UseUnknownFieldSet(descriptor->file(), options)) { - (*variables)["unknown_fields_type"] = "::" + proto_ns + "::UnknownFieldSet"; - } else { - (*variables)["unknown_fields_type"] = - PrimitiveTypeName(options, FieldDescriptor::CPPTYPE_STRING); - } - (*variables)["have_unknown_fields"] = - "_internal_metadata_.have_unknown_fields()"; - (*variables)["unknown_fields"] = "_internal_metadata_.unknown_fields()"; - (*variables)["mutable_unknown_fields"] = - "_internal_metadata_.mutable_unknown_fields()"; -} - bool IsCrossFileMapField(const FieldDescriptor* field) { if (!field->is_map()) { return false; @@ -374,82 +403,17 @@ bool IsRequired(const std::vector& v) { return v.front()->is_required(); } -// Allows chunking repeated fields together and non-repeated fields if the -// fields share the same has_byte index. -// TODO(seongkim): use lambda with capture instead of functor. -class MatchRepeatedAndHasByte { - public: - MatchRepeatedAndHasByte(const std::vector* has_bit_indices, - bool has_field_presence) - : has_bit_indices_(*has_bit_indices), - has_field_presence_(has_field_presence) {} - - // Returns true if the following conditions are met: - // --both fields are repeated fields - // --both fields are non-repeated fields with either has_field_presence is - // false or have the same has_byte index. - bool operator()(const FieldDescriptor* a, const FieldDescriptor* b) const { - return a->is_repeated() == b->is_repeated() && - (!has_field_presence_ || a->is_repeated() || - has_bit_indices_[a->index()] / 8 == - has_bit_indices_[b->index()] / 8); - } - - private: - const std::vector& has_bit_indices_; - const bool has_field_presence_; -}; - -// Allows chunking required fields separately after chunking with -// MatchRepeatedAndHasByte. -class MatchRepeatedAndHasByteAndRequired : public MatchRepeatedAndHasByte { - public: - MatchRepeatedAndHasByteAndRequired(const std::vector* has_bit_indices, - bool has_field_presence) - : MatchRepeatedAndHasByte(has_bit_indices, has_field_presence) {} - - bool operator()(const FieldDescriptor* a, const FieldDescriptor* b) const { - return MatchRepeatedAndHasByte::operator()(a, b) && - a->is_required() == b->is_required(); - } -}; - -// Allows chunking zero-initializable fields separately after chunking with -// MatchRepeatedAndHasByte. -class MatchRepeatedAndHasByteAndZeroInits : public MatchRepeatedAndHasByte { - public: - MatchRepeatedAndHasByteAndZeroInits(const std::vector* has_bit_indices, - bool has_field_presence) - : MatchRepeatedAndHasByte(has_bit_indices, has_field_presence) {} - - bool operator()(const FieldDescriptor* a, const FieldDescriptor* b) const { - return MatchRepeatedAndHasByte::operator()(a, b) && - CanInitializeByZeroing(a) == CanInitializeByZeroing(b); - } -}; - // Collects neighboring fields based on a given criteria (equivalent predicate). template std::vector> CollectFields( const std::vector& fields, const Predicate& equivalent) { std::vector> chunks; - if (fields.empty()) { - return chunks; - } - - const FieldDescriptor* last_field = fields.front(); - std::vector chunk; for (auto field : fields) { - if (!equivalent(last_field, field) && !chunk.empty()) { - chunks.push_back(chunk); - chunk.clear(); + if (chunks.empty() || !equivalent(chunks.back().back(), field)) { + chunks.emplace_back(); } - chunk.push_back(field); - last_field = field; - } - if (!chunk.empty()) { - chunks.push_back(chunk); + chunks.back().push_back(field); } return chunks; } @@ -489,20 +453,18 @@ class ColdChunkSkipper { ColdChunkSkipper( const Options& options, const std::vector>& chunks, - const std::vector& has_bit_indices, const double cold_threshold, - bool has_field_presence) + const std::vector& has_bit_indices, const double cold_threshold) : chunks_(chunks), has_bit_indices_(has_bit_indices), access_info_map_(options.access_info_map), - cold_threshold_(cold_threshold), - has_field_presence_(has_field_presence) { + cold_threshold_(cold_threshold) { SetCommonVars(options, &variables_); } // May open an external if check for a batch of cold fields. "from" is the // prefix to _has_bits_ to allow MergeFrom to use "from._has_bits_". // Otherwise, it should be "". - void OnStartChunk(int chunk, int cached_has_bit_index, + void OnStartChunk(int chunk, int cached_has_word_index, const std::string& from, io::Printer* printer); bool OnEndChunk(int chunk, io::Printer* printer); @@ -519,7 +481,6 @@ class ColdChunkSkipper { const double cold_threshold_; std::map variables_; int limit_chunk_ = -1; - bool has_field_presence_; }; // Tuning parameters for ColdChunkSkipper. @@ -532,11 +493,11 @@ bool ColdChunkSkipper::IsColdChunk(int chunk) { } -void ColdChunkSkipper::OnStartChunk(int chunk, int cached_has_bit_index, +void ColdChunkSkipper::OnStartChunk(int chunk, int cached_has_word_index, const std::string& from, io::Printer* printer) { Formatter format(printer, variables_); - if (!access_info_map_ || !has_field_presence_) { + if (!access_info_map_) { return; } else if (chunk < limit_chunk_) { // We are already inside a run of cold chunks. @@ -578,7 +539,7 @@ void ColdChunkSkipper::OnStartChunk(int chunk, int cached_has_bit_index, format(" ||\n "); } format.Set("mask", strings::Hex(mask, strings::ZERO_PAD_8)); - if (this_word == cached_has_bit_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); @@ -630,26 +591,31 @@ MessageGenerator::MessageGenerator( // Compute optimized field order to be used for layout and initialization // purposes. for (auto field : FieldRange(descriptor_)) { + if (!IsFieldUsed(field, options_)) { + continue; + } + if (IsWeak(field, options_)) { num_weak_fields_++; - } else if (!field->containing_oneof()) { + } else if (!field->real_containing_oneof()) { optimized_order_.push_back(field); } } message_layout_helper_->OptimizeLayout(&optimized_order_, options_); - if (HasFieldPresence(descriptor_->file())) { - // We use -1 as a sentinel. - has_bit_indices_.resize(descriptor_->field_count(), -1); - for (auto field : optimized_order_) { - // Skip fields that do not have has bits. - if (field->is_repeated()) { - continue; + // This message has hasbits iff one or more fields need one. + for (auto field : optimized_order_) { + if (HasHasbit(field)) { + if (has_bit_indices_.empty()) { + has_bit_indices_.resize(descriptor_->field_count(), kNoHasbit); } - has_bit_indices_[field->index()] = max_has_bit_index_++; } + } + + + if (!has_bit_indices_.empty()) { field_generators_.SetHasBitIndices(has_bit_indices_); } @@ -678,6 +644,21 @@ size_t MessageGenerator::HasBitsSize() const { return sizeof_has_bits; } +int MessageGenerator::HasBitIndex(const FieldDescriptor* field) const { + return has_bit_indices_.empty() ? kNoHasbit + : has_bit_indices_[field->index()]; +} + +int MessageGenerator::HasByteIndex(const FieldDescriptor* field) const { + int hasbit = HasBitIndex(field); + return hasbit == kNoHasbit ? kNoHasbit : hasbit / 8; +} + +int MessageGenerator::HasWordIndex(const FieldDescriptor* field) const { + int hasbit = HasBitIndex(field); + return hasbit == kNoHasbit ? kNoHasbit : hasbit / 32; +} + void MessageGenerator::AddGenerators( std::vector>* enum_generators, std::vector>* extension_generators) { @@ -696,7 +677,7 @@ void MessageGenerator::AddGenerators( void MessageGenerator::GenerateFieldAccessorDeclarations(io::Printer* printer) { Formatter format(printer, variables_); // optimized_fields_ does not contain fields where - // field->containing_oneof() != NULL + // field->real_containing_oneof() // so we need to iterate over those as well. // // We place the non-oneof fields in optimized_order_, as that controls the @@ -708,12 +689,25 @@ void MessageGenerator::GenerateFieldAccessorDeclarations(io::Printer* printer) { ordered_fields.insert(ordered_fields.begin(), optimized_order_.begin(), optimized_order_.end()); for (auto field : FieldRange(descriptor_)) { - if (field->containing_oneof() == NULL && !field->options().weak()) { + if (!field->real_containing_oneof() && !field->options().weak() && + IsFieldUsed(field, options_)) { continue; } ordered_fields.push_back(field); } + if (!ordered_fields.empty()) { + format("enum : int {\n"); + for (auto field : ordered_fields) { + Formatter::SaveState save(&format); + + std::map vars; + SetCommonFieldVariables(field, &vars, options_); + format.AddMap(vars); + format(" ${1$$2$$}$ = $number$,\n", field, FieldConstantName(field)); + } + format("};\n"); + } for (auto field : ordered_fields) { PrintFieldComment(format, field); @@ -724,21 +718,35 @@ void MessageGenerator::GenerateFieldAccessorDeclarations(io::Printer* printer) { format.AddMap(vars); if (field->is_repeated()) { - format("$deprecated_attr$int ${1$$name$_size$}$() const;\n", field); + format("$deprecated_attr$int ${1$$name$_size$}$() const$2$\n", field, + IsFieldUsed(field, options_) ? ";" : " {__builtin_trap();}"); + if (IsFieldUsed(field, options_)) { + format( + "private:\n" + "int ${1$_internal_$name$_size$}$() const;\n" + "public:\n", + field); + } } else if (HasHasMethod(field)) { - format("$deprecated_attr$bool ${1$has_$name$$}$() const;\n", field); + format("$deprecated_attr$bool ${1$has_$name$$}$() const$2$\n", field, + IsFieldUsed(field, options_) ? ";" : " {__builtin_trap();}"); + if (IsFieldUsed(field, options_)) { + format( + "private:\n" + "bool _internal_has_$name$() const;\n" + "public:\n"); + } } else if (HasPrivateHasMethod(field)) { - format( - "private:\n" - "bool ${1$has_$name$$}$() const;\n" - "public:\n", - field); + if (IsFieldUsed(field, options_)) { + format( + "private:\n" + "bool ${1$_internal_has_$name$$}$() const;\n" + "public:\n", + field); + } } - - format( - "$deprecated_attr$void ${1$clear_$name$$}$();\n" - "$deprecated_attr$static const int ${1$$2$$}$ = $number$;\n", - field, FieldConstantName(field)); + format("$deprecated_attr$void ${1$clear_$name$$}$()$2$\n", field, + IsFieldUsed(field, options_) ? ";" : "{__builtin_trap();}"); // Generate type-specific accessor declarations. field_generators_.get(field).GenerateAccessorDeclarations(printer); @@ -773,42 +781,66 @@ void MessageGenerator::GenerateFieldAccessorDeclarations(io::Printer* printer) { void MessageGenerator::GenerateSingularFieldHasBits( const FieldDescriptor* field, Formatter format) { + if (!IsFieldUsed(field, options_)) { + format( + "inline bool $classname$::has_$name$() const { " + "__builtin_trap(); }\n"); + return; + } if (field->options().weak()) { format( "inline bool $classname$::has_$name$() const {\n" + "$annotate_accessor$" " return _weak_field_map_.Has($number$);\n" "}\n"); return; } - if (HasFieldPresence(descriptor_->file())) { - // N.B.: without field presence, we do not use has-bits or generate - // has_$name$() methods. - int has_bit_index = has_bit_indices_[field->index()]; - GOOGLE_CHECK_GE(has_bit_index, 0); + if (HasHasbit(field)) { + int has_bit_index = HasBitIndex(field); + GOOGLE_CHECK_NE(has_bit_index, kNoHasbit); format.Set("has_array_index", has_bit_index / 32); format.Set("has_mask", strings::Hex(1u << (has_bit_index % 32), strings::ZERO_PAD_8)); format( - "inline bool $classname$::has_$name$() const {\n" - " return (_has_bits_[$has_array_index$] & 0x$has_mask$u) != 0;\n" - "}\n"); - } else { - // Message fields have a has_$name$() method. - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - if (IsLazy(field, options_)) { - format( - "inline bool $classname$::has_$name$() const {\n" - " return !$name$_.IsCleared();\n" - "}\n"); - } else { - format( - "inline bool $classname$::has_$name$() const {\n" - " return this != internal_default_instance() " - "&& $name$_ != nullptr;\n" - "}\n"); - } + "inline bool $classname$::_internal_has_$name$() const {\n" + " bool value = " + "(_has_bits_[$has_array_index$] & 0x$has_mask$u) != 0;\n"); + + if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && + !IsLazy(field, options_)) { + // We maintain the invariant that for a submessage x, has_x() returning + // true implies that x_ is not null. By giving this information to the + // compiler, we allow it to eliminate unnecessary null checks later on. + format(" PROTOBUF_ASSUME(!value || $name$_ != nullptr);\n"); } + + format( + " return value;\n" + "}\n" + "inline bool $classname$::has_$name$() const {\n" + "$annotate_accessor$" + " return _internal_has_$name$();\n" + "}\n"); + } else if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { + // Message fields have a has_$name$() method. + if (IsLazy(field, options_)) { + format( + "inline bool $classname$::_internal_has_$name$() const {\n" + " return !$name$_.IsCleared();\n" + "}\n"); + } else { + format( + "inline bool $classname$::_internal_has_$name$() const {\n" + " return this != internal_default_instance() " + "&& $name$_ != nullptr;\n" + "}\n"); + } + format( + "inline bool $classname$::has_$name$() const {\n" + "$annotate_accessor$" + " return _internal_has_$name$();\n" + "}\n"); } } @@ -830,16 +862,44 @@ void MessageGenerator::GenerateOneofHasBits(io::Printer* printer) { void MessageGenerator::GenerateOneofMemberHasBits(const FieldDescriptor* field, const Formatter& format) { + if (!IsFieldUsed(field, options_)) { + if (HasHasMethod(field)) { + format( + "inline bool $classname$::has_$name$() const { " + "__builtin_trap(); }\n"); + } + format( + "inline void $classname$::set_has_$name$() { __builtin_trap(); " + "}\n"); + return; + } // Singular field in a oneof // N.B.: Without field presence, we do not use has-bits or generate // has_$name$() methods, but oneofs still have set_has_$name$(). // Oneofs also have has_$name$() but only as a private helper // method, so that generated code is slightly cleaner (vs. comparing // _oneof_case_[index] against a constant everywhere). + // + // If has_$name$() is private, there is no need to add an internal accessor. + // Only annotate public accessors. + if (HasHasMethod(field)) { + format( + "inline bool $classname$::_internal_has_$name$() const {\n" + " return $oneof_name$_case() == k$field_name$;\n" + "}\n" + "inline bool $classname$::has_$name$() const {\n" + "$annotate_accessor$" + " return _internal_has_$name$();\n" + "}\n"); + } else if (HasPrivateHasMethod(field)) { + format( + "inline bool $classname$::_internal_has_$name$() const {\n" + " return $oneof_name$_case() == k$field_name$;\n" + "}\n"); + } + // set_has_$name$() for oneof fields is always private; hence should not be + // annotated. format( - "inline bool $classname$::has_$name$() const {\n" - " return $oneof_name$_case() == k$field_name$;\n" - "}\n" "inline void $classname$::set_has_$name$() {\n" " _oneof_case_[$oneof_index$] = k$field_name$;\n" "}\n"); @@ -847,18 +907,25 @@ void MessageGenerator::GenerateOneofMemberHasBits(const FieldDescriptor* field, void MessageGenerator::GenerateFieldClear(const FieldDescriptor* field, bool is_inline, Formatter format) { + if (!IsFieldUsed(field, options_)) { + format("void $classname$::clear_$name$() { __builtin_trap(); }\n"); + return; + } + // Generate clear_$name$(). if (is_inline) { format("inline "); } - format("void $classname$::clear_$name$() {\n"); + format( + "void $classname$::clear_$name$() {\n" + "$annotate_accessor$"); format.Indent(); - if (field->containing_oneof()) { + if (field->real_containing_oneof()) { // Clear this field only if it is the active field in this oneof, // otherwise ignore - format("if (has_$name$()) {\n"); + format("if (_internal_has_$name$()) {\n"); format.Indent(); field_generators_.get(field).GenerateClearingCode(format.printer()); format("clear_has_$oneof_name$();\n"); @@ -866,16 +933,12 @@ void MessageGenerator::GenerateFieldClear(const FieldDescriptor* field, format("}\n"); } else { field_generators_.get(field).GenerateClearingCode(format.printer()); - if (HasFieldPresence(descriptor_->file())) { - if (!field->is_repeated() && !field->options().weak()) { - int has_bit_index = has_bit_indices_[field->index()]; - GOOGLE_CHECK_GE(has_bit_index, 0); - - format.Set("has_array_index", has_bit_index / 32); - format.Set("has_mask", - strings::Hex(1u << (has_bit_index % 32), strings::ZERO_PAD_8)); - format("_has_bits_[$has_array_index$] &= ~0x$has_mask$u;\n"); - } + if (HasHasbit(field)) { + int has_bit_index = HasBitIndex(field); + format.Set("has_array_index", has_bit_index / 32); + format.Set("has_mask", + strings::Hex(1u << (has_bit_index % 32), strings::ZERO_PAD_8)); + format("_has_bits_[$has_array_index$] &= ~0x$has_mask$u;\n"); } } @@ -890,6 +953,10 @@ void MessageGenerator::GenerateFieldAccessorDefinitions(io::Printer* printer) { for (auto field : FieldRange(descriptor_)) { PrintFieldComment(format, field); + if (!IsFieldUsed(field, options_)) { + continue; + } + std::map vars; SetCommonFieldVariables(field, &vars, options_); @@ -898,11 +965,25 @@ void MessageGenerator::GenerateFieldAccessorDefinitions(io::Printer* printer) { // Generate has_$name$() or $name$_size(). if (field->is_repeated()) { - format( - "inline int $classname$::$name$_size() const {\n" - " return $name$_.size();\n" - "}\n"); - } else if (field->containing_oneof()) { + if (!IsFieldUsed(field, options_)) { + format( + "inline int $classname$::$name$_size() const { " + "__builtin_trap(); }\n"); + } else { + format( + "inline int $classname$::_internal_$name$_size() const {\n" + " return $name$_$1$.size();\n" + "}\n" + "inline int $classname$::$name$_size() const {\n" + "$annotate_accessor$" + " return _internal_$name$_size();\n" + "}\n", + IsImplicitWeakField(field, options_, scc_analyzer_) && + field->message_type() + ? ".weak" + : ""); + } + } else if (field->real_containing_oneof()) { format.Set("field_name", UnderscoresToCamelCase(field->name(), true)); format.Set("oneof_name", field->containing_oneof()->name()); format.Set("oneof_index", @@ -918,7 +999,9 @@ void MessageGenerator::GenerateFieldAccessorDefinitions(io::Printer* printer) { } // Generate type-specific accessors. - field_generators_.get(field).GenerateInlineAccessorDefinitions(printer); + if (IsFieldUsed(field, options_)) { + field_generators_.get(field).GenerateInlineAccessorDefinitions(printer); + } format("\n"); } @@ -929,8 +1012,9 @@ void MessageGenerator::GenerateFieldAccessorDefinitions(io::Printer* printer) { void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { Formatter format(printer, variables_); - format.Set("class_final", - ShouldMarkClassAsFinal(descriptor_, options_) ? "final" : ""); + format.Set("class_final", ShouldMarkClassAsFinal(descriptor_, options_) + ? "PROTOBUF_FINAL" + : ""); if (IsMapEntryMessage(descriptor_)) { std::map vars; @@ -957,24 +1041,25 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { " static const $classname$* internal_default_instance() { return " "reinterpret_cast(&_$classname$_default_instance_); }\n"); - std::string suffix = GetUtf8Suffix(descriptor_->field(0), options_); + auto utf8_check = GetUtf8CheckMode(descriptor_->field(0), options_); if (descriptor_->field(0)->type() == FieldDescriptor::TYPE_STRING && - !suffix.empty()) { - if (suffix == "UTF8") { + utf8_check != NONE) { + if (utf8_check == STRICT) { format( " static bool ValidateKey(std::string* s) {\n" " return ::$proto_ns$::internal::WireFormatLite::" - "VerifyUtf8String(s->data(), s->size(), " + "VerifyUtf8String(s->data(), static_cast(s->size()), " "::$proto_ns$::internal::WireFormatLite::PARSE, \"$1$\");\n" " }\n", descriptor_->field(0)->full_name()); } else { - GOOGLE_CHECK(suffix == "UTF8Verify"); + GOOGLE_CHECK(utf8_check == VERIFY); format( " static bool ValidateKey(std::string* s) {\n" "#ifndef NDEBUG\n" " ::$proto_ns$::internal::WireFormatLite::VerifyUtf8String(\n" - " s->data(), s->size(), ::$proto_ns$::internal::" + " s->data(), static_cast(s->size()), " + "::$proto_ns$::internal::" "WireFormatLite::PARSE, \"$1$\");\n" "#endif\n" " return true;\n" @@ -985,22 +1070,23 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { format(" static bool ValidateKey(void*) { return true; }\n"); } if (descriptor_->field(1)->type() == FieldDescriptor::TYPE_STRING && - !suffix.empty()) { - if (suffix == "UTF8") { + utf8_check != NONE) { + if (utf8_check == STRICT) { format( " static bool ValidateValue(std::string* s) {\n" " return ::$proto_ns$::internal::WireFormatLite::" - "VerifyUtf8String(s->data(), s->size(), " + "VerifyUtf8String(s->data(), static_cast(s->size()), " "::$proto_ns$::internal::WireFormatLite::PARSE, \"$1$\");\n" " }\n", descriptor_->field(1)->full_name()); } else { - GOOGLE_CHECK(suffix == "UTF8Verify"); + GOOGLE_CHECK(utf8_check = VERIFY); format( " static bool ValidateValue(std::string* s) {\n" "#ifndef NDEBUG\n" " ::$proto_ns$::internal::WireFormatLite::VerifyUtf8String(\n" - " s->data(), s->size(), ::$proto_ns$::internal::" + " s->data(), static_cast(s->size()), " + "::$proto_ns$::internal::" "WireFormatLite::PARSE, \"$1$\");\n" "#endif\n" " return true;\n" @@ -1037,8 +1123,13 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { format(" public:\n"); format.Indent(); + if (SupportsArenas(descriptor_)) { + format("inline $classname$() : $classname$(nullptr) {};\n"); + } else { + format("$classname$();\n"); + } + format( - "$classname$();\n" "virtual ~$classname$();\n" "\n" "$classname$(const $classname$& from);\n" @@ -1052,7 +1143,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { " return *this;\n" "}\n" "inline $classname$& operator=($classname$&& from) noexcept {\n" - " if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {\n" + " if (GetArena() == from.GetArena()) {\n" " if (this != &from) InternalSwap(&from);\n" " } else {\n" " CopyFrom(from);\n" @@ -1083,21 +1174,6 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { "\n"); } - // N.B.: We exclude GetArena() when arena support is disabled, falling back on - // MessageLite's implementation which returns NULL rather than generating our - // own method which returns NULL, in order to reduce code size. - if (SupportsArenas(descriptor_)) { - // virtual method version of GetArenaNoVirtual(), required for generic - // dispatch given a MessageLite* (e.g., in RepeatedField::AddAllocated()). - format( - "inline ::$proto_ns$::Arena* GetArena() const final {\n" - " return GetArenaNoVirtual();\n" - "}\n" - "inline void* GetMaybeArenaPointer() const final {\n" - " return MaybeArenaPtr();\n" - "}\n"); - } - // Only generate this member if it's not disabled. if (HasDescriptorMethods(descriptor_->file(), options_) && !descriptor_->options().no_standard_descriptor_accessor()) { @@ -1159,24 +1235,45 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { "\n", index_in_file_messages_); - if (SupportsArenas(descriptor_)) { - format("void UnsafeArenaSwap($classname$* other);\n"); - } - if (IsAnyMessage(descriptor_, options_)) { format( "// implements Any -----------------------------------------------\n" "\n"); if (HasDescriptorMethods(descriptor_->file(), options_)) { format( - "void PackFrom(const ::$proto_ns$::Message& message);\n" + "void PackFrom(const ::$proto_ns$::Message& message) {\n" + " _any_metadata_.PackFrom(message);\n" + "}\n" "void PackFrom(const ::$proto_ns$::Message& message,\n" - " const std::string& type_url_prefix);\n" - "bool UnpackTo(::$proto_ns$::Message* message) const;\n" + " const std::string& type_url_prefix) {\n" + " _any_metadata_.PackFrom(message, type_url_prefix);\n" + "}\n" + "bool UnpackTo(::$proto_ns$::Message* message) const {\n" + " return _any_metadata_.UnpackTo(message);\n" + "}\n" "static bool GetAnyFieldDescriptors(\n" " const ::$proto_ns$::Message& message,\n" " const ::$proto_ns$::FieldDescriptor** type_url_field,\n" - " const ::$proto_ns$::FieldDescriptor** value_field);\n"); + " const ::$proto_ns$::FieldDescriptor** value_field);\n" + "template " + "::value>::type>\n" + "void PackFrom(const T& message) {\n" + " _any_metadata_.PackFrom(message);\n" + "}\n" + "template " + "::value>::type>\n" + "void PackFrom(const T& message,\n" + " const std::string& type_url_prefix) {\n" + " _any_metadata_.PackFrom(message, type_url_prefix);" + "}\n" + "template " + "::value>::type>\n" + "bool UnpackTo(T* message) const {\n" + " return _any_metadata_.UnpackTo(message);\n" + "}\n"); } else { format( "template \n" @@ -1186,7 +1283,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { "template \n" "void PackFrom(const T& message,\n" " const std::string& type_url_prefix) {\n" - " _any_metadata_.PackFrom(message, type_url_prefix);" + " _any_metadata_.PackFrom(message, type_url_prefix);\n" "}\n" "template \n" "bool UnpackTo(T* message) const {\n" @@ -1205,10 +1302,34 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { ShouldMarkNewAsFinal(descriptor_, options_) ? "final" : ""); format( - "void Swap($classname$* other);\n" "friend void swap($classname$& a, $classname$& b) {\n" " a.Swap(&b);\n" - "}\n" + "}\n"); + + if (SupportsArenas(descriptor_)) { + format( + "inline void Swap($classname$* other) {\n" + " if (other == this) return;\n" + " if (GetArena() == other->GetArena()) {\n" + " InternalSwap(other);\n" + " } else {\n" + " ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);\n" + " }\n" + "}\n" + "void UnsafeArenaSwap($classname$* other) {\n" + " if (other == this) return;\n" + " $DCHK$(GetArena() == other->GetArena());\n" + " InternalSwap(other);\n" + "}\n"); + } else { + format( + "inline void Swap($classname$* other) {\n" + " if (other == this) return;\n" + " InternalSwap(other);\n" + "}\n"); + } + + format( "\n" "// implements Message ----------------------------------------------\n" "\n" @@ -1250,30 +1371,17 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { "bool IsInitialized() const$ is_initialized_final$;\n" "\n" "size_t ByteSizeLong() const final;\n" - "#if $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n" "const char* _InternalParse(const char* ptr, " "::$proto_ns$::internal::ParseContext* ctx) final;\n" - "#else\n" - "bool MergePartialFromCodedStream(\n" - " ::$proto_ns$::io::CodedInputStream* input) final;\n" - "#endif // $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"); + "$uint8$* _InternalSerialize(\n" + " $uint8$* target, ::$proto_ns$::io::EpsCopyOutputStream* stream) " + "const final;\n"); - if (!options_.table_driven_serialization || - descriptor_->options().message_set_wire_format()) { - format( - "void SerializeWithCachedSizes(\n" - " ::$proto_ns$::io::CodedOutputStream* output) const final;\n"); - } // DiscardUnknownFields() is implemented in message.cc using reflections. We // need to implement this function in generated code for messages. if (!UseUnknownFieldSet(descriptor_->file(), options_)) { format("void DiscardUnknownFields()$ full_final$;\n"); } - if (HasFastArraySerialization(descriptor_->file(), options_)) { - format( - "$uint8$* InternalSerializeWithCachedSizesToArray(\n" - " $uint8$* target) const final;\n"); - } } format( @@ -1305,26 +1413,6 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { "inline void RegisterArenaDtor(::$proto_ns$::Arena* arena);\n"); } - if (SupportsArenas(descriptor_)) { - format( - "private:\n" - "inline ::$proto_ns$::Arena* GetArenaNoVirtual() const {\n" - " return _internal_metadata_.arena();\n" - "}\n" - "inline void* MaybeArenaPtr() const {\n" - " return _internal_metadata_.raw_arena_ptr();\n" - "}\n"); - } else { - format( - "private:\n" - "inline ::$proto_ns$::Arena* GetArenaNoVirtual() const {\n" - " return nullptr;\n" - "}\n" - "inline void* MaybeArenaPtr() const {\n" - " return nullptr;\n" - "}\n"); - } - format( "public:\n" "\n"); @@ -1392,13 +1480,12 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { format(" private:\n"); format.Indent(); // TODO(seongkim): Remove hack to track field access and remove this class. - format("class HasBitSetters;\n"); - + format("class _Internal;\n"); for (auto field : FieldRange(descriptor_)) { // set_has_***() generated in all oneofs. if (!field->is_repeated() && !field->options().weak() && - field->containing_oneof()) { + field->real_containing_oneof()) { format("void set_has_$1$();\n", FieldName(field)); } } @@ -1448,16 +1535,6 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { "\n"); } - if (UseUnknownFieldSet(descriptor_->file(), options_)) { - format( - "::$proto_ns$::internal::InternalMetadataWithArena " - "_internal_metadata_;\n"); - } else { - format( - "::$proto_ns$::internal::InternalMetadataWithArenaLite " - "_internal_metadata_;\n"); - } - if (SupportsArenas(descriptor_)) { format( "template friend class " @@ -1466,7 +1543,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { "typedef void DestructorSkippable_;\n"); } - if (HasFieldPresence(descriptor_->file())) { + 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 // _cached_size_ together with _has_bits_ improves cache locality despite @@ -1496,12 +1573,16 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { camel_oneof_name); format.Indent(); for (auto field : FieldRange(oneof)) { - field_generators_.get(field).GeneratePrivateMembers(printer); + if (IsFieldUsed(field, options_)) { + field_generators_.get(field).GeneratePrivateMembers(printer); + } } format.Outdent(); format("} $1$_;\n", oneof->name()); for (auto field : FieldRange(oneof)) { - field_generators_.get(field).GenerateStaticMembers(printer); + if (IsFieldUsed(field, options_)) { + field_generators_.get(field).GenerateStaticMembers(printer); + } } } @@ -1513,11 +1594,11 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { } // Generate _oneof_case_. - if (descriptor_->oneof_decl_count() > 0) { + if (descriptor_->real_oneof_decl_count() > 0) { format( "$uint32$ _oneof_case_[$1$];\n" "\n", - descriptor_->oneof_decl_count()); + descriptor_->real_oneof_decl_count()); } if (num_weak_fields_) { @@ -1535,7 +1616,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { format.Outdent(); format("};"); GOOGLE_DCHECK(!need_to_emit_cached_size); -} +} // NOLINT(readability/fn_size) void MessageGenerator::GenerateInlineMethods(io::Printer* printer) { if (IsMapEntryMessage(descriptor_)) return; @@ -1561,21 +1642,22 @@ void MessageGenerator::GenerateExtraDefaultFields(io::Printer* printer) { // Generate oneof default instance and weak field instances for reflection // usage. Formatter format(printer, variables_); - if (descriptor_->oneof_decl_count() > 0 || num_weak_fields_ > 0) { - for (auto oneof : OneOfRange(descriptor_)) { - for (auto field : FieldRange(oneof)) { - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE || - (field->cpp_type() == FieldDescriptor::CPPTYPE_STRING && - EffectiveStringCType(field, options_) != FieldOptions::STRING)) { - format("const "); - } - field_generators_.get(field).GeneratePrivateMembers(printer); + for (auto oneof : OneOfRange(descriptor_)) { + for (auto field : FieldRange(oneof)) { + if (!IsFieldUsed(field, options_)) { + continue; } + if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE || + (field->cpp_type() == FieldDescriptor::CPPTYPE_STRING && + EffectiveStringCType(field, options_) != FieldOptions::STRING)) { + format("const "); + } + field_generators_.get(field).GeneratePrivateMembers(printer); } - for (auto field : FieldRange(descriptor_)) { - if (field->options().weak()) { - format(" const ::$proto_ns$::Message* $1$_;\n", FieldName(field)); - } + } + for (auto field : FieldRange(descriptor_)) { + if (field->options().weak() && IsFieldUsed(field, options_)) { + format(" const ::$proto_ns$::Message* $1$_;\n", FieldName(field)); } } } @@ -1605,14 +1687,14 @@ bool MessageGenerator::GenerateParseTable(io::Printer* printer, size_t offset, "$3$,\n", offset, aux_offset, max_field_number); - if (!HasFieldPresence(descriptor_->file())) { - // If we don't have field presence, then _has_bits_ does not exist. + if (has_bit_indices_.empty()) { + // If no fields have hasbits, then _has_bits_ does not exist. format("-1,\n"); } else { format("PROTOBUF_FIELD_OFFSET($classtype$, _has_bits_),\n"); } - if (descriptor_->oneof_decl_count() > 0) { + if (descriptor_->real_oneof_decl_count() > 0) { format("PROTOBUF_FIELD_OFFSET($classtype$, _oneof_case_),\n"); } else { format("-1, // no _oneof_case_\n"); @@ -1644,10 +1726,9 @@ bool MessageGenerator::GenerateParseTable(io::Printer* printer, size_t offset, void MessageGenerator::GenerateSchema(io::Printer* printer, int offset, int has_offset) { Formatter format(printer, variables_); - has_offset = - HasFieldPresence(descriptor_->file()) || IsMapEntryMessage(descriptor_) - ? offset + has_offset - : -1; + has_offset = !has_bit_indices_.empty() || IsMapEntryMessage(descriptor_) + ? offset + has_offset + : -1; format("{ $1$, $2$, sizeof($classtype$)},\n", offset, has_offset); } @@ -1672,23 +1753,22 @@ uint32 CalcFieldNum(const FieldGenerator& generator, type = internal::FieldMetadata::kStringPieceType; } } - if (field->containing_oneof()) { + + if (field->real_containing_oneof()) { return internal::FieldMetadata::CalculateType( type, internal::FieldMetadata::kOneOf); - } - if (field->is_packed()) { + } else if (field->is_packed()) { return internal::FieldMetadata::CalculateType( type, internal::FieldMetadata::kPacked); } else if (field->is_repeated()) { return internal::FieldMetadata::CalculateType( type, internal::FieldMetadata::kRepeated); - } else if (!HasFieldPresence(field->file()) && - field->containing_oneof() == NULL && !is_a_map) { - return internal::FieldMetadata::CalculateType( - type, internal::FieldMetadata::kNoPresence); - } else { + } else if (HasHasbit(field) || field->real_containing_oneof() || is_a_map) { return internal::FieldMetadata::CalculateType( type, internal::FieldMetadata::kPresence); + } else { + return internal::FieldMetadata::CalculateType( + type, internal::FieldMetadata::kNoPresence); } } @@ -1778,7 +1858,7 @@ int MessageGenerator::GenerateFieldMetadata(io::Printer* printer) { } std::string classfieldname = FieldName(field); - if (field->containing_oneof()) { + if (field->real_containing_oneof()) { classfieldname = field->containing_oneof()->name(); } format.Set("field_name", classfieldname); @@ -1814,10 +1894,9 @@ int MessageGenerator::GenerateFieldMetadata(io::Printer* printer) { type = internal::FieldMetadata::kSpecial; ptr = "reinterpret_cast(::" + variables_["proto_ns"] + "::internal::LazyFieldSerializer"; - if (field->containing_oneof()) { + if (field->real_containing_oneof()) { ptr += "OneOf"; - } else if (!HasFieldPresence(descriptor_->file()) || - has_bit_indices_[field->index()] == -1) { + } else if (!HasHasbit(field)) { ptr += "NoPresence"; } ptr += ")"; @@ -1832,7 +1911,7 @@ int MessageGenerator::GenerateFieldMetadata(io::Printer* printer) { "reinterpret_cast(::$proto_ns$::internal::WeakFieldSerializer)},\n", tag); - } else if (field->containing_oneof()) { + } else if (field->real_containing_oneof()) { format.Set("oneofoffset", sizeof(uint32) * field->containing_oneof()->index()); format( @@ -1840,8 +1919,7 @@ int MessageGenerator::GenerateFieldMetadata(io::Printer* printer) { " PROTOBUF_FIELD_OFFSET($classtype$, _oneof_case_) + " "$oneofoffset$, $2$, $3$},\n", tag, type, ptr); - } else if (HasFieldPresence(descriptor_->file()) && - has_bit_indices_[field->index()] != -1) { + } else if (HasHasbit(field)) { format.Set("hasbitsoffset", has_bit_indices_[field->index()]); format( "{PROTOBUF_FIELD_OFFSET($classtype$, $field_name$_), " @@ -1886,14 +1964,17 @@ void MessageGenerator::GenerateDefaultInstanceInitializer( // TODO(kenton): Maybe all message fields (even for non-default messages) // should be initialized to point at default instances rather than NULL? for (auto field : FieldRange(descriptor_)) { + if (!IsFieldUsed(field, options_)) { + continue; + } Formatter::SaveState saver(&format); if (!field->is_repeated() && !IsLazy(field, options_) && field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && - (field->containing_oneof() == NULL || + (!field->real_containing_oneof() || HasDescriptorMethods(descriptor_->file(), options_))) { std::string name; - if (field->containing_oneof() || field->options().weak()) { + if (field->real_containing_oneof() || field->options().weak()) { name = "_" + classname_ + "_default_instance_."; } else { name = @@ -1913,11 +1994,19 @@ void MessageGenerator::GenerateDefaultInstanceInitializer( options_)); // 1 continue; } - format( - "$package_ns$::$name$_ = const_cast< $1$*>(\n" - " $1$::internal_default_instance());\n", - FieldMessageTypeName(field, options_)); - } else if (field->containing_oneof() && + if (IsImplicitWeakField(field, options_, scc_analyzer_)) { + format( + "$package_ns$::$name$_ = reinterpret_cast<$1$*>(\n" + " $2$);\n", + FieldMessageTypeName(field, options_), + QualifiedDefaultInstancePtr(field->message_type(), options_)); + } else { + format( + "$package_ns$::$name$_ = const_cast< $1$*>(\n" + " $1$::internal_default_instance());\n", + FieldMessageTypeName(field, options_)); + } + } else if (field->real_containing_oneof() && HasDescriptorMethods(descriptor_->file(), options_)) { field_generators_.get(field).GenerateConstructorCode(printer); } @@ -1960,18 +2049,6 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) { if (IsAnyMessage(descriptor_, options_)) { if (HasDescriptorMethods(descriptor_->file(), options_)) { format( - "void $classname$::PackFrom(const ::$proto_ns$::Message& message) {\n" - " _any_metadata_.PackFrom(message);\n" - "}\n" - "\n" - "void $classname$::PackFrom(const ::$proto_ns$::Message& message,\n" - " const std::string& type_url_prefix) {\n" - " _any_metadata_.PackFrom(message, type_url_prefix);\n" - "}\n" - "\n" - "bool $classname$::UnpackTo(::$proto_ns$::Message* message) const {\n" - " return _any_metadata_.UnpackTo(message);\n" - "}\n" "bool $classname$::GetAnyFieldDescriptors(\n" " const ::$proto_ns$::Message& message,\n" " const ::$proto_ns$::FieldDescriptor** type_url_field,\n" @@ -1990,19 +2067,21 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) { } format( - "class $classname$::HasBitSetters {\n" + "class $classname$::_Internal {\n" " public:\n"); format.Indent(); - if (HasFieldPresence(descriptor_->file()) && HasBitsSize() != 0) { + if (!has_bit_indices_.empty()) { format( "using HasBits = decltype(std::declval<$classname$>()._has_bits_);\n"); } for (auto field : FieldRange(descriptor_)) { field_generators_.get(field).GenerateInternalAccessorDeclarations(printer); - if (HasFieldPresence(descriptor_->file()) && !field->is_repeated() && - !field->options().weak() && !field->containing_oneof()) { - int has_bit_index = has_bit_indices_[field->index()]; - GOOGLE_CHECK_GE(has_bit_index, 0); + if (!IsFieldUsed(field, options_)) { + continue; + } + if (HasHasbit(field)) { + int has_bit_index = HasBitIndex(field); + GOOGLE_CHECK_NE(has_bit_index, kNoHasbit) << field->full_name(); format( "static void set_has_$1$(HasBits* has_bits) {\n" " (*has_bits)[$2$] |= $3$u;\n" @@ -2010,20 +2089,35 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) { FieldName(field), has_bit_index / 32, (1u << (has_bit_index % 32))); } } + if (num_required_fields_ > 0) { + const std::vector masks_for_has_bits = RequiredFieldsBitMask(); + format( + "static bool MissingRequiredFields(const HasBits& has_bits) " + "{\n" + " return $1$;\n" + "}\n", + ConditionalToCheckBitmasks(masks_for_has_bits, false, "has_bits")); + } + format.Outdent(); format("};\n\n"); for (auto field : FieldRange(descriptor_)) { - field_generators_.get(field).GenerateInternalAccessorDefinitions(printer); + if (IsFieldUsed(field, options_)) { + field_generators_.get(field).GenerateInternalAccessorDefinitions(printer); + } } // Generate non-inline field definitions. for (auto field : FieldRange(descriptor_)) { + if (!IsFieldUsed(field, options_)) { + continue; + } field_generators_.get(field).GenerateNonInlineAccessorDefinitions(printer); if (IsCrossFileMaybeMap(field)) { Formatter::SaveState saver(&format); std::map vars; SetCommonFieldVariables(field, &vars, options_); - if (field->containing_oneof()) { + if (field->real_containing_oneof()) { SetCommonOneofFieldVariables(field, &vars); } format.AddMap(vars); @@ -2031,19 +2125,10 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) { } } - // Generate field number constants. - format("#if !defined(_MSC_VER) || _MSC_VER >= 1900\n"); - for (auto field : FieldRange(descriptor_)) { - format("const int $classname$::$1$;\n", FieldConstantName(field)); - } - format( - "#endif // !defined(_MSC_VER) || _MSC_VER >= 1900\n" - "\n"); - GenerateStructors(printer); format("\n"); - if (descriptor_->oneof_decl_count() > 0) { + if (descriptor_->real_oneof_decl_count() > 0) { GenerateOneofClear(printer); format("\n"); } @@ -2055,20 +2140,18 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) { GenerateMergeFromCodedStream(printer); format("\n"); - GenerateSerializeWithCachedSizes(printer); + GenerateSerializeWithCachedSizesToArray(printer); format("\n"); - if (HasFastArraySerialization(descriptor_->file(), options_)) { - GenerateSerializeWithCachedSizesToArray(printer); - format("\n"); - } - GenerateByteSize(printer); format("\n"); GenerateMergeFrom(printer); format("\n"); + GenerateClassSpecificMergeFrom(printer); + format("\n"); + GenerateCopyFrom(printer); format("\n"); @@ -2175,7 +2258,7 @@ size_t MessageGenerator::GenerateParseOffsets(io::Printer* printer) { processing_type |= static_cast( field->is_repeated() ? internal::kRepeatedMask : 0); processing_type |= static_cast( - field->containing_oneof() ? internal::kOneofMask : 0); + field->real_containing_oneof() ? internal::kOneofMask : 0); if (field->is_map()) { processing_type = internal::TYPE_MAP; @@ -2185,7 +2268,7 @@ size_t MessageGenerator::GenerateParseOffsets(io::Printer* printer) { WireFormat::TagSize(field->number(), field->type()); std::map vars; - if (field->containing_oneof() != NULL) { + if (field->real_containing_oneof()) { vars["name"] = field->containing_oneof()->name(); vars["presence"] = StrCat(field->containing_oneof()->index()); } else { @@ -2305,7 +2388,7 @@ std::pair MessageGenerator::GenerateOffsets( io::Printer* printer) { Formatter format(printer, variables_); - if (HasFieldPresence(descriptor_->file()) || IsMapEntryMessage(descriptor_)) { + if (!has_bit_indices_.empty() || IsMapEntryMessage(descriptor_)) { format("PROTOBUF_FIELD_OFFSET($classtype$, _has_bits_),\n"); } else { format("~0u, // no _has_bits_\n"); @@ -2316,7 +2399,7 @@ std::pair MessageGenerator::GenerateOffsets( } else { format("~0u, // no _extensions_\n"); } - if (descriptor_->oneof_decl_count() > 0) { + if (descriptor_->real_oneof_decl_count() > 0) { format("PROTOBUF_FIELD_OFFSET($classtype$, _oneof_case_[0]),\n"); } else { format("~0u, // no _oneof_case_\n"); @@ -2326,12 +2409,21 @@ std::pair MessageGenerator::GenerateOffsets( } else { format("~0u, // no _weak_field_map_\n"); } + int num_stripped = 0; + for (auto field : FieldRange(descriptor_)) { + if (!IsFieldUsed(field, options_)) { + num_stripped++; + } + } const int kNumGenericOffsets = 5; // the number of fixed offsets above const size_t offsets = kNumGenericOffsets + descriptor_->field_count() + - descriptor_->oneof_decl_count(); + descriptor_->real_oneof_decl_count() - num_stripped; size_t entries = offsets; for (auto field : FieldRange(descriptor_)) { - if (field->containing_oneof() || field->options().weak()) { + if (!IsFieldUsed(field, options_)) { + continue; + } + if (field->real_containing_oneof() || field->options().weak()) { format("offsetof($classtype$DefaultTypeInternal, $1$_)", FieldName(field)); } else { @@ -2346,18 +2438,24 @@ std::pair MessageGenerator::GenerateOffsets( format(",\n"); } + int count = 0; for (auto oneof : OneOfRange(descriptor_)) { format("PROTOBUF_FIELD_OFFSET($classtype$, $1$_),\n", oneof->name()); + count++; } + GOOGLE_CHECK_EQ(count, descriptor_->real_oneof_decl_count()); if (IsMapEntryMessage(descriptor_)) { entries += 2; format( "0,\n" "1,\n"); - } else if (HasFieldPresence(descriptor_->file())) { - entries += has_bit_indices_.size(); + } else if (!has_bit_indices_.empty()) { + entries += has_bit_indices_.size() - num_stripped; for (int i = 0; i < has_bit_indices_.size(); i++) { + if (!IsFieldUsed(descriptor_->field(i), options_)) { + continue; + } const std::string index = has_bit_indices_[i] >= 0 ? StrCat(has_bit_indices_[i]) : "~0u"; format("$1$,\n", index); @@ -2395,7 +2493,7 @@ void MessageGenerator::GenerateSharedDestructorCode(io::Printer* printer) { format("void $classname$::SharedDtor() {\n"); format.Indent(); if (SupportsArenas(descriptor_)) { - format("$DCHK$(GetArenaNoVirtual() == nullptr);\n"); + format("$DCHK$(GetArena() == nullptr);\n"); } // Write the destructors for each field except oneof members. // optimized_order_ does not contain oneof fields. @@ -2452,7 +2550,8 @@ void MessageGenerator::GenerateArenaDestructorCode(io::Printer* printer) { // and returns false for oneof fields. for (auto oneof : OneOfRange(descriptor_)) { for (auto field : FieldRange(oneof)) { - if (field_generators_.get(field).GenerateArenaDestructorCode(printer)) { + if (IsFieldUsed(field, options_) && + field_generators_.get(field).GenerateArenaDestructorCode(printer)) { need_registration = true; } } @@ -2486,25 +2585,13 @@ void MessageGenerator::GenerateConstructorBody(io::Printer* printer, std::vector processed, bool copy_constructor) const { Formatter format(printer, variables_); - const FieldDescriptor* last_start = NULL; - // RunMap maps from fields that start each run to the number of fields in that - // run. This is optimized for the common case that there are very few runs in - // a message and that most of the eligible fields appear together. - typedef std::unordered_map RunMap; - RunMap runs; - for (auto field : optimized_order_) { - if ((copy_constructor && IsPOD(field)) || - (!copy_constructor && CanConstructByZeroing(field, options_))) { - if (last_start == NULL) { - last_start = field; - } - - runs[last_start]++; - } else { - last_start = NULL; - } - } + const RunMap runs = FindRuns( + optimized_order_, [copy_constructor, this](const FieldDescriptor* field) { + return (copy_constructor && IsPOD(field)) || + (!copy_constructor && + CanBeManipulatedAsRawBytes(field, options_)); + }); std::string pod_template; if (copy_constructor) { @@ -2525,7 +2612,7 @@ void MessageGenerator::GenerateConstructorBody(io::Printer* printer, } const FieldDescriptor* field = optimized_order_[i]; - RunMap::const_iterator it = runs.find(field); + const auto it = runs.find(field); // We only apply the memset technique to runs of more than one field, as // assignment is better than memset for generated code clarity. @@ -2558,18 +2645,17 @@ void MessageGenerator::GenerateStructors(io::Printer* printer) { std::string superclass; superclass = SuperClassName(descriptor_, options_); - std::string initializer_with_arena = superclass + "()"; + std::string initializer_with_arena = superclass + "(arena)"; if (descriptor_->extension_range_count() > 0) { initializer_with_arena += ",\n _extensions_(arena)"; } - initializer_with_arena += ",\n _internal_metadata_(arena)"; - // Initialize member variables with arena constructor. for (auto field : optimized_order_) { + GOOGLE_DCHECK(IsFieldUsed(field, options_)); bool has_arena_constructor = field->is_repeated(); - if (field->containing_oneof() == NULL && + if (!field->real_containing_oneof() && (IsLazy(field, options_) || IsStringPiece(field, options_))) { has_arena_constructor = true; } @@ -2586,8 +2672,7 @@ void MessageGenerator::GenerateStructors(io::Printer* printer) { initializer_with_arena += ", _weak_field_map_(arena)"; } - std::string initializer_null = - superclass + "(), _internal_metadata_(nullptr)"; + std::string initializer_null = superclass + "()"; if (IsAnyMessage(descriptor_, options_)) { initializer_null += ", _any_metadata_(&type_url_, &value_)"; } @@ -2595,14 +2680,6 @@ void MessageGenerator::GenerateStructors(io::Printer* printer) { initializer_null += ", _weak_field_map_(nullptr)"; } - format( - "$classname$::$classname$()\n" - " : $1$ {\n" - " SharedCtor();\n" - " // @@protoc_insertion_point(constructor:$full_name$)\n" - "}\n", - initializer_null); - if (SupportsArenas(descriptor_)) { format( "$classname$::$classname$(::$proto_ns$::Arena* arena)\n" @@ -2612,8 +2689,20 @@ void MessageGenerator::GenerateStructors(io::Printer* printer) { " // @@protoc_insertion_point(arena_constructor:$full_name$)\n" "}\n", initializer_with_arena); + } else { + format( + "$classname$::$classname$()\n" + " : $1$ {\n" + " SharedCtor();\n" + " // @@protoc_insertion_point(constructor:$full_name$)\n" + "}\n", + initializer_null); } + std::map vars; + SetUnknkownFieldsVariable(descriptor_, options_, &vars); + format.AddMap(vars); + // Generate the copy constructor. if (UsingImplicitWeakFields(descriptor_->file(), options_)) { // If we are in lite mode and using implicit weak fields, we generate a @@ -2632,12 +2721,9 @@ void MessageGenerator::GenerateStructors(io::Printer* printer) { format.Indent(); format.Indent(); format.Indent(); - format(",\n_internal_metadata_(nullptr)"); - if (HasFieldPresence(descriptor_->file())) { - if (!IsProto2MessageSet(descriptor_, options_)) { - format(",\n_has_bits_(from._has_bits_)"); - } + if (!has_bit_indices_.empty()) { + format(",\n_has_bits_(from._has_bits_)"); } std::vector processed(optimized_order_.size(), false); @@ -2663,7 +2749,9 @@ void MessageGenerator::GenerateStructors(io::Printer* printer) { format.Outdent(); format(" {\n"); - format("_internal_metadata_.MergeFrom(from._internal_metadata_);\n"); + format( + "_internal_metadata_.MergeFrom<$unknown_fields_type$>(from._internal_" + "metadata_);\n"); if (descriptor_->extension_range_count() > 0) { format("_extensions_.MergeFrom(from._extensions_);\n"); @@ -2681,7 +2769,9 @@ void MessageGenerator::GenerateStructors(io::Printer* printer) { for (auto field : FieldRange(oneof)) { format("case k$1$: {\n", UnderscoresToCamelCase(field->name(), true)); format.Indent(); - field_generators_.get(field).GenerateMergingCode(printer); + if (IsFieldUsed(field, options_)) { + field_generators_.get(field).GenerateMergingCode(printer); + } format("break;\n"); format.Outdent(); format("}\n"); @@ -2710,6 +2800,7 @@ void MessageGenerator::GenerateStructors(io::Printer* printer) { "$classname$::~$classname$() {\n" " // @@protoc_insertion_point(destructor:$full_name$)\n" " SharedDtor();\n" + " _internal_metadata_.Delete<$unknown_fields_type$>();\n" "}\n" "\n"); @@ -2749,7 +2840,9 @@ void MessageGenerator::GenerateSourceInProto2Namespace(io::Printer* printer) { void MessageGenerator::GenerateClear(io::Printer* printer) { Formatter format(printer, variables_); - // Performance tuning parameters + + // The maximum number of bytes we will memset to zero without checking their + // hasbit to see if a zero-init is necessary. const int kMaxUnconditionalPrimitiveBytesClear = 4; format( @@ -2764,162 +2857,118 @@ void MessageGenerator::GenerateClear(io::Printer* printer) { "// Prevent compiler warnings about cached_has_bits being unused\n" "(void) cached_has_bits;\n\n"); - int cached_has_bit_index = -1; - - // Step 1: Extensions if (descriptor_->extension_range_count() > 0) { format("_extensions_.Clear();\n"); } - int unconditional_budget = kMaxUnconditionalPrimitiveBytesClear; - for (int i = 0; i < optimized_order_.size(); i++) { - const FieldDescriptor* field = optimized_order_[i]; - - if (!CanInitializeByZeroing(field)) { - continue; + // Collect fields into chunks. Each chunk may have an if() condition that + // checks all hasbits in the chunk and skips it if none are set. + int zero_init_bytes = 0; + for (const auto& field : optimized_order_) { + if (CanInitializeByZeroing(field)) { + zero_init_bytes += EstimateAlignmentSize(field); } - - unconditional_budget -= EstimateAlignmentSize(field); } + bool merge_zero_init = zero_init_bytes > kMaxUnconditionalPrimitiveBytesClear; + int chunk_count = 0; - std::vector> chunks_frag = CollectFields( + std::vector> chunks = CollectFields( optimized_order_, - MatchRepeatedAndHasByteAndZeroInits( - &has_bit_indices_, HasFieldPresence(descriptor_->file()))); + [&](const FieldDescriptor* a, const FieldDescriptor* b) -> bool { + chunk_count++; + // This predicate guarantees that there is only a single zero-init + // (memset) per chunk, and if present it will be at the beginning. + bool same = HasByteIndex(a) == HasByteIndex(b) && + a->is_repeated() == b->is_repeated() && + (CanInitializeByZeroing(a) == CanInitializeByZeroing(b) || + (CanInitializeByZeroing(a) && + (chunk_count == 1 || merge_zero_init))); + if (!same) chunk_count = 0; + return same; + }); - // Merge next non-zero initializable chunk if it has the same has_byte index - // and not meeting unconditional clear condition. - std::vector> chunks; - if (!HasFieldPresence(descriptor_->file())) { - // Don't bother with merging without has_bit field. - chunks = chunks_frag; - } else { - // Note that only the next chunk is considered for merging. - for (int i = 0; i < chunks_frag.size(); i++) { - chunks.push_back(chunks_frag[i]); - const FieldDescriptor* field = chunks_frag[i].front(); - const FieldDescriptor* next_field = - (i + 1) < chunks_frag.size() ? chunks_frag[i + 1].front() : nullptr; - if (CanInitializeByZeroing(field) && - (chunks_frag[i].size() == 1 || unconditional_budget < 0) && - next_field != nullptr && - has_bit_indices_[field->index()] / 8 == - has_bit_indices_[next_field->index()] / 8) { - GOOGLE_CHECK(!CanInitializeByZeroing(next_field)); - // Insert next chunk to the current one and skip next chunk. - chunks.back().insert(chunks.back().end(), chunks_frag[i + 1].begin(), - chunks_frag[i + 1].end()); - i++; - } - } - } + ColdChunkSkipper cold_skipper(options_, chunks, has_bit_indices_, kColdRatio); + int cached_has_word_index = -1; - ColdChunkSkipper cold_skipper(options_, chunks, has_bit_indices_, kColdRatio, - HasFieldPresence(descriptor_->file())); for (int chunk_index = 0; chunk_index < chunks.size(); chunk_index++) { std::vector& chunk = chunks[chunk_index]; - GOOGLE_CHECK(!chunk.empty()); + cold_skipper.OnStartChunk(chunk_index, cached_has_word_index, "", printer); - // Step 2: Repeated fields don't use _has_bits_; emit code to clear them - // here. - if (chunk.front()->is_repeated()) { - for (int i = 0; i < chunk.size(); i++) { - const FieldDescriptor* field = chunk[i]; - const FieldGenerator& generator = field_generators_.get(field); + const FieldDescriptor* memset_start = nullptr; + const FieldDescriptor* memset_end = nullptr; + bool saw_non_zero_init = false; - generator.GenerateMessageClearingCode(printer); - } - continue; - } - - cold_skipper.OnStartChunk(chunk_index, cached_has_bit_index, "", printer); - - // Step 3: Non-repeated fields that can be cleared by memset-to-0, then - // non-repeated, non-zero initializable fields. - int last_chunk = HasFieldPresence(descriptor_->file()) - ? has_bit_indices_[chunk.front()->index()] / 8 - : 0; - int last_chunk_start = 0; - int memset_run_start = -1; - int memset_run_end = -1; - - for (int i = 0; i < chunk.size(); i++) { - const FieldDescriptor* field = chunk[i]; + for (const auto& field : chunk) { if (CanInitializeByZeroing(field)) { - if (memset_run_start == -1) { - memset_run_start = i; - } - memset_run_end = i; + GOOGLE_CHECK(!saw_non_zero_init); + if (!memset_start) memset_start = field; + memset_end = field; + } else { + saw_non_zero_init = true; } } - const bool have_outer_if = - HasFieldPresence(descriptor_->file()) && chunk.size() > 1 && - (memset_run_end != chunk.size() - 1 || unconditional_budget < 0); + // Whether we wrap this chunk in: + // if (cached_has_bits & 1 && + (memset_end != chunk.back() || merge_zero_init); if (have_outer_if) { - uint32 last_chunk_mask = GenChunkMask(chunk, has_bit_indices_); - const int count = popcnt(last_chunk_mask); + // Emit an if() that will let us skip the whole chunk if none are set. + uint32 chunk_mask = GenChunkMask(chunk, has_bit_indices_); + std::string chunk_mask_str = + StrCat(strings::Hex(chunk_mask, strings::ZERO_PAD_8)); // Check (up to) 8 has_bits at a time if we have more than one field in // this chunk. Due to field layout ordering, we may check // _has_bits_[last_chunk * 8 / 32] multiple times. - GOOGLE_DCHECK_LE(2, count); - GOOGLE_DCHECK_GE(8, count); + GOOGLE_DCHECK_LE(2, popcnt(chunk_mask)); + GOOGLE_DCHECK_GE(8, popcnt(chunk_mask)); - if (cached_has_bit_index != last_chunk / 4) { - cached_has_bit_index = last_chunk / 4; - format("cached_has_bits = _has_bits_[$1$];\n", cached_has_bit_index); + if (cached_has_word_index != HasWordIndex(chunk.front())) { + cached_has_word_index = HasWordIndex(chunk.front()); + format("cached_has_bits = _has_bits_[$1$];\n", cached_has_word_index); } - format("if (cached_has_bits & 0x$1$u) {\n", - StrCat(strings::Hex(last_chunk_mask, strings::ZERO_PAD_8))); + format("if (cached_has_bits & 0x$1$u) {\n", chunk_mask_str); format.Indent(); } - if (memset_run_start != -1) { - if (memset_run_start == memset_run_end) { + if (memset_start) { + if (memset_start == memset_end) { // For clarity, do not memset a single field. - const FieldGenerator& generator = - field_generators_.get(chunk[memset_run_start]); - generator.GenerateMessageClearingCode(printer); + field_generators_.get(memset_start) + .GenerateMessageClearingCode(printer); } else { - const std::string first_field_name = FieldName(chunk[memset_run_start]); - const std::string last_field_name = FieldName(chunk[memset_run_end]); - format( "::memset(&$1$_, 0, static_cast(\n" " reinterpret_cast(&$2$_) -\n" " reinterpret_cast(&$1$_)) + sizeof($2$_));\n", - first_field_name, last_field_name); + FieldName(memset_start), FieldName(memset_end)); } - - // Advance last_chunk_start to skip over the fields we zeroed/memset. - last_chunk_start = memset_run_end + 1; } - // Go back and emit clears for each of the fields we processed. - for (int j = last_chunk_start; j < chunk.size(); j++) { - const FieldDescriptor* field = chunk[j]; - const FieldGenerator& generator = field_generators_.get(field); - + // Clear all non-zero-initializable fields in the chunk. + for (const auto& field : chunk) { + if (CanInitializeByZeroing(field)) continue; // It's faster to just overwrite primitive types, but we should only // clear strings and messages if they were set. // // TODO(kenton): Let the CppFieldGenerator decide this somehow. - bool should_check_bit = - field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE || - field->cpp_type() == FieldDescriptor::CPPTYPE_STRING; + bool have_enclosing_if = + HasBitIndex(field) != kNoHasbit && + (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE || + field->cpp_type() == FieldDescriptor::CPPTYPE_STRING); - bool have_enclosing_if = false; - if (should_check_bit && - // If no field presence, then always clear strings/messages as well. - HasFieldPresence(descriptor_->file())) { + if (have_enclosing_if) { PrintPresenceCheck(format, field, has_bit_indices_, printer, - &cached_has_bit_index); - have_enclosing_if = true; + &cached_has_word_index); } - generator.GenerateMessageClearingCode(printer); + field_generators_.get(field).GenerateMessageClearingCode(printer); if (have_enclosing_if) { format.Outdent(); @@ -2934,7 +2983,7 @@ void MessageGenerator::GenerateClear(io::Printer* printer) { if (cold_skipper.OnEndChunk(chunk_index, printer)) { // Reset here as it may have been updated in just closed if statement. - cached_has_bit_index = -1; + cached_has_word_index = -1; } } @@ -2947,12 +2996,15 @@ void MessageGenerator::GenerateClear(io::Printer* printer) { format("_weak_field_map_.ClearAll();\n"); } - if (HasFieldPresence(descriptor_->file())) { + if (!has_bit_indices_.empty()) { // Step 5: Everything else. format("_has_bits_.Clear();\n"); } - format("_internal_metadata_.Clear();\n"); + std::map vars; + SetUnknkownFieldsVariable(descriptor_, options_, &vars); + format.AddMap(vars); + format("_internal_metadata_.Clear<$unknown_fields_type$>();\n"); format.Outdent(); format("}\n"); @@ -2960,8 +3012,8 @@ void MessageGenerator::GenerateClear(io::Printer* printer) { void MessageGenerator::GenerateOneofClear(io::Printer* printer) { // Generated function clears the active field and union case (e.g. foo_case_). - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { - auto oneof = descriptor_->oneof_decl(i); + int i = 0; + for (auto oneof : OneOfRange(descriptor_)) { Formatter format(printer, variables_); format.Set("oneofname", oneof->name()); @@ -2975,7 +3027,7 @@ void MessageGenerator::GenerateOneofClear(io::Printer* printer) { format("case k$1$: {\n", UnderscoresToCamelCase(field->name(), true)); format.Indent(); // We clear only allocated objects in oneofs - if (!IsStringOrMessage(field)) { + if (!IsStringOrMessage(field) || !IsFieldUsed(field, options_)) { format("// No need to clear\n"); } else { field_generators_.get(field).GenerateClearingCode(printer); @@ -2998,45 +3050,13 @@ void MessageGenerator::GenerateOneofClear(io::Printer* printer) { format( "}\n" "\n"); + i++; } } void MessageGenerator::GenerateSwap(io::Printer* printer) { Formatter format(printer, variables_); - if (SupportsArenas(descriptor_)) { - // Generate the Swap member function. This is a lightweight wrapper around - // UnsafeArenaSwap() / MergeFrom() with temporaries, depending on the memory - // ownership situation: swapping across arenas or between an arena and a - // heap requires copying. - format( - "void $classname$::Swap($classname$* other) {\n" - " if (other == this) return;\n" - " if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {\n" - " InternalSwap(other);\n" - " } else {\n" - " $classname$* temp = New(GetArenaNoVirtual());\n" - " temp->MergeFrom(*other);\n" - " other->CopyFrom(*this);\n" - " InternalSwap(temp);\n" - " if (GetArenaNoVirtual() == nullptr) {\n" - " delete temp;\n" - " }\n" - " }\n" - "}\n" - "void $classname$::UnsafeArenaSwap($classname$* other) {\n" - " if (other == this) return;\n" - " $DCHK$(GetArenaNoVirtual() == other->GetArenaNoVirtual());\n" - " InternalSwap(other);\n" - "}\n"); - } else { - format( - "void $classname$::Swap($classname$* other) {\n" - " if (other == this) return;\n" - " InternalSwap(other);\n" - "}\n"); - } - // Generate the UnsafeArenaSwap member function. format("void $classname$::InternalSwap($classname$* other) {\n"); format.Indent(); format("using std::swap;\n"); @@ -3046,26 +3066,62 @@ void MessageGenerator::GenerateSwap(io::Printer* printer) { format("_extensions_.Swap(&other->_extensions_);\n"); } - format("_internal_metadata_.Swap(&other->_internal_metadata_);\n"); + std::map vars; + SetUnknkownFieldsVariable(descriptor_, options_, &vars); + format.AddMap(vars); + format( + "_internal_metadata_.Swap<$unknown_fields_type$>(&other->_internal_" + "metadata_);\n"); - if (HasFieldPresence(descriptor_->file())) { + if (!has_bit_indices_.empty()) { for (int i = 0; i < HasBitsSize() / 4; ++i) { format("swap(_has_bits_[$1$], other->_has_bits_[$1$]);\n", i); } } - for (int i = 0; i < optimized_order_.size(); i++) { - // optimized_order_ does not contain oneof fields, but the field - // generators for these fields do not emit swapping code on their own. + // If possible, we swap several fields at once, including padding. + const RunMap runs = + FindRuns(optimized_order_, [this](const FieldDescriptor* field) { + return CanBeManipulatedAsRawBytes(field, options_); + }); + + for (int i = 0; i < optimized_order_.size(); ++i) { const FieldDescriptor* field = optimized_order_[i]; - field_generators_.get(field).GenerateSwappingCode(printer); + const auto it = runs.find(field); + + // We only apply the memswap technique to runs of more than one field, as + // `swap(field_, other.field_)` is better than + // `memswap<...>(&field_, &other.field_)` for generated code readability. + if (it != runs.end() && it->second > 1) { + // Use a memswap, then skip run_length fields. + const size_t run_length = it->second; + const std::string first_field_name = FieldName(field); + const std::string last_field_name = + FieldName(optimized_order_[i + run_length - 1]); + + format.Set("first", first_field_name); + format.Set("last", last_field_name); + + format( + "::PROTOBUF_NAMESPACE_ID::internal::memswap<\n" + " PROTOBUF_FIELD_OFFSET($classname$, $last$_)\n" + " + sizeof($classname$::$last$_)\n" + " - PROTOBUF_FIELD_OFFSET($classname$, $first$_)>(\n" + " reinterpret_cast(&$first$_),\n" + " reinterpret_cast(&other->$first$_));\n"); + + i += run_length - 1; + // ++i at the top of the loop. + } else { + field_generators_.get(field).GenerateSwappingCode(printer); + } } for (auto oneof : OneOfRange(descriptor_)) { format("swap($1$_, other->$1$_);\n", oneof->name()); } - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { + for (int i = 0; i < descriptor_->real_oneof_decl_count(); i++) { format("swap(_oneof_case_[$1$], other->_oneof_case_[$1$]);\n", i); } @@ -3111,7 +3167,7 @@ void MessageGenerator::GenerateMergeFrom(io::Printer* printer) { "}\n"); format.Outdent(); - format("}\n\n"); + format("}\n"); } else { // Generate CheckTypeAndMergeFrom(). format( @@ -3119,11 +3175,13 @@ void MessageGenerator::GenerateMergeFrom(io::Printer* printer) { " const ::$proto_ns$::MessageLite& from) {\n" " MergeFrom(*::$proto_ns$::internal::DownCast(\n" " &from));\n" - "}\n" - "\n"); + "}\n"); } +} +void MessageGenerator::GenerateClassSpecificMergeFrom(io::Printer* printer) { // Generate the class-specific MergeFrom, which avoids the GOOGLE_CHECK and cast. + Formatter format(printer, variables_); format( "void $classname$::MergeFrom(const $classname$& from) {\n" "// @@protoc_insertion_point(class_specific_merge_from_start:" @@ -3134,91 +3192,94 @@ void MessageGenerator::GenerateMergeFrom(io::Printer* printer) { if (descriptor_->extension_range_count() > 0) { format("_extensions_.MergeFrom(from._extensions_);\n"); } - + std::map vars; + SetUnknkownFieldsVariable(descriptor_, options_, &vars); + format.AddMap(vars); format( - "_internal_metadata_.MergeFrom(from._internal_metadata_);\n" + "_internal_metadata_.MergeFrom<$unknown_fields_type$>(from._internal_" + "metadata_);\n" "$uint32$ cached_has_bits = 0;\n" "(void) cached_has_bits;\n\n"); - if (HasFieldPresence(descriptor_->file())) { - std::vector> chunks = CollectFields( - optimized_order_, MatchRepeatedAndHasByte(&has_bit_indices_, true)); + std::vector> chunks = CollectFields( + optimized_order_, + [&](const FieldDescriptor* a, const FieldDescriptor* b) -> bool { + return HasByteIndex(a) == HasByteIndex(b); + }); - ColdChunkSkipper cold_skipper(options_, chunks, has_bit_indices_, - kColdRatio, true); + ColdChunkSkipper cold_skipper(options_, chunks, has_bit_indices_, kColdRatio); - // cached_has_bit_index maintains that: - // cached_has_bits = from._has_bits_[cached_has_bit_index] - // for cached_has_bit_index >= 0 - int cached_has_bit_index = -1; + // cached_has_word_index maintains that: + // cached_has_bits = from._has_bits_[cached_has_word_index] + // for cached_has_word_index >= 0 + int cached_has_word_index = -1; - for (int chunk_index = 0; chunk_index < chunks.size(); chunk_index++) { - const std::vector& chunk = chunks[chunk_index]; - GOOGLE_CHECK(!chunk.empty()); + for (int chunk_index = 0; chunk_index < chunks.size(); chunk_index++) { + const std::vector& chunk = chunks[chunk_index]; + bool have_outer_if = + chunk.size() > 1 && HasByteIndex(chunk.front()) != kNoHasbit; + cold_skipper.OnStartChunk(chunk_index, cached_has_word_index, "from.", + printer); - // Merge Repeated fields. These fields do not require a - // check as we can simply iterate over them. - if (chunk.front()->is_repeated()) { - for (int i = 0; i < chunk.size(); i++) { - const FieldDescriptor* field = chunk[i]; + if (have_outer_if) { + // Emit an if() that will let us skip the whole chunk if none are set. + uint32 chunk_mask = GenChunkMask(chunk, has_bit_indices_); + std::string chunk_mask_str = + StrCat(strings::Hex(chunk_mask, strings::ZERO_PAD_8)); - const FieldGenerator& generator = field_generators_.get(field); - generator.GenerateMergingCode(printer); - } - continue; + // Check (up to) 8 has_bits at a time if we have more than one field in + // this chunk. Due to field layout ordering, we may check + // _has_bits_[last_chunk * 8 / 32] multiple times. + GOOGLE_DCHECK_LE(2, popcnt(chunk_mask)); + GOOGLE_DCHECK_GE(8, popcnt(chunk_mask)); + + if (cached_has_word_index != HasWordIndex(chunk.front())) { + cached_has_word_index = HasWordIndex(chunk.front()); + format("cached_has_bits = from._has_bits_[$1$];\n", + cached_has_word_index); } - // Merge Optional and Required fields (after a _has_bit_ check). - cold_skipper.OnStartChunk(chunk_index, cached_has_bit_index, "from.", - printer); + format("if (cached_has_bits & 0x$1$u) {\n", chunk_mask_str); + format.Indent(); + } - int last_chunk = has_bit_indices_[chunk.front()->index()] / 8; - GOOGLE_DCHECK_NE(-1, last_chunk); + // Go back and emit merging code for each of the fields we processed. + bool deferred_has_bit_changes = false; + for (const auto field : chunk) { + const FieldGenerator& generator = field_generators_.get(field); - const bool have_outer_if = chunk.size() > 1; - if (have_outer_if) { - uint32 last_chunk_mask = GenChunkMask(chunk, has_bit_indices_); - const int count = popcnt(last_chunk_mask); - - // Check (up to) 8 has_bits at a time if we have more than one field in - // this chunk. Due to field layout ordering, we may check - // _has_bits_[last_chunk * 8 / 32] multiple times. - GOOGLE_DCHECK_LE(2, count); - GOOGLE_DCHECK_GE(8, count); - - if (cached_has_bit_index != last_chunk / 4) { - cached_has_bit_index = last_chunk / 4; - format("cached_has_bits = from._has_bits_[$1$];\n", - cached_has_bit_index); + if (field->is_repeated()) { + generator.GenerateMergingCode(printer); + } else if (field->is_optional() && !HasHasbit(field)) { + // Merge semantics without true field presence: primitive fields are + // merged only if non-zero (numeric) or non-empty (string). + bool have_enclosing_if = + EmitFieldNonDefaultCondition(printer, "from.", field); + generator.GenerateMergingCode(printer); + if (have_enclosing_if) { + format.Outdent(); + format("}\n"); } - format("if (cached_has_bits & 0x$1$u) {\n", - StrCat(strings::Hex(last_chunk_mask, strings::ZERO_PAD_8))); + } else if (field->options().weak() || + cached_has_word_index != HasWordIndex(field)) { + // Check hasbit, not using cached bits. + GOOGLE_CHECK(HasHasbit(field)); + format("if (from._internal_has_$1$()) {\n", FieldName(field)); format.Indent(); - } - - // Go back and emit merging code for each of the fields we processed. - bool deferred_has_bit_changes = false; - for (const auto field : chunk) { - const FieldGenerator& generator = field_generators_.get(field); - - // Attempt to use the state of cached_has_bits, if possible. + generator.GenerateMergingCode(printer); + format.Outdent(); + format("}\n"); + } else { + // Check hasbit, using cached bits. + GOOGLE_CHECK(HasHasbit(field)); int has_bit_index = has_bit_indices_[field->index()]; - if (!field->options().weak() && - cached_has_bit_index == has_bit_index / 32) { - const std::string mask = StrCat( - strings::Hex(1u << (has_bit_index % 32), strings::ZERO_PAD_8)); - - format("if (cached_has_bits & 0x$1$u) {\n", mask); - } else { - format("if (from.has_$1$()) {\n", FieldName(field)); - } + const std::string mask = StrCat( + strings::Hex(1u << (has_bit_index % 32), strings::ZERO_PAD_8)); + format("if (cached_has_bits & 0x$1$u) {\n", mask); format.Indent(); if (have_outer_if && IsPOD(field)) { - // GenerateCopyConstructorCode for enum and primitive scalar fields - // does not do _has_bits_ modifications. We defer _has_bits_ - // manipulation until the end of the outer if. - // + // Defer hasbit modification until the end of chunk. // This can reduce the number of loads/stores by up to 7 per 8 fields. deferred_has_bit_changes = true; generator.GenerateCopyConstructorCode(printer); @@ -3229,38 +3290,22 @@ void MessageGenerator::GenerateMergeFrom(io::Printer* printer) { format.Outdent(); format("}\n"); } - - if (have_outer_if) { - if (deferred_has_bit_changes) { - // Flush the has bits for the primitives we deferred. - GOOGLE_CHECK_LE(0, cached_has_bit_index); - format("_has_bits_[$1$] |= cached_has_bits;\n", cached_has_bit_index); - } - - format.Outdent(); - format("}\n"); - } - - if (cold_skipper.OnEndChunk(chunk_index, printer)) { - // Reset here as it may have been updated in just closed if statement. - cached_has_bit_index = -1; - } } - } else { - // proto3 - for (const auto field : optimized_order_) { - const FieldGenerator& generator = field_generators_.get(field); - // Merge semantics without true field presence: primitive fields are - // merged only if non-zero (numeric) or non-empty (string). - bool have_enclosing_if = - EmitFieldNonDefaultCondition(printer, "from.", field); - generator.GenerateMergingCode(printer); - - if (have_enclosing_if) { - format.Outdent(); - format("}\n"); + if (have_outer_if) { + 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.Outdent(); + format("}\n"); + } + + if (cold_skipper.OnEndChunk(chunk_index, printer)) { + // Reset here as it may have been updated in just closed if statement. + cached_has_word_index = -1; } } @@ -3271,7 +3316,9 @@ void MessageGenerator::GenerateMergeFrom(io::Printer* printer) { for (auto field : FieldRange(oneof)) { format("case k$1$: {\n", UnderscoresToCamelCase(field->name(), true)); format.Indent(); - field_generators_.get(field).GenerateMergingCode(printer); + if (IsFieldUsed(field, options_)) { + field_generators_.get(field).GenerateMergingCode(printer); + } format("break;\n"); format.Outdent(); format("}\n"); @@ -3368,331 +3415,23 @@ void MessageGenerator::GenerateMergeFromCodedStream(io::Printer* printer) { if (descriptor_->options().message_set_wire_format()) { // Special-case MessageSet. format( - "#if $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n" "const char* $classname$::_InternalParse(const char* ptr,\n" " ::$proto_ns$::internal::ParseContext* ctx) {\n" " return _extensions_.ParseMessageSet(ptr, \n" " internal_default_instance(), &_internal_metadata_, ctx);\n" - "}\n" - "#else\n" - "bool $classname$::MergePartialFromCodedStream(\n" - " ::$proto_ns$::io::CodedInputStream* input) {\n" - " return _extensions_.ParseMessageSet(input,\n" - " internal_default_instance(), $mutable_unknown_fields$);\n" - "}\n" - "#endif // $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"); + "}\n"); return; } - format("#if $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"); GenerateParserLoop(descriptor_, max_has_bit_index_, options_, scc_analyzer_, printer); - format("#else // $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"); - std::vector ordered_fields = - SortFieldsByNumber(descriptor_); - - format( - "bool $classname$::MergePartialFromCodedStream(\n" - " ::$proto_ns$::io::CodedInputStream* input) {\n"); - - if (table_driven_) { - format.Indent(); - - const std::string lite = - UseUnknownFieldSet(descriptor_->file(), options_) ? "" : "Lite"; - - format( - "return ::$proto_ns$::internal::MergePartialFromCodedStream$1$(\n" - " this, ::$tablename$::schema[\n" - " $classname$::kIndexInFileMessages], input);\n", - lite); - - format.Outdent(); - - format("}\n"); - format("#endif // $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"); - return; - } - - if (SupportsArenas(descriptor_)) { - for (auto field : ordered_fields) { - const FieldGenerator& field_generator = field_generators_.get(field); - if (field_generator.MergeFromCodedStreamNeedsArena()) { - format(" ::$proto_ns$::Arena* arena = GetArenaNoVirtual();\n"); - break; - } - } - } - - format( - "#define DO_(EXPRESSION) if " - "(!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure\n" - " $uint32$ tag;\n"); - - if (!UseUnknownFieldSet(descriptor_->file(), options_)) { - format( - " ::$proto_ns$::internal::LiteUnknownFieldSetter " - "unknown_fields_setter(\n" - " &_internal_metadata_);\n" - " ::$proto_ns$::io::StringOutputStream unknown_fields_output(\n" - " unknown_fields_setter.buffer());\n" - " ::$proto_ns$::io::CodedOutputStream unknown_fields_stream(\n" - " &unknown_fields_output, false);\n"); - } - - format(" // @@protoc_insertion_point(parse_start:$full_name$)\n"); - - format.Indent(); - format("for (;;) {\n"); - format.Indent(); - - // To calculate the maximum tag to expect, we look at the highest-numbered - // field. We need to be prepared to handle more than one wire type if that - // field is a packable repeated field, so to simplify things we assume the - // highest possible wire type of 5. - uint32 maxtag = - ordered_fields.empty() ? 0 : ordered_fields.back()->number() * 8 + 5; - const int kCutoff0 = 127; // fits in 1-byte varint - const int kCutoff1 = (127 << 7) + 127; // fits in 2-byte varint - - // We need to capture the last tag when parsing if this is a Group type, as - // our caller will verify (via CodedInputStream::LastTagWas) that the correct - // closing tag was received. - bool capture_last_tag = false; - const Descriptor* parent = descriptor_->containing_type(); - if (parent) { - for (auto field : FieldRange(parent)) { - if (field->type() == FieldDescriptor::TYPE_GROUP && - field->message_type() == descriptor_) { - capture_last_tag = true; - break; - } - } - - for (int i = 0; i < parent->extension_count(); i++) { - const FieldDescriptor* field = parent->extension(i); - if (field->type() == FieldDescriptor::TYPE_GROUP && - field->message_type() == descriptor_) { - capture_last_tag = true; - break; - } - } - } - - for (int i = 0; i < descriptor_->file()->extension_count(); i++) { - const FieldDescriptor* field = descriptor_->file()->extension(i); - if (field->type() == FieldDescriptor::TYPE_GROUP && - field->message_type() == descriptor_) { - capture_last_tag = true; - break; - } - } - - format( - "::std::pair<$uint32$, bool> p = " - "input->ReadTagWithCutoffNoLastTag($1$u);\n" - "tag = p.first;\n" - "if (!p.second) goto handle_unusual;\n", - maxtag <= kCutoff0 ? kCutoff0 : (maxtag <= kCutoff1 ? kCutoff1 : maxtag)); - - if (descriptor_->field_count() > 0) { - // We don't even want to print the switch() if we have no fields because - // MSVC dislikes switch() statements that contain only a default value. - - // Note: If we just switched on the tag rather than the field number, we - // could avoid the need for the if() to check the wire type at the beginning - // of each case. However, this is actually a bit slower in practice as it - // creates a jump table that is 8x larger and sparser, and meanwhile the - // if()s are highly predictable. - // - // Historically, we inserted checks to peek at the next tag on the wire and - // jump directly to the next case statement. While this avoids the jump - // table that the switch uses, it greatly increases code size (20-60%) and - // inserts branches that may fail (especially for real world protos that - // interleave--in field number order--hot and cold fields). Loadtests - // confirmed that removing this optimization is performance neutral. - if (num_weak_fields_ > 0) { - format("uint32 weak_offset;\n"); - } - format( - "switch (::$proto_ns$::internal::WireFormatLite::" - "GetTagFieldNumber(tag)) {\n"); - - format.Indent(); - - for (auto field : ordered_fields) { - PrintFieldComment(format, field); - if (IsWeak(field, options_)) { - format( - "case $1$:\n" - " weak_offset = offsetof($classname$DefaultTypeInternal, $2$_);\n" - " goto handle_weak_field_map;\n", - field->number(), FieldName(field)); - continue; - } - - format("case $1$: {\n", field->number()); - format.Indent(); - const FieldGenerator& field_generator = field_generators_.get(field); - - // Emit code to parse the common, expected case. - // MSVC is warning about truncating constant in the static_cast so - // we truncate the tag explicitly. - format("if (static_cast< $uint8$>(tag) == ($1$ & 0xFF)) {\n", - WireFormat::MakeTag(field)); - - format.Indent(); - if (field->is_packed()) { - field_generator.GenerateMergeFromCodedStreamWithPacking(printer); - } else { - field_generator.GenerateMergeFromCodedStream(printer); - } - format.Outdent(); - - // Emit code to parse unexpectedly packed or unpacked values. - if (field->is_packed()) { - internal::WireFormatLite::WireType wiretype = - WireFormat::WireTypeForFieldType(field->type()); - const uint32 tag = - internal::WireFormatLite::MakeTag(field->number(), wiretype); - format("} else if (static_cast< $uint8$>(tag) == ($1$ & 0xFF)) {\n", - tag); - - format.Indent(); - field_generator.GenerateMergeFromCodedStream(printer); - format.Outdent(); - } else if (field->is_packable() && !field->is_packed()) { - internal::WireFormatLite::WireType wiretype = - internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED; - const uint32 tag = - internal::WireFormatLite::MakeTag(field->number(), wiretype); - format("} else if (static_cast< $uint8$>(tag) == ($1$ & 0xFF)) {\n", - tag); - format.Indent(); - field_generator.GenerateMergeFromCodedStreamWithPacking(printer); - format.Outdent(); - } - - format( - "} else {\n" - " goto handle_unusual;\n" - "}\n"); - - format("break;\n"); - - format.Outdent(); - format("}\n\n"); - } - if (num_weak_fields_ > 0) { - format("handle_weak_field_map: {\n"); - format.Indent(); - - format( - "if ((tag & 0x7) != 2) goto handle_unusual;\n" - "DO_(_weak_field_map_.ReadMessage(input, tag >> 3,\n" - " &_$classname$_default_instance_, weak_offset));\n"); - format("break;\n"); - format.Outdent(); - format("}\n\n"); - } - format("default: {\n"); - format.Indent(); - } - - format.Outdent(); - format("handle_unusual:\n"); - format.Indent(); - // If tag is 0 or an end-group tag then this must be the end of the message. - if (capture_last_tag) { - format( - "if (tag == 0 ||\n" - " ::$proto_ns$::internal::WireFormatLite::GetTagWireType(tag) ==\n" - " ::$proto_ns$::internal::WireFormatLite::WIRETYPE_END_GROUP) {\n" - " input->SetLastTag(tag);\n" - " goto success;\n" - "}\n"); - } else { - format( - "if (tag == 0) {\n" - " goto success;\n" - "}\n"); - } - - // Handle extension ranges. - if (descriptor_->extension_range_count() > 0) { - format("if ("); - for (int i = 0; i < descriptor_->extension_range_count(); i++) { - const Descriptor::ExtensionRange* range = descriptor_->extension_range(i); - if (i > 0) format(" ||\n "); - - uint32 start_tag = WireFormatLite::MakeTag( - range->start, static_cast(0)); - uint32 end_tag = WireFormatLite::MakeTag( - range->end, static_cast(0)); - - if (range->end > FieldDescriptor::kMaxNumber) { - format("($1$u <= tag)", start_tag); - } else { - format("($1$u <= tag && tag < $2$u)", start_tag, end_tag); - } - } - format(") {\n"); - if (UseUnknownFieldSet(descriptor_->file(), options_)) { - format( - " DO_(_extensions_.ParseField(tag, input,\n" - " internal_default_instance(),\n" - " $mutable_unknown_fields$));\n"); - } else { - format( - " DO_(_extensions_.ParseField(tag, input,\n" - " internal_default_instance(),\n" - " &unknown_fields_stream));\n"); - } - format( - " continue;\n" - "}\n"); - } - - // We really don't recognize this tag. Skip it. - if (UseUnknownFieldSet(descriptor_->file(), options_)) { - format( - "DO_(::$proto_ns$::internal::WireFormat::SkipField(\n" - " input, tag, $mutable_unknown_fields$));\n"); - } else { - format( - "DO_(::$proto_ns$::internal::WireFormatLite::SkipField(\n" - " input, tag, &unknown_fields_stream));\n"); - } - - if (descriptor_->field_count() > 0) { - format("break;\n"); - format.Outdent(); - format("}\n"); // default: - format.Outdent(); - format("}\n"); // switch - } - - format.Outdent(); - format.Outdent(); - format( - " }\n" // for (;;) - "success:\n" - " // @@protoc_insertion_point(parse_success:$full_name$)\n" - " return true;\n" - "failure:\n" - " // @@protoc_insertion_point(parse_failure:$full_name$)\n" - " return false;\n" - "#undef DO_\n" - "}\n"); - format("#endif // $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"); } void MessageGenerator::GenerateSerializeOneofFields( - io::Printer* printer, const std::vector& fields, - bool to_array) { + io::Printer* printer, const std::vector& fields) { Formatter format(printer, variables_); GOOGLE_CHECK(!fields.empty()); if (fields.size() == 1) { - GenerateSerializeOneField(printer, fields[0], to_array, -1); + GenerateSerializeOneField(printer, fields[0], -1); return; } // We have multiple mutually exclusive choices. Emit a switch statement. @@ -3700,16 +3439,13 @@ void MessageGenerator::GenerateSerializeOneofFields( format("switch ($1$_case()) {\n", oneof->name()); format.Indent(); for (auto field : fields) { - format("case k$1$:\n", UnderscoresToCamelCase(field->name(), true)); + format("case k$1$: {\n", UnderscoresToCamelCase(field->name(), true)); format.Indent(); - if (to_array) { - field_generators_.get(field).GenerateSerializeWithCachedSizesToArray( - printer); - } else { - field_generators_.get(field).GenerateSerializeWithCachedSizes(printer); - } + field_generators_.get(field).GenerateSerializeWithCachedSizesToArray( + printer); format("break;\n"); format.Outdent(); + format("}\n"); } format.Outdent(); // Doing nothing is an option. @@ -3720,7 +3456,6 @@ void MessageGenerator::GenerateSerializeOneofFields( void MessageGenerator::GenerateSerializeOneField(io::Printer* printer, const FieldDescriptor* field, - bool to_array, int cached_has_bits_index) { Formatter format(printer, variables_); if (!field->options().weak()) { @@ -3730,30 +3465,25 @@ void MessageGenerator::GenerateSerializeOneField(io::Printer* printer, bool have_enclosing_if = false; if (field->options().weak()) { - } else if (!field->is_repeated() && HasFieldPresence(descriptor_->file())) { + } else if (HasHasbit(field)) { // Attempt to use the state of cached_has_bits, if possible. - int has_bit_index = has_bit_indices_[field->index()]; + int has_bit_index = HasBitIndex(field); if (cached_has_bits_index == has_bit_index / 32) { const std::string mask = StrCat(strings::Hex(1u << (has_bit_index % 32), strings::ZERO_PAD_8)); format("if (cached_has_bits & 0x$1$u) {\n", mask); } else { - format("if (has_$1$()) {\n", FieldName(field)); + format("if (_internal_has_$1$()) {\n", FieldName(field)); } format.Indent(); have_enclosing_if = true; - } else if (!HasFieldPresence(descriptor_->file())) { + } else if (field->is_optional() && !HasHasbit(field)) { have_enclosing_if = EmitFieldNonDefaultCondition(printer, "this->", field); } - if (to_array) { - field_generators_.get(field).GenerateSerializeWithCachedSizesToArray( - printer); - } else { - field_generators_.get(field).GenerateSerializeWithCachedSizes(printer); - } + field_generators_.get(field).GenerateSerializeWithCachedSizesToArray(printer); if (have_enclosing_if) { format.Outdent(); @@ -3763,57 +3493,15 @@ void MessageGenerator::GenerateSerializeOneField(io::Printer* printer, } void MessageGenerator::GenerateSerializeOneExtensionRange( - io::Printer* printer, const Descriptor::ExtensionRange* range, - bool to_array) { - std::map vars; + io::Printer* printer, const Descriptor::ExtensionRange* range) { + std::map vars = variables_; vars["start"] = StrCat(range->start); vars["end"] = StrCat(range->end); Formatter format(printer, vars); format("// Extension range [$start$, $end$)\n"); - if (to_array) { - format( - "target = _extensions_.InternalSerializeWithCachedSizesToArray(\n" - " $start$, $end$, target);\n\n"); - } else { - format( - "_extensions_.SerializeWithCachedSizes($start$, $end$, output);\n" - "\n"); - } -} - -void MessageGenerator::GenerateSerializeWithCachedSizes(io::Printer* printer) { - Formatter format(printer, variables_); - if (descriptor_->options().message_set_wire_format()) { - // Special-case MessageSet. - format( - "void $classname$::SerializeWithCachedSizes(\n" - " ::$proto_ns$::io::CodedOutputStream* output) const {\n" - " _extensions_.SerializeMessageSetWithCachedSizes(output);\n"); - std::map vars; - SetUnknkownFieldsVariable(descriptor_, options_, &vars); - format.AddMap(vars); - format( - " " - "::$proto_ns$::internal::SerializeUnknownMessageSetItems(\n" - " $unknown_fields$, output);\n"); - format("}\n"); - return; - } - if (options_.table_driven_serialization) return; - format( - "void $classname$::SerializeWithCachedSizes(\n" - " ::$proto_ns$::io::CodedOutputStream* output) const {\n"); - format.Indent(); - - format("// @@protoc_insertion_point(serialize_start:$full_name$)\n"); - - GenerateSerializeWithCachedSizesBody(printer, false); - - format("// @@protoc_insertion_point(serialize_end:$full_name$)\n"); - - format.Outdent(); - format("}\n"); + "target = _extensions_._InternalSerialize(\n" + " $start$, $end$, target, stream);\n\n"); } void MessageGenerator::GenerateSerializeWithCachedSizesToArray( @@ -3822,18 +3510,18 @@ void MessageGenerator::GenerateSerializeWithCachedSizesToArray( if (descriptor_->options().message_set_wire_format()) { // Special-case MessageSet. format( - "$uint8$* $classname$::InternalSerializeWithCachedSizesToArray(\n" - " $uint8$* target) const {\n" + "$uint8$* $classname$::_InternalSerialize(\n" + " $uint8$* target, ::$proto_ns$::io::EpsCopyOutputStream* stream) " + "const {\n" " target = _extensions_." - "InternalSerializeMessageSetWithCachedSizesToArray(target);\n"); - GOOGLE_CHECK(UseUnknownFieldSet(descriptor_->file(), options_)); + "InternalSerializeMessageSetWithCachedSizesToArray(target, stream);\n"); std::map vars; SetUnknkownFieldsVariable(descriptor_, options_, &vars); format.AddMap(vars); format( - " target = ::$proto_ns$::internal::WireFormat::\n" - " SerializeUnknownMessageSetItemsToArray(\n" - " $unknown_fields$, target);\n"); + " target = ::$proto_ns$::internal::" + "InternalSerializeUnknownMessageSetItemsToArray(\n" + " $unknown_fields$, target, stream);\n"); format( " return target;\n" "}\n"); @@ -3841,13 +3529,14 @@ void MessageGenerator::GenerateSerializeWithCachedSizesToArray( } format( - "$uint8$* $classname$::InternalSerializeWithCachedSizesToArray(\n" - " $uint8$* target) const {\n"); + "$uint8$* $classname$::_InternalSerialize(\n" + " $uint8$* target, ::$proto_ns$::io::EpsCopyOutputStream* stream) " + "const {\n"); format.Indent(); format("// @@protoc_insertion_point(serialize_to_array_start:$full_name$)\n"); - GenerateSerializeWithCachedSizesBody(printer, true); + GenerateSerializeWithCachedSizesBody(printer); format("// @@protoc_insertion_point(serialize_to_array_end:$full_name$)\n"); @@ -3858,7 +3547,7 @@ void MessageGenerator::GenerateSerializeWithCachedSizesToArray( } void MessageGenerator::GenerateSerializeWithCachedSizesBody( - io::Printer* printer, bool to_array) { + io::Printer* printer) { Formatter format(printer, variables_); // If there are multiple fields in a row from the same oneof then we // coalesce them and emit a switch statement. This is more efficient @@ -3867,13 +3556,11 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBody( // compiler's emitted code might check has_y() even when has_x() is true. class LazySerializerEmitter { public: - LazySerializerEmitter(MessageGenerator* mg, io::Printer* printer, - bool to_array) + LazySerializerEmitter(MessageGenerator* mg, io::Printer* printer) : mg_(mg), format_(printer), - to_array_(to_array), eager_(!HasFieldPresence(mg->descriptor_->file())), - cached_has_bit_index_(-1) {} + cached_has_bit_index_(kNoHasbit) {} ~LazySerializerEmitter() { Flush(); } @@ -3883,7 +3570,7 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBody( if (eager_ || MustFlush(field)) { Flush(); } - if (field->containing_oneof() == NULL) { + if (!field->real_containing_oneof()) { // TODO(ckennelly): Defer non-oneof fields similarly to oneof fields. if (!field->options().weak() && !field->is_repeated() && !eager_) { @@ -3901,7 +3588,7 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBody( } } - mg_->GenerateSerializeOneField(format_.printer(), field, to_array_, + mg_->GenerateSerializeOneField(format_.printer(), field, cached_has_bit_index_); } else { v_.push_back(field); @@ -3910,7 +3597,7 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBody( void Flush() { if (!v_.empty()) { - mg_->GenerateSerializeOneofFields(format_.printer(), v_, to_array_); + mg_->GenerateSerializeOneofFields(format_.printer(), v_); v_.clear(); } } @@ -3925,7 +3612,6 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBody( MessageGenerator* mg_; Formatter format_; - const bool to_array_; const bool eager_; std::vector v_; @@ -3957,7 +3643,7 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBody( // Merge the fields and the extension ranges, both sorted by field number. { - LazySerializerEmitter e(this, printer, to_array); + LazySerializerEmitter e(this, printer); const FieldDescriptor* last_weak_field = nullptr; int i, j; for (i = 0, j = 0; @@ -3966,6 +3652,9 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBody( (i < descriptor_->field_count() && ordered_fields[i]->number() < sorted_extensions[j]->start)) { const FieldDescriptor* field = ordered_fields[i++]; + if (!IsFieldUsed(field, options_)) { + continue; + } if (field->options().weak()) { last_weak_field = field; PrintFieldComment(format, field); @@ -3982,8 +3671,7 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBody( last_weak_field = nullptr; } e.Flush(); - GenerateSerializeOneExtensionRange(printer, sorted_extensions[j++], - to_array); + GenerateSerializeOneExtensionRange(printer, sorted_extensions[j++]); } } if (last_weak_field != nullptr) { @@ -3994,27 +3682,21 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBody( std::map vars; SetUnknkownFieldsVariable(descriptor_, options_, &vars); format.AddMap(vars); + format("if (PROTOBUF_PREDICT_FALSE($have_unknown_fields$)) {\n"); + format.Indent(); if (UseUnknownFieldSet(descriptor_->file(), options_)) { - format("if ($have_unknown_fields$) {\n"); - format.Indent(); - if (to_array) { - format( - "target = " - "::$proto_ns$::internal::WireFormat::SerializeUnknownFieldsToArray(\n" - " $unknown_fields$, target);\n"); - } else { - format( - "::$proto_ns$::internal::WireFormat::SerializeUnknownFields(\n" - " $unknown_fields$, output);\n"); - } - format.Outdent(); - - format("}\n"); + format( + "target = " + "::$proto_ns$::internal::WireFormat::" + "InternalSerializeUnknownFieldsToArray(\n" + " $unknown_fields$, target, stream);\n"); } else { format( - "output->WriteRaw($unknown_fields$.data(),\n" - " static_cast($unknown_fields$.size()));\n"); + "target = stream->WriteRaw($unknown_fields$.data(),\n" + " static_cast($unknown_fields$.size()), target);\n"); } + format.Outdent(); + format("}\n"); } std::vector MessageGenerator::RequiredFieldsBitMask() const { @@ -4032,29 +3714,6 @@ std::vector MessageGenerator::RequiredFieldsBitMask() const { return masks; } -// Create an expression that evaluates to -// "for all i, (_has_bits_[i] & masks[i]) == masks[i]" -// masks is allowed to be shorter than _has_bits_, but at least one element of -// masks must be non-zero. -static std::string ConditionalToCheckBitmasks( - const std::vector& masks) { - std::vector parts; - for (int i = 0; i < masks.size(); i++) { - if (masks[i] == 0) continue; - std::string m = StrCat("0x", strings::Hex(masks[i], strings::ZERO_PAD_8)); - // Each xor evaluates to 0 if the expected bits are present. - parts.push_back( - StrCat("((_has_bits_[", i, "] & ", m, ") ^ ", m, ")")); - } - GOOGLE_CHECK(!parts.empty()); - // If we have multiple parts, each expected to be 0, then bitwise-or them. - std::string result = - parts.size() == 1 - ? parts[0] - : StrCat("(", Join(parts, "\n | "), ")"); - return result + " == 0"; -} - void MessageGenerator::GenerateByteSize(io::Printer* printer) { Formatter format(printer, variables_); @@ -4079,7 +3738,7 @@ void MessageGenerator::GenerateByteSize(io::Printer* printer) { return; } - if (num_required_fields_ > 1 && HasFieldPresence(descriptor_->file())) { + if (num_required_fields_ > 1) { // Emit a function (rarely used, we hope) that handles the required fields // by checking for each one individually. format( @@ -4092,7 +3751,7 @@ void MessageGenerator::GenerateByteSize(io::Printer* printer) { if (field->is_required()) { format( "\n" - "if (has_$1$()) {\n", + "if (_internal_has_$1$()) {\n", FieldName(field)); format.Indent(); PrintFieldComment(format, field); @@ -4125,23 +3784,11 @@ void MessageGenerator::GenerateByteSize(io::Printer* printer) { std::map vars; SetUnknkownFieldsVariable(descriptor_, options_, &vars); format.AddMap(vars); - if (UseUnknownFieldSet(descriptor_->file(), options_)) { - format( - "if ($have_unknown_fields$) {\n" - " total_size +=\n" - " ::$proto_ns$::internal::WireFormat::ComputeUnknownFieldsSize(\n" - " $unknown_fields$);\n" - "}\n"); - } else { - format( - "total_size += $unknown_fields$.size();\n" - "\n"); - } // Handle required fields (if any). We expect all of them to be // present, so emit one conditional that checks for that. If they are all // present then the fast path executes; otherwise the slow path executes. - if (num_required_fields_ > 1 && HasFieldPresence(descriptor_->file())) { + if (num_required_fields_ > 1) { // The fast path works if all required fields are present. const std::vector masks_for_has_bits = RequiredFieldsBitMask(); format("if ($1$) { // All required fields are present.\n", @@ -4165,7 +3812,7 @@ void MessageGenerator::GenerateByteSize(io::Printer* printer) { for (auto field : optimized_order_) { if (!field->is_required()) continue; PrintFieldComment(format, field); - format("if (has_$1$()) {\n", FieldName(field)); + format("if (_internal_has_$1$()) {\n", FieldName(field)); format.Indent(); field_generators_.get(field).GenerateByteSize(printer); format.Outdent(); @@ -4175,75 +3822,45 @@ void MessageGenerator::GenerateByteSize(io::Printer* printer) { std::vector> chunks = CollectFields( optimized_order_, - MatchRepeatedAndHasByteAndRequired( - &has_bit_indices_, HasFieldPresence(descriptor_->file()))); + [&](const FieldDescriptor* a, const FieldDescriptor* b) -> bool { + return a->label() == b->label() && HasByteIndex(a) == HasByteIndex(b); + }); // 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, - HasFieldPresence(descriptor_->file())); + ColdChunkSkipper cold_skipper(options_, chunks, has_bit_indices_, kColdRatio); + int cached_has_word_index = -1; format( "$uint32$ cached_has_bits = 0;\n" "// Prevent compiler warnings about cached_has_bits being unused\n" "(void) cached_has_bits;\n\n"); - int cached_has_bit_index = -1; - for (int chunk_index = 0; chunk_index < chunks.size(); chunk_index++) { const std::vector& chunk = chunks[chunk_index]; - GOOGLE_CHECK(!chunk.empty()); - - // Handle repeated fields. - if (chunk.front()->is_repeated()) { - for (int i = 0; i < chunk.size(); i++) { - const FieldDescriptor* field = chunk[i]; - - PrintFieldComment(format, field); - const FieldGenerator& generator = field_generators_.get(field); - generator.GenerateByteSize(printer); - format("\n"); - } - continue; - } - - cold_skipper.OnStartChunk(chunk_index, cached_has_bit_index, "", printer); - - // Handle optional (non-repeated/oneof) fields. - // - // These are handled in chunks of 8. The first chunk is - // the non-requireds-non-repeateds-non-unions-non-extensions in - // descriptor_->field(0), descriptor_->field(1), ... descriptor_->field(7), - // and the second chunk is the same for - // descriptor_->field(8), descriptor_->field(9), ... - // descriptor_->field(15), - // etc. - int last_chunk = HasFieldPresence(descriptor_->file()) - ? has_bit_indices_[chunk.front()->index()] / 8 - : 0; - GOOGLE_DCHECK_NE(-1, last_chunk); - const bool have_outer_if = - HasFieldPresence(descriptor_->file()) && chunk.size() > 1; + chunk.size() > 1 && HasWordIndex(chunk[0]) != kNoHasbit; + cold_skipper.OnStartChunk(chunk_index, cached_has_word_index, "", printer); if (have_outer_if) { - uint32 last_chunk_mask = GenChunkMask(chunk, has_bit_indices_); - const int count = popcnt(last_chunk_mask); + // Emit an if() that will let us skip the whole chunk if none are set. + uint32 chunk_mask = GenChunkMask(chunk, has_bit_indices_); + std::string chunk_mask_str = + StrCat(strings::Hex(chunk_mask, strings::ZERO_PAD_8)); // Check (up to) 8 has_bits at a time if we have more than one field in // this chunk. Due to field layout ordering, we may check // _has_bits_[last_chunk * 8 / 32] multiple times. - GOOGLE_DCHECK_LE(2, count); - GOOGLE_DCHECK_GE(8, count); + GOOGLE_DCHECK_LE(2, popcnt(chunk_mask)); + GOOGLE_DCHECK_GE(8, popcnt(chunk_mask)); - if (cached_has_bit_index != last_chunk / 4) { - cached_has_bit_index = last_chunk / 4; - format("cached_has_bits = _has_bits_[$1$];\n", cached_has_bit_index); + if (cached_has_word_index != HasWordIndex(chunk.front())) { + cached_has_word_index = HasWordIndex(chunk.front()); + format("cached_has_bits = _has_bits_[$1$];\n", cached_has_word_index); } - format("if (cached_has_bits & 0x$1$u) {\n", - StrCat(strings::Hex(last_chunk_mask, strings::ZERO_PAD_8))); + format("if (cached_has_bits & 0x$1$u) {\n", chunk_mask_str); format.Indent(); } @@ -4251,13 +3868,17 @@ void MessageGenerator::GenerateByteSize(io::Printer* printer) { for (int j = 0; j < chunk.size(); j++) { const FieldDescriptor* field = chunk[j]; const FieldGenerator& generator = field_generators_.get(field); + bool have_enclosing_if = false; + bool need_extra_newline = false; PrintFieldComment(format, field); - bool have_enclosing_if = false; - if (HasFieldPresence(descriptor_->file())) { + if (field->is_repeated()) { + // No presence check is required. + need_extra_newline = true; + } else if (HasHasbit(field)) { PrintPresenceCheck(format, field, has_bit_indices_, printer, - &cached_has_bit_index); + &cached_has_word_index); have_enclosing_if = true; } else { // Without field presence: field is serialized only if it has a @@ -4274,6 +3895,9 @@ void MessageGenerator::GenerateByteSize(io::Printer* printer) { "}\n" "\n"); } + if (need_extra_newline) { + format("\n"); + } } if (have_outer_if) { @@ -4283,7 +3907,7 @@ void MessageGenerator::GenerateByteSize(io::Printer* printer) { if (cold_skipper.OnEndChunk(chunk_index, printer)) { // Reset here as it may have been updated in just closed if statement. - cached_has_bit_index = -1; + cached_has_word_index = -1; } } @@ -4296,7 +3920,9 @@ void MessageGenerator::GenerateByteSize(io::Printer* printer) { PrintFieldComment(format, field); format("case k$1$: {\n", UnderscoresToCamelCase(field->name(), true)); format.Indent(); - field_generators_.get(field).GenerateByteSize(printer); + if (IsFieldUsed(field, options_)) { + field_generators_.get(field).GenerateByteSize(printer); + } format("break;\n"); format.Outdent(); format("}\n"); @@ -4315,6 +3941,19 @@ void MessageGenerator::GenerateByteSize(io::Printer* printer) { format("total_size += _weak_field_map_.ByteSizeLong();\n"); } + format("if (PROTOBUF_PREDICT_FALSE($have_unknown_fields$)) {\n"); + if (UseUnknownFieldSet(descriptor_->file(), options_)) { + // We go out of our way to put the computation of the uncommon path of + // unknown fields in tail position. This allows for better code generation + // of this function for simple protos. + format( + " return ::$proto_ns$::internal::ComputeUnknownFieldsSize(\n" + " _internal_metadata_, total_size, &_cached_size_);\n"); + } else { + format(" total_size += $unknown_fields$.size();\n"); + } + format("}\n"); + // We update _cached_size_ even though this is a const method. Because // const methods might be called concurrently this needs to be atomic // operations or the program is undefined. In practice, since any concurrent @@ -4344,24 +3983,10 @@ void MessageGenerator::GenerateIsInitialized(io::Printer* printer) { "}\n\n"); } - if (HasFieldPresence(descriptor_->file())) { - // Check that all required fields in this message are set. We can do this - // most efficiently by checking 32 "has bits" at a time. - const std::vector masks = RequiredFieldsBitMask(); - - for (int i = 0; i < masks.size(); i++) { - uint32 mask = masks[i]; - if (mask == 0) { - continue; - } - - // TODO(ckennelly): Consider doing something similar to ByteSizeLong(), - // where we check all of the required fields in a single branch (assuming - // that we aren't going to benefit from early termination). - format("if ((_has_bits_[$1$] & 0x$2$) != 0x$2$) return false;\n", - i, // 1 - StrCat(strings::Hex(mask, strings::ZERO_PAD_8))); // 2 - } + if (num_required_fields_ > 0) { + format( + "if (_Internal::MissingRequiredFields(_has_bits_))" + " return false;\n"); } // Now check that all non-oneof embedded messages are initialized. @@ -4373,22 +3998,24 @@ void MessageGenerator::GenerateIsInitialized(io::Printer* printer) { if (field->is_repeated()) { if (IsImplicitWeakField(field, options_, scc_analyzer_)) { format( - "if (!::$proto_ns$::internal::AllAreInitializedWeak(this->$1$_))" + "if " + "(!::$proto_ns$::internal::AllAreInitializedWeak($1$_.weak)" + ")" " return false;\n", FieldName(field)); } else { format( - "if (!::$proto_ns$::internal::AllAreInitialized(this->$1$()))" + "if (!::$proto_ns$::internal::AllAreInitialized($1$_))" " return false;\n", FieldName(field)); } } else if (field->options().weak()) { continue; } else { - GOOGLE_CHECK(!field->containing_oneof()); + GOOGLE_CHECK(!field->real_containing_oneof()); format( - "if (has_$1$()) {\n" - " if (!this->$1$_->IsInitialized()) return false;\n" + "if (_internal_has_$1$()) {\n" + " if (!$1$_->IsInitialized()) return false;\n" "}\n", FieldName(field)); } @@ -4421,10 +4048,11 @@ void MessageGenerator::GenerateIsInitialized(io::Printer* printer) { format("case k$1$: {\n", UnderscoresToCamelCase(field->name(), true)); format.Indent(); - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && + if (IsFieldUsed(field, options_) && + field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && !ShouldIgnoreRequiredFieldCheck(field, options_) && scc_analyzer_->HasRequiredFields(field->message_type())) { - GOOGLE_CHECK(!(field->options().weak() || !field->containing_oneof())); + GOOGLE_CHECK(!(field->options().weak() || !field->real_containing_oneof())); if (field->options().weak()) { // Just skip. } else { diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h index f7206b94..a212ff41 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h @@ -141,10 +141,10 @@ class MessageGenerator { void GenerateMergeFromCodedStream(io::Printer* printer); void GenerateSerializeWithCachedSizes(io::Printer* printer); void GenerateSerializeWithCachedSizesToArray(io::Printer* printer); - void GenerateSerializeWithCachedSizesBody(io::Printer* printer, - bool to_array); + void GenerateSerializeWithCachedSizesBody(io::Printer* printer); void GenerateByteSize(io::Printer* printer); void GenerateMergeFrom(io::Printer* printer); + void GenerateClassSpecificMergeFrom(io::Printer* printer); void GenerateCopyFrom(io::Printer* printer); void GenerateSwap(io::Printer* printer); void GenerateIsInitialized(io::Printer* printer); @@ -155,16 +155,14 @@ class MessageGenerator { // cached_has_bits = _has_bits_[cached_has_bit_index] // for cached_has_bit_index >= 0 void GenerateSerializeOneField(io::Printer* printer, - const FieldDescriptor* field, bool unbounded, + const FieldDescriptor* field, int cached_has_bits_index); // Generate a switch statement to serialize 2+ fields from the same oneof. // Or, if fields.size() == 1, just call GenerateSerializeOneField(). void GenerateSerializeOneofFields( - io::Printer* printer, const std::vector& fields, - bool to_array); + io::Printer* printer, const std::vector& fields); void GenerateSerializeOneExtensionRange( - io::Printer* printer, const Descriptor::ExtensionRange* range, - bool unbounded); + io::Printer* printer, const Descriptor::ExtensionRange* range); // Generates has_foo() functions and variables for singular field has-bits. void GenerateSingularFieldHasBits(const FieldDescriptor* field, @@ -183,6 +181,10 @@ class MessageGenerator { bool copy_constructor) const; size_t HasBitsSize() const; + int HasBitIndex(const FieldDescriptor* a) const; + int HasByteIndex(const FieldDescriptor* a) const; + int HasWordIndex(const FieldDescriptor* a) const; + bool SameHasByte(const FieldDescriptor* a, const FieldDescriptor* b) const; std::vector RequiredFieldsBitMask() const; const Descriptor* descriptor_; diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc index 659e3fae..b6b8f24b 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc @@ -44,8 +44,9 @@ namespace compiler { namespace cpp { namespace { -string ReinterpretCast(const string& type, const string& expression, - bool implicit_weak_field) { +std::string ReinterpretCast(const std::string& type, + const std::string& expression, + bool implicit_weak_field) { if (implicit_weak_field) { return "reinterpret_cast< " + type + " >(" + expression + ")"; } else { @@ -62,16 +63,13 @@ void SetMessageVariables(const FieldDescriptor* descriptor, (*variables)["type"] + "*", (*variables)["name"] + "_", implicit_weak); (*variables)["type_default_instance"] = QualifiedDefaultInstanceName(descriptor->message_type(), options); + (*variables)["type_default_instance_ptr"] = + QualifiedDefaultInstancePtr(descriptor->message_type(), options); (*variables)["type_reference_function"] = - implicit_weak - ? (" " + ReferenceFunctionName(descriptor->message_type(), options) + - "();\n") - : ""; - (*variables)["stream_writer"] = - (*variables)["declared_type"] + - (HasFastArraySerialization(descriptor->message_type()->file(), options) - ? "MaybeToArray" - : ""); + implicit_weak ? (" ::" + (*variables)["proto_ns"] + + "::internal::StrongReference(" + + (*variables)["type_default_instance"] + ");\n") + : ""; // NOTE: Escaped here to unblock proto1->proto2 migration. // TODO(liujisi): Extend this to apply for other conflicting methods. (*variables)["release_name"] = @@ -106,6 +104,28 @@ void MessageFieldGenerator::GeneratePrivateMembers(io::Printer* printer) const { void MessageFieldGenerator::GenerateAccessorDeclarations( io::Printer* printer) const { Formatter format(printer, variables_); + if (!IsFieldUsed(descriptor_, options_)) { + format( + "$deprecated_attr$const $type$& ${1$$name$$}$() const { " + "__builtin_trap(); }\n" + "$deprecated_attr$$type$* ${1$$release_name$$}$() { " + "__builtin_trap(); }\n" + "$deprecated_attr$$type$* ${1$mutable_$name$$}$() { " + "__builtin_trap(); }\n" + "$deprecated_attr$void ${1$set_allocated_$name$$}$" + "($type$* $name$) { __builtin_trap(); }\n", + descriptor_); + if (SupportsArenas(descriptor_)) { + format( + "$deprecated_attr$void " + "${1$unsafe_arena_set_allocated_$name$$}$(\n" + " $type$* $name$) { __builtin_trap(); }\n" + "$deprecated_attr$$type$* ${1$unsafe_arena_release_$name$$}$() { " + "__builtin_trap(); }\n", + descriptor_); + } + return; + } format( "$deprecated_attr$const $type$& ${1$$name$$}$() const;\n" "$deprecated_attr$$type$* ${1$$release_name$$}$();\n" @@ -113,6 +133,14 @@ void MessageFieldGenerator::GenerateAccessorDeclarations( "$deprecated_attr$void ${1$set_allocated_$name$$}$" "($type$* $name$);\n", descriptor_); + if (IsFieldUsed(descriptor_, options_)) { + format( + "private:\n" + "const $type$& ${1$_internal_$name$$}$() const;\n" + "$type$* ${1$_internal_mutable_$name$$}$();\n" + "public:\n", + descriptor_); + } if (SupportsArenas(descriptor_)) { format( "$deprecated_attr$void " @@ -125,17 +153,42 @@ void MessageFieldGenerator::GenerateAccessorDeclarations( void MessageFieldGenerator::GenerateNonInlineAccessorDefinitions( io::Printer* printer) const { +} + +void MessageFieldGenerator::GenerateInlineAccessorDefinitions( + io::Printer* printer) const { Formatter format(printer, variables_); + format( + "inline const $type$& $classname$::_internal_$name$() const {\n" + "$type_reference_function$" + " const $type$* p = $casted_member$;\n" + " return p != nullptr ? *p : *reinterpret_cast(\n" + " &$type_default_instance$);\n" + "}\n" + "inline const $type$& $classname$::$name$() const {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_get:$full_name$)\n" + " return _internal_$name$();\n" + "}\n"); + if (SupportsArenas(descriptor_)) { format( - "void $classname$::unsafe_arena_set_allocated_$name$(\n" + "inline void $classname$::unsafe_arena_set_allocated_$name$(\n" " $type$* $name$) {\n" + "$annotate_accessor$" // 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 (GetArenaNoVirtual() == nullptr) {\n" - " delete $name$_;\n" - " }\n" - " $name$_ = $name$;\n" + " if (GetArena() == nullptr) {\n" + " delete reinterpret_cast<::$proto_ns$::MessageLite*>($name$_);\n" + " }\n"); + if (implicit_weak_field_) { + format( + " $name$_ = " + "reinterpret_cast<::$proto_ns$::MessageLite*>($name$);\n"); + } else { + format(" $name$_ = $name$;\n"); + } + format( " if ($name$) {\n" " $set_hasbit$\n" " } else {\n" @@ -144,55 +197,34 @@ void MessageFieldGenerator::GenerateNonInlineAccessorDefinitions( " // @@protoc_insertion_point(field_unsafe_arena_set_allocated" ":$full_name$)\n" "}\n"); + format( + "inline $type$* $classname$::$release_name$() {\n" + " auto temp = unsafe_arena_release_$name$();\n" + " if (GetArena() != nullptr) {\n" + " temp = ::$proto_ns$::internal::DuplicateIfNonNull(temp);\n" + " }\n" + " return temp;\n" + "}\n" + "inline $type$* $classname$::unsafe_arena_release_$name$() {\n"); + } else { + format("inline $type$* $classname$::$release_name$() {\n"); } -} - -void MessageFieldGenerator::GenerateInlineAccessorDefinitions( - io::Printer* printer) const { - Formatter format(printer, variables_); format( - "inline const $type$& $classname$::$name$() const {\n" - " const $type$* p = $casted_member$;\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" - " return p != nullptr ? *p : *reinterpret_cast(\n" - " &$type_default_instance$);\n" - "}\n"); - - format( - "inline $type$* $classname$::$release_name$() {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_release:$full_name$)\n" "$type_reference_function$" " $clear_hasbit$\n" - " $type$* temp = $casted_member$;\n"); - if (SupportsArenas(descriptor_)) { - format( - " if (GetArenaNoVirtual() != nullptr) {\n" - " temp = ::$proto_ns$::internal::DuplicateIfNonNull(temp);\n" - " }\n"); - } - format( + " $type$* temp = $casted_member$;\n" " $name$_ = nullptr;\n" " return temp;\n" "}\n"); - if (SupportsArenas(descriptor_)) { - format( - "inline $type$* $classname$::unsafe_arena_release_$name$() {\n" - " // " - "@@protoc_insertion_point(field_unsafe_arena_release:$full_name$)\n" - "$type_reference_function$" - " $clear_hasbit$\n" - " $type$* temp = $casted_member$;\n" - " $name$_ = nullptr;\n" - " return temp;\n" - "}\n"); - } - format( - "inline $type$* $classname$::mutable_$name$() {\n" + "inline $type$* $classname$::_internal_mutable_$name$() {\n" + "$type_reference_function$" " $set_hasbit$\n" " if ($name$_ == nullptr) {\n" - " auto* p = CreateMaybeMessage<$type$>(GetArenaNoVirtual());\n"); + " auto* p = CreateMaybeMessage<$type$>(GetArena());\n"); if (implicit_weak_field_) { format(" $name$_ = reinterpret_cast<::$proto_ns$::MessageLite*>(p);\n"); } else { @@ -200,15 +232,20 @@ void MessageFieldGenerator::GenerateInlineAccessorDefinitions( } format( " }\n" - " // @@protoc_insertion_point(field_mutable:$full_name$)\n" " return $casted_member$;\n" + "}\n" + "inline $type$* $classname$::mutable_$name$() {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_mutable:$full_name$)\n" + " return _internal_mutable_$name$();\n" "}\n"); // We handle the most common case inline, and delegate less common cases to // the slow fallback function. format( "inline void $classname$::set_allocated_$name$($type$* $name$) {\n" - " ::$proto_ns$::Arena* message_arena = GetArenaNoVirtual();\n"); + "$annotate_accessor$" + " ::$proto_ns$::Arena* message_arena = GetArena();\n"); format(" if (message_arena == nullptr) {\n"); if (IsCrossFileMessage(descriptor_)) { format( @@ -269,7 +306,7 @@ void MessageFieldGenerator::GenerateInternalAccessorDeclarations( void MessageFieldGenerator::GenerateInternalAccessorDefinitions( io::Printer* printer) const { - // In theory, these accessors could be inline in HasBitSetters. However, in + // In theory, these accessors could be inline in _Internal. However, in // practice, the linker is then not able to throw them out making implicit // weak dependencies not work at all. Formatter format(printer, variables_); @@ -278,13 +315,13 @@ void MessageFieldGenerator::GenerateInternalAccessorDefinitions( // MergePartialFromCodedStream, and their purpose is to provide access to // the field without creating a strong dependency on the message type. format( - "const ::$proto_ns$::MessageLite& $classname$::HasBitSetters::$name$(\n" + "const ::$proto_ns$::MessageLite& $classname$::_Internal::$name$(\n" " const $classname$* msg) {\n" " if (msg->$name$_ != nullptr) {\n" " return *msg->$name$_;\n" - " } else if (&$type_default_instance$ != nullptr) {\n" + " } else if ($type_default_instance_ptr$ != nullptr) {\n" " return *reinterpret_cast(\n" - " &$type_default_instance$);\n" + " $type_default_instance_ptr$);\n" " } else {\n" " return " "*::$proto_ns$::internal::ImplicitWeakMessage::default_instance();\n" @@ -293,21 +330,20 @@ void MessageFieldGenerator::GenerateInternalAccessorDefinitions( if (SupportsArenas(descriptor_)) { format( "::$proto_ns$::MessageLite*\n" - "$classname$::HasBitSetters::mutable_$name$($classname$* msg) {\n"); + "$classname$::_Internal::mutable_$name$($classname$* msg) {\n"); if (HasFieldPresence(descriptor_->file())) { format(" msg->$set_hasbit$\n"); } format( " if (msg->$name$_ == nullptr) {\n" - " if (&$type_default_instance$ == nullptr) {\n" + " if ($type_default_instance_ptr$ == nullptr) {\n" " msg->$name$_ = ::$proto_ns$::Arena::CreateMessage<\n" " ::$proto_ns$::internal::ImplicitWeakMessage>(\n" - " msg->GetArenaNoVirtual());\n" + " msg->GetArena());\n" " } else {\n" " msg->$name$_ = reinterpret_cast(\n" - " &$type_default_instance$)->New(" - "msg->GetArenaNoVirtual());\n" + " $type_default_instance_ptr$)->New(msg->GetArena());\n" " }\n" " }\n" " return msg->$name$_;\n" @@ -315,19 +351,19 @@ void MessageFieldGenerator::GenerateInternalAccessorDefinitions( } else { format( "::$proto_ns$::MessageLite*\n" - "$classname$::HasBitSetters::mutable_$name$($classname$* msg) {\n"); + "$classname$::_Internal::mutable_$name$($classname$* msg) {\n"); if (HasFieldPresence(descriptor_->file())) { format(" msg->$set_hasbit$\n"); } format( " if (msg->$name$_ == nullptr) {\n" - " if (&$type_default_instance$ == nullptr) {\n" + " if ($type_default_instance_ptr$ == nullptr) {\n" " msg->$name$_ = " "new ::$proto_ns$::internal::ImplicitWeakMessage;\n" " } else {\n" " msg->$name$_ = " "reinterpret_cast(\n" - " &$type_default_instance$)->New();\n" + " $type_default_instance_ptr$)->New();\n" " }\n" " }\n" " return msg->$name$_;\n" @@ -339,19 +375,21 @@ void MessageFieldGenerator::GenerateInternalAccessorDefinitions( // message fields under serialize. format( "const $type$&\n" - "$classname$::HasBitSetters::$name$(const $classname$* msg) {\n" + "$classname$::_Internal::$name$(const $classname$* msg) {\n" " return *msg->$field_member$;\n" "}\n"); } } void MessageFieldGenerator::GenerateClearingCode(io::Printer* printer) const { + GOOGLE_CHECK(IsFieldUsed(descriptor_, options_)); + Formatter format(printer, variables_); if (!HasFieldPresence(descriptor_->file())) { // If we don't have has-bits, message presence is indicated only by ptr != // NULL. Thus on clear, we need to delete the object. format( - "if (GetArenaNoVirtual() == nullptr && $name$_ != nullptr) {\n" + "if (GetArena() == nullptr && $name$_ != nullptr) {\n" " delete $name$_;\n" "}\n" "$name$_ = nullptr;\n"); @@ -362,12 +400,14 @@ void MessageFieldGenerator::GenerateClearingCode(io::Printer* printer) const { void MessageFieldGenerator::GenerateMessageClearingCode( io::Printer* printer) const { + GOOGLE_CHECK(IsFieldUsed(descriptor_, options_)); + Formatter format(printer, variables_); if (!HasFieldPresence(descriptor_->file())) { // If we don't have has-bits, message presence is indicated only by ptr != // NULL. Thus on clear, we need to delete the object. format( - "if (GetArenaNoVirtual() == nullptr && $name$_ != nullptr) {\n" + "if (GetArena() == nullptr && $name$_ != nullptr) {\n" " delete $name$_;\n" "}\n" "$name$_ = nullptr;\n"); @@ -379,22 +419,30 @@ void MessageFieldGenerator::GenerateMessageClearingCode( } void MessageFieldGenerator::GenerateMergingCode(io::Printer* printer) const { + GOOGLE_CHECK(IsFieldUsed(descriptor_, options_)); + Formatter format(printer, variables_); if (implicit_weak_field_) { format( - "HasBitSetters::mutable_$name$(this)->CheckTypeAndMergeFrom(\n" - " HasBitSetters::$name$(&from));\n"); + "_Internal::mutable_$name$(this)->CheckTypeAndMergeFrom(\n" + " _Internal::$name$(&from));\n"); } else { - format("mutable_$name$()->$type$::MergeFrom(from.$name$());\n"); + format( + "_internal_mutable_$name$()->$type$::MergeFrom(from._internal_$name$())" + ";\n"); } } void MessageFieldGenerator::GenerateSwappingCode(io::Printer* printer) const { + GOOGLE_CHECK(IsFieldUsed(descriptor_, options_)); + Formatter format(printer, variables_); format("swap($name$_, other->$name$_);\n"); } void MessageFieldGenerator::GenerateDestructorCode(io::Printer* printer) const { + GOOGLE_CHECK(IsFieldUsed(descriptor_, options_)); + Formatter format(printer, variables_); if (options_.opensource_runtime) { // TODO(gerbens) Remove this when we don't need to destruct default @@ -409,57 +457,40 @@ void MessageFieldGenerator::GenerateDestructorCode(io::Printer* printer) const { void MessageFieldGenerator::GenerateConstructorCode( io::Printer* printer) const { + GOOGLE_CHECK(IsFieldUsed(descriptor_, options_)); + Formatter format(printer, variables_); format("$name$_ = nullptr;\n"); } void MessageFieldGenerator::GenerateCopyConstructorCode( io::Printer* printer) const { + GOOGLE_CHECK(IsFieldUsed(descriptor_, options_)); + Formatter format(printer, variables_); format( - "if (from.has_$name$()) {\n" + "if (from._internal_has_$name$()) {\n" " $name$_ = new $type$(*from.$name$_);\n" "} else {\n" " $name$_ = nullptr;\n" "}\n"); } -void MessageFieldGenerator::GenerateMergeFromCodedStream( - io::Printer* printer) const { - Formatter format(printer, variables_); - if (implicit_weak_field_) { - format( - "DO_(::$proto_ns$::internal::WireFormatLite::ReadMessage(\n" - " input, HasBitSetters::mutable_$name$(this)));\n"); - } else if (descriptor_->type() == FieldDescriptor::TYPE_MESSAGE) { - format( - "DO_(::$proto_ns$::internal::WireFormatLite::ReadMessage(\n" - " input, mutable_$name$()));\n"); - } else { - format( - "DO_(::$proto_ns$::internal::WireFormatLite::ReadGroup(\n" - " $number$, input, mutable_$name$()));\n"); - } -} - -void MessageFieldGenerator::GenerateSerializeWithCachedSizes( - io::Printer* printer) const { - Formatter format(printer, variables_); - format( - "::$proto_ns$::internal::WireFormatLite::Write$stream_writer$(\n" - " $number$, HasBitSetters::$name$(this), output);\n"); -} - void MessageFieldGenerator::GenerateSerializeWithCachedSizesToArray( io::Printer* printer) const { + GOOGLE_CHECK(IsFieldUsed(descriptor_, options_)); + Formatter format(printer, variables_); format( + "target = stream->EnsureSpace(target);\n" "target = ::$proto_ns$::internal::WireFormatLite::\n" - " InternalWrite$declared_type$ToArray(\n" - " $number$, HasBitSetters::$name$(this), target);\n"); + " InternalWrite$declared_type$(\n" + " $number$, _Internal::$name$(this), target, stream);\n"); } void MessageFieldGenerator::GenerateByteSize(io::Printer* printer) const { + GOOGLE_CHECK(IsFieldUsed(descriptor_, options_)); + Formatter format(printer, variables_); format( "total_size += $tag_size$ +\n" @@ -483,7 +514,8 @@ void MessageOneofFieldGenerator::GenerateNonInlineAccessorDefinitions( Formatter format(printer, variables_); format( "void $classname$::set_allocated_$name$($type$* $name$) {\n" - " ::$proto_ns$::Arena* message_arena = GetArenaNoVirtual();\n" + "$annotate_accessor$" + " ::$proto_ns$::Arena* message_arena = GetArena();\n" " clear_$oneof_name$();\n" " if ($name$) {\n"); if (SupportsArenas(descriptor_->message_type()) && @@ -518,13 +550,14 @@ void MessageOneofFieldGenerator::GenerateInlineAccessorDefinitions( Formatter format(printer, variables_); format( "inline $type$* $classname$::$release_name$() {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_release:$full_name$)\n" - " if (has_$name$()) {\n" + " if (_internal_has_$name$()) {\n" " clear_has_$oneof_name$();\n" " $type$* temp = $field_member$;\n"); if (SupportsArenas(descriptor_)) { format( - " if (GetArenaNoVirtual() != nullptr) {\n" + " if (GetArena() != nullptr) {\n" " temp = ::$proto_ns$::internal::DuplicateIfNonNull(temp);\n" " }\n"); } @@ -537,19 +570,24 @@ void MessageOneofFieldGenerator::GenerateInlineAccessorDefinitions( "}\n"); format( - "inline const $type$& $classname$::$name$() const {\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" - " return has_$name$()\n" + "inline const $type$& $classname$::_internal_$name$() const {\n" + " return _internal_has_$name$()\n" " ? *$field_member$\n" " : *reinterpret_cast< $type$*>(&$type_default_instance$);\n" + "}\n" + "inline const $type$& $classname$::$name$() const {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_get:$full_name$)\n" + " return _internal_$name$();\n" "}\n"); if (SupportsArenas(descriptor_)) { format( "inline $type$* $classname$::unsafe_arena_release_$name$() {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_unsafe_arena_release" ":$full_name$)\n" - " if (has_$name$()) {\n" + " if (_internal_has_$name$()) {\n" " clear_has_$oneof_name$();\n" " $type$* temp = $field_member$;\n" " $field_member$ = nullptr;\n" @@ -560,6 +598,7 @@ void MessageOneofFieldGenerator::GenerateInlineAccessorDefinitions( "}\n" "inline void $classname$::unsafe_arena_set_allocated_$name$" "($type$* $name$) {\n" + "$annotate_accessor$" // We rely on the oneof clear method to free the earlier contents of // this oneof. We can directly use the pointer we're given to set the // new value. @@ -574,24 +613,29 @@ void MessageOneofFieldGenerator::GenerateInlineAccessorDefinitions( } format( - "inline $type$* $classname$::mutable_$name$() {\n" - " if (!has_$name$()) {\n" + "inline $type$* $classname$::_internal_mutable_$name$() {\n" + " if (!_internal_has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" - " $field_member$ = CreateMaybeMessage< $type$ >(\n" - " GetArenaNoVirtual());\n" + " $field_member$ = CreateMaybeMessage< $type$ >(GetArena());\n" " }\n" - " // @@protoc_insertion_point(field_mutable:$full_name$)\n" " return $field_member$;\n" + "}\n" + "inline $type$* $classname$::mutable_$name$() {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_mutable:$full_name$)\n" + " return _internal_mutable_$name$();\n" "}\n"); } void MessageOneofFieldGenerator::GenerateClearingCode( io::Printer* printer) const { + GOOGLE_CHECK(IsFieldUsed(descriptor_, options_)); + Formatter format(printer, variables_); if (SupportsArenas(descriptor_)) { format( - "if (GetArenaNoVirtual() == nullptr) {\n" + "if (GetArena() == nullptr) {\n" " delete $field_member$;\n" "}\n"); } else { @@ -637,16 +681,45 @@ RepeatedMessageFieldGenerator::~RepeatedMessageFieldGenerator() {} void RepeatedMessageFieldGenerator::GeneratePrivateMembers( io::Printer* printer) const { Formatter format(printer, variables_); - format("::$proto_ns$::RepeatedPtrField< $type$ > $name$_;\n"); + if (implicit_weak_field_) { + format("::$proto_ns$::WeakRepeatedPtrField< $type$ > $name$_;\n"); + } else { + format("::$proto_ns$::RepeatedPtrField< $type$ > $name$_;\n"); + } } void RepeatedMessageFieldGenerator::GenerateAccessorDeclarations( io::Printer* printer) const { Formatter format(printer, variables_); + if (!IsFieldUsed(descriptor_, options_)) { + format( + "$deprecated_attr$$type$* ${1$mutable_$name$$}$(int index) { " + "__builtin_trap(); }\n" + "$deprecated_attr$::$proto_ns$::RepeatedPtrField< $type$ >*\n" + " ${1$mutable_$name$$}$() { __builtin_trap(); }\n" + "$deprecated_attr$const $type$& ${1$$name$$}$(int index) const { " + "__builtin_trap(); }\n" + "$deprecated_attr$$type$* ${1$add_$name$$}$() { " + "__builtin_trap(); }\n" + "$deprecated_attr$const ::$proto_ns$::RepeatedPtrField< $type$ >&\n" + " ${1$$name$$}$() const { __builtin_trap(); }\n", + descriptor_); + return; + } format( "$deprecated_attr$$type$* ${1$mutable_$name$$}$(int index);\n" "$deprecated_attr$::$proto_ns$::RepeatedPtrField< $type$ >*\n" - " ${1$mutable_$name$$}$();\n" + " ${1$mutable_$name$$}$();\n", + descriptor_); + if (IsFieldUsed(descriptor_, options_)) { + format( + "private:\n" + "const $type$& ${1$_internal_$name$$}$(int index) const;\n" + "$type$* ${1$_internal_add_$name$$}$();\n" + "public:\n", + descriptor_); + } + format( "$deprecated_attr$const $type$& ${1$$name$$}$(int index) const;\n" "$deprecated_attr$$type$* ${1$add_$name$$}$();\n" "$deprecated_attr$const ::$proto_ns$::RepeatedPtrField< $type$ >&\n" @@ -657,80 +730,87 @@ void RepeatedMessageFieldGenerator::GenerateAccessorDeclarations( void RepeatedMessageFieldGenerator::GenerateInlineAccessorDefinitions( io::Printer* printer) const { Formatter format(printer, variables_); + format.Set("weak", implicit_weak_field_ ? ".weak" : ""); + format( "inline $type$* $classname$::mutable_$name$(int index) {\n" + "$annotate_accessor$" // TODO(dlj): move insertion points " // @@protoc_insertion_point(field_mutable:$full_name$)\n" "$type_reference_function$" - " return $name$_.Mutable(index);\n" + " return $name$_$weak$.Mutable(index);\n" "}\n" "inline ::$proto_ns$::RepeatedPtrField< $type$ >*\n" "$classname$::mutable_$name$() {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_mutable_list:$full_name$)\n" "$type_reference_function$" - " return &$name$_;\n" + " return &$name$_$weak$;\n" "}\n"); if (options_.safe_boundary_check) { format( - "inline const $type$& $classname$::$name$(int index) const {\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" - " return $name$_.InternalCheckedGet(index,\n" + "inline const $type$& $classname$::_internal_$name$(int index) const " + "{\n" + " return $name$_$weak$.InternalCheckedGet(index,\n" " *reinterpret_cast(&$type_default_instance$));\n" "}\n"); } else { format( - "inline const $type$& $classname$::$name$(int index) const {\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" + "inline const $type$& $classname$::_internal_$name$(int index) const " + "{\n" "$type_reference_function$" - " return $name$_.Get(index);\n" + " return $name$_$weak$.Get(index);\n" "}\n"); } format( + "inline const $type$& $classname$::$name$(int index) const {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_get:$full_name$)\n" + " return _internal_$name$(index);\n" + "}\n" + "inline $type$* $classname$::_internal_add_$name$() {\n" + " return $name$_$weak$.Add();\n" + "}\n" "inline $type$* $classname$::add_$name$() {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_add:$full_name$)\n" - " return $name$_.Add();\n" + " return _internal_add_$name$();\n" "}\n"); format( "inline const ::$proto_ns$::RepeatedPtrField< $type$ >&\n" "$classname$::$name$() const {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_list:$full_name$)\n" "$type_reference_function$" - " return $name$_;\n" + " return $name$_$weak$;\n" "}\n"); } void RepeatedMessageFieldGenerator::GenerateClearingCode( io::Printer* printer) const { + GOOGLE_CHECK(IsFieldUsed(descriptor_, options_)); + Formatter format(printer, variables_); - if (implicit_weak_field_) { - format( - "CastToBase(&$name$_)->Clear<" - "::$proto_ns$::internal::ImplicitWeakTypeHandler<$type$>>();\n"); - } else { - format("$name$_.Clear();\n"); - } + format("$name$_.Clear();\n"); } void RepeatedMessageFieldGenerator::GenerateMergingCode( io::Printer* printer) const { + GOOGLE_CHECK(IsFieldUsed(descriptor_, options_)); + Formatter format(printer, variables_); - if (implicit_weak_field_) { - format( - "CastToBase(&$name$_)->MergeFrom<" - "::$proto_ns$::internal::ImplicitWeakTypeHandler<$type$>>(CastToBase(" - "from.$name$_));\n"); - } else { - format("$name$_.MergeFrom(from.$name$_);\n"); - } + format("$name$_.MergeFrom(from.$name$_);\n"); } void RepeatedMessageFieldGenerator::GenerateSwappingCode( io::Printer* printer) const { + GOOGLE_CHECK(IsFieldUsed(descriptor_, options_)); + Formatter format(printer, variables_); - format("CastToBase(&$name$_)->InternalSwap(CastToBase(&other->$name$_));\n"); + format("$name$_.InternalSwap(&other->$name$_);\n"); } void RepeatedMessageFieldGenerator::GenerateConstructorCode( @@ -738,86 +818,44 @@ void RepeatedMessageFieldGenerator::GenerateConstructorCode( // Not needed for repeated fields. } -void RepeatedMessageFieldGenerator::GenerateMergeFromCodedStream( - io::Printer* printer) const { - Formatter format(printer, variables_); - if (descriptor_->type() == FieldDescriptor::TYPE_MESSAGE) { - if (implicit_weak_field_) { - format( - "DO_(::$proto_ns$::internal::WireFormatLite::" - "ReadMessage(input, CastToBase(&$name$_)->AddWeak(\n" - " reinterpret_cast(\n" - " &$type_default_instance$))));\n"); - } else { - format( - "DO_(::$proto_ns$::internal::WireFormatLite::" - "ReadMessage(\n" - " input, add_$name$()));\n"); - } - } else { - format( - "DO_(::$proto_ns$::internal::WireFormatLite::" - "ReadGroup($number$, input, add_$name$()));\n"); - } -} - -void RepeatedMessageFieldGenerator::GenerateSerializeWithCachedSizes( - io::Printer* printer) const { - Formatter format(printer, variables_); - format( - "for (unsigned int i = 0,\n" - " n = static_cast(this->$name$_size()); i < n; i++) {\n" - " ::$proto_ns$::internal::WireFormatLite::Write$stream_writer$(\n" - " $number$,\n"); - if (implicit_weak_field_) { - format( - " CastToBase($name$_).Get<" - "::$proto_ns$::internal::ImplicitWeakTypeHandler<$type$>>(" - "static_cast(i)),\n"); - } else { - format(" this->$name$(static_cast(i)),\n"); - } - format( - " output);\n" - "}\n"); -} - void RepeatedMessageFieldGenerator::GenerateSerializeWithCachedSizesToArray( io::Printer* printer) const { + GOOGLE_CHECK(IsFieldUsed(descriptor_, options_)); + Formatter format(printer, variables_); - format( - "for (unsigned int i = 0,\n" - " n = static_cast(this->$name$_size()); i < n; i++) {\n" - " target = ::$proto_ns$::internal::WireFormatLite::\n" - " InternalWrite$declared_type$ToArray(\n" - " $number$, this->$name$(static_cast(i)), target);\n" - "}\n"); + if (implicit_weak_field_) { + format( + "for (auto it = this->$name$_.pointer_begin(),\n" + " end = this->$name$_.pointer_end(); it < end; ++it) {\n" + " target = stream->EnsureSpace(target);\n" + " target = ::$proto_ns$::internal::WireFormatLite::\n" + " InternalWrite$declared_type$($number$, **it, target, stream);\n" + "}\n"); + } else { + format( + "for (unsigned int i = 0,\n" + " n = static_cast(this->_internal_$name$_size()); i < " + "n; i++) " + "{\n" + " target = stream->EnsureSpace(target);\n" + " target = ::$proto_ns$::internal::WireFormatLite::\n" + " InternalWrite$declared_type$($number$, " + "this->_internal_$name$(i), target, stream);\n" + "}\n"); + } } void RepeatedMessageFieldGenerator::GenerateByteSize( io::Printer* printer) const { + GOOGLE_CHECK(IsFieldUsed(descriptor_, options_)); + Formatter format(printer, variables_); format( - "{\n" - " unsigned int count = static_cast(this->$name$_size());\n"); - format.Indent(); - format( - "total_size += $tag_size$UL * count;\n" - "for (unsigned int i = 0; i < count; i++) {\n" + "total_size += $tag_size$UL * this->_internal_$name$_size();\n" + "for (const auto& msg : this->$name$_) {\n" " total_size +=\n" - " ::$proto_ns$::internal::WireFormatLite::$declared_type$Size(\n"); - if (implicit_weak_field_) { - format( - " CastToBase($name$_).Get<" - "::$proto_ns$::internal::ImplicitWeakTypeHandler<$type$>>(" - "static_cast(i)));\n"); - } else { - format(" this->$name$(static_cast(i)));\n"); - } - format("}\n"); - format.Outdent(); - format("}\n"); + " ::$proto_ns$::internal::WireFormatLite::$declared_type$Size(msg);\n" + "}\n"); } } // namespace cpp diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h index eed8e4f5..fe5cf13c 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h @@ -66,8 +66,6 @@ class MessageFieldGenerator : public FieldGenerator { void GenerateDestructorCode(io::Printer* printer) const; void GenerateConstructorCode(io::Printer* printer) const; void GenerateCopyConstructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; void GenerateByteSize(io::Printer* printer) const; @@ -117,8 +115,6 @@ class RepeatedMessageFieldGenerator : public FieldGenerator { void GenerateSwappingCode(io::Printer* printer) const; void GenerateConstructorCode(io::Printer* printer) const; void GenerateCopyConstructorCode(io::Printer* printer) const {} - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; void GenerateByteSize(io::Printer* printer) const; diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h index 6616e4ba..92b55484 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h @@ -44,7 +44,8 @@ namespace cpp { enum class EnforceOptimizeMode { kNoEnforcement, // Use the runtime specified by the file specific options. - kSpeed, // This is the full runtime. + kSpeed, // Full runtime with a generated code implementation. + kCodeSize, // Full runtime with a reflective implementation. kLiteRuntime, }; @@ -61,6 +62,8 @@ struct Options { bool lite_implicit_weak_fields = false; bool bootstrap = false; bool opensource_runtime = false; + bool annotate_accessor = false; + bool unused_field_stripping = false; std::string runtime_include_base; int num_cc_files = 0; std::string annotation_pragma_name; diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc index 164bb1c5..042776c2 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc @@ -38,7 +38,6 @@ #include #include - namespace google { namespace protobuf { namespace compiler { @@ -137,7 +136,11 @@ void PrimitiveFieldGenerator::GenerateAccessorDeclarations( Formatter format(printer, variables_); format( "$deprecated_attr$$type$ ${1$$name$$}$() const;\n" - "$deprecated_attr$void ${1$set_$name$$}$($type$ value);\n", + "$deprecated_attr$void ${1$set_$name$$}$($type$ value);\n" + "private:\n" + "$type$ ${1$_internal_$name$$}$() const;\n" + "void ${1$_internal_set_$name$$}$($type$ value);\n" + "public:\n", descriptor_); } @@ -145,13 +148,21 @@ void PrimitiveFieldGenerator::GenerateInlineAccessorDefinitions( io::Printer* printer) const { Formatter format(printer, variables_); format( - "inline $type$ $classname$::$name$() const {\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" + "inline $type$ $classname$::_internal_$name$() const {\n" " return $name$_;\n" "}\n" - "inline void $classname$::set_$name$($type$ value) {\n" + "inline $type$ $classname$::$name$() const {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_get:$full_name$)\n" + " return _internal_$name$();\n" + "}\n" + "inline void $classname$::_internal_set_$name$($type$ value) {\n" " $set_hasbit$\n" " $name$_ = value;\n" + "}\n" + "inline void $classname$::set_$name$($type$ value) {\n" + "$annotate_accessor$" + " _internal_set_$name$(value);\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n"); } @@ -163,7 +174,7 @@ void PrimitiveFieldGenerator::GenerateClearingCode(io::Printer* printer) const { void PrimitiveFieldGenerator::GenerateMergingCode(io::Printer* printer) const { Formatter format(printer, variables_); - format("set_$name$(from.$name$());\n"); + format("_internal_set_$name$(from._internal_$name$());\n"); } void PrimitiveFieldGenerator::GenerateSwappingCode(io::Printer* printer) const { @@ -183,32 +194,14 @@ void PrimitiveFieldGenerator::GenerateCopyConstructorCode( format("$name$_ = from.$name$_;\n"); } -void PrimitiveFieldGenerator::GenerateMergeFromCodedStream( - io::Printer* printer) const { - Formatter format(printer, variables_); - format( - "$set_hasbit_io$\n" - "DO_((::$proto_ns$::internal::WireFormatLite::ReadPrimitive<\n" - " $type$, " - "::$proto_ns$::internal::WireFormatLite::$wire_format_field_type$>(\n" - " input, &$name$_)));\n"); -} - -void PrimitiveFieldGenerator::GenerateSerializeWithCachedSizes( - io::Printer* printer) const { - Formatter format(printer, variables_); - format( - "::$proto_ns$::internal::WireFormatLite::Write$declared_type$(" - "$number$, this->$name$(), output);\n"); -} - void PrimitiveFieldGenerator::GenerateSerializeWithCachedSizesToArray( io::Printer* printer) const { Formatter format(printer, variables_); format( + "target = stream->EnsureSpace(target);\n" "target = " "::$proto_ns$::internal::WireFormatLite::Write$declared_type$ToArray(" - "$number$, this->$name$(), target);\n"); + "$number$, this->_internal_$name$(), target);\n"); } void PrimitiveFieldGenerator::GenerateByteSize(io::Printer* printer) const { @@ -218,7 +211,7 @@ void PrimitiveFieldGenerator::GenerateByteSize(io::Printer* printer) const { format( "total_size += $tag_size$ +\n" " ::$proto_ns$::internal::WireFormatLite::$declared_type$Size(\n" - " this->$name$());\n"); + " this->_internal_$name$());\n"); } else { format("total_size += $tag_size$ + $fixed_size$;\n"); } @@ -238,19 +231,27 @@ void PrimitiveOneofFieldGenerator::GenerateInlineAccessorDefinitions( io::Printer* printer) const { Formatter format(printer, variables_); format( - "inline $type$ $classname$::$name$() const {\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" - " if (has_$name$()) {\n" + "inline $type$ $classname$::_internal_$name$() const {\n" + " if (_internal_has_$name$()) {\n" " return $field_member$;\n" " }\n" " return $default$;\n" "}\n" - "inline void $classname$::set_$name$($type$ value) {\n" - " if (!has_$name$()) {\n" + "inline void $classname$::_internal_set_$name$($type$ value) {\n" + " if (!_internal_has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" " }\n" " $field_member$ = value;\n" + "}\n" + "inline $type$ $classname$::$name$() const {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_get:$full_name$)\n" + " return _internal_$name$();\n" + "}\n" + "inline void $classname$::set_$name$($type$ value) {\n" + "$annotate_accessor$" + " _internal_set_$name$(value);\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n"); } @@ -272,18 +273,6 @@ void PrimitiveOneofFieldGenerator::GenerateConstructorCode( format("$ns$::_$classname$_default_instance_.$name$_ = $default$;\n"); } -void PrimitiveOneofFieldGenerator::GenerateMergeFromCodedStream( - io::Printer* printer) const { - Formatter format(printer, variables_); - format( - "clear_$oneof_name$();\n" - "DO_((::$proto_ns$::internal::WireFormatLite::ReadPrimitive<\n" - " $type$, " - "::$proto_ns$::internal::WireFormatLite::$wire_format_field_type$>(\n" - " input, &$field_member$)));\n" - "set_has_$name$();\n"); -} - // =================================================================== RepeatedPrimitiveFieldGenerator::RepeatedPrimitiveFieldGenerator( @@ -316,6 +305,14 @@ void RepeatedPrimitiveFieldGenerator::GenerateAccessorDeclarations( io::Printer* printer) const { Formatter format(printer, variables_); format( + "private:\n" + "$type$ ${1$_internal_$name$$}$(int index) const;\n" + "const ::$proto_ns$::RepeatedField< $type$ >&\n" + " ${1$_internal_$name$$}$() const;\n" + "void ${1$_internal_add_$name$$}$($type$ value);\n" + "::$proto_ns$::RepeatedField< $type$ >*\n" + " ${1$_internal_mutable_$name$$}$();\n" + "public:\n" "$deprecated_attr$$type$ ${1$$name$$}$(int index) const;\n" "$deprecated_attr$void ${1$set_$name$$}$(int index, $type$ value);\n" "$deprecated_attr$void ${1$add_$name$$}$($type$ value);\n" @@ -330,27 +327,46 @@ void RepeatedPrimitiveFieldGenerator::GenerateInlineAccessorDefinitions( io::Printer* printer) const { Formatter format(printer, variables_); format( - "inline $type$ $classname$::$name$(int index) const {\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" + "inline $type$ $classname$::_internal_$name$(int index) const {\n" " return $name$_.Get(index);\n" "}\n" + "inline $type$ $classname$::$name$(int index) const {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_get:$full_name$)\n" + " return _internal_$name$(index);\n" + "}\n" "inline void $classname$::set_$name$(int index, $type$ value) {\n" + "$annotate_accessor$" " $name$_.Set(index, value);\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n" - "inline void $classname$::add_$name$($type$ value) {\n" + "inline void $classname$::_internal_add_$name$($type$ value) {\n" " $name$_.Add(value);\n" + "}\n" + "inline void $classname$::add_$name$($type$ value) {\n" + "$annotate_accessor$" + " _internal_add_$name$(value);\n" " // @@protoc_insertion_point(field_add:$full_name$)\n" "}\n" "inline const ::$proto_ns$::RepeatedField< $type$ >&\n" - "$classname$::$name$() const {\n" - " // @@protoc_insertion_point(field_list:$full_name$)\n" + "$classname$::_internal_$name$() const {\n" " return $name$_;\n" "}\n" + "inline const ::$proto_ns$::RepeatedField< $type$ >&\n" + "$classname$::$name$() const {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_list:$full_name$)\n" + " return _internal_$name$();\n" + "}\n" + "inline ::$proto_ns$::RepeatedField< $type$ >*\n" + "$classname$::_internal_mutable_$name$() {\n" + " return &$name$_;\n" + "}\n" "inline ::$proto_ns$::RepeatedField< $type$ >*\n" "$classname$::mutable_$name$() {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_mutable_list:$full_name$)\n" - " return &$name$_;\n" + " return _internal_mutable_$name$();\n" "}\n"); } @@ -383,92 +399,35 @@ void RepeatedPrimitiveFieldGenerator::GenerateCopyConstructorCode( format("$name$_.CopyFrom(from.$name$_);\n"); } -void RepeatedPrimitiveFieldGenerator::GenerateMergeFromCodedStream( - io::Printer* printer) const { - Formatter format(printer, variables_); - format( - "DO_((::$proto_ns$::internal::WireFormatLite::$repeated_reader$<\n" - " $type$, " - "::$proto_ns$::internal::WireFormatLite::$wire_format_field_type$>(\n" - " $tag_size$, $tag$u, input, this->mutable_$name$())));\n"); -} - -void RepeatedPrimitiveFieldGenerator::GenerateMergeFromCodedStreamWithPacking( - io::Printer* printer) const { - Formatter format(printer, variables_); - format( - "DO_((::$proto_ns$::internal::WireFormatLite::$packed_reader$<\n" - " $type$, " - "::$proto_ns$::internal::WireFormatLite::$wire_format_field_type$>(\n" - " input, this->mutable_$name$())));\n"); -} - -void RepeatedPrimitiveFieldGenerator::GenerateSerializeWithCachedSizes( - io::Printer* printer) const { - Formatter format(printer, variables_); - bool array_written = false; - if (descriptor_->is_packed()) { - // Write the tag and the size. - format( - "if (this->$name$_size() > 0) {\n" - " ::$proto_ns$::internal::WireFormatLite::WriteTag(" - "$number$, " - "::$proto_ns$::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, " - "output);\n" - " output->WriteVarint32(_$name$_cached_byte_size_.load(\n" - " std::memory_order_relaxed));\n"); - - if (FixedSize(descriptor_->type()) > 0) { - // TODO(ckennelly): Use RepeatedField::unsafe_data() via - // WireFormatLite to access the contents of this->$name$_ to save a branch - // here. - format( - " " - "::$proto_ns$::internal::WireFormatLite::Write$declared_type$Array(\n" - " this->$name$().data(), this->$name$_size(), output);\n"); - array_written = true; // Wrote array all at once - } - format("}\n"); - } - if (!array_written) { - format("for (int i = 0, n = this->$name$_size(); i < n; i++) {\n"); - if (descriptor_->is_packed()) { - format( - " " - "::$proto_ns$::internal::WireFormatLite::Write$declared_type$NoTag(\n" - " this->$name$(i), output);\n"); - } else { - format( - " ::$proto_ns$::internal::WireFormatLite::Write$declared_type$(\n" - " $number$, this->$name$(i), output);\n"); - } - format("}\n"); - } -} - void RepeatedPrimitiveFieldGenerator::GenerateSerializeWithCachedSizesToArray( io::Printer* printer) const { Formatter format(printer, variables_); if (descriptor_->is_packed()) { - // Write the tag and the size. - format( - "if (this->$name$_size() > 0) {\n" - " target = ::$proto_ns$::internal::WireFormatLite::WriteTagToArray(\n" - " $number$,\n" - " " - "::$proto_ns$::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,\n" - " target);\n" - " target = " - "::$proto_ns$::io::CodedOutputStream::WriteVarint32ToArray(\n" - " _$name$_cached_byte_size_.load(std::memory_order_relaxed),\n" - " target);\n" - " target = ::$proto_ns$::internal::WireFormatLite::\n" - " Write$declared_type$NoTagToArray(this->$name$_, target);\n" - "}\n"); + if (FixedSize(descriptor_->type()) > 0) { + format( + "if (this->_internal_$name$_size() > 0) {\n" + " target = stream->WriteFixedPacked($number$, _internal_$name$(), " + "target);\n" + "}\n"); + } else { + format( + "{\n" + " int byte_size = " + "_$name$_cached_byte_size_.load(std::memory_order_relaxed);\n" + " if (byte_size > 0) {\n" + " target = stream->Write$declared_type$Packed(\n" + " $number$, _internal_$name$(), byte_size, target);\n" + " }\n" + "}\n"); + } } else { format( - "target = ::$proto_ns$::internal::WireFormatLite::\n" - " Write$declared_type$ToArray($number$, this->$name$_, target);\n"); + "for (int i = 0, n = this->_internal_$name$_size(); i < n; i++) {\n" + " target = stream->EnsureSpace(target);\n" + " target = ::$proto_ns$::internal::WireFormatLite::" + "Write$declared_type$ToArray($number$, this->_internal_$name$(i), " + "target);\n" + "}\n"); } } @@ -484,7 +443,8 @@ void RepeatedPrimitiveFieldGenerator::GenerateByteSize( " $declared_type$Size(this->$name$_);\n"); } else { format( - "unsigned int count = static_cast(this->$name$_size());\n" + "unsigned int count = static_cast(this->_internal_$name$_size());\n" "size_t data_size = $fixed_size$UL * count;\n"); } @@ -503,7 +463,7 @@ void RepeatedPrimitiveFieldGenerator::GenerateByteSize( format( "total_size += $tag_size$ *\n" " " - "::$proto_ns$::internal::FromIntSize(this->$name$_size());\n" + "::$proto_ns$::internal::FromIntSize(this->_internal_$name$_size());\n" "total_size += data_size;\n"); } format.Outdent(); diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h index 77389aa0..fe54ce33 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h @@ -59,8 +59,6 @@ class PrimitiveFieldGenerator : public FieldGenerator { void GenerateSwappingCode(io::Printer* printer) const; void GenerateConstructorCode(io::Printer* printer) const; void GenerateCopyConstructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; void GenerateByteSize(io::Printer* printer) const; @@ -79,7 +77,6 @@ class PrimitiveOneofFieldGenerator : public PrimitiveFieldGenerator { void GenerateClearingCode(io::Printer* printer) const; void GenerateSwappingCode(io::Printer* printer) const; void GenerateConstructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveOneofFieldGenerator); @@ -100,9 +97,6 @@ class RepeatedPrimitiveFieldGenerator : public FieldGenerator { void GenerateSwappingCode(io::Printer* printer) const; void GenerateConstructorCode(io::Printer* printer) const; void GenerateCopyConstructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateMergeFromCodedStreamWithPacking(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; void GenerateByteSize(io::Printer* printer) const; diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc index bd25d7a8..a21c4c7f 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc @@ -39,7 +39,6 @@ #include - namespace google { namespace protobuf { namespace compiler { @@ -197,6 +196,12 @@ void StringFieldGenerator::GenerateAccessorDeclarations( descriptor_); } } + format( + "private:\n" + "const std::string& _internal_$name$() const;\n" + "void _internal_set_$name$(const std::string& value);\n" + "std::string* _internal_mutable_$name$();\n" + "public:\n"); if (unknown_ctype) { format.Outdent(); @@ -208,36 +213,53 @@ void StringFieldGenerator::GenerateAccessorDeclarations( void StringFieldGenerator::GenerateInlineAccessorDefinitions( io::Printer* printer) const { Formatter format(printer, variables_); + format( + "inline const std::string& $classname$::$name$() const {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_get:$full_name$)\n" + " return _internal_$name$();\n" + "}\n" + "inline void $classname$::set_$name$(const std::string& value) {\n" + "$annotate_accessor$" + " _internal_set_$name$(value);\n" + " // @@protoc_insertion_point(field_set:$full_name$)\n" + "}\n" + "inline std::string* $classname$::mutable_$name$() {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_mutable:$full_name$)\n" + " return _internal_mutable_$name$();\n" + "}\n"); if (SupportsArenas(descriptor_)) { format( - "inline const std::string& $classname$::$name$() const {\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" + "inline const std::string& $classname$::_internal_$name$() const {\n" " return $name$_.Get();\n" "}\n" - "inline void $classname$::set_$name$(const std::string& value) {\n" + "inline void $classname$::_internal_set_$name$(const std::string& " + "value) {\n" " $set_hasbit$\n" - " $name$_.Set$lite$($default_variable$, value, GetArenaNoVirtual());\n" - " // @@protoc_insertion_point(field_set:$full_name$)\n" + " $name$_.Set$lite$($default_variable$, value, GetArena());\n" "}\n" "inline void $classname$::set_$name$(std::string&& value) {\n" + "$annotate_accessor$" " $set_hasbit$\n" " $name$_.Set$lite$(\n" - " $default_variable$, ::std::move(value), GetArenaNoVirtual());\n" + " $default_variable$, ::std::move(value), GetArena());\n" " // @@protoc_insertion_point(field_set_rvalue:$full_name$)\n" "}\n" "inline void $classname$::set_$name$(const char* value) {\n" + "$annotate_accessor$" " $null_check$" " $set_hasbit$\n" " $name$_.Set$lite$($default_variable$, $string_piece$(value),\n" - " GetArenaNoVirtual());\n" + " GetArena());\n" " // @@protoc_insertion_point(field_set_char:$full_name$)\n" "}\n"); if (!options_.opensource_runtime) { format( "inline void $classname$::set_$name$(::StringPiece value) {\n" + "$annotate_accessor$" " $set_hasbit$\n" - " $name$_.Set$lite$($default_variable$, value, " - "GetArenaNoVirtual());\n" + " $name$_.Set$lite$($default_variable$, value,GetArena());\n" " // @@protoc_insertion_point(field_set_string_piece:$full_name$)\n" "}\n"); } @@ -245,67 +267,68 @@ void StringFieldGenerator::GenerateInlineAccessorDefinitions( "inline " "void $classname$::set_$name$(const $pointer_type$* value,\n" " size_t size) {\n" + "$annotate_accessor$" " $set_hasbit$\n" " $name$_.Set$lite$($default_variable$, $string_piece$(\n" - " reinterpret_cast(value), size), " - "GetArenaNoVirtual());\n" + " reinterpret_cast(value), size), GetArena());\n" " // @@protoc_insertion_point(field_set_pointer:$full_name$)\n" "}\n" - "inline std::string* $classname$::mutable_$name$() {\n" + "inline std::string* $classname$::_internal_mutable_$name$() {\n" " $set_hasbit$\n" - " // @@protoc_insertion_point(field_mutable:$full_name$)\n" - " return $name$_.Mutable($default_variable$, GetArenaNoVirtual());\n" + " return $name$_.Mutable($default_variable$, GetArena());\n" "}\n" "inline std::string* $classname$::$release_name$() {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_release:$full_name$)\n"); - if (HasFieldPresence(descriptor_->file())) { + if (HasHasbit(descriptor_)) { format( - " if (!has_$name$()) {\n" + " if (!_internal_has_$name$()) {\n" " return nullptr;\n" " }\n" " $clear_hasbit$\n" " return $name$_.ReleaseNonDefault(" - "$default_variable$, GetArenaNoVirtual());\n"); + "$default_variable$, GetArena());\n"); } else { format( - " $clear_hasbit$\n" - " return $name$_.Release($default_variable$, " - "GetArenaNoVirtual());\n"); + " return $name$_.Release($default_variable$, GetArena());\n"); } format( "}\n" "inline void $classname$::set_allocated_$name$(std::string* $name$) {\n" + "$annotate_accessor$" " if ($name$ != nullptr) {\n" " $set_hasbit$\n" " } else {\n" " $clear_hasbit$\n" " }\n" " $name$_.SetAllocated($default_variable$, $name$,\n" - " GetArenaNoVirtual());\n" + " GetArena());\n" " // @@protoc_insertion_point(field_set_allocated:$full_name$)\n" "}\n"); if (options_.opensource_runtime) { format( "inline std::string* $classname$::unsafe_arena_release_$name$() {\n" + "$annotate_accessor$" " // " "@@protoc_insertion_point(field_unsafe_arena_release:$full_name$)\n" - " $DCHK$(GetArenaNoVirtual() != nullptr);\n" + " $DCHK$(GetArena() != nullptr);\n" " $clear_hasbit$\n" " return $name$_.UnsafeArenaRelease($default_variable$,\n" - " GetArenaNoVirtual());\n" + " GetArena());\n" "}\n" "inline void $classname$::unsafe_arena_set_allocated_$name$(\n" + "$annotate_accessor$" " std::string* $name$) {\n" - " $DCHK$(GetArenaNoVirtual() != nullptr);\n" + " $DCHK$(GetArena() != nullptr);\n" " if ($name$ != nullptr) {\n" " $set_hasbit$\n" " } else {\n" " $clear_hasbit$\n" " }\n" " $name$_.UnsafeArenaSetAllocated($default_variable$,\n" - " $name$, GetArenaNoVirtual());\n" + " $name$, GetArena());\n" " // @@protoc_insertion_point(field_unsafe_arena_set_allocated:" "$full_name$)\n" "}\n"); @@ -313,22 +336,23 @@ void StringFieldGenerator::GenerateInlineAccessorDefinitions( } else { // No-arena case. format( - "inline const std::string& $classname$::$name$() const {\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" + "inline const std::string& $classname$::_internal_$name$() const {\n" " return $name$_.GetNoArena();\n" "}\n" - "inline void $classname$::set_$name$(const std::string& value) {\n" + "inline void $classname$::_internal_set_$name$(const std::string& " + "value) {\n" " $set_hasbit$\n" " $name$_.SetNoArena($default_variable$, value);\n" - " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n" "inline void $classname$::set_$name$(std::string&& value) {\n" + "$annotate_accessor$" " $set_hasbit$\n" " $name$_.SetNoArena(\n" " $default_variable$, ::std::move(value));\n" " // @@protoc_insertion_point(field_set_rvalue:$full_name$)\n" "}\n" "inline void $classname$::set_$name$(const char* value) {\n" + "$annotate_accessor$" " $null_check$" " $set_hasbit$\n" " $name$_.SetNoArena($default_variable$, $string_piece$(value));\n" @@ -337,6 +361,7 @@ void StringFieldGenerator::GenerateInlineAccessorDefinitions( if (!options_.opensource_runtime) { format( "inline void $classname$::set_$name$(::StringPiece value) {\n" + "$annotate_accessor$" " $set_hasbit$\n" " $name$_.SetNoArena($default_variable$, value);\n" " // @@protoc_insertion_point(field_set_string_piece:$full_name$)\n" @@ -346,22 +371,23 @@ void StringFieldGenerator::GenerateInlineAccessorDefinitions( "inline " "void $classname$::set_$name$(const $pointer_type$* value, " "size_t size) {\n" + "$annotate_accessor$" " $set_hasbit$\n" " $name$_.SetNoArena($default_variable$,\n" " $string_piece$(reinterpret_cast(value), size));\n" " // @@protoc_insertion_point(field_set_pointer:$full_name$)\n" "}\n" - "inline std::string* $classname$::mutable_$name$() {\n" + "inline std::string* $classname$::_internal_mutable_$name$() {\n" " $set_hasbit$\n" - " // @@protoc_insertion_point(field_mutable:$full_name$)\n" " return $name$_.MutableNoArena($default_variable$);\n" "}\n" "inline std::string* $classname$::$release_name$() {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_release:$full_name$)\n"); - if (HasFieldPresence(descriptor_->file())) { + if (HasHasbit(descriptor_)) { format( - " if (!has_$name$()) {\n" + " if (!_internal_has_$name$()) {\n" " return nullptr;\n" " }\n" " $clear_hasbit$\n" @@ -375,6 +401,7 @@ void StringFieldGenerator::GenerateInlineAccessorDefinitions( format( "}\n" "inline void $classname$::set_allocated_$name$(std::string* $name$) {\n" + "$annotate_accessor$" " if ($name$ != nullptr) {\n" " $set_hasbit$\n" " } else {\n" @@ -405,11 +432,9 @@ void StringFieldGenerator::GenerateClearingCode(io::Printer* printer) const { // below methods are inlined one-liners)! if (SupportsArenas(descriptor_)) { if (descriptor_->default_value_string().empty()) { - format( - "$name$_.ClearToEmpty($default_variable$, GetArenaNoVirtual());\n"); + format("$name$_.ClearToEmpty($default_variable$, GetArena());\n"); } else { - format( - "$name$_.ClearToDefault($default_variable$, GetArenaNoVirtual());\n"); + format("$name$_.ClearToDefault($default_variable$, GetArena());\n"); } } else { if (descriptor_->default_value_string().empty()) { @@ -428,10 +453,10 @@ void StringFieldGenerator::GenerateMessageClearingCode( // the minimal number of branches / amount of extraneous code at runtime // (given that the below methods are inlined one-liners)! - // If we have field presence, then the Clear() method of the protocol buffer + // If we have a hasbit, then the Clear() method of the protocol buffer // will have checked that this field is set. If so, we can avoid redundant // checks against default_variable. - const bool must_be_present = HasFieldPresence(descriptor_->file()); + const bool must_be_present = HasHasbit(descriptor_); if (inlined_ && must_be_present) { // Calling mutable_$name$() gives us a string reference and sets the has bit @@ -450,14 +475,12 @@ void StringFieldGenerator::GenerateMessageClearingCode( if (must_be_present) { format("$name$_.ClearNonDefaultToEmpty();\n"); } else { - format( - "$name$_.ClearToEmpty($default_variable$, GetArenaNoVirtual());\n"); + format("$name$_.ClearToEmpty($default_variable$, GetArena());\n"); } } else { // Clear to a non-empty default is more involved, as we try to use the // Arena if one is present and may need to reallocate the string. - format( - "$name$_.ClearToDefault($default_variable$, GetArenaNoVirtual());\n"); + format("$name$_.ClearToDefault($default_variable$, GetArena());\n"); } } else if (must_be_present) { // When Arenas are disabled and field presence has been checked, we can @@ -478,9 +501,9 @@ void StringFieldGenerator::GenerateMessageClearingCode( void StringFieldGenerator::GenerateMergingCode(io::Printer* printer) const { Formatter format(printer, variables_); - if (SupportsArenas(descriptor_) || descriptor_->containing_oneof() != NULL) { + if (SupportsArenas(descriptor_) || descriptor_->real_containing_oneof()) { // TODO(gpike): improve this - format("set_$name$(from.$name$());\n"); + format("_internal_set_$name$(from._internal_$name$());\n"); } else { format( "$set_hasbit$\n" @@ -493,9 +516,7 @@ void StringFieldGenerator::GenerateSwappingCode(io::Printer* printer) const { if (inlined_) { format("$name$_.Swap(&other->$name$_);\n"); } else { - format( - "$name$_.Swap(&other->$name$_, $default_variable$,\n" - " GetArenaNoVirtual());\n"); + format("$name$_.Swap(&other->$name$_, $default_variable$, GetArena());\n"); } } @@ -516,19 +537,19 @@ void StringFieldGenerator::GenerateCopyConstructorCode( Formatter format(printer, variables_); GenerateConstructorCode(printer); - if (HasFieldPresence(descriptor_->file())) { - format("if (from.has_$name$()) {\n"); + if (HasHasbit(descriptor_)) { + format("if (from._internal_has_$name$()) {\n"); } else { - format("if (from.$name$().size() > 0) {\n"); + format("if (!from._internal_$name$().empty()) {\n"); } format.Indent(); - if (SupportsArenas(descriptor_) || descriptor_->containing_oneof() != NULL) { + if (SupportsArenas(descriptor_) || descriptor_->real_containing_oneof()) { // TODO(gpike): improve this format( - "$name$_.Set$lite$($default_variable$, from.$name$(),\n" - " GetArenaNoVirtual());\n"); + "$name$_.Set$lite$($default_variable$, from._internal_$name$(),\n" + " GetArena());\n"); } else { format("$name$_.AssignWithDefault($default_variable$, from.$name$_);\n"); } @@ -571,75 +592,23 @@ void StringFieldGenerator::GenerateDefaultInstanceAllocator( } } -void StringFieldGenerator::GenerateMergeFromCodedStream( - io::Printer* printer) const { - Formatter format(printer, variables_); - // The google3 version of proto2 has ArenaStrings and parses into them - // directly, but for the open-source release, we always parse into std::string - // instances. Note that for lite, we do similarly to the open source release - // and use std::string, not ArenaString. - if (!options_.opensource_runtime && !inlined_ && - SupportsArenas(descriptor_) && !lite_) { - // If arena != NULL, the current string is either an ArenaString (no - // destructor necessary) or a materialized std::string (and is on the - // Arena's destructor list). No call to ArenaStringPtr::Destroy is needed. - format( - "if (arena != nullptr) {\n" - " ::$proto_ns$::internal::TaggedPtr str =\n" - " ::$proto_ns$::internal::ReadArenaString(input, arena);\n" - " DO_(!str.IsNull());\n" - " $set_hasbit_io$\n" - " $name$_.UnsafeSetTaggedPointer(str);\n" - "} else {\n" - " DO_(::$proto_ns$::internal::WireFormatLite::Read$declared_type$(\n" - " input, this->mutable_$name$()));\n" - "}\n"); - } else { - format( - "DO_(::$proto_ns$::internal::WireFormatLite::Read$declared_type$(\n" - " input, this->mutable_$name$()));\n"); - } - - if (descriptor_->type() == FieldDescriptor::TYPE_STRING) { - GenerateUtf8CheckCodeForString( - descriptor_, options_, true, - "this->$name$().data(), static_cast(this->$name$().length()),\n", - format); - } -} - bool StringFieldGenerator::MergeFromCodedStreamNeedsArena() const { return !lite_ && !inlined_ && !options_.opensource_runtime; } -void StringFieldGenerator::GenerateSerializeWithCachedSizes( - io::Printer* printer) const { - Formatter format(printer, variables_); - if (descriptor_->type() == FieldDescriptor::TYPE_STRING) { - GenerateUtf8CheckCodeForString( - descriptor_, options_, false, - "this->$name$().data(), static_cast(this->$name$().length()),\n", - format); - } - format( - "::$proto_ns$::internal::WireFormatLite::Write$declared_type$" - "MaybeAliased(\n" - " $number$, this->$name$(), output);\n"); -} - void StringFieldGenerator::GenerateSerializeWithCachedSizesToArray( io::Printer* printer) const { Formatter format(printer, variables_); if (descriptor_->type() == FieldDescriptor::TYPE_STRING) { GenerateUtf8CheckCodeForString( descriptor_, options_, false, - "this->$name$().data(), static_cast(this->$name$().length()),\n", + "this->_internal_$name$().data(), " + "static_cast(this->_internal_$name$().length()),\n", format); } format( - "target =\n" - " ::$proto_ns$::internal::WireFormatLite::Write$declared_type$ToArray(\n" - " $number$, this->$name$(), target);\n"); + "target = stream->Write$declared_type$MaybeAliased(\n" + " $number$, this->_internal_$name$(), target);\n"); } void StringFieldGenerator::GenerateByteSize(io::Printer* printer) const { @@ -647,7 +616,7 @@ void StringFieldGenerator::GenerateByteSize(io::Printer* printer) const { format( "total_size += $tag_size$ +\n" " ::$proto_ns$::internal::WireFormatLite::$declared_type$Size(\n" - " this->$name$());\n"); + " this->_internal_$name$());\n"); } uint32 StringFieldGenerator::CalculateFieldTag() const { @@ -662,6 +631,9 @@ StringOneofFieldGenerator::StringOneofFieldGenerator( inlined_ = false; SetCommonOneofFieldVariables(descriptor, &variables_); + variables_["field_name"] = UnderscoresToCamelCase(descriptor->name(), true); + variables_["oneof_index"] = + StrCat(descriptor->containing_oneof()->index()); } StringOneofFieldGenerator::~StringOneofFieldGenerator() {} @@ -669,57 +641,74 @@ StringOneofFieldGenerator::~StringOneofFieldGenerator() {} void StringOneofFieldGenerator::GenerateInlineAccessorDefinitions( io::Printer* printer) const { Formatter format(printer, variables_); + format( + "inline const std::string& $classname$::$name$() const {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_get:$full_name$)\n" + " return _internal_$name$();\n" + "}\n" + "inline void $classname$::set_$name$(const std::string& value) {\n" + "$annotate_accessor$" + " _internal_set_$name$(value);\n" + " // @@protoc_insertion_point(field_set:$full_name$)\n" + "}\n" + "inline std::string* $classname$::mutable_$name$() {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_mutable:$full_name$)\n" + " return _internal_mutable_$name$();\n" + "}\n"); if (SupportsArenas(descriptor_)) { format( - "inline const std::string& $classname$::$name$() const {\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" - " if (has_$name$()) {\n" + "inline const std::string& $classname$::_internal_$name$() const {\n" + " if (_internal_has_$name$()) {\n" " return $field_member$.Get();\n" " }\n" " return *$default_variable$;\n" "}\n" - "inline void $classname$::set_$name$(const std::string& value) {\n" - " if (!has_$name$()) {\n" + "inline void $classname$::_internal_set_$name$(const std::string& " + "value) {\n" + " if (!_internal_has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" " $field_member$.UnsafeSetDefault($default_variable$);\n" " }\n" - " $field_member$.Set$lite$($default_variable$, value,\n" - " GetArenaNoVirtual());\n" - " // @@protoc_insertion_point(field_set:$full_name$)\n" + " $field_member$.Set$lite$($default_variable$, value, GetArena());\n" "}\n" "inline void $classname$::set_$name$(std::string&& value) {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_set:$full_name$)\n" - " if (!has_$name$()) {\n" + " if (!_internal_has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" " $field_member$.UnsafeSetDefault($default_variable$);\n" " }\n" " $field_member$.Set$lite$(\n" - " $default_variable$, ::std::move(value), GetArenaNoVirtual());\n" + " $default_variable$, ::std::move(value), GetArena());\n" " // @@protoc_insertion_point(field_set_rvalue:$full_name$)\n" "}\n" "inline void $classname$::set_$name$(const char* value) {\n" + "$annotate_accessor$" " $null_check$" - " if (!has_$name$()) {\n" + " if (!_internal_has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" " $field_member$.UnsafeSetDefault($default_variable$);\n" " }\n" " $field_member$.Set$lite$($default_variable$,\n" - " $string_piece$(value), GetArenaNoVirtual());\n" + " $string_piece$(value), GetArena());\n" " // @@protoc_insertion_point(field_set_char:$full_name$)\n" "}\n"); if (!options_.opensource_runtime) { format( "inline void $classname$::set_$name$(::StringPiece value) {\n" - " if (!has_$name$()) {\n" + "$annotate_accessor$" + " if (!_internal_has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" " $field_member$.UnsafeSetDefault($default_variable$);\n" " }\n" " $field_member$.Set$lite$($default_variable$, value,\n" - " GetArenaNoVirtual());\n" + " GetArena());\n" " // @@protoc_insertion_point(field_set_string_piece:$full_name$)\n" "}\n"); } @@ -727,7 +716,8 @@ void StringOneofFieldGenerator::GenerateInlineAccessorDefinitions( "inline " "void $classname$::set_$name$(const $pointer_type$* value,\n" " size_t size) {\n" - " if (!has_$name$()) {\n" + "$annotate_accessor$" + " if (!_internal_has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" " $field_member$.UnsafeSetDefault($default_variable$);\n" @@ -735,30 +725,29 @@ void StringOneofFieldGenerator::GenerateInlineAccessorDefinitions( " $field_member$.Set$lite$(\n" " $default_variable$, $string_piece$(\n" " reinterpret_cast(value), size),\n" - " GetArenaNoVirtual());\n" + " GetArena());\n" " // @@protoc_insertion_point(field_set_pointer:$full_name$)\n" "}\n" - "inline std::string* $classname$::mutable_$name$() {\n" - " if (!has_$name$()) {\n" + "inline std::string* $classname$::_internal_mutable_$name$() {\n" + " if (!_internal_has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" " $field_member$.UnsafeSetDefault($default_variable$);\n" " }\n" - " return $field_member$.Mutable($default_variable$,\n" - " GetArenaNoVirtual());\n" - " // @@protoc_insertion_point(field_mutable:$full_name$)\n" + " return $field_member$.Mutable($default_variable$, GetArena());\n" "}\n" "inline std::string* $classname$::$release_name$() {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_release:$full_name$)\n" - " if (has_$name$()) {\n" + " if (_internal_has_$name$()) {\n" " clear_has_$oneof_name$();\n" - " return $field_member$.Release($default_variable$,\n" - " GetArenaNoVirtual());\n" + " return $field_member$.Release($default_variable$, GetArena());\n" " } else {\n" " return nullptr;\n" " }\n" "}\n" "inline void $classname$::set_allocated_$name$(std::string* $name$) {\n" + "$annotate_accessor$" " if (has_$oneof_name$()) {\n" " clear_$oneof_name$();\n" " }\n" @@ -771,28 +760,30 @@ void StringOneofFieldGenerator::GenerateInlineAccessorDefinitions( if (options_.opensource_runtime) { format( "inline std::string* $classname$::unsafe_arena_release_$name$() {\n" + "$annotate_accessor$" " // " "@@protoc_insertion_point(field_unsafe_arena_release:$full_name$)\n" - " $DCHK$(GetArenaNoVirtual() != nullptr);\n" - " if (has_$name$()) {\n" + " $DCHK$(GetArena() != nullptr);\n" + " if (_internal_has_$name$()) {\n" " clear_has_$oneof_name$();\n" " return $field_member$.UnsafeArenaRelease(\n" - " $default_variable$, GetArenaNoVirtual());\n" + " $default_variable$, GetArena());\n" " } else {\n" " return nullptr;\n" " }\n" "}\n" "inline void $classname$::unsafe_arena_set_allocated_$name$(" "std::string* $name$) {\n" - " $DCHK$(GetArenaNoVirtual() != nullptr);\n" - " if (!has_$name$()) {\n" + "$annotate_accessor$" + " $DCHK$(GetArena() != nullptr);\n" + " if (!_internal_has_$name$()) {\n" " $field_member$.UnsafeSetDefault($default_variable$);\n" " }\n" " clear_$oneof_name$();\n" " if ($name$) {\n" " set_has_$name$();\n" " $field_member$.UnsafeArenaSetAllocated($default_variable$, " - "$name$, GetArenaNoVirtual());\n" + "$name$, GetArena());\n" " }\n" " // @@protoc_insertion_point(field_unsafe_arena_set_allocated:" "$full_name$)\n" @@ -801,26 +792,25 @@ void StringOneofFieldGenerator::GenerateInlineAccessorDefinitions( } else { // No-arena case. format( - "inline const std::string& $classname$::$name$() const {\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" - " if (has_$name$()) {\n" + "inline const std::string& $classname$::_internal_$name$() const {\n" + " if (_internal_has_$name$()) {\n" " return $field_member$.GetNoArena();\n" " }\n" " return *$default_variable$;\n" "}\n" - "inline void $classname$::set_$name$(const std::string& value) {\n" - " // @@protoc_insertion_point(field_set:$full_name$)\n" - " if (!has_$name$()) {\n" + "inline void $classname$::_internal_set_$name$(const std::string& " + "value) {\n" + " if (!_internal_has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" " $field_member$.UnsafeSetDefault($default_variable$);\n" " }\n" " $field_member$.SetNoArena($default_variable$, value);\n" - " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n" "inline void $classname$::set_$name$(std::string&& value) {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_set:$full_name$)\n" - " if (!has_$name$()) {\n" + " if (!_internal_has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" " $field_member$.UnsafeSetDefault($default_variable$);\n" @@ -829,8 +819,9 @@ void StringOneofFieldGenerator::GenerateInlineAccessorDefinitions( " // @@protoc_insertion_point(field_set_rvalue:$full_name$)\n" "}\n" "inline void $classname$::set_$name$(const char* value) {\n" + "$annotate_accessor$" " $null_check$" - " if (!has_$name$()) {\n" + " if (!_internal_has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" " $field_member$.UnsafeSetDefault($default_variable$);\n" @@ -842,7 +833,8 @@ void StringOneofFieldGenerator::GenerateInlineAccessorDefinitions( if (!options_.opensource_runtime) { format( "inline void $classname$::set_$name$(::StringPiece value) {\n" - " if (!has_$name$()) {\n" + "$annotate_accessor$" + " if (!_internal_has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" " $field_member$.UnsafeSetDefault($default_variable$);\n" @@ -855,7 +847,8 @@ void StringOneofFieldGenerator::GenerateInlineAccessorDefinitions( "inline " "void $classname$::set_$name$(const $pointer_type$* value, size_t " "size) {\n" - " if (!has_$name$()) {\n" + "$annotate_accessor$" + " if (!_internal_has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" " $field_member$.UnsafeSetDefault($default_variable$);\n" @@ -864,18 +857,18 @@ void StringOneofFieldGenerator::GenerateInlineAccessorDefinitions( " reinterpret_cast(value), size));\n" " // @@protoc_insertion_point(field_set_pointer:$full_name$)\n" "}\n" - "inline std::string* $classname$::mutable_$name$() {\n" - " if (!has_$name$()) {\n" + "inline std::string* $classname$::_internal_mutable_$name$() {\n" + " if (!_internal_has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" " $field_member$.UnsafeSetDefault($default_variable$);\n" " }\n" - " // @@protoc_insertion_point(field_mutable:$full_name$)\n" " return $field_member$.MutableNoArena($default_variable$);\n" "}\n" "inline std::string* $classname$::$release_name$() {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_release:$full_name$)\n" - " if (has_$name$()) {\n" + " if (_internal_has_$name$()) {\n" " clear_has_$oneof_name$();\n" " return $field_member$.ReleaseNoArena($default_variable$);\n" " } else {\n" @@ -883,6 +876,7 @@ void StringOneofFieldGenerator::GenerateInlineAccessorDefinitions( " }\n" "}\n" "inline void $classname$::set_allocated_$name$(std::string* $name$) {\n" + "$annotate_accessor$" " if (has_$oneof_name$()) {\n" " clear_$oneof_name$();\n" " }\n" @@ -899,9 +893,7 @@ void StringOneofFieldGenerator::GenerateClearingCode( io::Printer* printer) const { Formatter format(printer, variables_); if (SupportsArenas(descriptor_)) { - format( - "$field_member$.Destroy($default_variable$,\n" - " GetArenaNoVirtual());\n"); + format("$field_member$.Destroy($default_variable$, GetArena());\n"); } else { format("$field_member$.DestroyNoArena($default_variable$);\n"); } @@ -929,48 +921,11 @@ void StringOneofFieldGenerator::GenerateDestructorCode( io::Printer* printer) const { Formatter format(printer, variables_); format( - "if (has_$name$()) {\n" + "if (_internal_has_$name$()) {\n" " $field_member$.DestroyNoArena($default_variable$);\n" "}\n"); } -void StringOneofFieldGenerator::GenerateMergeFromCodedStream( - io::Printer* printer) const { - Formatter format(printer, variables_); - // See above: ArenaString is not included in the open-source release. - if (!options_.opensource_runtime && SupportsArenas(descriptor_) && !lite_) { - // If has_$name$(), then the current string is either an ArenaString (no - // destructor necessary) or a materialized std::string (and is on the - // Arena's destructor list). No call to ArenaStringPtr::Destroy is needed. - format( - "if (arena != nullptr) {\n" - " clear_$oneof_name$();\n" - " if (!has_$name$()) {\n" - " $field_member$.UnsafeSetDefault($default_variable$);\n" - " set_has_$name$();\n" - " }\n" - " ::$proto_ns$::internal::TaggedPtr new_value =\n" - " ::$proto_ns$::internal::ReadArenaString(input, arena);\n" - " DO_(!new_value.IsNull());\n" - " $field_member$.UnsafeSetTaggedPointer(new_value);\n" - "} else {\n" - " DO_(::$proto_ns$::internal::WireFormatLite::Read$declared_type$(\n" - " input, this->mutable_$name$()));\n" - "}\n"); - } else { - format( - "DO_(::$proto_ns$::internal::WireFormatLite::Read$declared_type$(\n" - " input, this->mutable_$name$()));\n"); - } - - if (descriptor_->type() == FieldDescriptor::TYPE_STRING) { - GenerateUtf8CheckCodeForString( - descriptor_, options_, true, - "this->$name$().data(), static_cast(this->$name$().length()),\n", - format); - } -} - // =================================================================== RepeatedStringFieldGenerator::RepeatedStringFieldGenerator( @@ -1040,7 +995,11 @@ void RepeatedStringFieldGenerator::GenerateAccessorDeclarations( "const;\n" "$deprecated_attr$::$proto_ns$::RepeatedPtrField* " "${1$mutable_$name$$}$()" - ";\n", + ";\n" + "private:\n" + "const std::string& ${1$_internal_$name$$}$(int index) const;\n" + "std::string* _internal_add_$name$();\n" + "public:\n", descriptor_); if (unknown_ctype) { @@ -1053,36 +1012,51 @@ void RepeatedStringFieldGenerator::GenerateAccessorDeclarations( void RepeatedStringFieldGenerator::GenerateInlineAccessorDefinitions( io::Printer* printer) const { Formatter format(printer, variables_); + format( + "inline std::string* $classname$::add_$name$() {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_add_mutable:$full_name$)\n" + " return _internal_add_$name$();\n" + "}\n"); if (options_.safe_boundary_check) { format( - "inline const std::string& $classname$::$name$(int index) const {\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" + "inline const std::string& $classname$::_internal_$name$(int index) " + "const {\n" " return $name$_.InternalCheckedGet(\n" " index, ::$proto_ns$::internal::GetEmptyStringAlreadyInited());\n" "}\n"); } else { format( - "inline const std::string& $classname$::$name$(int index) const {\n" - " // @@protoc_insertion_point(field_get:$full_name$)\n" + "inline const std::string& $classname$::_internal_$name$(int index) " + "const {\n" " return $name$_.Get(index);\n" "}\n"); } format( + "inline const std::string& $classname$::$name$(int index) const {\n" + "$annotate_accessor$" + " // @@protoc_insertion_point(field_get:$full_name$)\n" + " return _internal_$name$(index);\n" + "}\n" "inline std::string* $classname$::mutable_$name$(int index) {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_mutable:$full_name$)\n" " return $name$_.Mutable(index);\n" "}\n" "inline void $classname$::set_$name$(int index, const std::string& " "value) " "{\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_set:$full_name$)\n" " $name$_.Mutable(index)->assign(value);\n" "}\n" "inline void $classname$::set_$name$(int index, std::string&& value) {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_set:$full_name$)\n" " $name$_.Mutable(index)->assign(std::move(value));\n" "}\n" "inline void $classname$::set_$name$(int index, const char* value) {\n" + "$annotate_accessor$" " $null_check$" " $name$_.Mutable(index)->assign(value);\n" " // @@protoc_insertion_point(field_set_char:$full_name$)\n" @@ -1091,6 +1065,7 @@ void RepeatedStringFieldGenerator::GenerateInlineAccessorDefinitions( format( "inline void " "$classname$::set_$name$(int index, StringPiece value) {\n" + "$annotate_accessor$" " $name$_.Mutable(index)->assign(value.data(), value.size());\n" " // @@protoc_insertion_point(field_set_string_piece:$full_name$)\n" "}\n"); @@ -1099,23 +1074,26 @@ void RepeatedStringFieldGenerator::GenerateInlineAccessorDefinitions( "inline void " "$classname$::set_$name$" "(int index, const $pointer_type$* value, size_t size) {\n" + "$annotate_accessor$" " $name$_.Mutable(index)->assign(\n" " reinterpret_cast(value), size);\n" " // @@protoc_insertion_point(field_set_pointer:$full_name$)\n" "}\n" - "inline std::string* $classname$::add_$name$() {\n" - " // @@protoc_insertion_point(field_add_mutable:$full_name$)\n" + "inline std::string* $classname$::_internal_add_$name$() {\n" " return $name$_.Add();\n" "}\n" "inline void $classname$::add_$name$(const std::string& value) {\n" + "$annotate_accessor$" " $name$_.Add()->assign(value);\n" " // @@protoc_insertion_point(field_add:$full_name$)\n" "}\n" "inline void $classname$::add_$name$(std::string&& value) {\n" + "$annotate_accessor$" " $name$_.Add(std::move(value));\n" " // @@protoc_insertion_point(field_add:$full_name$)\n" "}\n" "inline void $classname$::add_$name$(const char* value) {\n" + "$annotate_accessor$" " $null_check$" " $name$_.Add()->assign(value);\n" " // @@protoc_insertion_point(field_add_char:$full_name$)\n" @@ -1123,6 +1101,7 @@ void RepeatedStringFieldGenerator::GenerateInlineAccessorDefinitions( if (!options_.opensource_runtime) { format( "inline void $classname$::add_$name$(StringPiece value) {\n" + "$annotate_accessor$" " $name$_.Add()->assign(value.data(), value.size());\n" " // @@protoc_insertion_point(field_add_string_piece:$full_name$)\n" "}\n"); @@ -1130,16 +1109,19 @@ void RepeatedStringFieldGenerator::GenerateInlineAccessorDefinitions( format( "inline void " "$classname$::add_$name$(const $pointer_type$* value, size_t size) {\n" + "$annotate_accessor$" " $name$_.Add()->assign(reinterpret_cast(value), size);\n" " // @@protoc_insertion_point(field_add_pointer:$full_name$)\n" "}\n" "inline const ::$proto_ns$::RepeatedPtrField&\n" "$classname$::$name$() const {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_list:$full_name$)\n" " return $name$_;\n" "}\n" "inline ::$proto_ns$::RepeatedPtrField*\n" "$classname$::mutable_$name$() {\n" + "$annotate_accessor$" " // @@protoc_insertion_point(field_mutable_list:$full_name$)\n" " return &$name$_;\n" "}\n"); @@ -1160,7 +1142,7 @@ void RepeatedStringFieldGenerator::GenerateMergingCode( void RepeatedStringFieldGenerator::GenerateSwappingCode( io::Printer* printer) const { Formatter format(printer, variables_); - format("$name$_.InternalSwap(CastToBase(&other->$name$_));\n"); + format("$name$_.InternalSwap(&other->$name$_);\n"); } void RepeatedStringFieldGenerator::GenerateConstructorCode( @@ -1174,54 +1156,22 @@ void RepeatedStringFieldGenerator::GenerateCopyConstructorCode( format("$name$_.CopyFrom(from.$name$_);"); } -void RepeatedStringFieldGenerator::GenerateMergeFromCodedStream( - io::Printer* printer) const { - Formatter format(printer, variables_); - format( - "DO_(::$proto_ns$::internal::WireFormatLite::Read$declared_type$(\n" - " input, this->add_$name$()));\n"); - if (descriptor_->type() == FieldDescriptor::TYPE_STRING) { - GenerateUtf8CheckCodeForString( - descriptor_, options_, true, - "this->$name$(this->$name$_size() - 1).data(),\n" - "static_cast(this->$name$(this->$name$_size() - 1).length()),\n", - format); - } -} - -void RepeatedStringFieldGenerator::GenerateSerializeWithCachedSizes( - io::Printer* printer) const { - Formatter format(printer, variables_); - format("for (int i = 0, n = this->$name$_size(); i < n; i++) {\n"); - format.Indent(); - if (descriptor_->type() == FieldDescriptor::TYPE_STRING) { - GenerateUtf8CheckCodeForString( - descriptor_, options_, false, - "this->$name$(i).data(), static_cast(this->$name$(i).length()),\n", - format); - } - format.Outdent(); - format( - " ::$proto_ns$::internal::WireFormatLite::Write$declared_type$(\n" - " $number$, this->$name$(i), output);\n" - "}\n"); -} - void RepeatedStringFieldGenerator::GenerateSerializeWithCachedSizesToArray( io::Printer* printer) const { Formatter format(printer, variables_); - format("for (int i = 0, n = this->$name$_size(); i < n; i++) {\n"); + format( + "for (int i = 0, n = this->_internal_$name$_size(); i < n; i++) {\n" + " const auto& s = this->_internal_$name$(i);\n"); + // format("for (const std::string& s : this->$name$()) {\n"); format.Indent(); if (descriptor_->type() == FieldDescriptor::TYPE_STRING) { - GenerateUtf8CheckCodeForString( - descriptor_, options_, false, - "this->$name$(i).data(), static_cast(this->$name$(i).length()),\n", - format); + GenerateUtf8CheckCodeForString(descriptor_, options_, false, + "s.data(), static_cast(s.length()),\n", + format); } format.Outdent(); format( - " target = ::$proto_ns$::internal::WireFormatLite::\n" - " Write$declared_type$ToArray($number$, this->$name$(i), target);\n" + " target = stream->Write$declared_type$($number$, s, target);\n" "}\n"); } @@ -1230,11 +1180,11 @@ void RepeatedStringFieldGenerator::GenerateByteSize( Formatter format(printer, variables_); format( "total_size += $tag_size$ *\n" - " ::$proto_ns$::internal::FromIntSize(this->$name$_size());\n" - "for (int i = 0, n = this->$name$_size(); i < n; i++) {\n" + " ::$proto_ns$::internal::FromIntSize($name$_.size());\n" + "for (int i = 0, n = $name$_.size(); i < n; i++) {\n" " total_size += " "::$proto_ns$::internal::WireFormatLite::$declared_type$Size(\n" - " this->$name$(i));\n" + " $name$_.Get(i));\n" "}\n"); } diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h index 3a1de551..f39a93ab 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h @@ -65,8 +65,6 @@ class StringFieldGenerator : public FieldGenerator { void GenerateDestructorCode(io::Printer* printer) const; bool GenerateArenaDestructorCode(io::Printer* printer) const; void GenerateDefaultInstanceAllocator(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; void GenerateByteSize(io::Printer* printer) const; uint32 CalculateFieldTag() const; @@ -98,7 +96,6 @@ class StringOneofFieldGenerator : public StringFieldGenerator { void GenerateSwappingCode(io::Printer* printer) const; void GenerateConstructorCode(io::Printer* printer) const; void GenerateDestructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(StringOneofFieldGenerator); @@ -119,8 +116,6 @@ class RepeatedStringFieldGenerator : public FieldGenerator { void GenerateSwappingCode(io::Printer* printer) const; void GenerateConstructorCode(io::Printer* printer) const; void GenerateCopyConstructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; void GenerateByteSize(io::Printer* printer) const; diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.inc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.inc index 0b18662e..0bf754cf 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.inc +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.inc @@ -72,12 +72,13 @@ #include #include #include -#include #include #include #include +#include #include +// Must be included last. #include namespace google { @@ -99,8 +100,8 @@ class MockErrorCollector : public MultiFileErrorCollector { // implements ErrorCollector --------------------------------------- void AddError(const std::string& filename, int line, int column, const std::string& message) { - strings::SubstituteAndAppend(&text_, "$0:$1:$2: $3\n", - filename, line, column, message); + strings::SubstituteAndAppend(&text_, "$0:$1:$2: $3\n", filename, line, column, + message); } }; diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/metadata_test.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/metadata_test.cc index 045c6a3d..a16c8b53 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/metadata_test.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/metadata_test.cc @@ -132,7 +132,7 @@ TEST_F(CppMetadataTest, AddsPragma) { atu::AddFile("test.proto", kSmallTestFile); EXPECT_TRUE( CaptureMetadata("test.proto", &file, &pb_h, &info, NULL, NULL, NULL)); - EXPECT_TRUE(pb_h.find("#ifdef guard_name") != string::npos); + EXPECT_TRUE(pb_h.find("#ifdef guard_name") != std::string::npos); EXPECT_TRUE(pb_h.find("#pragma pragma_name \"test.pb.h.meta\"") != std::string::npos); } diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc index 33c56198..978fdf02 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc @@ -77,23 +77,19 @@ class MockErrorCollector : public MultiFileErrorCollector { class MockGeneratorContext : public GeneratorContext { public: - MockGeneratorContext() {} - ~MockGeneratorContext() { - STLDeleteValues(&files_); - } - void ExpectFileMatches(const string& virtual_filename, const string& physical_filename) { - string* expected_contents = FindPtrOrNull(files_, virtual_filename); - ASSERT_TRUE(expected_contents != NULL) + auto it = files_.find(virtual_filename); + ASSERT_TRUE(it != files_.end()) << "Generator failed to generate file: " << virtual_filename; + string expected_contents = *it->second; string actual_contents; GOOGLE_CHECK_OK( File::GetContentsAsText(TestSourceDir() + "/" + physical_filename, &actual_contents, true)) << "Unable to get " << physical_filename; - EXPECT_TRUE(actual_contents == *expected_contents) + EXPECT_TRUE(actual_contents == expected_contents) << physical_filename << " needs to be regenerated. Please run " "generate_descriptor_proto.sh. Then add this file " "to your CL."; @@ -102,15 +98,13 @@ class MockGeneratorContext : public GeneratorContext { // implements GeneratorContext -------------------------------------- virtual io::ZeroCopyOutputStream* Open(const string& filename) { - string** map_slot = &files_[filename]; - delete *map_slot; - *map_slot = new string; - - return new io::StringOutputStream(*map_slot); + auto& map_slot = files_[filename]; + map_slot.reset(new std::string); + return new io::StringOutputStream(map_slot.get()); } private: - std::map files_; + std::map> files_; }; class GenerateAndTest { diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc index fcc0aec0..a4e9ff40 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc @@ -57,7 +57,7 @@ void WriteDocCommentBodyImpl(io::Printer* printer, SourceLocation location) { comments = StringReplace(comments, "&", "&", true); comments = StringReplace(comments, "<", "<", true); std::vector lines; - SplitStringAllowEmpty(comments, "\n", &lines); + lines = Split(comments, "\n", false); // TODO: We really should work out which part to put in the summary and which to put in the remarks... // but that needs to be part of a bigger effort to understand the markdown better anyway. printer->Print("/// \n"); diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc index f4570966..2baefd84 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc @@ -79,12 +79,12 @@ void EnumGenerator::Generate(io::Printer* printer) { printer->Print("[pbr::OriginalName(\"$original_name$\", PreferredAlias = false)] $name$ = $number$,\n", "original_name", original_name, "name", name, - "number", SimpleItoa(number)); + "number", StrCat(number)); } else { printer->Print("[pbr::OriginalName(\"$original_name$\")] $name$ = $number$,\n", "original_name", original_name, "name", name, - "number", SimpleItoa(number)); + "number", StrCat(number)); } } printer->Outdent(); diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.cc index 4d9bb672..186fa27e 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.cc @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -75,9 +76,20 @@ void EnumFieldGenerator::GenerateSerializedSizeCode(io::Printer* printer) { } void EnumFieldGenerator::GenerateCodecCode(io::Printer* printer) { - printer->Print( - variables_, - "pb::FieldCodec.ForEnum($tag$, x => (int) x, x => ($type_name$) x)"); + printer->Print( + variables_, + "pb::FieldCodec.ForEnum($tag$, x => (int) x, x => ($type_name$) x, $default_value$)"); +} + +void EnumFieldGenerator::GenerateExtensionCode(io::Printer* printer) { + WritePropertyDocComment(printer, descriptor_); + AddDeprecatedFlag(printer); + printer->Print( + variables_, + "$access_level$ static readonly pb::Extension<$extended_type$, $type_name$> $property_name$ =\n" + " new pb::Extension<$extended_type$, $type_name$>($number$, "); + GenerateCodecCode(printer); + printer->Print(");\n"); } EnumOneofFieldGenerator::EnumOneofFieldGenerator( diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.h b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.h index 04ca68da..9f1a2ea7 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.h @@ -55,6 +55,7 @@ class EnumFieldGenerator : public PrimitiveFieldGenerator { virtual void GenerateParsingCode(io::Printer* printer); virtual void GenerateSerializationCode(io::Printer* printer); virtual void GenerateSerializedSizeCode(io::Printer* printer); + virtual void GenerateExtensionCode(io::Printer* printer); }; class EnumOneofFieldGenerator : public PrimitiveOneofFieldGenerator { diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.cc index 02adfeae..c69e2480 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.cc @@ -56,43 +56,60 @@ void FieldGeneratorBase::SetCommonFieldVariables( // repeated fields varies by wire format. The wire format is encoded in the bottom 3 bits, which // never effects the tag size. int tag_size = internal::WireFormat::TagSize(descriptor_->number(), descriptor_->type()); + int part_tag_size = tag_size; if (descriptor_->type() == FieldDescriptor::TYPE_GROUP) { - tag_size /= 2; + part_tag_size /= 2; } uint tag = internal::WireFormat::MakeTag(descriptor_); uint8 tag_array[5]; io::CodedOutputStream::WriteTagToArray(tag, tag_array); - string tag_bytes = SimpleItoa(tag_array[0]); - for (int i = 1; i < tag_size; i++) { - tag_bytes += ", " + SimpleItoa(tag_array[i]); + string tag_bytes = StrCat(tag_array[0]); + for (int i = 1; i < part_tag_size; i++) { + tag_bytes += ", " + StrCat(tag_array[i]); + } + + (*variables)["tag"] = StrCat(tag); + (*variables)["tag_size"] = StrCat(tag_size); + (*variables)["tag_bytes"] = tag_bytes; + + if (descriptor_->type() == FieldDescriptor::Type::TYPE_GROUP) { + tag = internal::WireFormatLite::MakeTag( + descriptor_->number(), + internal::WireFormatLite::WIRETYPE_END_GROUP); + io::CodedOutputStream::WriteTagToArray(tag, tag_array); + tag_bytes = StrCat(tag_array[0]); + for (int i = 1; i < part_tag_size; i++) { + tag_bytes += ", " + StrCat(tag_array[i]); + } + + variables_["end_tag"] = StrCat(tag); + variables_["end_tag_bytes"] = tag_bytes; } (*variables)["access_level"] = "public"; - (*variables)["tag"] = SimpleItoa(tag); - (*variables)["tag_size"] = SimpleItoa(tag_size); - (*variables)["tag_bytes"] = tag_bytes; (*variables)["property_name"] = property_name(); (*variables)["type_name"] = type_name(); + (*variables)["extended_type"] = GetClassName(descriptor_->containing_type()); (*variables)["name"] = name(); (*variables)["descriptor_name"] = descriptor_->name(); (*variables)["default_value"] = default_value(); (*variables)["capitalized_type_name"] = capitalized_type_name(); (*variables)["number"] = number(); - if (has_default_value() && !IsProto2(descriptor_->file())) { + if (has_default_value() && !SupportsPresenceApi(descriptor_)) { (*variables)["name_def_message"] = (*variables)["name"] + "_ = " + (*variables)["default_value"]; } else { (*variables)["name_def_message"] = (*variables)["name"] + "_"; } - if (IsProto2(descriptor_->file())) { + if (SupportsPresenceApi(descriptor_)) { (*variables)["has_property_check"] = "Has" + (*variables)["property_name"]; (*variables)["other_has_property_check"] = "other.Has" + (*variables)["property_name"]; (*variables)["has_not_property_check"] = "!" + (*variables)["has_property_check"]; (*variables)["other_has_not_property_check"] = "!" + (*variables)["other_has_property_check"]; if (presenceIndex_ != -1) { - string hasBitsNumber = SimpleItoa(presenceIndex_ / 32); - string hasBitsMask = SimpleItoa(1 << (presenceIndex_ % 32)); + string hasBitsNumber = StrCat(presenceIndex_ / 32); + string hasBitsMask = StrCat(1 << (presenceIndex_ % 32)); (*variables)["has_field_check"] = "(_hasBits" + hasBitsNumber + " & " + hasBitsMask + ") != 0"; (*variables)["set_has_field"] = "_hasBits" + hasBitsNumber + " |= " + hasBitsMask; (*variables)["clear_has_field"] = "_hasBits" + hasBitsNumber + " &= ~" + hasBitsMask; @@ -108,7 +125,7 @@ void FieldGeneratorBase::SetCommonFieldVariables( void FieldGeneratorBase::SetCommonOneofFieldVariables( std::map* variables) { (*variables)["oneof_name"] = oneof_name(); - if (IsProto2(descriptor_->file())) { + if (SupportsPresenceApi(descriptor_)) { (*variables)["has_property_check"] = "Has" + property_name(); } else { (*variables)["has_property_check"] = @@ -139,6 +156,11 @@ void FieldGeneratorBase::GenerateCodecCode(io::Printer* printer) { // Could fail if we get called here though... } +void FieldGeneratorBase::GenerateExtensionCode(io::Printer* printer) { + // No-op: only message fields, enum fields, primitives, + // and repeated fields need this default is to not generate any code +} + void FieldGeneratorBase::AddDeprecatedFlag(io::Printer* printer) { if (descriptor_->options().deprecated()) { printer->Print("[global::System.ObsoleteAttribute]\n"); @@ -284,7 +306,9 @@ std::string FieldGeneratorBase::GetStringDefaultValueInternal(const FieldDescrip if (descriptor->default_value_string().empty()) return "\"\""; else - return "global::System.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(\" +" + StringToBase64(descriptor->default_value_string()) + " +\"))"; + return "global::System.Text.Encoding.UTF8.GetString(global::System." + "Convert.FromBase64String(\"" + + StringToBase64(descriptor->default_value_string()) + "\"), 0, " + StrCat(descriptor->default_value_string().length()) + ")"; } std::string FieldGeneratorBase::GetBytesDefaultValueInternal(const FieldDescriptor* descriptor) { @@ -301,13 +325,8 @@ std::string FieldGeneratorBase::default_value() { std::string FieldGeneratorBase::default_value(const FieldDescriptor* descriptor) { switch (descriptor->type()) { case FieldDescriptor::TYPE_ENUM: - if (IsProto2(descriptor_->file())) { - return GetClassName(descriptor->default_value_enum()->type()) + "." + - GetEnumValueName(descriptor->default_value_enum()->type()->name(), descriptor->default_value_enum()->name()); - } - else { - return "0"; - } + return GetClassName(descriptor->default_value_enum()->type()) + "." + + GetEnumValueName(descriptor->default_value_enum()->type()->name(), descriptor->default_value_enum()->name()); case FieldDescriptor::TYPE_MESSAGE: case FieldDescriptor::TYPE_GROUP: if (IsWrapperType(descriptor)) { @@ -325,7 +344,7 @@ std::string FieldGeneratorBase::default_value(const FieldDescriptor* descriptor) } else if (std::isnan(value)) { return "double.NaN"; } - return SimpleDtoa(value) + "D"; + return StrCat(value) + "D"; } case FieldDescriptor::TYPE_FLOAT: { float value = descriptor->default_value_float(); @@ -336,18 +355,18 @@ std::string FieldGeneratorBase::default_value(const FieldDescriptor* descriptor) } else if (std::isnan(value)) { return "float.NaN"; } - return SimpleFtoa(value) + "F"; + return StrCat(value) + "F"; } case FieldDescriptor::TYPE_INT64: - return SimpleItoa(descriptor->default_value_int64()) + "L"; + return StrCat(descriptor->default_value_int64()) + "L"; case FieldDescriptor::TYPE_UINT64: - return SimpleItoa(descriptor->default_value_uint64()) + "UL"; + return StrCat(descriptor->default_value_uint64()) + "UL"; case FieldDescriptor::TYPE_INT32: - return SimpleItoa(descriptor->default_value_int32()); + return StrCat(descriptor->default_value_int32()); case FieldDescriptor::TYPE_FIXED64: - return SimpleItoa(descriptor->default_value_uint64()) + "UL"; + return StrCat(descriptor->default_value_uint64()) + "UL"; case FieldDescriptor::TYPE_FIXED32: - return SimpleItoa(descriptor->default_value_uint32()); + return StrCat(descriptor->default_value_uint32()); case FieldDescriptor::TYPE_BOOL: if (descriptor->default_value_bool()) { return "true"; @@ -359,15 +378,15 @@ std::string FieldGeneratorBase::default_value(const FieldDescriptor* descriptor) case FieldDescriptor::TYPE_BYTES: return GetBytesDefaultValueInternal(descriptor); case FieldDescriptor::TYPE_UINT32: - return SimpleItoa(descriptor->default_value_uint32()); + return StrCat(descriptor->default_value_uint32()); case FieldDescriptor::TYPE_SFIXED32: - return SimpleItoa(descriptor->default_value_int32()); + return StrCat(descriptor->default_value_int32()); case FieldDescriptor::TYPE_SFIXED64: - return SimpleItoa(descriptor->default_value_int64()) + "L"; + return StrCat(descriptor->default_value_int64()) + "L"; case FieldDescriptor::TYPE_SINT32: - return SimpleItoa(descriptor->default_value_int32()); + return StrCat(descriptor->default_value_int32()); case FieldDescriptor::TYPE_SINT64: - return SimpleItoa(descriptor->default_value_int64()) + "L"; + return StrCat(descriptor->default_value_int64()) + "L"; default: GOOGLE_LOG(FATAL)<< "Unknown field type."; return ""; @@ -375,7 +394,7 @@ std::string FieldGeneratorBase::default_value(const FieldDescriptor* descriptor) } std::string FieldGeneratorBase::number() { - return SimpleItoa(descriptor_->number()); + return StrCat(descriptor_->number()); } std::string FieldGeneratorBase::capitalized_type_name() { diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.h b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.h index 28a09621..594461da 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.h +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.h @@ -57,6 +57,7 @@ class FieldGeneratorBase : public SourceGeneratorBase { virtual void GenerateCloningCode(io::Printer* printer) = 0; virtual void GenerateFreezingCode(io::Printer* printer); virtual void GenerateCodecCode(io::Printer* printer); + virtual void GenerateExtensionCode(io::Printer* printer); virtual void GenerateMembers(io::Printer* printer) = 0; virtual void GenerateMergingCode(io::Printer* printer) = 0; virtual void GenerateParsingCode(io::Printer* printer) = 0; diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_generator.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_generator.cc index 2b353b34..c2170f17 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_generator.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_generator.cc @@ -48,6 +48,13 @@ namespace protobuf { namespace compiler { namespace csharp { +Generator::Generator() {} +Generator::~Generator() {} + +uint64 Generator::GetSupportedFeatures() const { + return CodeGenerator::Feature::FEATURE_PROTO3_OPTIONAL; +} + void GenerateFile(const FileDescriptor* file, io::Printer* printer, const Options* options) { ReflectionClassGenerator reflectionClassGenerator(file, options); @@ -63,12 +70,6 @@ bool Generator::Generate( std::vector > options; ParseGeneratorParameter(parameter, &options); - // We only support proto3 - but we make an exception for descriptor.proto. - if (file->syntax() != FileDescriptor::SYNTAX_PROTO3 && !IsDescriptorProto(file)) { - *error = "C# code generation only supports proto3 syntax"; - return false; - } - struct Options cli_options; for (int i = 0; i < options.size(); i++) { diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_generator.h b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_generator.h index da72e0e7..76806db1 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_generator.h +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_generator.h @@ -50,11 +50,14 @@ namespace csharp { // CodeGenerator with the CommandLineInterface in your main() function. class PROTOC_EXPORT Generator : public CodeGenerator { public: - virtual bool Generate( - const FileDescriptor* file, - const string& parameter, - GeneratorContext* generator_context, - string* error) const; + Generator(); + ~Generator(); + bool Generate( + const FileDescriptor* file, + const string& parameter, + GeneratorContext* generator_context, + string* error) const override; + uint64 GetSupportedFeatures() const override; }; } // namespace csharp diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.cc index e8b5dcda..c7a0d4fa 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.cc @@ -133,6 +133,12 @@ std::string GetReflectionClassUnqualifiedName(const FileDescriptor* descriptor) return GetFileNameBase(descriptor) + "Reflection"; } +std::string GetExtensionClassUnqualifiedName(const FileDescriptor* descriptor) { + // TODO: Detect collisions with existing messages, + // and append an underscore if necessary. + return GetFileNameBase(descriptor) + "Extensions"; +} + // TODO(jtattermusch): can we reuse a utility function? std::string UnderscoresToCamelCase(const std::string& input, bool cap_next_letter, @@ -278,20 +284,45 @@ std::string GetEnumValueName(const std::string& enum_name, const std::string& en uint GetGroupEndTag(const Descriptor* descriptor) { const Descriptor* containing_type = descriptor->containing_type(); - if (containing_type == NULL) { - return 0; - } - const FieldDescriptor* field = containing_type->FindFieldByName(descriptor->name()); - if (field != NULL && field->type() == FieldDescriptor::Type::TYPE_GROUP) { - return internal::WireFormatLite::MakeTag(field->number(), internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED); + if (containing_type != NULL) { + const FieldDescriptor* field; + for (int i = 0; i < containing_type->field_count(); i++) { + field = containing_type->field(i); + if (field->type() == FieldDescriptor::Type::TYPE_GROUP && + field->message_type() == descriptor) { + return internal::WireFormatLite::MakeTag( + field->number(), internal::WireFormatLite::WIRETYPE_END_GROUP); + } + } + for (int i = 0; i < containing_type->extension_count(); i++) { + field = containing_type->extension(i); + if (field->type() == FieldDescriptor::Type::TYPE_GROUP && + field->message_type() == descriptor) { + return internal::WireFormatLite::MakeTag( + field->number(), internal::WireFormatLite::WIRETYPE_END_GROUP); + } + } } else { - return 0; + const FileDescriptor* containing_file = descriptor->file(); + if (containing_file != NULL) { + const FieldDescriptor* field; + for (int i = 0; i < containing_file->extension_count(); i++) { + field = containing_file->extension(i); + if (field->type() == FieldDescriptor::Type::TYPE_GROUP && + field->message_type() == descriptor) { + return internal::WireFormatLite::MakeTag( + field->number(), internal::WireFormatLite::WIRETYPE_END_GROUP); + } + } + } } + + return 0; } std::string ToCSharpName(const std::string& name, const FileDescriptor* file) { std::string result = GetFileNamespace(file); - if (result != "") { + if (!result.empty()) { result += '.'; } string classname; @@ -315,6 +346,15 @@ std::string GetReflectionClassName(const FileDescriptor* descriptor) { return "global::" + result; } +std::string GetFullExtensionName(const FieldDescriptor* descriptor) { + if (descriptor->extension_scope()) { + return GetClassName(descriptor->extension_scope()) + ".Extensions." + GetPropertyName(descriptor); + } + else { + return GetExtensionClassUnqualifiedName(descriptor->file()) + "." + GetPropertyName(descriptor); + } +} + std::string GetClassName(const Descriptor* descriptor) { return ToCSharpName(descriptor->full_name(), descriptor->file()); } @@ -475,13 +515,13 @@ FieldGeneratorBase* CreateFieldGenerator(const FieldDescriptor* descriptor, } } else { if (IsWrapperType(descriptor)) { - if (descriptor->containing_oneof()) { + if (descriptor->real_containing_oneof()) { return new WrapperOneofFieldGenerator(descriptor, presenceIndex, options); } else { return new WrapperFieldGenerator(descriptor, presenceIndex, options); } } else { - if (descriptor->containing_oneof()) { + if (descriptor->real_containing_oneof()) { return new MessageOneofFieldGenerator(descriptor, presenceIndex, options); } else { return new MessageFieldGenerator(descriptor, presenceIndex, options); @@ -492,7 +532,7 @@ FieldGeneratorBase* CreateFieldGenerator(const FieldDescriptor* descriptor, if (descriptor->is_repeated()) { return new RepeatedEnumFieldGenerator(descriptor, presenceIndex, options); } else { - if (descriptor->containing_oneof()) { + if (descriptor->real_containing_oneof()) { return new EnumOneofFieldGenerator(descriptor, presenceIndex, options); } else { return new EnumFieldGenerator(descriptor, presenceIndex, options); @@ -502,7 +542,7 @@ FieldGeneratorBase* CreateFieldGenerator(const FieldDescriptor* descriptor, if (descriptor->is_repeated()) { return new RepeatedPrimitiveFieldGenerator(descriptor, presenceIndex, options); } else { - if (descriptor->containing_oneof()) { + if (descriptor->real_containing_oneof()) { return new PrimitiveOneofFieldGenerator(descriptor, presenceIndex, options); } else { return new PrimitiveFieldGenerator(descriptor, presenceIndex, options); diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.h b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.h index d351a1c9..90ead89c 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.h +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.h @@ -36,7 +36,8 @@ #define GOOGLE_PROTOBUF_COMPILER_CSHARP_HELPERS_H__ #include -#include +#include +#include #include #include #include @@ -75,6 +76,8 @@ std::string StripDotProto(const std::string& proto_file); // Gets unqualified name of the reflection class std::string GetReflectionClassUnqualifiedName(const FileDescriptor* descriptor); +// Gets unqualified name of the extension class +std::string GetExtensionClassUnqualifiedName(const FileDescriptor* descriptor); std::string GetClassName(const EnumDescriptor* descriptor); @@ -110,6 +113,8 @@ FieldGeneratorBase* CreateFieldGenerator(const FieldDescriptor* descriptor, int presenceIndex, const Options* options); +std::string GetFullExtensionName(const FieldDescriptor* descriptor); + bool IsNullable(const FieldDescriptor* descriptor); // Determines whether the given message is a map entry message, @@ -153,6 +158,33 @@ inline bool IsProto2(const FileDescriptor* descriptor) { return descriptor->syntax() == FileDescriptor::SYNTAX_PROTO2; } +inline bool SupportsPresenceApi(const FieldDescriptor* descriptor) { + // Unlike most languages, we don't generate Has/Clear members for message + // types, because they can always be set to null in C#. They're not really + // needed for oneof fields in proto2 either, as everything can be done via + // oneof case, but we follow the convention from other languages. Proto3 + // oneof fields never have Has/Clear members - but will also never have + // the explicit optional keyword either. + // + // None of the built-in helpers (descriptor->has_presence() etc) describe + // quite the behavior we want, so the rules are explicit below. + + if (descriptor->is_repeated() || + descriptor->type() == FieldDescriptor::TYPE_MESSAGE) { + return false; + } + // has_optional_keyword() has more complex rules for proto2, but that + // doesn't matter given the first part of this condition. + return IsProto2(descriptor->file()) || descriptor->has_optional_keyword(); +} + +inline bool RequiresPresenceBit(const FieldDescriptor* descriptor) { + return SupportsPresenceApi(descriptor) && + !IsNullable(descriptor) && + !descriptor->is_extension() && + !descriptor->real_containing_oneof(); +} + } // namespace csharp } // namespace compiler } // namespace protobuf diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message.cc index e365463b..d71d2c41 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message.cc @@ -63,7 +63,8 @@ MessageGenerator::MessageGenerator(const Descriptor* descriptor, : SourceGeneratorBase(descriptor->file(), options), descriptor_(descriptor), has_bit_field_count_(0), - end_tag_(GetGroupEndTag(descriptor)) { + end_tag_(GetGroupEndTag(descriptor)), + has_extension_ranges_(descriptor->extension_range_count() > 0) { // fields by number for (int i = 0; i < descriptor_->field_count(); i++) { fields_by_number_.push_back(descriptor_->field(i)); @@ -71,15 +72,13 @@ MessageGenerator::MessageGenerator(const Descriptor* descriptor, std::sort(fields_by_number_.begin(), fields_by_number_.end(), CompareFieldNumbers); - if (IsProto2(descriptor_->file())) { - int primitiveCount = 0; - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - if (!IsNullable(field)) { - primitiveCount++; - if (has_bit_field_count_ == 0 || (primitiveCount % 32) == 0) { - has_bit_field_count_++; - } + int presence_bit_count = 0; + for (int i = 0; i < descriptor_->field_count(); i++) { + const FieldDescriptor* field = descriptor_->field(i); + if (RequiresPresenceBit(field)) { + presence_bit_count++; + if (has_bit_field_count_ == 0 || (presence_bit_count % 32) == 0) { + has_bit_field_count_++; } } } @@ -123,7 +122,15 @@ void MessageGenerator::Generate(io::Printer* printer) { printer->Print( vars, - "$access_level$ sealed partial class $class_name$ : pb::IMessage<$class_name$> {\n"); + "$access_level$ sealed partial class $class_name$ : "); + + if (has_extension_ranges_) { + printer->Print(vars, "pb::IExtendableMessage<$class_name$>"); + } + else { + printer->Print(vars, "pb::IMessage<$class_name$>"); + } + printer->Print(" {\n"); printer->Indent(); // All static fields and properties @@ -134,10 +141,24 @@ void MessageGenerator::Generate(io::Printer* printer) { printer->Print( "private pb::UnknownFieldSet _unknownFields;\n"); + if (has_extension_ranges_) { + if (IsDescriptorProto(descriptor_->file())) { + printer->Print(vars, "internal pb::ExtensionSet<$class_name$> _extensions;\n"); // CustomOptions compatibility + } else { + printer->Print(vars, "private pb::ExtensionSet<$class_name$> _extensions;\n"); + } + + // a read-only property for fast + // retrieval of the set in IsInitialized + printer->Print(vars, + "private pb::ExtensionSet<$class_name$> _Extensions { get { " + "return _extensions; } }\n"); + } + for (int i = 0; i < has_bit_field_count_; i++) { // don't use arrays since all arrays are heap allocated, saving allocations // use ints instead of bytes since bytes lack bitwise operators, saving casts - printer->Print("private int _hasBits$i$;\n", "i", SimpleItoa(i)); + printer->Print("private int _hasBits$i$;\n", "i", StrCat(i)); } WriteGeneratedCodeAttributes(printer); @@ -149,10 +170,10 @@ void MessageGenerator::Generate(io::Printer* printer) { // Access the message descriptor via the relevant file descriptor or containing message descriptor. if (!descriptor_->containing_type()) { vars["descriptor_accessor"] = GetReflectionClassName(descriptor_->file()) - + ".Descriptor.MessageTypes[" + SimpleItoa(descriptor_->index()) + "]"; + + ".Descriptor.MessageTypes[" + StrCat(descriptor_->index()) + "]"; } else { vars["descriptor_accessor"] = GetClassName(descriptor_->containing_type()) - + ".Descriptor.NestedTypes[" + SimpleItoa(descriptor_->index()) + "]"; + + ".Descriptor.NestedTypes[" + StrCat(descriptor_->index()) + "]"; } WriteGeneratedCodeAttributes(printer); @@ -169,12 +190,6 @@ void MessageGenerator::Generate(io::Printer* printer) { " get { return Descriptor; }\n" "}\n" "\n"); - // CustomOptions property, only for options messages - if (IsDescriptorOptionMessage(descriptor_)) { - printer->Print( - "internal CustomOptions CustomOptions{ get; private set; } = CustomOptions.Empty;\n" - "\n"); - } // Parameterless constructor and partial OnConstruction method. WriteGeneratedCodeAttributes(printer); @@ -198,18 +213,19 @@ void MessageGenerator::Generate(io::Printer* printer) { "public const int $field_constant_name$ = $index$;\n", "field_name", fieldDescriptor->name(), "field_constant_name", GetFieldConstantName(fieldDescriptor), - "index", SimpleItoa(fieldDescriptor->number())); + "index", StrCat(fieldDescriptor->number())); std::unique_ptr generator( CreateFieldGeneratorInternal(fieldDescriptor)); generator->GenerateMembers(printer); printer->Print("\n"); } - // oneof properties - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { - vars["name"] = UnderscoresToCamelCase(descriptor_->oneof_decl(i)->name(), false); - vars["property_name"] = UnderscoresToCamelCase(descriptor_->oneof_decl(i)->name(), true); - vars["original_name"] = descriptor_->oneof_decl(i)->name(); + // oneof properties (for real oneofs, which come before synthetic ones) + for (int i = 0; i < descriptor_->real_oneof_decl_count(); i++) { + const OneofDescriptor* oneof = descriptor_->oneof_decl(i); + vars["name"] = UnderscoresToCamelCase(oneof->name(), false); + vars["property_name"] = UnderscoresToCamelCase(oneof->name(), true); + vars["original_name"] = oneof->name(); printer->Print( vars, "private object $name$_;\n" @@ -217,11 +233,11 @@ void MessageGenerator::Generate(io::Printer* printer) { "public enum $property_name$OneofCase {\n"); printer->Indent(); printer->Print("None = 0,\n"); - for (int j = 0; j < descriptor_->oneof_decl(i)->field_count(); j++) { - const FieldDescriptor* field = descriptor_->oneof_decl(i)->field(j); + 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), - "index", SimpleItoa(field->number())); + "index", StrCat(field->number())); } printer->Outdent(); printer->Print("}\n"); @@ -250,6 +266,43 @@ void MessageGenerator::Generate(io::Printer* printer) { GenerateMessageSerializationMethods(printer); GenerateMergingMethods(printer); + if (has_extension_ranges_) { + printer->Print( + vars, + "public TValue GetExtension(pb::Extension<$class_name$, " + "TValue> extension) {\n" + " return pb::ExtensionSet.Get(ref _extensions, extension);\n" + "}\n" + "public pbc::RepeatedField " + "GetExtension(pb::RepeatedExtension<$class_name$, TValue> " + "extension) {\n" + " return pb::ExtensionSet.Get(ref _extensions, extension);\n" + "}\n" + "public pbc::RepeatedField " + "GetOrInitializeExtension(pb::RepeatedExtension<$class_name$, " + "TValue> extension) {\n" + " return pb::ExtensionSet.GetOrInitialize(ref _extensions, " + "extension);\n" + "}\n" + "public void SetExtension(pb::Extension<$class_name$, TValue> " + "extension, TValue value) {\n" + " pb::ExtensionSet.Set(ref _extensions, extension, value);\n" + "}\n" + "public bool HasExtension(pb::Extension<$class_name$, TValue> " + "extension) {\n" + " return pb::ExtensionSet.Has(ref _extensions, extension);\n" + "}\n" + "public void ClearExtension(pb::Extension<$class_name$, " + "TValue> extension) {\n" + " pb::ExtensionSet.Clear(ref _extensions, extension);\n" + "}\n" + "public void " + "ClearExtension(pb::RepeatedExtension<$class_name$, TValue> " + "extension) {\n" + " pb::ExtensionSet.Clear(ref _extensions, extension);\n" + "}\n\n"); + } + // Nested messages and enums if (HasNestedGeneratedTypes()) { printer->Print( @@ -277,6 +330,26 @@ void MessageGenerator::Generate(io::Printer* printer) { "\n"); } + if (descriptor_->extension_count() > 0) { + printer->Print( + vars, + "#region Extensions\n" + "/// Container for extensions for other messages declared in the $class_name$ message type.\n"); + WriteGeneratedCodeAttributes(printer); + printer->Print("public static partial class Extensions {\n"); + printer->Indent(); + for (int i = 0; i < descriptor_->extension_count(); i++) { + std::unique_ptr generator( + CreateFieldGeneratorInternal(descriptor_->extension(i))); + generator->GenerateExtensionCode(printer); + } + printer->Outdent(); + printer->Print( + "}\n" + "#endregion\n" + "\n"); + } + printer->Outdent(); printer->Print("}\n"); printer->Print("\n"); @@ -306,25 +379,26 @@ void MessageGenerator::GenerateCloningCode(io::Printer* printer) { "public $class_name$($class_name$ other) : this() {\n"); printer->Indent(); for (int i = 0; i < has_bit_field_count_; i++) { - printer->Print("_hasBits$i$ = other._hasBits$i$;\n", "i", SimpleItoa(i)); + printer->Print("_hasBits$i$ = other._hasBits$i$;\n", "i", StrCat(i)); } - // Clone non-oneof fields first + // Clone non-oneof fields first (treating optional proto3 fields as non-oneof) for (int i = 0; i < descriptor_->field_count(); i++) { - if (!descriptor_->field(i)->containing_oneof()) { - std::unique_ptr generator( - CreateFieldGeneratorInternal(descriptor_->field(i))); - generator->GenerateCloningCode(printer); + const FieldDescriptor* field = descriptor_->field(i); + if (field->real_containing_oneof()) { + continue; } + std::unique_ptr generator(CreateFieldGeneratorInternal(field)); + generator->GenerateCloningCode(printer); } - // Clone just the right field for each oneof - for (int i = 0; i < descriptor_->oneof_decl_count(); ++i) { - vars["name"] = UnderscoresToCamelCase(descriptor_->oneof_decl(i)->name(), false); - vars["property_name"] = UnderscoresToCamelCase( - descriptor_->oneof_decl(i)->name(), true); + // Clone just the right field for each real oneof + for (int i = 0; i < descriptor_->real_oneof_decl_count(); ++i) { + const OneofDescriptor* oneof = descriptor_->oneof_decl(i); + vars["name"] = UnderscoresToCamelCase(oneof->name(), false); + vars["property_name"] = UnderscoresToCamelCase(oneof->name(), true); printer->Print(vars, "switch (other.$property_name$Case) {\n"); printer->Indent(); - for (int j = 0; j < descriptor_->oneof_decl(i)->field_count(); j++) { - const FieldDescriptor* field = descriptor_->oneof_decl(i)->field(j); + for (int j = 0; j < oneof->field_count(); j++) { + const FieldDescriptor* field = oneof->field(j); std::unique_ptr generator(CreateFieldGeneratorInternal(field)); vars["field_property_name"] = GetPropertyName(field); printer->Print( @@ -341,6 +415,10 @@ void MessageGenerator::GenerateCloningCode(io::Printer* printer) { // Clone unknown fields printer->Print( "_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);\n"); + if (has_extension_ranges_) { + printer->Print( + "_extensions = pb::ExtensionSet.Clone(other._extensions);\n"); + } printer->Outdent(); printer->Print("}\n\n"); @@ -383,9 +461,15 @@ void MessageGenerator::GenerateFrameworkMethods(io::Printer* printer) { CreateFieldGeneratorInternal(descriptor_->field(i))); generator->WriteEquals(printer); } - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { - printer->Print("if ($property_name$Case != other.$property_name$Case) return false;\n", - "property_name", UnderscoresToCamelCase(descriptor_->oneof_decl(i)->name(), true)); + for (int i = 0; i < descriptor_->real_oneof_decl_count(); i++) { + printer->Print("if ($property_name$Case != other.$property_name$Case) return false;\n", + "property_name", UnderscoresToCamelCase(descriptor_->oneof_decl(i)->name(), true)); + } + if (has_extension_ranges_) { + printer->Print( + "if (!Equals(_extensions, other._extensions)) {\n" + " return false;\n" + "}\n"); } printer->Outdent(); printer->Print( @@ -404,9 +488,15 @@ void MessageGenerator::GenerateFrameworkMethods(io::Printer* printer) { CreateFieldGeneratorInternal(descriptor_->field(i))); generator->WriteHash(printer); } - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { - printer->Print("hash ^= (int) $name$Case_;\n", - "name", UnderscoresToCamelCase(descriptor_->oneof_decl(i)->name(), false)); + for (int i = 0; i < descriptor_->real_oneof_decl_count(); i++) { + printer->Print("hash ^= (int) $name$Case_;\n", + "name", UnderscoresToCamelCase(descriptor_->oneof_decl(i)->name(), false)); + } + if (has_extension_ranges_) { + printer->Print( + "if (_extensions != null) {\n" + " hash ^= _extensions.GetHashCode();\n" + "}\n"); } printer->Print( "if (_unknownFields != null) {\n" @@ -436,6 +526,14 @@ void MessageGenerator::GenerateMessageSerializationMethods(io::Printer* printer) generator->GenerateSerializationCode(printer); } + if (has_extension_ranges_) { + // Serialize extensions + printer->Print( + "if (_extensions != null) {\n" + " _extensions.WriteTo(output);\n" + "}\n"); + } + // Serialize unknown fields printer->Print( "if (_unknownFields != null) {\n" @@ -458,6 +556,13 @@ void MessageGenerator::GenerateMessageSerializationMethods(io::Printer* printer) generator->GenerateSerializedSizeCode(printer); } + if (has_extension_ranges_) { + printer->Print( + "if (_extensions != null) {\n" + " size += _extensions.CalculateSize();\n" + "}\n"); + } + printer->Print( "if (_unknownFields != null) {\n" " size += _unknownFields.CalculateSize();\n" @@ -484,22 +589,24 @@ void MessageGenerator::GenerateMergingMethods(io::Printer* printer) { "if (other == null) {\n" " return;\n" "}\n"); - // Merge non-oneof fields + // Merge non-oneof fields, treating optional proto3 fields as normal fields for (int i = 0; i < descriptor_->field_count(); i++) { - if (!descriptor_->field(i)->containing_oneof()) { - std::unique_ptr generator( - CreateFieldGeneratorInternal(descriptor_->field(i))); - generator->GenerateMergingCode(printer); + const FieldDescriptor* field = descriptor_->field(i); + if (field->real_containing_oneof()) { + continue; } + std::unique_ptr generator(CreateFieldGeneratorInternal(field)); + generator->GenerateMergingCode(printer); } - // Merge oneof fields - for (int i = 0; i < descriptor_->oneof_decl_count(); ++i) { - vars["name"] = UnderscoresToCamelCase(descriptor_->oneof_decl(i)->name(), false); - vars["property_name"] = UnderscoresToCamelCase(descriptor_->oneof_decl(i)->name(), true); + // Merge oneof fields (for non-synthetic oneofs) + for (int i = 0; i < descriptor_->real_oneof_decl_count(); ++i) { + const OneofDescriptor* oneof = descriptor_->oneof_decl(i); + vars["name"] = UnderscoresToCamelCase(oneof->name(), false); + vars["property_name"] = UnderscoresToCamelCase(oneof->name(), true); printer->Print(vars, "switch (other.$property_name$Case) {\n"); printer->Indent(); - for (int j = 0; j < descriptor_->oneof_decl(i)->field_count(); j++) { - const FieldDescriptor* field = descriptor_->oneof_decl(i)->field(j); + for (int j = 0; j < oneof->field_count(); j++) { + const FieldDescriptor* field = oneof->field(j); vars["field_property_name"] = GetPropertyName(field); printer->Print( vars, @@ -513,6 +620,11 @@ void MessageGenerator::GenerateMergingMethods(io::Printer* printer) { printer->Outdent(); printer->Print("}\n\n"); } + // Merge extensions + if (has_extension_ranges_) { + printer->Print("pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions);\n"); + } + // Merge unknown fields. printer->Print( "_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);\n"); @@ -530,23 +642,24 @@ void MessageGenerator::GenerateMergingMethods(io::Printer* printer) { " switch(tag) {\n"); printer->Indent(); printer->Indent(); - // Option messages need to store unknown fields so that options can be parsed later. - if (IsDescriptorOptionMessage(descriptor_)) { + if (end_tag_ != 0) { + printer->Print( + "case $end_tag$:\n" + " return;\n", + "end_tag", StrCat(end_tag_)); + } + if (has_extension_ranges_) { printer->Print( "default:\n" - " CustomOptions = CustomOptions.ReadOrSkipUnknownField(input);\n" + " if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) {\n" + " _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);\n" + " }\n" " break;\n"); } else { printer->Print( "default:\n" " _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);\n" " break;\n"); - if (end_tag_ != 0) { - printer->Print( - "$end_tag$:\n" - " return;\n", - "end_tag", SimpleItoa(end_tag_)); - } } for (int i = 0; i < fields_by_number().size(); i++) { const FieldDescriptor* field = fields_by_number()[i]; @@ -562,13 +675,13 @@ void MessageGenerator::GenerateMergingMethods(io::Printer* printer) { printer->Print( "case $packed_tag$:\n", "packed_tag", - SimpleItoa( + StrCat( internal::WireFormatLite::MakeTag( field->number(), internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED))); } - printer->Print("case $tag$: {\n", "tag", SimpleItoa(tag)); + printer->Print("case $tag$: {\n", "tag", StrCat(tag)); printer->Indent(); std::unique_ptr generator( CreateFieldGeneratorInternal(field)); @@ -587,7 +700,7 @@ void MessageGenerator::GenerateMergingMethods(io::Printer* printer) { // it's a waste of space to track presence for all values, so we only track them if they're not nullable int MessageGenerator::GetPresenceIndex(const FieldDescriptor* descriptor) { - if (IsNullable(descriptor) || !IsProto2(descriptor_->file())) { + if (!RequiresPresenceBit(descriptor)) { return -1; } @@ -597,7 +710,7 @@ int MessageGenerator::GetPresenceIndex(const FieldDescriptor* descriptor) { if (field == descriptor) { return index; } - if (!IsNullable(field)) { + if (RequiresPresenceBit(field)) { index++; } } diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message.h b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message.h index 7e88ecf1..5642dc88 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message.h +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message.h @@ -63,6 +63,7 @@ class MessageGenerator : public SourceGeneratorBase { std::vector fields_by_number_; int has_bit_field_count_; uint end_tag_; + bool has_extension_ranges_; void GenerateMessageSerializationMethods(io::Printer* printer); void GenerateMergingMethods(io::Printer* printer); diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.cc index ab76552d..034fbd92 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.cc @@ -53,25 +53,10 @@ MessageFieldGenerator::MessageFieldGenerator(const FieldDescriptor* descriptor, int presenceIndex, const Options *options) : FieldGeneratorBase(descriptor, presenceIndex, options) { - if (!IsProto2(descriptor_->file())) { + if (!SupportsPresenceApi(descriptor_)) { variables_["has_property_check"] = name() + "_ != null"; variables_["has_not_property_check"] = name() + "_ == null"; } - - if (descriptor_->type() == FieldDescriptor::Type::TYPE_GROUP) { - int tag_size = internal::WireFormat::TagSize(descriptor_->number(), descriptor_->type()) / 2; - uint tag = internal::WireFormatLite::MakeTag( - descriptor_->number(), - internal::WireFormatLite::WIRETYPE_END_GROUP); - uint8 tag_array[5]; - io::CodedOutputStream::WriteTagToArray(tag, tag_array); - string tag_bytes = SimpleItoa(tag_array[0]); - for (int i = 1; i < tag_size; i++) { - tag_bytes += ", " + SimpleItoa(tag_array[i]); - } - variables_["end_tag"] = SimpleItoa(tag); - variables_["end_tag_bytes"] = tag_bytes; - } } MessageFieldGenerator::~MessageFieldGenerator() { @@ -92,7 +77,7 @@ void MessageFieldGenerator::GenerateMembers(io::Printer* printer) { " $name$_ = value;\n" " }\n" "}\n"); - if (IsProto2(descriptor_->file())) { + if (SupportsPresenceApi(descriptor_)) { printer->Print( variables_, "/// Gets whether the $descriptor_name$ field is set\n"); @@ -168,7 +153,7 @@ void MessageFieldGenerator::GenerateSerializedSizeCode(io::Printer* printer) { printer->Print( variables_, "if ($has_property_check$) {\n" - " size += $tag_size$ + $tag_size$ + pb::CodedOutputStream.ComputeGroupSize($property_name$);\n" + " size += $tag_size$ + pb::CodedOutputStream.ComputeGroupSize($property_name$);\n" "}\n"); } } @@ -189,6 +174,16 @@ void MessageFieldGenerator::WriteToString(io::Printer* printer) { variables_, "PrintField(\"$field_name$\", has$property_name$, $name$_, writer);\n"); } +void MessageFieldGenerator::GenerateExtensionCode(io::Printer* printer) { + WritePropertyDocComment(printer, descriptor_); + AddDeprecatedFlag(printer); + printer->Print( + variables_, + "$access_level$ static readonly pb::Extension<$extended_type$, $type_name$> $property_name$ =\n" + " new pb::Extension<$extended_type$, $type_name$>($number$, "); + GenerateCodecCode(printer); + printer->Print(");\n"); +} void MessageFieldGenerator::GenerateCloningCode(io::Printer* printer) { printer->Print(variables_, "$name$_ = other.$has_property_check$ ? other.$name$_.Clone() : null;\n"); @@ -233,7 +228,7 @@ void MessageOneofFieldGenerator::GenerateMembers(io::Printer* printer) { " $oneof_name$Case_ = value == null ? $oneof_property_name$OneofCase.None : $oneof_property_name$OneofCase.$property_name$;\n" " }\n" "}\n"); - if (IsProto2(descriptor_->file())) { + if (SupportsPresenceApi(descriptor_)) { printer->Print( variables_, "/// Gets whether the \"$descriptor_name$\" field is set\n"); diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.h b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.h index 224bc28e..2463d912 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.h @@ -59,6 +59,7 @@ class MessageFieldGenerator : public FieldGeneratorBase { virtual void GenerateParsingCode(io::Printer* printer); virtual void GenerateSerializationCode(io::Printer* printer); virtual void GenerateSerializedSizeCode(io::Printer* printer); + virtual void GenerateExtensionCode(io::Printer* printer); virtual void WriteHash(io::Printer* printer); virtual void WriteEquals(io::Printer* printer); diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_names.h b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_names.h index 0c5ade91..44852721 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_names.h +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_names.h @@ -39,7 +39,8 @@ #define GOOGLE_PROTOBUF_COMPILER_CSHARP_NAMES_H__ #include -#include +#include +#include #include diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc index 0bf10f2e..9df1dd6a 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc @@ -53,7 +53,7 @@ PrimitiveFieldGenerator::PrimitiveFieldGenerator( // TODO(jonskeet): Make this cleaner... is_value_type = descriptor->type() != FieldDescriptor::TYPE_STRING && descriptor->type() != FieldDescriptor::TYPE_BYTES; - if (!is_value_type && !IsProto2(descriptor_->file())) { + if (!is_value_type && !SupportsPresenceApi(descriptor_)) { variables_["has_property_check"] = variables_["property_name"] + ".Length != 0"; variables_["other_has_property_check"] = "other." + variables_["property_name"] + ".Length != 0"; } @@ -63,42 +63,65 @@ PrimitiveFieldGenerator::~PrimitiveFieldGenerator() { } void PrimitiveFieldGenerator::GenerateMembers(io::Printer* printer) { - // TODO(jonskeet): Work out whether we want to prevent the fields from ever being - // null, or whether we just handle it, in the cases of bytes and string. - // (Basically, should null-handling code be in the getter or the setter?) + + // Note: in multiple places, this code assumes that all fields + // that support presence are either nullable, or use a presence field bit. + // Fields which are oneof members are not generated here; they're generated in PrimitiveOneofFieldGenerator below. + // Extensions are not generated here either. + + + // Proto2 allows different default values to be specified. These are retained + // via static fields. They don't particularly need to be, but we don't need + // to change that. In Proto3 the default value we don't generate these + // fields, just using the literal instead. if (IsProto2(descriptor_->file())) { + // Note: "private readonly static" isn't as idiomatic as + // "private static readonly", but changing this now would create a lot of + // churn in generated code with near-to-zero benefit. printer->Print( variables_, "private readonly static $type_name$ $property_name$DefaultValue = $default_value$;\n\n"); + variables_["default_value_access"] = + variables_["property_name"] + "DefaultValue"; + } else { + variables_["default_value_access"] = variables_["default_value"]; } + // Declare the field itself. printer->Print( variables_, "private $type_name$ $name_def_message$;\n"); WritePropertyDocComment(printer, descriptor_); AddPublicMemberAttributes(printer); - if (IsProto2(descriptor_->file())) { - if (presenceIndex_ == -1) { + + // Most of the work is done in the property: + // Declare the property itself (the same for all options) + printer->Print(variables_, "$access_level$ $type_name$ $property_name$ {\n"); + + // Specify the "getter", which may need to check for a presence field. + if (SupportsPresenceApi(descriptor_)) { + if (IsNullable(descriptor_)) { printer->Print( variables_, - "$access_level$ $type_name$ $property_name$ {\n" - " get { return $name$_ ?? $property_name$DefaultValue; }\n" - " set {\n"); + " get { return $name$_ ?? $default_value_access$; }\n"); } else { printer->Print( variables_, - "$access_level$ $type_name$ $property_name$ {\n" - " get { if ($has_field_check$) { return $name$_; } else { return $property_name$DefaultValue; } }\n" - " set {\n"); + // Note: it's possible that this could be rewritten as a + // conditional ?: expression, but there's no significant benefit + // to changing it. + " get { if ($has_field_check$) { return $name$_; } else { return $default_value_access$; } }\n"); } } else { printer->Print( variables_, - "$access_level$ $type_name$ $property_name$ {\n" - " get { return $name$_; }\n" - " set {\n"); + " get { return $name$_; }\n"); } + + // Specify the "setter", which may need to set a field bit as well as the + // value. + printer->Print(" set {\n"); if (presenceIndex_ != -1) { printer->Print( variables_, @@ -116,8 +139,11 @@ void PrimitiveFieldGenerator::GenerateMembers(io::Printer* printer) { printer->Print( " }\n" "}\n"); - if (IsProto2(descriptor_->file())) { - printer->Print(variables_, "/// Gets whether the \"$descriptor_name$\" field is set\n"); + + // The "HasFoo" property, where required. + if (SupportsPresenceApi(descriptor_)) { + printer->Print(variables_, + "/// Gets whether the \"$descriptor_name$\" field is set\n"); AddPublicMemberAttributes(printer); printer->Print( variables_, @@ -133,8 +159,11 @@ void PrimitiveFieldGenerator::GenerateMembers(io::Printer* printer) { "$has_field_check$; }\n}\n"); } } - if (IsProto2(descriptor_->file())) { - printer->Print(variables_, "/// Clears the value of the \"$descriptor_name$\" field\n"); + + // The "ClearFoo" method, where required. + if (SupportsPresenceApi(descriptor_)) { + printer->Print(variables_, + "/// Clears the value of the \"$descriptor_name$\" field\n"); AddPublicMemberAttributes(printer); printer->Print( variables_, @@ -186,7 +215,7 @@ void PrimitiveFieldGenerator::GenerateSerializedSizeCode(io::Printer* printer) { } else { printer->Print( "size += $tag_size$ + $fixed_size$;\n", - "fixed_size", SimpleItoa(fixedSize), + "fixed_size", StrCat(fixedSize), "tag_size", variables_["tag_size"]); } printer->Outdent(); @@ -225,7 +254,18 @@ void PrimitiveFieldGenerator::GenerateCloningCode(io::Printer* printer) { void PrimitiveFieldGenerator::GenerateCodecCode(io::Printer* printer) { printer->Print( variables_, - "pb::FieldCodec.For$capitalized_type_name$($tag$)"); + "pb::FieldCodec.For$capitalized_type_name$($tag$, $default_value$)"); +} + +void PrimitiveFieldGenerator::GenerateExtensionCode(io::Printer* printer) { + WritePropertyDocComment(printer, descriptor_); + AddDeprecatedFlag(printer); + printer->Print( + variables_, + "$access_level$ static readonly pb::Extension<$extended_type$, $type_name$> $property_name$ =\n" + " new pb::Extension<$extended_type$, $type_name$>($number$, "); + GenerateCodecCode(printer); + printer->Print(");\n"); } PrimitiveOneofFieldGenerator::PrimitiveOneofFieldGenerator( @@ -259,7 +299,7 @@ void PrimitiveOneofFieldGenerator::GenerateMembers(io::Printer* printer) { " $oneof_name$Case_ = $oneof_property_name$OneofCase.$property_name$;\n" " }\n" "}\n"); - if (IsProto2(descriptor_->file())) { + if (SupportsPresenceApi(descriptor_)) { printer->Print( variables_, "/// Gets whether the \"$descriptor_name$\" field is set\n"); diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.h b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.h index 54782e15..5edcc42b 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.h @@ -60,6 +60,7 @@ class PrimitiveFieldGenerator : public FieldGeneratorBase { virtual void GenerateParsingCode(io::Printer* printer); virtual void GenerateSerializationCode(io::Printer* printer); virtual void GenerateSerializedSizeCode(io::Printer* printer); + virtual void GenerateExtensionCode(io::Printer* printer); virtual void WriteHash(io::Printer* printer); virtual void WriteEquals(io::Printer* printer); diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc index 4ed2ef36..37154e3c 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -56,6 +57,7 @@ ReflectionClassGenerator::ReflectionClassGenerator(const FileDescriptor* file, file_(file) { namespace_ = GetFileNamespace(file); reflectionClassname_ = GetReflectionClassUnqualifiedName(file); + extensionClassname_ = GetExtensionClassUnqualifiedName(file); } ReflectionClassGenerator::~ReflectionClassGenerator() { @@ -69,6 +71,25 @@ void ReflectionClassGenerator::Generate(io::Printer* printer) { printer->Outdent(); printer->Print("}\n"); + if (file_->extension_count() > 0) { + printer->Print( + "/// Holder for extension identifiers generated from the top " + "level of $file_name$\n" + "$access_level$ static partial class $class_name$ {\n", + "access_level", class_access_level(), "class_name", extensionClassname_, + "file_name", file_->name()); + printer->Indent(); + for (int i = 0; i < file_->extension_count(); i++) { + std::unique_ptr generator( + CreateFieldGenerator(file_->extension(i), -1, this->options())); + generator->GenerateExtensionCode(printer); + } + printer->Outdent(); + printer->Print( + "}\n" + "\n"); + } + // write children: Enums if (file_->enum_type_count() > 0) { printer->Print("#region Enums\n"); @@ -169,17 +190,10 @@ void ReflectionClassGenerator::WriteDescriptor(io::Printer* printer) { "descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,\n"); printer->Print(" new pbr::FileDescriptor[] { "); for (int i = 0; i < file_->dependency_count(); i++) { - // descriptor.proto is special: we don't allow access to the generated code, but there's - // a separately-exposed property to get at the file descriptor, specifically to allow this - // kind of dependency. - if (IsDescriptorProto(file_->dependency(i))) { - printer->Print("pbr::FileDescriptor.DescriptorProtoFileDescriptor, "); - } else { printer->Print( "$full_reflection_class_name$.Descriptor, ", "full_reflection_class_name", GetReflectionClassName(file_->dependency(i))); - } } printer->Print("},\n" " new pbr::GeneratedClrTypeInfo("); @@ -193,6 +207,16 @@ void ReflectionClassGenerator::WriteDescriptor(io::Printer* printer) { } else { printer->Print("null, "); + } + if (file_->extension_count() > 0) { + std::vector extensions; + for (int i = 0; i < file_->extension_count(); i++) { + extensions.push_back(GetFullExtensionName(file_->extension(i))); + } + printer->Print("new pb::Extension[] { $extensions$ }, ", "extensions", Join(extensions, ", ")); + } + else { + printer->Print("null, "); } if (file_->message_type_count() > 0) { printer->Print("new pbr::GeneratedClrTypeInfo[] {\n"); @@ -237,10 +261,11 @@ void ReflectionClassGenerator::WriteGeneratedCodeInfo(const Descriptor* descript // Fields if (descriptor->field_count() > 0) { std::vector fields; + fields.reserve(descriptor->field_count()); for (int i = 0; i < descriptor->field_count(); i++) { fields.push_back(GetPropertyName(descriptor->field(i))); } - printer->Print("new[]{ \"$fields$\" }, ", "fields", JoinStrings(fields, "\", \"")); + printer->Print("new[]{ \"$fields$\" }, ", "fields", Join(fields, "\", \"")); } else { printer->Print("null, "); @@ -249,10 +274,11 @@ void ReflectionClassGenerator::WriteGeneratedCodeInfo(const Descriptor* descript // Oneofs if (descriptor->oneof_decl_count() > 0) { std::vector oneofs; + oneofs.reserve(descriptor->oneof_decl_count()); for (int i = 0; i < descriptor->oneof_decl_count(); i++) { oneofs.push_back(UnderscoresToCamelCase(descriptor->oneof_decl(i)->name(), true)); } - printer->Print("new[]{ \"$oneofs$\" }, ", "oneofs", JoinStrings(oneofs, "\", \"")); + printer->Print("new[]{ \"$oneofs$\" }, ", "oneofs", Join(oneofs, "\", \"")); } else { printer->Print("null, "); @@ -261,15 +287,28 @@ void ReflectionClassGenerator::WriteGeneratedCodeInfo(const Descriptor* descript // Nested enums if (descriptor->enum_type_count() > 0) { std::vector enums; + enums.reserve(descriptor->enum_type_count()); for (int i = 0; i < descriptor->enum_type_count(); i++) { enums.push_back(GetClassName(descriptor->enum_type(i))); } - printer->Print("new[]{ typeof($enums$) }, ", "enums", JoinStrings(enums, "), typeof(")); + printer->Print("new[]{ typeof($enums$) }, ", "enums", Join(enums, "), typeof(")); } else { printer->Print("null, "); } + // Extensions + if (descriptor->extension_count() > 0) { + std::vector extensions; + for (int i = 0; i < descriptor->extension_count(); i++) { + extensions.push_back(GetFullExtensionName(descriptor->extension(i))); + } + printer->Print("new pb::Extension[] { $extensions$ }, ", "extensions", Join(extensions, ", ")); + } + else { + printer->Print("null, "); + } + // Nested types if (descriptor->nested_type_count() > 0) { // Need to specify array type explicitly here, as all elements may be null. diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.h b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.h index 1a4a2f4a..95547277 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.h +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.h @@ -58,6 +58,7 @@ class ReflectionClassGenerator : public SourceGeneratorBase { std::string namespace_; std::string reflectionClassname_; + std::string extensionClassname_; void WriteIntroduction(io::Printer* printer); void WriteDescriptor(io::Printer* printer); diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc index b8e66abb..73309a7e 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc @@ -117,6 +117,16 @@ void RepeatedEnumFieldGenerator::GenerateCloningCode(io::Printer* printer) { "$name$_ = other.$name$_.Clone();\n"); } +void RepeatedEnumFieldGenerator::GenerateExtensionCode(io::Printer* printer) { + WritePropertyDocComment(printer, descriptor_); + AddDeprecatedFlag(printer); + printer->Print( + variables_, + "$access_level$ static readonly pb::RepeatedExtension<$extended_type$, $type_name$> $property_name$ =\n" + " new pb::RepeatedExtension<$extended_type$, $type_name$>($number$, " + "pb::FieldCodec.ForEnum($tag$, x => (int) x, x => ($type_name$) x));\n"); +} + void RepeatedEnumFieldGenerator::GenerateFreezingCode(io::Printer* printer) { } diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h index 75de1ada..c7a632a1 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h @@ -61,6 +61,7 @@ class RepeatedEnumFieldGenerator : public FieldGeneratorBase { virtual void GenerateParsingCode(io::Printer* printer); virtual void GenerateSerializationCode(io::Printer* printer); virtual void GenerateSerializedSizeCode(io::Printer* printer); + virtual void GenerateExtensionCode(io::Printer* printer); virtual void WriteHash(io::Printer* printer); virtual void WriteEquals(io::Printer* printer); diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc index bf76c0d3..4b4b37de 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc @@ -137,6 +137,25 @@ void RepeatedMessageFieldGenerator::GenerateCloningCode(io::Printer* printer) { void RepeatedMessageFieldGenerator::GenerateFreezingCode(io::Printer* printer) { } +void RepeatedMessageFieldGenerator::GenerateExtensionCode(io::Printer* printer) { + WritePropertyDocComment(printer, descriptor_); + AddDeprecatedFlag(printer); + printer->Print( + variables_, + "$access_level$ static readonly pb::RepeatedExtension<$extended_type$, $type_name$> $property_name$ =\n" + " new pb::RepeatedExtension<$extended_type$, $type_name$>($number$, "); + if (IsWrapperType(descriptor_)) { + std::unique_ptr single_generator( + new WrapperFieldGenerator(descriptor_, -1, this->options())); + single_generator->GenerateCodecCode(printer); + } else { + std::unique_ptr single_generator( + new MessageFieldGenerator(descriptor_, -1, this->options())); + single_generator->GenerateCodecCode(printer); + } + printer->Print(");\n"); +} + } // namespace csharp } // namespace compiler } // namespace protobuf diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h index e1b5f27c..74f6874d 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h @@ -61,6 +61,7 @@ class RepeatedMessageFieldGenerator : public FieldGeneratorBase { virtual void GenerateParsingCode(io::Printer* printer); virtual void GenerateSerializationCode(io::Printer* printer); virtual void GenerateSerializedSizeCode(io::Printer* printer); + virtual void GenerateExtensionCode(io::Printer* printer); virtual void WriteHash(io::Printer* printer); virtual void WriteEquals(io::Printer* printer); diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc index 78fcdc67..c1444ea1 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc @@ -118,6 +118,15 @@ void RepeatedPrimitiveFieldGenerator::GenerateCloningCode(io::Printer* printer) void RepeatedPrimitiveFieldGenerator::GenerateFreezingCode(io::Printer* printer) { } +void RepeatedPrimitiveFieldGenerator::GenerateExtensionCode(io::Printer* printer) { + WritePropertyDocComment(printer, descriptor_); + AddDeprecatedFlag(printer); + printer->Print( + variables_, + "$access_level$ static readonly pb::RepeatedExtension<$extended_type$, $type_name$> $property_name$ =\n" + " new pb::RepeatedExtension<$extended_type$, $type_name$>($number$, pb::FieldCodec.For$capitalized_type_name$($tag$));\n"); +} + } // namespace csharp } // namespace compiler } // namespace protobuf diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h index 7d9826fc..2a3be481 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h @@ -57,6 +57,7 @@ class RepeatedPrimitiveFieldGenerator : public FieldGeneratorBase { virtual void GenerateParsingCode(io::Printer* printer); virtual void GenerateSerializationCode(io::Printer* printer); virtual void GenerateSerializedSizeCode(io::Printer* printer); + virtual void GenerateExtensionCode(io::Printer* printer); virtual void WriteHash(io::Printer* printer); virtual void WriteEquals(io::Printer* printer); diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc index 68209cc8..ee7502fb 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc @@ -59,7 +59,7 @@ void SourceGeneratorBase::WriteGeneratedCodeAttributes(io::Printer* printer) { } std::string SourceGeneratorBase::class_access_level() { - return (IsDescriptorProto(descriptor_) || this->options()->internal_access) ? "internal" : "public"; + return this->options()->internal_access ? "internal" : "public"; } const Options* SourceGeneratorBase::options() { diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc index f284763d..2183d752 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc @@ -81,7 +81,7 @@ void WrapperFieldGenerator::GenerateMembers(io::Printer* printer) { " $name$_ = value;\n" " }\n" "}\n\n"); - if (IsProto2(descriptor_->file())) { + if (SupportsPresenceApi(descriptor_)) { printer->Print( variables_, "/// Gets whether the $descriptor_name$ field is set\n"); @@ -181,6 +181,17 @@ void WrapperFieldGenerator::GenerateCodecCode(io::Printer* printer) { } } +void WrapperFieldGenerator::GenerateExtensionCode(io::Printer* printer) { + WritePropertyDocComment(printer, descriptor_); + AddDeprecatedFlag(printer); + printer->Print( + variables_, + "$access_level$ static readonly pb::Extension<$extended_type$, $type_name$> $property_name$ =\n" + " new pb::Extension<$extended_type$, $type_name$>($number$, "); + GenerateCodecCode(printer); + printer->Print(");\n"); +} + WrapperOneofFieldGenerator::WrapperOneofFieldGenerator( const FieldDescriptor* descriptor, int presenceIndex, const Options *options) : WrapperFieldGenerator(descriptor, presenceIndex, options) { @@ -208,7 +219,7 @@ void WrapperOneofFieldGenerator::GenerateMembers(io::Printer* printer) { " $oneof_name$Case_ = value == null ? $oneof_property_name$OneofCase.None : $oneof_property_name$OneofCase.$property_name$;\n" " }\n" "}\n"); - if (IsProto2(descriptor_->file())) { + if (SupportsPresenceApi(descriptor_)) { printer->Print( variables_, "/// Gets whether the \"$descriptor_name$\" field is set\n"); diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.h b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.h index ee684dda..394e27de 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.h @@ -60,6 +60,7 @@ class WrapperFieldGenerator : public FieldGeneratorBase { virtual void GenerateParsingCode(io::Printer* printer); virtual void GenerateSerializationCode(io::Printer* printer); virtual void GenerateSerializedSizeCode(io::Printer* printer); + virtual void GenerateExtensionCode(io::Printer* printer); virtual void WriteHash(io::Printer* printer); virtual void WriteEquals(io::Printer* printer); diff --git a/third_party/protobuf/src/google/protobuf/compiler/importer.cc b/third_party/protobuf/src/google/protobuf/compiler/importer.cc index 715d999e..3b42d95e 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/importer.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/importer.cc @@ -46,14 +46,11 @@ #include #include - #include -#include #include #include #include - - +#include #ifdef _WIN32 #include @@ -234,8 +231,9 @@ const FileDescriptor* Importer::Import(const std::string& filename) { return pool_.FindFileByName(filename); } -void Importer::AddUnusedImportTrackFile(const std::string& file_name) { - pool_.AddUnusedImportTrackFile(file_name); +void Importer::AddUnusedImportTrackFile(const std::string& file_name, + bool is_error) { + pool_.AddUnusedImportTrackFile(file_name, is_error); } void Importer::ClearUnusedImportTrackFiles() { @@ -314,7 +312,7 @@ static std::string CanonicalizePath(std::string path) { static inline bool ContainsParentReference(const std::string& path) { return path == ".." || HasPrefixString(path, "../") || - HasSuffixString(path, "/..") || path.find("/../") != string::npos; + HasSuffixString(path, "/..") || path.find("/../") != std::string::npos; } // Maps a file from an old location to a new one. Typically, old_prefix is diff --git a/third_party/protobuf/src/google/protobuf/compiler/importer.h b/third_party/protobuf/src/google/protobuf/compiler/importer.h index 1a0b47ae..db4a876c 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/importer.h +++ b/third_party/protobuf/src/google/protobuf/compiler/importer.h @@ -178,7 +178,8 @@ class PROTOBUF_EXPORT Importer { // contents are stored. inline const DescriptorPool* pool() const { return &pool_; } - void AddUnusedImportTrackFile(const std::string& file_name); + void AddUnusedImportTrackFile(const std::string& file_name, + bool is_error = false); void ClearUnusedImportTrackFiles(); @@ -254,7 +255,7 @@ class PROTOBUF_EXPORT DiskSourceTree : public SourceTree { // and then you do: // Open("bar/qux"); // the DiskSourceTree will first try to open foo/bar/qux, then baz/bar/qux, - // returning the first one that opens successfuly. + // returning the first one that opens successfully. // // disk_path may be an absolute path or relative to the current directory, // just like a path you'd pass to open(). diff --git a/third_party/protobuf/src/google/protobuf/compiler/importer_unittest.cc b/third_party/protobuf/src/google/protobuf/compiler/importer_unittest.cc index 82ffc0fc..dc5c6929 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/importer_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/importer_unittest.cc @@ -44,9 +44,9 @@ #include #include #include -#include #include #include +#include #include #include @@ -74,14 +74,14 @@ class MockErrorCollector : public MultiFileErrorCollector { // implements ErrorCollector --------------------------------------- void AddError(const std::string& filename, int line, int column, const std::string& message) { - strings::SubstituteAndAppend(&text_, "$0:$1:$2: $3\n", filename, line, - column, message); + strings::SubstituteAndAppend(&text_, "$0:$1:$2: $3\n", filename, line, column, + message); } void AddWarning(const std::string& filename, int line, int column, const std::string& message) { - strings::SubstituteAndAppend(&warning_text_, "$0:$1:$2: $3\n", filename, - line, column, message); + strings::SubstituteAndAppend(&warning_text_, "$0:$1:$2: $3\n", filename, line, + column, message); } }; diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc index 778d3ba1..d74a7ed6 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc @@ -35,7 +35,6 @@ #include #include #include - #include namespace google { diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc index 29447ac0..2376488f 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc @@ -173,13 +173,11 @@ void WriteMessageDocComment(io::Printer* printer, const Descriptor* message) { } void WriteFieldDocComment(io::Printer* printer, const FieldDescriptor* field) { - // In theory we should have slightly different comments for setters, getters, - // etc., but in practice everyone already knows the difference between these - // so it's redundant information. - // We start the comment with the main body based on the comments from the - // .proto file (if present). We then end with the field declaration, e.g.: + // .proto file (if present). We then continue with the field declaration, + // e.g.: // optional string foo = 5; + // And then we end with the javadoc tags if applicable. // If the field is a group, the debug string might end with {. printer->Print("/**\n"); WriteDocCommentBody(printer, field); @@ -188,6 +186,191 @@ void WriteFieldDocComment(io::Printer* printer, const FieldDescriptor* field) { printer->Print(" */\n"); } +void WriteFieldAccessorDocComment(io::Printer* printer, + const FieldDescriptor* field, + const FieldAccessorType type, + const bool builder) { + printer->Print("/**\n"); + WriteDocCommentBody(printer, field); + printer->Print(" * $def$\n", "def", + EscapeJavadoc(FirstLineOf(field->DebugString()))); + switch (type) { + case HAZZER: + printer->Print(" * @return Whether the $name$ field is set.\n", "name", + field->camelcase_name()); + break; + case GETTER: + printer->Print(" * @return The $name$.\n", "name", + field->camelcase_name()); + break; + case SETTER: + printer->Print(" * @param value The $name$ to set.\n", "name", + field->camelcase_name()); + break; + case CLEARER: + // Print nothing + break; + // Repeated + case LIST_COUNT: + printer->Print(" * @return The count of $name$.\n", "name", + field->camelcase_name()); + break; + case LIST_GETTER: + printer->Print(" * @return A list containing the $name$.\n", "name", + field->camelcase_name()); + break; + case LIST_INDEXED_GETTER: + printer->Print(" * @param index The index of the element to return.\n"); + printer->Print(" * @return The $name$ at the given index.\n", "name", + field->camelcase_name()); + break; + case LIST_INDEXED_SETTER: + printer->Print(" * @param index The index to set the value at.\n"); + printer->Print(" * @param value The $name$ to set.\n", "name", + field->camelcase_name()); + break; + case LIST_ADDER: + printer->Print(" * @param value The $name$ to add.\n", "name", + field->camelcase_name()); + break; + case LIST_MULTI_ADDER: + printer->Print(" * @param values The $name$ to add.\n", "name", + field->camelcase_name()); + break; + } + if (builder) { + printer->Print(" * @return This builder for chaining.\n"); + } + printer->Print(" */\n"); +} + +void WriteFieldEnumValueAccessorDocComment(io::Printer* printer, + const FieldDescriptor* field, + const FieldAccessorType type, + const bool builder) { + printer->Print("/**\n"); + WriteDocCommentBody(printer, field); + printer->Print(" * $def$\n", "def", + EscapeJavadoc(FirstLineOf(field->DebugString()))); + switch (type) { + case HAZZER: + // Should never happen + break; + case GETTER: + printer->Print( + " * @return The enum numeric value on the wire for $name$.\n", "name", + field->camelcase_name()); + break; + case SETTER: + printer->Print( + " * @param value The enum numeric value on the wire for $name$ to " + "set.\n", + "name", field->camelcase_name()); + break; + case CLEARER: + // Print nothing + break; + // Repeated + case LIST_COUNT: + // Should never happen + break; + case LIST_GETTER: + printer->Print( + " * @return A list containing the enum numeric values on the wire " + "for $name$.\n", + "name", field->camelcase_name()); + break; + case LIST_INDEXED_GETTER: + printer->Print(" * @param index The index of the value to return.\n"); + printer->Print( + " * @return The enum numeric value on the wire of $name$ at the " + "given index.\n", + "name", field->camelcase_name()); + break; + case LIST_INDEXED_SETTER: + printer->Print(" * @param index The index to set the value at.\n"); + printer->Print( + " * @param value The enum numeric value on the wire for $name$ to " + "set.\n", + "name", field->camelcase_name()); + break; + case LIST_ADDER: + printer->Print( + " * @param value The enum numeric value on the wire for $name$ to " + "add.\n", + "name", field->camelcase_name()); + break; + case LIST_MULTI_ADDER: + printer->Print( + " * @param values The enum numeric values on the wire for $name$ to " + "add.\n", + "name", field->camelcase_name()); + break; + } + if (builder) { + printer->Print(" * @return This builder for chaining.\n"); + } + printer->Print(" */\n"); +} + +void WriteFieldStringBytesAccessorDocComment(io::Printer* printer, + const FieldDescriptor* field, + const FieldAccessorType type, + const bool builder) { + printer->Print("/**\n"); + WriteDocCommentBody(printer, field); + printer->Print(" * $def$\n", "def", + EscapeJavadoc(FirstLineOf(field->DebugString()))); + switch (type) { + case HAZZER: + // Should never happen + break; + case GETTER: + printer->Print(" * @return The bytes for $name$.\n", "name", + field->camelcase_name()); + break; + case SETTER: + printer->Print(" * @param value The bytes for $name$ to set.\n", "name", + field->camelcase_name()); + break; + case CLEARER: + // Print nothing + break; + // Repeated + case LIST_COUNT: + // Should never happen + break; + case LIST_GETTER: + printer->Print(" * @return A list containing the bytes for $name$.\n", + "name", field->camelcase_name()); + break; + case LIST_INDEXED_GETTER: + printer->Print(" * @param index The index of the value to return.\n"); + printer->Print(" * @return The bytes of the $name$ at the given index.\n", + "name", field->camelcase_name()); + break; + case LIST_INDEXED_SETTER: + printer->Print(" * @param index The index to set the value at.\n"); + printer->Print(" * @param value The bytes of the $name$ to set.\n", + "name", field->camelcase_name()); + break; + case LIST_ADDER: + printer->Print(" * @param value The bytes of the $name$ to add.\n", + "name", field->camelcase_name()); + break; + case LIST_MULTI_ADDER: + printer->Print(" * @param values The bytes of the $name$ to add.\n", + "name", field->camelcase_name()); + break; + } + if (builder) { + printer->Print(" * @return This builder for chaining.\n"); + } + printer->Print(" */\n"); +} + +// Enum + void WriteEnumDocComment(io::Printer* printer, const EnumDescriptor* enum_) { printer->Print("/**\n"); WriteDocCommentBody(printer, enum_); diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment.h b/third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment.h index ef9b3a90..b7de8776 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment.h +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment.h @@ -52,8 +52,34 @@ namespace protobuf { namespace compiler { namespace java { +enum FieldAccessorType { + HAZZER, + GETTER, + SETTER, + CLEARER, + // Repeated + LIST_COUNT, + LIST_GETTER, + LIST_INDEXED_GETTER, + LIST_INDEXED_SETTER, + LIST_ADDER, + LIST_MULTI_ADDER +}; + void WriteMessageDocComment(io::Printer* printer, const Descriptor* message); void WriteFieldDocComment(io::Printer* printer, const FieldDescriptor* field); +void WriteFieldAccessorDocComment(io::Printer* printer, + const FieldDescriptor* field, + const FieldAccessorType type, + const bool builder = false); +void WriteFieldEnumValueAccessorDocComment(io::Printer* printer, + const FieldDescriptor* field, + const FieldAccessorType type, + const bool builder = false); +void WriteFieldStringBytesAccessorDocComment(io::Printer* printer, + const FieldDescriptor* field, + const FieldAccessorType type, + const bool builder = false); void WriteEnumDocComment(io::Printer* printer, const EnumDescriptor* enum_); void WriteEnumValueDocComment(io::Printer* printer, const EnumValueDescriptor* value); diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_enum.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_enum.cc index 0dade1c3..8622ff05 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_enum.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_enum.cc @@ -44,7 +44,6 @@ #include #include - namespace google { namespace protobuf { namespace compiler { @@ -143,9 +142,13 @@ void EnumGenerator::Generate(io::Printer* printer) { vars["number"] = StrCat(descriptor_->value(i)->number()); vars["{"] = ""; vars["}"] = ""; + vars["deprecation"] = descriptor_->value(i)->options().deprecated() + ? "@java.lang.Deprecated " + : ""; WriteEnumValueDocComment(printer, descriptor_->value(i)); printer->Print(vars, - "public static final int ${$$name$_VALUE$}$ = $number$;\n"); + "$deprecation$public static final int ${$$name$_VALUE$}$ = " + "$number$;\n"); printer->Annotate("{", "}", descriptor_->value(i)); } printer->Print("\n"); @@ -175,6 +178,9 @@ void EnumGenerator::Generate(io::Printer* printer) { "}\n" "\n" "/**\n" + " * @param value The numeric wire value of the corresponding enum " + "entry.\n" + " * @return The enum associated with the given numeric wire value.\n" " * @deprecated Use {@link #forNumber(int)} instead.\n" " */\n" "@java.lang.Deprecated\n" @@ -182,6 +188,11 @@ void EnumGenerator::Generate(io::Printer* printer) { " return forNumber(value);\n" "}\n" "\n" + "/**\n" + " * @param value The numeric wire value of the corresponding enum " + "entry.\n" + " * @return The enum associated with the given numeric wire value.\n" + " */\n" "public static $classname$ forNumber(int value) {\n" " switch (value) {\n", "classname", descriptor_->name()); @@ -221,7 +232,25 @@ void EnumGenerator::Generate(io::Printer* printer) { if (HasDescriptorMethods(descriptor_, context_->EnforceLite())) { printer->Print( "public final com.google.protobuf.Descriptors.EnumValueDescriptor\n" - " getValueDescriptor() {\n" + " getValueDescriptor() {\n"); + if (SupportUnknownEnumValue(descriptor_->file())) { + if (ordinal_is_index) { + printer->Print( + " if (this == UNRECOGNIZED) {\n" + " throw new java.lang.IllegalStateException(\n" + " \"Can't get the descriptor of an unrecognized enum " + "value.\");\n" + " }\n"); + } else { + printer->Print( + " if (index == -1) {\n" + " throw new java.lang.IllegalStateException(\n" + " \"Can't get the descriptor of an unrecognized enum " + "value.\");\n" + " }\n"); + } + } + printer->Print( " return getDescriptor().getValues().get($index_text$);\n" "}\n" "public final com.google.protobuf.Descriptors.EnumDescriptor\n" @@ -272,15 +301,22 @@ void EnumGenerator::Generate(io::Printer* printer) { // for every enum. printer->Print("values();\n"); } else { + printer->Print("getStaticValuesArray();\n"); + printer->Print("private static $classname$[] getStaticValuesArray() {\n", + "classname", descriptor_->name()); + printer->Indent(); printer->Print( - "{\n" - " "); + "return new $classname$[] {\n" + " ", + "classname", descriptor_->name()); for (int i = 0; i < descriptor_->value_count(); i++) { printer->Print("$name$, ", "name", descriptor_->value(i)->name()); } printer->Print( "\n" "};\n"); + printer->Outdent(); + printer->Print("}"); } printer->Print( diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc index 280efaf5..32cff15f 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc @@ -46,7 +46,6 @@ #include #include - namespace google { namespace protobuf { namespace compiler { @@ -82,7 +81,7 @@ void SetEnumVariables(const FieldDescriptor* descriptor, int messageBitIndex, // with v2.5.0/v2.6.1, and remove the @SuppressWarnings annotations. (*variables)["for_number"] = "valueOf"; - if (SupportFieldPresence(descriptor->file())) { + if (SupportFieldPresence(descriptor)) { // For singular messages and builders, one bit is used for the hasField bit. (*variables)["get_has_field_bit_message"] = GenerateGetBit(messageBitIndex); (*variables)["get_has_field_bit_builder"] = GenerateGetBit(builderBitIndex); @@ -106,7 +105,7 @@ void SetEnumVariables(const FieldDescriptor* descriptor, int messageBitIndex, ".getNumber()"; } - // For repated builders, one bit is used for whether the array is immutable. + // For repeated builders, one bit is used for whether the array is immutable. (*variables)["get_mutable_bit_builder"] = GenerateGetBit(builderBitIndex); (*variables)["set_mutable_bit_builder"] = GenerateSetBit(builderBitIndex); (*variables)["clear_mutable_bit_builder"] = GenerateClearBit(builderBitIndex); @@ -146,7 +145,7 @@ ImmutableEnumFieldGenerator::ImmutableEnumFieldGenerator( ImmutableEnumFieldGenerator::~ImmutableEnumFieldGenerator() {} int ImmutableEnumFieldGenerator::GetNumBitsForMessage() const { - return SupportFieldPresence(descriptor_->file()) ? 1 : 0; + return SupportFieldPresence(descriptor_) ? 1 : 0; } int ImmutableEnumFieldGenerator::GetNumBitsForBuilder() const { @@ -155,44 +154,45 @@ int ImmutableEnumFieldGenerator::GetNumBitsForBuilder() const { void ImmutableEnumFieldGenerator::GenerateInterfaceMembers( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print(variables_, "$deprecation$boolean has$capitalized_name$();\n"); } if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$int get$capitalized_name$Value();\n"); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$$type$ get$capitalized_name$();\n"); } void ImmutableEnumFieldGenerator::GenerateMembers(io::Printer* printer) const { printer->Print(variables_, "private int $name$_;\n"); PrintExtraFieldInfo(variables_, printer); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); - printer->Print( - variables_, - "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" - " return $get_has_field_bit_message$;\n" - "}\n"); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); + printer->Print(variables_, + "@java.lang.Override $deprecation$public boolean " + "${$has$capitalized_name$$}$() {\n" + " return $get_has_field_bit_message$;\n" + "}\n"); printer->Annotate("{", "}", descriptor_); } if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); - printer->Print( - variables_, - "$deprecation$public int ${$get$capitalized_name$Value$}$() {\n" - " return $name$_;\n" - "}\n"); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, GETTER); + printer->Print(variables_, + "@java.lang.Override $deprecation$public int " + "${$get$capitalized_name$Value$}$() {\n" + " return $name$_;\n" + "}\n"); printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, - "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" + "@java.lang.Override $deprecation$public $type$ " + "${$get$capitalized_name$$}$() {\n" " @SuppressWarnings(\"deprecation\")\n" " $type$ result = $type$.$for_number$($name$_);\n" " return result == null ? $unknown$ : result;\n" @@ -203,42 +203,46 @@ void ImmutableEnumFieldGenerator::GenerateMembers(io::Printer* printer) const { void ImmutableEnumFieldGenerator::GenerateBuilderMembers( io::Printer* printer) const { printer->Print(variables_, "private int $name$_ = $default_number$;\n"); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); - printer->Print( - variables_, - "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" - " return $get_has_field_bit_builder$;\n" - "}\n"); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); + printer->Print(variables_, + "@java.lang.Override $deprecation$public boolean " + "${$has$capitalized_name$$}$() {\n" + " return $get_has_field_bit_builder$;\n" + "}\n"); printer->Annotate("{", "}", descriptor_); } if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); - printer->Print( - variables_, - "$deprecation$public int ${$get$capitalized_name$Value$}$() {\n" - " return $name$_;\n" - "}\n"); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, GETTER); + printer->Print(variables_, + "@java.lang.Override $deprecation$public int " + "${$get$capitalized_name$Value$}$() {\n" + " return $name$_;\n" + "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$set$capitalized_name$Value$}$(int value) {\n" + " $set_has_field_bit_builder$\n" " $name$_ = value;\n" " $on_changed$\n" " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" " @SuppressWarnings(\"deprecation\")\n" " $type$ result = $type$.$for_number$($name$_);\n" " return result == null ? $unknown$ : result;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$set$capitalized_name$$}$($type$ value) {\n" @@ -251,7 +255,8 @@ void ImmutableEnumFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -282,7 +287,7 @@ void ImmutableEnumFieldGenerator::GenerateBuilderClearCode( void ImmutableEnumFieldGenerator::GenerateMergingCode( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { + if (SupportFieldPresence(descriptor_)) { printer->Print(variables_, "if (other.has$capitalized_name$()) {\n" " set$capitalized_name$(other.get$capitalized_name$());\n" @@ -300,7 +305,7 @@ void ImmutableEnumFieldGenerator::GenerateMergingCode( void ImmutableEnumFieldGenerator::GenerateBuildingCode( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { + if (SupportFieldPresence(descriptor_)) { printer->Print(variables_, "if ($get_has_field_bit_from_local$) {\n" " $set_has_field_bit_to_local$;\n" @@ -384,8 +389,8 @@ ImmutableEnumOneofFieldGenerator::~ImmutableEnumOneofFieldGenerator() {} void ImmutableEnumOneofFieldGenerator::GenerateMembers( io::Printer* printer) const { PrintExtraFieldInfo(variables_, printer); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" @@ -394,7 +399,7 @@ void ImmutableEnumOneofFieldGenerator::GenerateMembers( printer->Annotate("{", "}", descriptor_); } if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, "$deprecation$public int ${$get$capitalized_name$Value$}$() {\n" @@ -405,7 +410,7 @@ void ImmutableEnumOneofFieldGenerator::GenerateMembers( "}\n"); printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" " if ($has_oneof_case_message$) {\n" @@ -421,19 +426,21 @@ void ImmutableEnumOneofFieldGenerator::GenerateMembers( void ImmutableEnumOneofFieldGenerator::GenerateBuilderMembers( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" " return $has_oneof_case_message$;\n" "}\n"); printer->Annotate("{", "}", descriptor_); } if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public int ${$get$capitalized_name$Value$}$() {\n" " if ($has_oneof_case_message$) {\n" " return ((java.lang.Integer) $oneof_name$_).intValue();\n" @@ -441,7 +448,8 @@ void ImmutableEnumOneofFieldGenerator::GenerateBuilderMembers( " return $default_number$;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$set$capitalized_name$Value$}$(int value) {\n" @@ -452,8 +460,9 @@ void ImmutableEnumOneofFieldGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" " if ($has_oneof_case_message$) {\n" " @SuppressWarnings(\"deprecation\")\n" @@ -464,7 +473,8 @@ void ImmutableEnumOneofFieldGenerator::GenerateBuilderMembers( " return $default$;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$set$capitalized_name$$}$($type$ value) {\n" @@ -477,7 +487,8 @@ void ImmutableEnumOneofFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -603,22 +614,23 @@ int RepeatedImmutableEnumFieldGenerator::GetNumBitsForBuilder() const { void RepeatedImmutableEnumFieldGenerator::GenerateInterfaceMembers( io::Printer* printer) const { - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print( variables_, "$deprecation$java.util.List<$type$> get$capitalized_name$List();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print(variables_, "$deprecation$int get$capitalized_name$Count();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$$type$ get$capitalized_name$(int index);\n"); if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "$deprecation$java.util.List\n" "get$capitalized_name$ValueList();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, + LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$int get$capitalized_name$Value(int index);\n"); } @@ -641,39 +653,45 @@ void RepeatedImmutableEnumFieldGenerator::GenerateMembers( " }\n" " };\n"); PrintExtraFieldInfo(variables_, printer); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public java.util.List<$type$> " "${$get$capitalized_name$List$}$() {\n" " return new com.google.protobuf.Internal.ListAdapter<\n" " java.lang.Integer, $type$>($name$_, $name$_converter_);\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public int ${$get$capitalized_name$Count$}$() {\n" " return $name$_.size();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$(int index) {\n" " return $name$_converter_.convert($name$_.get(index));\n" "}\n"); printer->Annotate("{", "}", descriptor_); if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public java.util.List\n" "${$get$capitalized_name$ValueList$}$() {\n" " return $name$_;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, + LIST_INDEXED_GETTER); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public int " "${$get$capitalized_name$Value$}$(int index) {\n" " return $name$_.get(index);\n" @@ -709,7 +727,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers( " }\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print( variables_, // Note: We return an unmodifiable list because otherwise the caller @@ -722,21 +740,22 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers( " java.lang.Integer, $type$>($name$_, $name$_converter_);\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print( variables_, "$deprecation$public int ${$get$capitalized_name$Count$}$() {\n" " return $name$_.size();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print( variables_, "$deprecation$public $type$ ${$get$capitalized_name$$}$(int index) {\n" " return $name$_converter_.convert($name$_.get(index));\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$set$capitalized_name$$}$(\n" " int index, $type$ value) {\n" @@ -749,7 +768,8 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$add$capitalized_name$$}$($type$ value) {\n" @@ -762,7 +782,8 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$addAll$capitalized_name$$}$(\n" " java.lang.Iterable values) {\n" @@ -774,7 +795,8 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -786,21 +808,24 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers( printer->Annotate("{", "}", descriptor_); if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "$deprecation$public java.util.List\n" "${$get$capitalized_name$ValueList$}$() {\n" " return java.util.Collections.unmodifiableList($name$_);\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, + LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$public int " "${$get$capitalized_name$Value$}$(int index) {\n" " return $name$_.get(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, + LIST_INDEXED_GETTER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$set$capitalized_name$Value$}$(\n" @@ -811,7 +836,8 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, LIST_ADDER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$add$capitalized_name$Value$}$(int value) {\n" @@ -821,7 +847,8 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, + LIST_MULTI_ADDER, /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$addAll$capitalized_name$Value$}$(\n" diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.cc index 376aa861..23aea9b2 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.cc @@ -46,7 +46,6 @@ #include #include - namespace google { namespace protobuf { namespace compiler { @@ -84,7 +83,7 @@ void SetEnumVariables(const FieldDescriptor* descriptor, int messageBitIndex, descriptor->options().deprecated() ? "@java.lang.Deprecated " : ""; (*variables)["required"] = descriptor->is_required() ? "true" : "false"; - if (SupportFieldPresence(descriptor->file())) { + if (SupportFieldPresence(descriptor)) { // For singular messages and builders, one bit is used for the hasField bit. (*variables)["get_has_field_bit_message"] = GenerateGetBit(messageBitIndex); @@ -104,9 +103,6 @@ void SetEnumVariables(const FieldDescriptor* descriptor, int messageBitIndex, ".getNumber()"; } - // For repeated builders, the underlying list tracks mutability state. - (*variables)["is_mutable"] = (*variables)["name"] + "_.isModifiable()"; - (*variables)["get_has_field_bit_from_local"] = GenerateGetBitFromLocal(builderBitIndex); (*variables)["set_has_field_bit_to_local"] = @@ -117,6 +113,10 @@ void SetEnumVariables(const FieldDescriptor* descriptor, int messageBitIndex, } else { (*variables)["unknown"] = (*variables)["default"]; } + + // We use `x.getClass()` as a null check because it generates less bytecode + // than an `if (x == null) { throw ... }` statement. + (*variables)["null_check"] = "value.getClass();\n"; } } // namespace @@ -137,22 +137,22 @@ ImmutableEnumFieldLiteGenerator::ImmutableEnumFieldLiteGenerator( ImmutableEnumFieldLiteGenerator::~ImmutableEnumFieldLiteGenerator() {} int ImmutableEnumFieldLiteGenerator::GetNumBitsForMessage() const { - return SupportFieldPresence(descriptor_->file()) ? 1 : 0; + return SupportFieldPresence(descriptor_) ? 1 : 0; } void ImmutableEnumFieldLiteGenerator::GenerateInterfaceMembers( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print(variables_, "$deprecation$boolean has$capitalized_name$();\n"); } if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$int get$capitalized_name$Value();\n"); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$$type$ get$capitalized_name$();\n"); } @@ -160,8 +160,8 @@ void ImmutableEnumFieldLiteGenerator::GenerateMembers( io::Printer* printer) const { printer->Print(variables_, "private int $name$_;\n"); PrintExtraFieldInfo(variables_, printer); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "@java.lang.Override\n" @@ -171,7 +171,7 @@ void ImmutableEnumFieldLiteGenerator::GenerateMembers( printer->Annotate("{", "}", descriptor_); } if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, "@java.lang.Override\n" @@ -180,7 +180,7 @@ void ImmutableEnumFieldLiteGenerator::GenerateMembers( "}\n"); printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" @@ -191,23 +191,20 @@ void ImmutableEnumFieldLiteGenerator::GenerateMembers( // Generate private setters for the builder to proxy into. if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER); printer->Print(variables_, "private void set$capitalized_name$Value(int value) {\n" " $set_has_field_bit_message$" " $name$_ = value;\n" "}\n"); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER); printer->Print(variables_, "private void set$capitalized_name$($type$ value) {\n" - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n" - " $set_has_field_bit_message$\n" " $name$_ = value.getNumber();\n" + " $set_has_field_bit_message$\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER); printer->Print(variables_, "private void clear$capitalized_name$() {\n" " $clear_has_field_bit_message$\n" @@ -217,8 +214,8 @@ void ImmutableEnumFieldLiteGenerator::GenerateMembers( void ImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "@java.lang.Override\n" @@ -228,7 +225,7 @@ void ImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( printer->Annotate("{", "}", descriptor_); } if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, "@java.lang.Override\n" @@ -236,7 +233,8 @@ void ImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( " return instance.get$capitalized_name$Value();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$set$capitalized_name$Value$}$(int value) {\n" @@ -246,14 +244,15 @@ void ImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" " return instance.get$capitalized_name$();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$set$capitalized_name$$}$($type$ value) {\n" @@ -262,7 +261,8 @@ void ImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -285,11 +285,11 @@ void ImmutableEnumFieldLiteGenerator::GenerateFieldInfo( WriteIntToUtf16CharSequence(descriptor_->number(), output); WriteIntToUtf16CharSequence(GetExperimentalJavaFieldType(descriptor_), output); - if (SupportFieldPresence(descriptor_->file())) { + if (HasHasbit(descriptor_)) { WriteIntToUtf16CharSequence(messageBitIndex_, output); } printer->Print(variables_, "\"$name$_\",\n"); - if (SupportFieldPresence(descriptor_->file())) { + if (!SupportUnknownEnumValue((descriptor_))) { PrintEnumVerifierLogic(printer, descriptor_, variables_, /*var_name=*/"$type$", /*terminating_string=*/",\n", @@ -316,8 +316,8 @@ ImmutableEnumOneofFieldLiteGenerator::~ImmutableEnumOneofFieldLiteGenerator() {} void ImmutableEnumOneofFieldLiteGenerator::GenerateMembers( io::Printer* printer) const { PrintExtraFieldInfo(variables_, printer); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "@java.lang.Override\n" @@ -327,7 +327,7 @@ void ImmutableEnumOneofFieldLiteGenerator::GenerateMembers( printer->Annotate("{", "}", descriptor_); } if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, "@java.lang.Override\n" @@ -339,7 +339,7 @@ void ImmutableEnumOneofFieldLiteGenerator::GenerateMembers( "}\n"); printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" @@ -354,23 +354,20 @@ void ImmutableEnumOneofFieldLiteGenerator::GenerateMembers( // Generate private setters for the builder to proxy into. if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER); printer->Print(variables_, "private void set$capitalized_name$Value(int value) {\n" " $set_oneof_case_message$;\n" " $oneof_name$_ = value;\n" "}\n"); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER); printer->Print(variables_, "private void set$capitalized_name$($type$ value) {\n" - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n" - " $set_oneof_case_message$;\n" " $oneof_name$_ = value.getNumber();\n" + " $set_oneof_case_message$;\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER); printer->Print(variables_, "private void clear$capitalized_name$() {\n" " if ($has_oneof_case_message$) {\n" @@ -386,7 +383,7 @@ void ImmutableEnumOneofFieldLiteGenerator::GenerateFieldInfo( WriteIntToUtf16CharSequence(GetExperimentalJavaFieldType(descriptor_), output); WriteIntToUtf16CharSequence(descriptor_->containing_oneof()->index(), output); - if (SupportFieldPresence(descriptor_->file())) { + if (!SupportUnknownEnumValue(descriptor_)) { PrintEnumVerifierLogic(printer, descriptor_, variables_, /*var_name=*/"$type$", /*terminating_string=*/",\n", @@ -396,8 +393,8 @@ void ImmutableEnumOneofFieldLiteGenerator::GenerateFieldInfo( void ImmutableEnumOneofFieldLiteGenerator::GenerateBuilderMembers( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "@java.lang.Override\n" @@ -407,7 +404,7 @@ void ImmutableEnumOneofFieldLiteGenerator::GenerateBuilderMembers( printer->Annotate("{", "}", descriptor_); } if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, "@java.lang.Override\n" @@ -415,7 +412,8 @@ void ImmutableEnumOneofFieldLiteGenerator::GenerateBuilderMembers( " return instance.get$capitalized_name$Value();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$set$capitalized_name$Value$}$(int value) {\n" @@ -425,14 +423,15 @@ void ImmutableEnumOneofFieldLiteGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" " return instance.get$capitalized_name$();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$set$capitalized_name$$}$($type$ value) {\n" @@ -441,7 +440,8 @@ void ImmutableEnumOneofFieldLiteGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -475,22 +475,23 @@ int RepeatedImmutableEnumFieldLiteGenerator::GetNumBitsForMessage() const { void RepeatedImmutableEnumFieldLiteGenerator::GenerateInterfaceMembers( io::Printer* printer) const { - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print( variables_, "$deprecation$java.util.List<$type$> get$capitalized_name$List();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print(variables_, "$deprecation$int get$capitalized_name$Count();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$$type$ get$capitalized_name$(int index);\n"); if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "$deprecation$java.util.List\n" "get$capitalized_name$ValueList();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, + LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$int get$capitalized_name$Value(int index);\n"); } @@ -513,7 +514,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateMembers( " }\n" " };\n"); PrintExtraFieldInfo(variables_, printer); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print( variables_, "@java.lang.Override\n" @@ -523,7 +524,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateMembers( " java.lang.Integer, $type$>($name$_, $name$_converter_);\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print( variables_, "@java.lang.Override\n" @@ -531,7 +532,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateMembers( " return $name$_.size();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print( variables_, "@java.lang.Override\n" @@ -540,7 +541,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateMembers( "}\n"); printer->Annotate("{", "}", descriptor_); if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public java.util.List\n" @@ -548,7 +549,8 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateMembers( " return $name$_;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, + LIST_INDEXED_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public int " @@ -567,31 +569,29 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateMembers( printer->Print( variables_, "private void ensure$capitalized_name$IsMutable() {\n" - " if (!$is_mutable$) {\n" + // Use a temporary to avoid a redundant iget-object. + " com.google.protobuf.Internal.IntList tmp = $name$_;\n" + " if (!tmp.isModifiable()) {\n" " $name$_ =\n" - " com.google.protobuf.GeneratedMessageLite.mutableCopy($name$_);\n" + " com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);\n" " }\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER); printer->Print(variables_, "private void set$capitalized_name$(\n" " int index, $type$ value) {\n" - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n" + " $null_check$" " ensure$capitalized_name$IsMutable();\n" " $name$_.setInt(index, value.getNumber());\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER); printer->Print(variables_, "private void add$capitalized_name$($type$ value) {\n" - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n" + " $null_check$" " ensure$capitalized_name$IsMutable();\n" " $name$_.addInt(value.getNumber());\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER); printer->Print(variables_, "private void addAll$capitalized_name$(\n" " java.lang.Iterable values) {\n" @@ -600,27 +600,28 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateMembers( " $name$_.addInt(value.getNumber());\n" " }\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER); printer->Print(variables_, "private void clear$capitalized_name$() {\n" " $name$_ = emptyIntList();\n" "}\n"); if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER); printer->Print(variables_, "private void set$capitalized_name$Value(\n" " int index, int value) {\n" " ensure$capitalized_name$IsMutable();\n" " $name$_.setInt(index, value);\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, LIST_ADDER); printer->Print(variables_, "private void add$capitalized_name$Value(int value) {\n" " ensure$capitalized_name$IsMutable();\n" " $name$_.addInt(value);\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, + LIST_MULTI_ADDER); printer->Print(variables_, "private void addAll$capitalized_name$Value(\n" " java.lang.Iterable values) {\n" @@ -638,7 +639,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateFieldInfo( WriteIntToUtf16CharSequence(GetExperimentalJavaFieldType(descriptor_), output); printer->Print(variables_, "\"$name$_\",\n"); - if (SupportFieldPresence(descriptor_->file())) { + if (!SupportUnknownEnumValue(descriptor_->file())) { PrintEnumVerifierLogic(printer, descriptor_, variables_, /*var_name=*/"$type$", /*terminating_string=*/",\n", @@ -648,7 +649,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateFieldInfo( void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( io::Printer* printer) const { - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public java.util.List<$type$> " @@ -656,7 +657,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( " return instance.get$capitalized_name$List();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print( variables_, "@java.lang.Override\n" @@ -664,7 +665,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( " return instance.get$capitalized_name$Count();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print( variables_, "@java.lang.Override\n" @@ -672,7 +673,8 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( " return instance.get$capitalized_name$(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$set$capitalized_name$$}$(\n" " int index, $type$ value) {\n" @@ -681,7 +683,8 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$add$capitalized_name$$}$($type$ value) {\n" @@ -690,7 +693,8 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$addAll$capitalized_name$$}$(\n" " java.lang.Iterable values) {\n" @@ -699,7 +703,8 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -710,7 +715,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( printer->Annotate("{", "}", descriptor_); if (SupportUnknownEnumValue(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public java.util.List\n" @@ -719,7 +724,8 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( " instance.get$capitalized_name$ValueList());\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, + LIST_INDEXED_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public int " @@ -727,7 +733,9 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( " return instance.get$capitalized_name$Value(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, + LIST_INDEXED_SETTER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$set$capitalized_name$Value$}$(\n" @@ -737,7 +745,8 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, LIST_ADDER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$add$capitalized_name$Value$}$(int value) {\n" @@ -745,7 +754,9 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldEnumValueAccessorDocComment(printer, descriptor_, + LIST_MULTI_ADDER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$addAll$capitalized_name$Value$}$(\n" diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_lite.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_lite.cc index a00624b5..226fa4fb 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_lite.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_lite.cc @@ -43,7 +43,6 @@ #include #include #include - #include namespace google { @@ -125,9 +124,13 @@ void EnumLiteGenerator::Generate(io::Printer* printer) { vars["number"] = StrCat(descriptor_->value(i)->number()); vars["{"] = ""; vars["}"] = ""; + vars["deprecation"] = descriptor_->value(i)->options().deprecated() + ? "@java.lang.Deprecated " + : ""; WriteEnumValueDocComment(printer, descriptor_->value(i)); printer->Print(vars, - "public static final int ${$$name$_VALUE$}$ = $number$;\n"); + "$deprecation$public static final int ${$$name$_VALUE$}$ = " + "$number$;\n"); printer->Annotate("{", "}", descriptor_->value(i)); } printer->Print("\n"); @@ -150,6 +153,8 @@ void EnumLiteGenerator::Generate(io::Printer* printer) { "}\n" "\n" "/**\n" + " * @param value The number of the enum to look for.\n" + " * @return The enum associated with the given number.\n" " * @deprecated Use {@link #forNumber(int)} instead.\n" " */\n" "@java.lang.Deprecated\n" diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_extension.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_extension.cc index 3ad64e06..db210fb3 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_extension.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_extension.cc @@ -41,7 +41,6 @@ #include #include - namespace google { namespace protobuf { namespace compiler { diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_field.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_field.cc index 18a86bad..2f775a68 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_field.cc @@ -55,7 +55,6 @@ #include - namespace google { namespace protobuf { namespace compiler { @@ -88,7 +87,7 @@ ImmutableFieldGenerator* MakeImmutableGenerator(const FieldDescriptor* field, field, messageBitIndex, builderBitIndex, context); } } else { - if (field->containing_oneof()) { + if (IsRealOneof(field)) { switch (GetJavaType(field)) { case JAVATYPE_MESSAGE: return new ImmutableMessageOneofFieldGenerator( @@ -145,7 +144,7 @@ ImmutableFieldLiteGenerator* MakeImmutableLiteGenerator( field, messageBitIndex, context); } } else { - if (field->containing_oneof()) { + if (IsRealOneof(field)) { switch (GetJavaType(field)) { case JAVATYPE_MESSAGE: return new ImmutableMessageOneofFieldLiteGenerator( @@ -252,6 +251,7 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor, (*variables)["disambiguated_reason"] = info->disambiguated_reason; (*variables)["constant_name"] = FieldConstantName(descriptor); (*variables)["number"] = StrCat(descriptor->number()); + (*variables)["kt_dsl_builder"] = "_builder"; // These variables are placeholders to pick out the beginning and ends of // identifiers for annotations (when doing so with existing variables would // be ambiguous or impossible). They should never be set to anything but the diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_file.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_file.cc index e8953911..2fc7aadf 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_file.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_file.cc @@ -54,7 +54,6 @@ #include #include - namespace google { namespace protobuf { namespace compiler { @@ -77,6 +76,7 @@ struct FieldDescriptorCompare { typedef std::set FieldDescriptorSet; + // Recursively searches the given message to collect extensions. // Returns true if all the extensions can be recognized. The extensions will be // appended in to the extensions parameter. @@ -86,13 +86,17 @@ bool CollectExtensions(const Message& message, FieldDescriptorSet* extensions) { const Reflection* reflection = message.GetReflection(); // There are unknown fields that could be extensions, thus this call fails. - if (reflection->GetUnknownFields(message).field_count() > 0) return false; + UnknownFieldSet unknown_fields; + unknown_fields.MergeFrom(reflection->GetUnknownFields(message)); + if (unknown_fields.field_count() > 0) return false; std::vector fields; reflection->ListFields(message, &fields); for (int i = 0; i < fields.size(); i++) { - if (fields[i]->is_extension()) extensions->insert(fields[i]); + if (fields[i]->is_extension()) { + extensions->insert(fields[i]); + } if (GetJavaType(fields[i]) == JAVATYPE_MESSAGE) { if (fields[i]->is_repeated()) { @@ -238,7 +242,8 @@ bool FileGenerator::Validate(std::string* error) { } // Print a warning if optimize_for = LITE_RUNTIME is used. - if (file_->options().optimize_for() == FileOptions::LITE_RUNTIME) { + if (file_->options().optimize_for() == FileOptions::LITE_RUNTIME && + !options_.enforce_lite) { GOOGLE_LOG(WARNING) << "The optimize_for = LITE_RUNTIME option is no longer supported by " << "protobuf Java code generator and is ignored--protoc will always " @@ -267,6 +272,7 @@ void FileGenerator::Generate(io::Printer* printer) { } PrintGeneratedAnnotation( printer, '$', options_.annotate_code ? classname_ + ".java.pb.meta" : ""); + printer->Print( "$deprecation$public final class $classname$ {\n" " private $ctor$() {}\n", @@ -521,7 +527,7 @@ void FileGenerator::GenerateDescriptorInitializationCodeForMutable( // we want the mutable code to be independent from the immutable code // at compile time. It is required to implement dual-compile for // mutable and immutable API in blaze. - " java.lang.Class immutableClass = java.lang.Class.forName(\n" + " java.lang.Class immutableClass = java.lang.Class.forName(\n" " \"$immutable_classname$\");\n" "} catch (java.lang.ClassNotFoundException e) {\n", "immutable_classname", name_resolver_->GetImmutableClassName(file_)); diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_generator.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_generator.cc index 5045cfdc..11b04b8d 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_generator.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_generator.cc @@ -58,6 +58,10 @@ namespace java { JavaGenerator::JavaGenerator() {} JavaGenerator::~JavaGenerator() {} +uint64 JavaGenerator::GetSupportedFeatures() const { + return CodeGenerator::Feature::FEATURE_PROTO3_OPTIONAL; +} + bool JavaGenerator::Generate(const FileDescriptor* file, const std::string& parameter, GeneratorContext* context, diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_generator.h b/third_party/protobuf/src/google/protobuf/compiler/java/java_generator.h index be63ac49..a4e17083 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_generator.h +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_generator.h @@ -58,7 +58,9 @@ class PROTOC_EXPORT JavaGenerator : public CodeGenerator { // implements CodeGenerator ---------------------------------------- bool Generate(const FileDescriptor* file, const std::string& parameter, - GeneratorContext* context, std::string* error) const; + GeneratorContext* context, std::string* error) const override; + + uint64 GetSupportedFeatures() const override; private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(JavaGenerator); diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_helpers.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_helpers.cc index ac0e9cd3..92ec9257 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_helpers.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_helpers.cc @@ -32,21 +32,19 @@ // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. +#include + #include #include #include #include #include -#include #include #include #include #include #include - - - #include // for hash namespace google { @@ -430,6 +428,7 @@ const char* BoxedPrimitiveTypeName(const FieldDescriptor* descriptor) { return BoxedPrimitiveTypeName(GetJavaType(descriptor)); } + std::string GetOneofStoredType(const FieldDescriptor* field) { const JavaType javaType = GetJavaType(field); switch (javaType) { @@ -965,6 +964,7 @@ int GetExperimentalJavaFieldType(const FieldDescriptor* field) { static const int kUtf8CheckBit = 0x200; static const int kCheckInitialized = 0x400; static const int kMapWithProto2EnumValue = 0x800; + static const int kHasHasBit = 0x1000; int extra_bits = field->is_required() ? kRequiredBit : 0; if (field->type() == FieldDescriptor::TYPE_STRING && CheckUtf8(field)) { extra_bits |= kUtf8CheckBit; @@ -973,9 +973,12 @@ int GetExperimentalJavaFieldType(const FieldDescriptor* field) { HasRequiredFields(field->message_type()))) { extra_bits |= kCheckInitialized; } + if (HasHasbit(field)) { + extra_bits |= kHasHasBit; + } if (field->is_map()) { - if (SupportFieldPresence(field->file())) { + if (!SupportUnknownEnumValue(field)) { const FieldDescriptor* value = field->message_type()->FindFieldByName("value"); if (GetJavaType(value) == JAVATYPE_ENUM) { @@ -987,7 +990,7 @@ int GetExperimentalJavaFieldType(const FieldDescriptor* field) { return GetExperimentalJavaFieldTypeForPacked(field); } else if (field->is_repeated()) { return GetExperimentalJavaFieldTypeForRepeated(field) | extra_bits; - } else if (field->containing_oneof() != NULL) { + } else if (IsRealOneof(field)) { return (GetExperimentalJavaFieldTypeForSingular(field) + kOneofFieldTypeOffset) | extra_bits; diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_helpers.h b/third_party/protobuf/src/google/protobuf/compiler/java/java_helpers.h index b06ab208..046fe7e3 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_helpers.h +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_helpers.h @@ -86,7 +86,7 @@ std::string UnderscoresToCamelCase(const MethodDescriptor* method); // Same as UnderscoresToCamelCase, but checks for reserved keywords std::string UnderscoresToCamelCaseCheckReserved(const FieldDescriptor* field); -// Similar to UnderscoresToCamelCase, but guarentees that the result is a +// Similar to UnderscoresToCamelCase, but guarantees that the result is a // complete Java identifier by adding a _ if needed. std::string CamelCaseFieldName(const FieldDescriptor* field); @@ -160,6 +160,7 @@ inline bool MultipleJavaFiles(const FileDescriptor* descriptor, return descriptor->options().java_multiple_files(); } + // Returns true if `descriptor` will be written to its own .java file. // `immutable` should be set to true if we're generating for the immutable API. template @@ -187,9 +188,11 @@ template void MaybePrintGeneratedAnnotation(Context* context, io::Printer* printer, Descriptor* descriptor, bool immutable, const std::string& suffix = "") { - if (context->options().annotate_code && IsOwnFile(descriptor, immutable)) { + if (IsOwnFile(descriptor, immutable)) { PrintGeneratedAnnotation(printer, '$', - AnnotationFileName(descriptor, suffix)); + context->options().annotate_code + ? AnnotationFileName(descriptor, suffix) + : ""); } } @@ -223,6 +226,7 @@ const char* PrimitiveTypeName(JavaType type); // types. const char* BoxedPrimitiveTypeName(JavaType type); + // Get the name of the java enum constant representing this type. E.g., // "INT32" for FieldDescriptor::TYPE_INT32. The enum constant's full // name is "com.google.protobuf.WireFormat.FieldType.INT32". @@ -351,9 +355,30 @@ inline bool HasPackedFields(const Descriptor* descriptor) { // them has a required field. Return true if a required field is found. bool HasRequiredFields(const Descriptor* descriptor); -// Whether a .proto file supports field presence test for non-message types. -inline bool SupportFieldPresence(const FileDescriptor* descriptor) { - return descriptor->syntax() != FileDescriptor::SYNTAX_PROTO3; +inline bool IsProto2(const FileDescriptor* descriptor) { + return descriptor->syntax() == FileDescriptor::SYNTAX_PROTO2; +} + +inline bool SupportFieldPresence(const FieldDescriptor* descriptor) { + // Note that while proto3 oneofs do conceptually support present, we return + // false for them because they do not offer a public hazzer. Therefore this + // method could be named HasHazzer(). + return !descriptor->is_repeated() && + (descriptor->message_type() || descriptor->has_optional_keyword() || + IsProto2(descriptor->file())); +} + +inline bool IsRealOneof(const FieldDescriptor* descriptor) { + return descriptor->containing_oneof() && + !descriptor->containing_oneof()->is_synthetic(); +} + +inline bool HasHasbit(const FieldDescriptor* descriptor) { + // Note that currently message fields inside oneofs have hasbits. This is + // surprising, as the oneof case should avoid any need for a hasbit. But if + // you change this method to remove hasbits for oneofs, a few tests fail. + return !descriptor->is_repeated() && + (descriptor->has_optional_keyword() || IsProto2(descriptor->file())); } // Whether generate classes expose public PARSER instances. @@ -369,7 +394,11 @@ inline bool SupportUnknownEnumValue(const FileDescriptor* descriptor) { return descriptor->syntax() == FileDescriptor::SYNTAX_PROTO3; } -// Check whether a mesasge has repeated fields. +inline bool SupportUnknownEnumValue(const FieldDescriptor* field) { + return field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3; +} + +// Check whether a message has repeated fields. bool HasRepeatedFields(const Descriptor* descriptor); inline bool IsMapEntry(const Descriptor* descriptor) { diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_map_field.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_map_field.cc index 53537458..5db199d3 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_map_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_map_field.cc @@ -483,6 +483,7 @@ void ImmutableMapFieldGenerator::GenerateMapGetters( printer->Print( variables_, "$deprecation$\n" + "@java.lang.Override\n" "public boolean ${$contains$capitalized_name$$}$(\n" " $key_type$ key) {\n" " $key_null_check$\n" @@ -494,6 +495,7 @@ void ImmutableMapFieldGenerator::GenerateMapGetters( "/**\n" " * Use {@link #get$capitalized_name$Map()} instead.\n" " */\n" + "@java.lang.Override\n" "@java.lang.Deprecated\n" "public java.util.Map<$boxed_key_type$, $value_enum_type$>\n" "${$get$capitalized_name$$}$() {\n" @@ -502,6 +504,7 @@ void ImmutableMapFieldGenerator::GenerateMapGetters( printer->Annotate("{", "}", descriptor_); WriteFieldDocComment(printer, descriptor_); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$\n" "public java.util.Map<$boxed_key_type$, $value_enum_type$>\n" "${$get$capitalized_name$Map$}$() {\n" @@ -512,6 +515,7 @@ void ImmutableMapFieldGenerator::GenerateMapGetters( WriteFieldDocComment(printer, descriptor_); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$\n" "public $value_enum_type$ ${$get$capitalized_name$OrDefault$}$(\n" " $key_type$ key,\n" @@ -527,6 +531,7 @@ void ImmutableMapFieldGenerator::GenerateMapGetters( WriteFieldDocComment(printer, descriptor_); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$\n" "public $value_enum_type$ ${$get$capitalized_name$OrThrow$}$(\n" " $key_type$ key) {\n" @@ -545,6 +550,7 @@ void ImmutableMapFieldGenerator::GenerateMapGetters( "/**\n" " * Use {@link #get$capitalized_name$ValueMap()} instead.\n" " */\n" + "@java.lang.Override\n" "@java.lang.Deprecated\n" "public java.util.Map<$boxed_key_type$, $boxed_value_type$>\n" "${$get$capitalized_name$Value$}$() {\n" @@ -554,6 +560,7 @@ void ImmutableMapFieldGenerator::GenerateMapGetters( WriteFieldDocComment(printer, descriptor_); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$\n" "public java.util.Map<$boxed_key_type$, $boxed_value_type$>\n" "${$get$capitalized_name$ValueMap$}$() {\n" @@ -563,6 +570,7 @@ void ImmutableMapFieldGenerator::GenerateMapGetters( WriteFieldDocComment(printer, descriptor_); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$\n" "public $value_type$ ${$get$capitalized_name$ValueOrDefault$}$(\n" " $key_type$ key,\n" @@ -576,6 +584,7 @@ void ImmutableMapFieldGenerator::GenerateMapGetters( WriteFieldDocComment(printer, descriptor_); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$\n" "public $value_type$ ${$get$capitalized_name$ValueOrThrow$}$(\n" " $key_type$ key) {\n" @@ -594,6 +603,7 @@ void ImmutableMapFieldGenerator::GenerateMapGetters( "/**\n" " * Use {@link #get$capitalized_name$Map()} instead.\n" " */\n" + "@java.lang.Override\n" "@java.lang.Deprecated\n" "public java.util.Map<$type_parameters$> " "${$get$capitalized_name$$}$() {\n" @@ -602,6 +612,7 @@ void ImmutableMapFieldGenerator::GenerateMapGetters( printer->Annotate("{", "}", descriptor_); WriteFieldDocComment(printer, descriptor_); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$\n" "public java.util.Map<$type_parameters$> " "${$get$capitalized_name$Map$}$() {\n" @@ -611,6 +622,7 @@ void ImmutableMapFieldGenerator::GenerateMapGetters( WriteFieldDocComment(printer, descriptor_); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$\n" "public $value_type$ ${$get$capitalized_name$OrDefault$}$(\n" " $key_type$ key,\n" @@ -623,6 +635,7 @@ void ImmutableMapFieldGenerator::GenerateMapGetters( printer->Annotate("{", "}", descriptor_); WriteFieldDocComment(printer, descriptor_); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$\n" "public $value_type$ ${$get$capitalized_name$OrThrow$}$(\n" " $key_type$ key) {\n" diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_map_field_lite.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_map_field_lite.cc index 90557748..4fa939f3 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_map_field_lite.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_map_field_lite.cc @@ -92,14 +92,12 @@ void SetMessageVariables(const FieldDescriptor* descriptor, int messageBitIndex, (*variables)["boxed_key_type"] = TypeName(key, name_resolver, true); (*variables)["key_wire_type"] = WireType(key); (*variables)["key_default_value"] = DefaultValue(key, true, name_resolver); + // We use `x.getClass()` as a null check because it generates less bytecode + // than an `if (x == null) { throw ... }` statement. (*variables)["key_null_check"] = - IsReferenceType(keyJavaType) - ? "if (key == null) { throw new java.lang.NullPointerException(); }" - : ""; + IsReferenceType(keyJavaType) ? "key.getClass();" : ""; (*variables)["value_null_check"] = - IsReferenceType(valueJavaType) - ? "if (value == null) { throw new java.lang.NullPointerException(); }" - : ""; + IsReferenceType(valueJavaType) ? "value.getClass();" : ""; if (GetJavaType(value) == JAVATYPE_ENUM) { // We store enums as Integers internally. @@ -510,7 +508,7 @@ void ImmutableMapFieldLiteGenerator::GenerateFieldInfo( printer->Print(variables_, "\"$name$_\",\n" "$default_entry$,\n"); - if (SupportFieldPresence(descriptor_->file()) && + if (!SupportUnknownEnumValue(descriptor_) && GetJavaType(ValueField(descriptor_)) == JAVATYPE_ENUM) { PrintEnumVerifierLogic(printer, ValueField(descriptor_), variables_, /*var_name=*/"$value_enum_type$", diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_message.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_message.cc index 5bbdccee..0192e4bc 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_message.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_message.cc @@ -55,8 +55,6 @@ #include #include - - namespace google { namespace protobuf { namespace compiler { @@ -77,7 +75,13 @@ std::string MapValueImmutableClassdName(const Descriptor* descriptor, // =================================================================== MessageGenerator::MessageGenerator(const Descriptor* descriptor) - : descriptor_(descriptor) {} + : descriptor_(descriptor) { + for (int i = 0; i < descriptor_->field_count(); i++) { + if (IsRealOneof(descriptor_->field(i))) { + oneofs_.insert(descriptor_->field(i)->containing_oneof()); + } + } +} MessageGenerator::~MessageGenerator() {} @@ -208,7 +212,7 @@ void ImmutableMessageGenerator::GenerateFieldAccessorTable( // 6 bytes per field and oneof *bytecode_estimate += - 10 + 6 * descriptor_->field_count() + 6 * descriptor_->oneof_decl_count(); + 10 + 6 * descriptor_->field_count() + 6 * oneofs_.size(); } int ImmutableMessageGenerator::GenerateFieldAccessorTableInitializer( @@ -227,6 +231,7 @@ int ImmutableMessageGenerator::GenerateFieldAccessorTableInitializer( bytecode_estimate += 6; printer->Print("\"$field_name$\", ", "field_name", info->capitalized_name); } + // We reproduce synthetic oneofs here since proto reflection needs these. for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { const OneofDescriptor* oneof = descriptor_->oneof_decl(i); const OneofGeneratorInfo* info = context_->GetOneofGeneratorInfo(oneof); @@ -271,15 +276,13 @@ void ImmutableMessageGenerator::GenerateInterface(io::Printer* printer) { field_generators_.get(descriptor_->field(i)) .GenerateInterfaceMembers(printer); } - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { + for (auto oneof : oneofs_) { printer->Print( "\n" "public $classname$.$oneof_capitalized_name$Case " "get$oneof_capitalized_name$Case();\n", "oneof_capitalized_name", - context_->GetOneofGeneratorInfo(descriptor_->oneof_decl(i)) - ->capitalized_name, - "classname", + context_->GetOneofGeneratorInfo(oneof)->capitalized_name, "classname", context_->GetNameResolver()->GetImmutableClassName(descriptor_)); } printer->Outdent(); @@ -293,7 +296,7 @@ void ImmutableMessageGenerator::Generate(io::Printer* printer) { bool is_own_file = IsOwnFile(descriptor_, /* immutable = */ true); std::map variables; - variables["static"] = is_own_file ? " " : " static "; + variables["static"] = is_own_file ? "" : "static "; variables["classname"] = descriptor_->name(); variables["extra_interfaces"] = ExtraMessageInterfaces(descriptor_); variables["ver"] = GeneratedCodeVersionSuffix(); @@ -332,7 +335,7 @@ void ImmutableMessageGenerator::Generate(io::Printer* printer) { " $classname$OrBuilder {\n"); builder_type = strings::Substitute("com.google.protobuf.GeneratedMessage$0.Builder", - GeneratedCodeVersionSuffix()); + GeneratedCodeVersionSuffix()); } printer->Print("private static final long serialVersionUID = 0L;\n"); @@ -405,24 +408,26 @@ void ImmutableMessageGenerator::Generate(io::Printer* printer) { // oneof std::map vars; - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { - vars["oneof_name"] = - context_->GetOneofGeneratorInfo(descriptor_->oneof_decl(i))->name; + for (auto oneof : oneofs_) { + vars["oneof_name"] = context_->GetOneofGeneratorInfo(oneof)->name; vars["oneof_capitalized_name"] = - context_->GetOneofGeneratorInfo(descriptor_->oneof_decl(i)) - ->capitalized_name; - vars["oneof_index"] = StrCat(descriptor_->oneof_decl(i)->index()); + context_->GetOneofGeneratorInfo(oneof)->capitalized_name; + vars["oneof_index"] = StrCat((oneof)->index()); // oneofCase_ and oneof_ printer->Print(vars, "private int $oneof_name$Case_ = 0;\n" "private java.lang.Object $oneof_name$_;\n"); // OneofCase enum - printer->Print(vars, - "public enum $oneof_capitalized_name$Case\n" - " implements com.google.protobuf.Internal.EnumLite {\n"); + printer->Print( + vars, + "public enum $oneof_capitalized_name$Case\n" + // TODO(dweis): Remove EnumLite when we want to break compatibility with + // 3.x users + " implements com.google.protobuf.Internal.EnumLite,\n" + " com.google.protobuf.AbstractMessage.InternalOneOfEnum {\n"); printer->Indent(); - for (int j = 0; j < descriptor_->oneof_decl(i)->field_count(); j++) { - const FieldDescriptor* field = descriptor_->oneof_decl(i)->field(j); + for (int j = 0; j < (oneof)->field_count(); j++) { + const FieldDescriptor* field = (oneof)->field(j); printer->Print( "$deprecation$$field_name$($field_number$),\n", "deprecation", field->options().deprecated() ? "@java.lang.Deprecated " : "", @@ -439,6 +444,8 @@ void ImmutableMessageGenerator::Generate(io::Printer* printer) { printer->Print( vars, "/**\n" + " * @param value The number of the enum to look for.\n" + " * @return The enum associated with the given number.\n" " * @deprecated Use {@link #forNumber(int)} instead.\n" " */\n" "@java.lang.Deprecated\n" @@ -448,8 +455,8 @@ void ImmutableMessageGenerator::Generate(io::Printer* printer) { "\n" "public static $oneof_capitalized_name$Case forNumber(int value) {\n" " switch (value) {\n"); - for (int j = 0; j < descriptor_->oneof_decl(i)->field_count(); j++) { - const FieldDescriptor* field = descriptor_->oneof_decl(i)->field(j); + for (int j = 0; j < (oneof)->field_count(); j++) { + const FieldDescriptor* field = (oneof)->field(j); printer->Print(" case $field_number$: return $field_name$;\n", "field_number", StrCat(field->number()), "field_name", ToUpper(field->name())); @@ -908,19 +915,8 @@ void ImmutableMessageGenerator::GenerateIsInitialized(io::Printer* printer) { "name", info->capitalized_name); break; case FieldDescriptor::LABEL_OPTIONAL: - if (!SupportFieldPresence(descriptor_->file()) && - field->containing_oneof() != NULL) { - const OneofDescriptor* oneof = field->containing_oneof(); - const OneofGeneratorInfo* oneof_info = - context_->GetOneofGeneratorInfo(oneof); - printer->Print("if ($oneof_name$Case_ == $field_number$) {\n", - "oneof_name", oneof_info->name, "field_number", - StrCat(field->number())); - } else { - printer->Print("if (has$name$()) {\n", "name", - info->capitalized_name); - } printer->Print( + "if (has$name$()) {\n" " if (!get$name$().isInitialized()) {\n" " memoizedIsInitialized = 0;\n" " return false;\n" @@ -983,11 +979,10 @@ bool CheckHasBitsForEqualsAndHashCode(const FieldDescriptor* field) { if (field->is_repeated()) { return false; } - if (SupportFieldPresence(field->file())) { + if (HasHasbit(field)) { return true; } - return GetJavaType(field) == JAVATYPE_MESSAGE && - field->containing_oneof() == NULL; + return GetJavaType(field) == JAVATYPE_MESSAGE && !IsRealOneof(field); } } // namespace @@ -995,7 +990,8 @@ void ImmutableMessageGenerator::GenerateEqualsAndHashCode( io::Printer* printer) { printer->Print( "@java.lang.Override\n" - "public boolean equals(final java.lang.Object obj) {\n"); + "public boolean equals("); + printer->Print("final java.lang.Object obj) {\n"); printer->Indent(); printer->Print( "if (obj == this) {\n" @@ -1010,7 +1006,7 @@ void ImmutableMessageGenerator::GenerateEqualsAndHashCode( for (int i = 0; i < descriptor_->field_count(); i++) { const FieldDescriptor* field = descriptor_->field(i); - if (field->containing_oneof() == NULL) { + if (!IsRealOneof(field)) { const FieldGeneratorInfo* info = context_->GetFieldGeneratorInfo(field); bool check_has_bits = CheckHasBitsForEqualsAndHashCode(field); if (check_has_bits) { @@ -1029,19 +1025,17 @@ void ImmutableMessageGenerator::GenerateEqualsAndHashCode( } // Compare oneofs. - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { + for (auto oneof : oneofs_) { printer->Print( "if (!get$oneof_capitalized_name$Case().equals(" "other.get$oneof_capitalized_name$Case())) return false;\n", "oneof_capitalized_name", - context_->GetOneofGeneratorInfo(descriptor_->oneof_decl(i)) - ->capitalized_name); - printer->Print( - "switch ($oneof_name$Case_) {\n", "oneof_name", - context_->GetOneofGeneratorInfo(descriptor_->oneof_decl(i))->name); + context_->GetOneofGeneratorInfo(oneof)->capitalized_name); + printer->Print("switch ($oneof_name$Case_) {\n", "oneof_name", + context_->GetOneofGeneratorInfo(oneof)->name); printer->Indent(); - for (int j = 0; j < descriptor_->oneof_decl(i)->field_count(); j++) { - const FieldDescriptor* field = descriptor_->oneof_decl(i)->field(j); + for (int j = 0; j < (oneof)->field_count(); j++) { + const FieldDescriptor* field = (oneof)->field(j); printer->Print("case $field_number$:\n", "field_number", StrCat(field->number())); printer->Indent(); @@ -1094,7 +1088,7 @@ void ImmutableMessageGenerator::GenerateEqualsAndHashCode( // hashCode non-oneofs. for (int i = 0; i < descriptor_->field_count(); i++) { const FieldDescriptor* field = descriptor_->field(i); - if (field->containing_oneof() == NULL) { + if (!IsRealOneof(field)) { const FieldGeneratorInfo* info = context_->GetFieldGeneratorInfo(field); bool check_has_bits = CheckHasBitsForEqualsAndHashCode(field); if (check_has_bits) { @@ -1110,13 +1104,12 @@ void ImmutableMessageGenerator::GenerateEqualsAndHashCode( } // hashCode oneofs. - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { - printer->Print( - "switch ($oneof_name$Case_) {\n", "oneof_name", - context_->GetOneofGeneratorInfo(descriptor_->oneof_decl(i))->name); + for (auto oneof : oneofs_) { + printer->Print("switch ($oneof_name$Case_) {\n", "oneof_name", + context_->GetOneofGeneratorInfo(oneof)->name); printer->Indent(); - for (int j = 0; j < descriptor_->oneof_decl(i)->field_count(); j++) { - const FieldDescriptor* field = descriptor_->oneof_decl(i)->field(j); + for (int j = 0; j < (oneof)->field_count(); j++) { + const FieldDescriptor* field = (oneof)->field(j); printer->Print("case $field_number$:\n", "field_number", StrCat(field->number())); printer->Indent(); @@ -1355,7 +1348,7 @@ void ImmutableMessageGenerator::GenerateParser(io::Printer* printer) { // =================================================================== void ImmutableMessageGenerator::GenerateInitializers(io::Printer* printer) { for (int i = 0; i < descriptor_->field_count(); i++) { - if (!descriptor_->field(i)->containing_oneof()) { + if (!IsRealOneof(descriptor_->field(i))) { field_generators_.get(descriptor_->field(i)) .GenerateInitializationCode(printer); } diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_message.h b/third_party/protobuf/src/google/protobuf/compiler/java/java_message.h index de2f359a..87b9df5e 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_message.h +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_message.h @@ -88,6 +88,7 @@ class MessageGenerator { protected: const Descriptor* descriptor_; + std::set oneofs_; private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator); diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder.cc index aa00a66f..320852b1 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder.cc @@ -53,8 +53,6 @@ #include #include - - namespace google { namespace protobuf { namespace compiler { @@ -78,6 +76,11 @@ MessageBuilderGenerator::MessageBuilderGenerator(const Descriptor* descriptor, GOOGLE_CHECK(HasDescriptorMethods(descriptor->file(), context->EnforceLite())) << "Generator factory error: A non-lite message generator is used to " "generate lite messages."; + for (int i = 0; i < descriptor_->field_count(); i++) { + if (IsRealOneof(descriptor_->field(i))) { + oneofs_.insert(descriptor_->field(i)->containing_oneof()); + } + } } MessageBuilderGenerator::~MessageBuilderGenerator() {} @@ -117,13 +120,11 @@ void MessageBuilderGenerator::Generate(io::Printer* printer) { // oneof std::map vars; - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { - vars["oneof_name"] = - context_->GetOneofGeneratorInfo(descriptor_->oneof_decl(i))->name; + for (auto oneof : oneofs_) { + vars["oneof_name"] = context_->GetOneofGeneratorInfo(oneof)->name; vars["oneof_capitalized_name"] = - context_->GetOneofGeneratorInfo(descriptor_->oneof_decl(i)) - ->capitalized_name; - vars["oneof_index"] = StrCat(descriptor_->oneof_decl(i)->index()); + context_->GetOneofGeneratorInfo(oneof)->capitalized_name; + vars["oneof_index"] = StrCat(oneof->index()); // oneofCase_ and oneof_ printer->Print(vars, "private int $oneof_name$Case_ = 0;\n" @@ -310,7 +311,7 @@ void MessageBuilderGenerator::GenerateCommonBuilderMethods( printer->Indent(); printer->Indent(); for (int i = 0; i < descriptor_->field_count(); i++) { - if (!descriptor_->field(i)->containing_oneof()) { + if (!IsRealOneof(descriptor_->field(i))) { field_generators_.get(descriptor_->field(i)) .GenerateFieldBuilderInitializationCode(printer); } @@ -330,18 +331,17 @@ void MessageBuilderGenerator::GenerateCommonBuilderMethods( printer->Indent(); for (int i = 0; i < descriptor_->field_count(); i++) { - if (!descriptor_->field(i)->containing_oneof()) { + if (!IsRealOneof(descriptor_->field(i))) { field_generators_.get(descriptor_->field(i)) .GenerateBuilderClearCode(printer); } } - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { + for (auto oneof : oneofs_) { printer->Print( "$oneof_name$Case_ = 0;\n" "$oneof_name$_ = null;\n", - "oneof_name", - context_->GetOneofGeneratorInfo(descriptor_->oneof_decl(i))->name); + "oneof_name", context_->GetOneofGeneratorInfo(oneof)->name); } printer->Outdent(); @@ -425,10 +425,9 @@ void MessageBuilderGenerator::GenerateCommonBuilderMethods( "bit_field_name", GetBitFieldName(i)); } - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { - printer->Print( - "result.$oneof_name$Case_ = $oneof_name$Case_;\n", "oneof_name", - context_->GetOneofGeneratorInfo(descriptor_->oneof_decl(i))->name); + for (auto oneof : oneofs_) { + printer->Print("result.$oneof_name$Case_ = $oneof_name$Case_;\n", + "oneof_name", context_->GetOneofGeneratorInfo(oneof)->name); } printer->Outdent(); @@ -537,21 +536,20 @@ void MessageBuilderGenerator::GenerateCommonBuilderMethods( printer->Indent(); for (int i = 0; i < descriptor_->field_count(); i++) { - if (!descriptor_->field(i)->containing_oneof()) { + if (!IsRealOneof(descriptor_->field(i))) { field_generators_.get(descriptor_->field(i)) .GenerateMergingCode(printer); } } // Merge oneof fields. - for (int i = 0; i < descriptor_->oneof_decl_count(); ++i) { + for (auto oneof : oneofs_) { printer->Print("switch (other.get$oneof_capitalized_name$Case()) {\n", "oneof_capitalized_name", - context_->GetOneofGeneratorInfo(descriptor_->oneof_decl(i)) - ->capitalized_name); + context_->GetOneofGeneratorInfo(oneof)->capitalized_name); printer->Indent(); - for (int j = 0; j < descriptor_->oneof_decl(i)->field_count(); j++) { - const FieldDescriptor* field = descriptor_->oneof_decl(i)->field(j); + for (int j = 0; j < oneof->field_count(); j++) { + const FieldDescriptor* field = oneof->field(j); printer->Print("case $field_name$: {\n", "field_name", ToUpper(field->name())); printer->Indent(); @@ -565,9 +563,7 @@ void MessageBuilderGenerator::GenerateCommonBuilderMethods( " break;\n" "}\n", "cap_oneof_name", - ToUpper( - context_->GetOneofGeneratorInfo(descriptor_->oneof_decl(i)) - ->name)); + ToUpper(context_->GetOneofGeneratorInfo(oneof)->name)); printer->Outdent(); printer->Print("}\n"); } @@ -657,19 +653,8 @@ void MessageBuilderGenerator::GenerateIsInitialized(io::Printer* printer) { "name", info->capitalized_name); break; case FieldDescriptor::LABEL_OPTIONAL: - if (!SupportFieldPresence(descriptor_->file()) && - field->containing_oneof() != NULL) { - const OneofDescriptor* oneof = field->containing_oneof(); - const OneofGeneratorInfo* oneof_info = - context_->GetOneofGeneratorInfo(oneof); - printer->Print("if ($oneof_name$Case_ == $field_number$) {\n", - "oneof_name", oneof_info->name, "field_number", - StrCat(field->number())); - } else { - printer->Print("if (has$name$()) {\n", "name", - info->capitalized_name); - } printer->Print( + "if (has$name$()) {\n" " if (!get$name$().isInitialized()) {\n" " return false;\n" " }\n" diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder.h b/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder.h index a31d0bad..fcd73b34 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder.h +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder.h @@ -76,6 +76,7 @@ class MessageBuilderGenerator { Context* context_; ClassNameResolver* name_resolver_; FieldGeneratorMap field_generators_; + std::set oneofs_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageBuilderGenerator); }; diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.cc index ae344991..7b69a9ab 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.cc @@ -53,7 +53,6 @@ #include #include - namespace google { namespace protobuf { namespace compiler { @@ -68,6 +67,11 @@ MessageBuilderLiteGenerator::MessageBuilderLiteGenerator( GOOGLE_CHECK(!HasDescriptorMethods(descriptor->file(), context->EnforceLite())) << "Generator factory error: A lite message generator is used to " "generate non-lite messages."; + for (int i = 0; i < descriptor_->field_count(); i++) { + if (IsRealOneof(descriptor_->field(i))) { + oneofs_.insert(descriptor_->field(i)->containing_oneof()); + } + } } MessageBuilderLiteGenerator::~MessageBuilderLiteGenerator() {} @@ -89,13 +93,11 @@ void MessageBuilderLiteGenerator::Generate(io::Printer* printer) { // oneof std::map vars; - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { - vars["oneof_name"] = - context_->GetOneofGeneratorInfo(descriptor_->oneof_decl(i))->name; + for (auto oneof : oneofs_) { + vars["oneof_name"] = context_->GetOneofGeneratorInfo(oneof)->name; vars["oneof_capitalized_name"] = - context_->GetOneofGeneratorInfo(descriptor_->oneof_decl(i)) - ->capitalized_name; - vars["oneof_index"] = StrCat(descriptor_->oneof_decl(i)->index()); + context_->GetOneofGeneratorInfo(oneof)->capitalized_name; + vars["oneof_index"] = StrCat(oneof->index()); // oneofCase() and clearOneof() printer->Print(vars, diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.h b/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.h index e0a48dc1..3402adf3 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.h +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.h @@ -73,6 +73,7 @@ class MessageBuilderLiteGenerator { Context* context_; ClassNameResolver* name_resolver_; FieldGeneratorMap field_generators_; + std::set oneofs_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageBuilderLiteGenerator); }; diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_message_field.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_message_field.cc index eb3ed51b..67273fa2 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_message_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_message_field.cc @@ -74,7 +74,7 @@ void SetMessageVariables(const FieldDescriptor* descriptor, int messageBitIndex, ExposePublicParser(descriptor->message_type()->file()) ? "PARSER" : "parser()"; - if (SupportFieldPresence(descriptor->file())) { + if (HasHasbit(descriptor)) { // For singular messages and builders, one bit is used for the hasField bit. (*variables)["get_has_field_bit_message"] = GenerateGetBit(messageBitIndex); (*variables)["get_has_field_bit_builder"] = GenerateGetBit(builderBitIndex); @@ -97,7 +97,7 @@ void SetMessageVariables(const FieldDescriptor* descriptor, int messageBitIndex, (*variables)["name"] + "_ != null"; } - // For repated builders, one bit is used for whether the array is immutable. + // For repeated builders, one bit is used for whether the array is immutable. (*variables)["get_mutable_bit_builder"] = GenerateGetBit(builderBitIndex); (*variables)["set_mutable_bit_builder"] = GenerateSetBit(builderBitIndex); (*variables)["clear_mutable_bit_builder"] = GenerateClearBit(builderBitIndex); @@ -131,7 +131,7 @@ ImmutableMessageFieldGenerator::ImmutableMessageFieldGenerator( ImmutableMessageFieldGenerator::~ImmutableMessageFieldGenerator() {} int ImmutableMessageFieldGenerator::GetNumBitsForMessage() const { - return SupportFieldPresence(descriptor_->file()) ? 1 : 0; + return HasHasbit(descriptor_) ? 1 : 0; } int ImmutableMessageFieldGenerator::GetNumBitsForBuilder() const { @@ -144,9 +144,9 @@ void ImmutableMessageFieldGenerator::GenerateInterfaceMembers( // interface so that builders can choose dynamically to either return a // message or a nested builder, so that asking for the interface doesn't // cause a message to ever be built. - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print(variables_, "$deprecation$boolean has$capitalized_name$();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$$type$ get$capitalized_name$();\n"); WriteFieldDocComment(printer, descriptor_); @@ -160,17 +160,19 @@ void ImmutableMessageFieldGenerator::GenerateMembers( printer->Print(variables_, "private $type$ $name$_;\n"); PrintExtraFieldInfo(variables_, printer); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (HasHasbit(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" " return $get_has_field_bit_message$;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" " return $name$_ == null ? $type$.getDefaultInstance() : $name$_;\n" "}\n"); @@ -179,22 +181,25 @@ void ImmutableMessageFieldGenerator::GenerateMembers( WriteFieldDocComment(printer, descriptor_); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public $type$OrBuilder " "${$get$capitalized_name$OrBuilder$}$() {\n" " return $name$_ == null ? $type$.getDefaultInstance() : $name$_;\n" "}\n"); printer->Annotate("{", "}", descriptor_); } else { - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" " return $name$_ != null;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" " return $name$_ == null ? $type$.getDefaultInstance() : $name$_;\n" "}\n"); @@ -202,6 +207,7 @@ void ImmutableMessageFieldGenerator::GenerateMembers( WriteFieldDocComment(printer, descriptor_); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public $type$OrBuilder " "${$get$capitalized_name$OrBuilder$}$() {\n" " return get$capitalized_name$();\n" @@ -246,7 +252,7 @@ void ImmutableMessageFieldGenerator::GenerateBuilderMembers( // non-nested builder case. It only creates a nested builder lazily on // demand and then forever delegates to it after creation. - bool support_field_presence = SupportFieldPresence(descriptor_->file()); + bool has_hasbit = HasHasbit(descriptor_); printer->Print(variables_, "private $type$ $name$_;\n"); @@ -261,8 +267,8 @@ void ImmutableMessageFieldGenerator::GenerateBuilderMembers( // field of type "Field" called "Field". // boolean hasField() - WriteFieldDocComment(printer, descriptor_); - if (support_field_presence) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); + if (has_hasbit) { printer->Print( variables_, "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" @@ -279,7 +285,7 @@ void ImmutableMessageFieldGenerator::GenerateBuilderMembers( } // Field getField() - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); PrintNestedBuilderFunction( printer, "$deprecation$public $type$ ${$get$capitalized_name$$}$()", "return $name$_ == null ? $type$.getDefaultInstance() : $name$_;\n", @@ -323,7 +329,7 @@ void ImmutableMessageFieldGenerator::GenerateBuilderMembers( printer, "$deprecation$public Builder ${$merge$capitalized_name$$}$($type$ value)", - support_field_presence + has_hasbit ? "if ($get_has_field_bit_builder$ &&\n" " $name$_ != null &&\n" " $name$_ != $type$.getDefaultInstance()) {\n" @@ -354,9 +360,9 @@ void ImmutableMessageFieldGenerator::GenerateBuilderMembers( "$name$_ = null;\n" "$on_changed$\n", - support_field_presence ? "$name$Builder_.clear();\n" - : "$name$_ = null;\n" - "$name$Builder_ = null;\n", + has_hasbit ? "$name$Builder_.clear();\n" + : "$name$_ = null;\n" + "$name$Builder_ = null;\n", "$clear_has_field_bit_builder$\n" "return this;\n"); @@ -402,7 +408,7 @@ void ImmutableMessageFieldGenerator::GenerateBuilderMembers( void ImmutableMessageFieldGenerator::GenerateFieldBuilderInitializationCode( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { + if (HasHasbit(descriptor_)) { printer->Print(variables_, "get$capitalized_name$FieldBuilder();\n"); } } @@ -412,7 +418,7 @@ void ImmutableMessageFieldGenerator::GenerateInitializationCode( void ImmutableMessageFieldGenerator::GenerateBuilderClearCode( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { + if (HasHasbit(descriptor_)) { PrintNestedBuilderCondition(printer, "$name$_ = null;\n", "$name$Builder_.clear();\n"); @@ -435,7 +441,7 @@ void ImmutableMessageFieldGenerator::GenerateMergingCode( void ImmutableMessageFieldGenerator::GenerateBuildingCode( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { + if (HasHasbit(descriptor_)) { printer->Print(variables_, "if ($get_has_field_bit_from_local$) {\n"); printer->Indent(); PrintNestedBuilderCondition(printer, "result.$name$_ = $name$_;\n", @@ -535,14 +541,16 @@ ImmutableMessageOneofFieldGenerator::~ImmutableMessageOneofFieldGenerator() {} void ImmutableMessageOneofFieldGenerator::GenerateMembers( io::Printer* printer) const { PrintExtraFieldInfo(variables_, printer); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" " return $has_oneof_case_message$;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" " if ($has_oneof_case_message$) {\n" " return ($type$) $oneof_name$_;\n" @@ -553,6 +561,7 @@ void ImmutableMessageOneofFieldGenerator::GenerateMembers( WriteFieldDocComment(printer, descriptor_); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public $type$OrBuilder " "${$get$capitalized_name$OrBuilder$}$() {\n" " if ($has_oneof_case_message$) {\n" @@ -579,17 +588,20 @@ void ImmutableMessageOneofFieldGenerator::GenerateBuilderMembers( // field of type "Field" called "Field". // boolean hasField() - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" " return $has_oneof_case_message$;\n" "}\n"); printer->Annotate("{", "}", descriptor_); // Field getField() - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); PrintNestedBuilderFunction( - printer, "$deprecation$public $type$ ${$get$capitalized_name$$}$()", + printer, + "@java.lang.Override\n" + "$deprecation$public $type$ ${$get$capitalized_name$$}$()", "if ($has_oneof_case_message$) {\n" " return ($type$) $oneof_name$_;\n" @@ -687,6 +699,7 @@ void ImmutableMessageOneofFieldGenerator::GenerateBuilderMembers( WriteFieldDocComment(printer, descriptor_); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public $type$OrBuilder " "${$get$capitalized_name$OrBuilder$}$() {\n" " if (($has_oneof_case_message$) && ($name$Builder_ != null)) {\n" @@ -846,6 +859,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateMembers( PrintExtraFieldInfo(variables_, printer); WriteFieldDocComment(printer, descriptor_); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public java.util.List<$type$> " "${$get$capitalized_name$List$}$() {\n" " return $name$_;\n" // note: unmodifiable list @@ -854,6 +868,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateMembers( WriteFieldDocComment(printer, descriptor_); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public java.util.List \n" " ${$get$capitalized_name$OrBuilderList$}$() {\n" " return $name$_;\n" @@ -862,6 +877,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateMembers( WriteFieldDocComment(printer, descriptor_); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public int ${$get$capitalized_name$Count$}$() {\n" " return $name$_.size();\n" "}\n"); @@ -869,12 +885,14 @@ void RepeatedImmutableMessageFieldGenerator::GenerateMembers( WriteFieldDocComment(printer, descriptor_); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$(int index) {\n" " return $name$_.get(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); WriteFieldDocComment(printer, descriptor_); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public $type$OrBuilder " "${$get$capitalized_name$OrBuilder$}$(\n" " int index) {\n" diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_message_field_lite.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_message_field_lite.cc index 3a6909fc..b17859d6 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_message_field_lite.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_message_field_lite.cc @@ -44,7 +44,6 @@ #include #include - namespace google { namespace protobuf { namespace compiler { @@ -71,7 +70,7 @@ void SetMessageVariables(const FieldDescriptor* descriptor, int messageBitIndex, descriptor->options().deprecated() ? "@java.lang.Deprecated " : ""; (*variables)["required"] = descriptor->is_required() ? "true" : "false"; - if (SupportFieldPresence(descriptor->file())) { + if (HasHasbit(descriptor)) { // For singular messages and builders, one bit is used for the hasField bit. (*variables)["get_has_field_bit_message"] = GenerateGetBit(messageBitIndex); @@ -90,13 +89,14 @@ void SetMessageVariables(const FieldDescriptor* descriptor, int messageBitIndex, (*variables)["name"] + "_ != null"; } - // For repeated builders, the underlying list tracks mutability state. - (*variables)["is_mutable"] = (*variables)["name"] + "_.isModifiable()"; - (*variables)["get_has_field_bit_from_local"] = GenerateGetBitFromLocal(builderBitIndex); (*variables)["set_has_field_bit_to_local"] = GenerateSetBitToLocal(messageBitIndex); + + // We use `x.getClass()` as a null check because it generates less bytecode + // than an `if (x == null) { throw ... }` statement. + (*variables)["null_check"] = "value.getClass();\n"; } } // namespace @@ -116,14 +116,18 @@ ImmutableMessageFieldLiteGenerator::ImmutableMessageFieldLiteGenerator( ImmutableMessageFieldLiteGenerator::~ImmutableMessageFieldLiteGenerator() {} int ImmutableMessageFieldLiteGenerator::GetNumBitsForMessage() const { - return SupportFieldPresence(descriptor_->file()) ? 1 : 0; + // TODO(dweis): We don't need a has bit for messages as they have null + // sentinels and no user should be reflecting on this. We could save some + // bits by setting to 0 and updating the runtimes but this might come at a + // runtime performance cost since we can't memoize has-bit reads. + return HasHasbit(descriptor_) ? 1 : 0; } void ImmutableMessageFieldLiteGenerator::GenerateInterfaceMembers( io::Printer* printer) const { - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print(variables_, "$deprecation$boolean has$capitalized_name$();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$$type$ get$capitalized_name$();\n"); } @@ -133,7 +137,7 @@ void ImmutableMessageFieldLiteGenerator::GenerateMembers( printer->Print(variables_, "private $type$ $name$_;\n"); PrintExtraFieldInfo(variables_, printer); - if (SupportFieldPresence(descriptor_->file())) { + if (HasHasbit(descriptor_)) { WriteFieldDocComment(printer, descriptor_); printer->Print( variables_, @@ -173,31 +177,18 @@ void ImmutableMessageFieldLiteGenerator::GenerateMembers( WriteFieldDocComment(printer, descriptor_); printer->Print(variables_, "private void set$capitalized_name$($type$ value) {\n" - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n" + " $null_check$" " $name$_ = value;\n" " $set_has_field_bit_message$\n" " }\n"); - // Field.Builder setField(Field.Builder builderForValue) - WriteFieldDocComment(printer, descriptor_); - printer->Print(variables_, - "private void set$capitalized_name$(\n" - " $type$.Builder builderForValue) {\n" - " $name$_ = builderForValue.build();\n" - " $set_has_field_bit_message$\n" - "}\n"); - // Field.Builder mergeField(Field value) WriteFieldDocComment(printer, descriptor_); printer->Print( variables_, "@java.lang.SuppressWarnings({\"ReferenceEquality\"})\n" "private void merge$capitalized_name$($type$ value) {\n" - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n" + " $null_check$" " if ($name$_ != null &&\n" " $name$_ != $type$.getDefaultInstance()) {\n" " $name$_ =\n" @@ -257,7 +248,7 @@ void ImmutableMessageFieldLiteGenerator::GenerateBuilderMembers( "$deprecation$public Builder ${$set$capitalized_name$$}$(\n" " $type$.Builder builderForValue) {\n" " copyOnWrite();\n" - " instance.set$capitalized_name$(builderForValue);\n" + " instance.set$capitalized_name$(builderForValue.build());\n" " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); @@ -284,13 +275,12 @@ void ImmutableMessageFieldLiteGenerator::GenerateBuilderMembers( printer->Annotate("{", "}", descriptor_); } - void ImmutableMessageFieldLiteGenerator::GenerateFieldInfo( io::Printer* printer, std::vector* output) const { WriteIntToUtf16CharSequence(descriptor_->number(), output); WriteIntToUtf16CharSequence(GetExperimentalJavaFieldType(descriptor_), output); - if (SupportFieldPresence(descriptor_->file())) { + if (HasHasbit(descriptor_)) { WriteIntToUtf16CharSequence(messageBitIndex_, output); } printer->Print(variables_, "\"$name$_\",\n"); @@ -343,30 +333,17 @@ void ImmutableMessageOneofFieldLiteGenerator::GenerateMembers( WriteFieldDocComment(printer, descriptor_); printer->Print(variables_, "private void set$capitalized_name$($type$ value) {\n" - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n" + " $null_check$" " $oneof_name$_ = value;\n" " $set_oneof_case_message$;\n" "}\n"); - // Field.Builder setField(Field.Builder builderForValue) - WriteFieldDocComment(printer, descriptor_); - printer->Print(variables_, - "private void set$capitalized_name$(\n" - " $type$.Builder builderForValue) {\n" - " $oneof_name$_ = builderForValue.build();\n" - " $set_oneof_case_message$;\n" - "}\n"); - // Field.Builder mergeField(Field value) WriteFieldDocComment(printer, descriptor_); printer->Print( variables_, "private void merge$capitalized_name$($type$ value) {\n" - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n" + " $null_check$" " if ($has_oneof_case_message$ &&\n" " $oneof_name$_ != $type$.getDefaultInstance()) {\n" " $oneof_name$_ = $type$.newBuilder(($type$) $oneof_name$_)\n" @@ -437,7 +414,7 @@ void ImmutableMessageOneofFieldLiteGenerator::GenerateBuilderMembers( "$deprecation$public Builder ${$set$capitalized_name$$}$(\n" " $type$.Builder builderForValue) {\n" " copyOnWrite();\n" - " instance.set$capitalized_name$(builderForValue);\n" + " instance.set$capitalized_name$(builderForValue.build());\n" " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); @@ -552,9 +529,11 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateMembers( printer->Print( variables_, "private void ensure$capitalized_name$IsMutable() {\n" - " if (!$is_mutable$) {\n" + // Use a temporary to avoid a redundant iget-object. + " com.google.protobuf.Internal.ProtobufList<$type$> tmp = $name$_;\n" + " if (!tmp.isModifiable()) {\n" " $name$_ =\n" - " com.google.protobuf.GeneratedMessageLite.mutableCopy($name$_);\n" + " com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);\n" " }\n" "}\n" "\n"); @@ -564,29 +543,16 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateMembers( printer->Print(variables_, "private void set$capitalized_name$(\n" " int index, $type$ value) {\n" - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n" + " $null_check$" " ensure$capitalized_name$IsMutable();\n" " $name$_.set(index, value);\n" "}\n"); - // Builder setRepeatedField(int index, Field.Builder builderForValue) - WriteFieldDocComment(printer, descriptor_); - printer->Print(variables_, - "private void set$capitalized_name$(\n" - " int index, $type$.Builder builderForValue) {\n" - " ensure$capitalized_name$IsMutable();\n" - " $name$_.set(index, builderForValue.build());\n" - "}\n"); - // Builder addRepeatedField(Field value) WriteFieldDocComment(printer, descriptor_); printer->Print(variables_, "private void add$capitalized_name$($type$ value) {\n" - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n" + " $null_check$" " ensure$capitalized_name$IsMutable();\n" " $name$_.add(value);\n" "}\n"); @@ -596,29 +562,10 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateMembers( printer->Print(variables_, "private void add$capitalized_name$(\n" " int index, $type$ value) {\n" - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n" + " $null_check$" " ensure$capitalized_name$IsMutable();\n" " $name$_.add(index, value);\n" "}\n"); - // Builder addRepeatedField(Field.Builder builderForValue) - WriteFieldDocComment(printer, descriptor_); - printer->Print(variables_, - "private void add$capitalized_name$(\n" - " $type$.Builder builderForValue) {\n" - " ensure$capitalized_name$IsMutable();\n" - " $name$_.add(builderForValue.build());\n" - "}\n"); - - // Builder addRepeatedField(int index, Field.Builder builderForValue) - WriteFieldDocComment(printer, descriptor_); - printer->Print(variables_, - "private void add$capitalized_name$(\n" - " int index, $type$.Builder builderForValue) {\n" - " ensure$capitalized_name$IsMutable();\n" - " $name$_.add(index, builderForValue.build());\n" - "}\n"); // Builder addAllRepeatedField(Iterable values) WriteFieldDocComment(printer, descriptor_); @@ -699,7 +646,8 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateBuilderMembers( "$deprecation$public Builder ${$set$capitalized_name$$}$(\n" " int index, $type$.Builder builderForValue) {\n" " copyOnWrite();\n" - " instance.set$capitalized_name$(index, builderForValue);\n" + " instance.set$capitalized_name$(index,\n" + " builderForValue.build());\n" " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); @@ -731,7 +679,7 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateBuilderMembers( "$deprecation$public Builder ${$add$capitalized_name$$}$(\n" " $type$.Builder builderForValue) {\n" " copyOnWrite();\n" - " instance.add$capitalized_name$(builderForValue);\n" + " instance.add$capitalized_name$(builderForValue.build());\n" " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); @@ -742,7 +690,8 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateBuilderMembers( "$deprecation$public Builder ${$add$capitalized_name$$}$(\n" " int index, $type$.Builder builderForValue) {\n" " copyOnWrite();\n" - " instance.add$capitalized_name$(index, builderForValue);\n" + " instance.add$capitalized_name$(index,\n" + " builderForValue.build());\n" " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); @@ -781,7 +730,6 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateBuilderMembers( printer->Annotate("{", "}", descriptor_); } - void RepeatedImmutableMessageFieldLiteGenerator::GenerateFieldInfo( io::Printer* printer, std::vector* output) const { WriteIntToUtf16CharSequence(descriptor_->number(), output); diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_message_lite.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_message_lite.cc index 73e0b9db..4afffdc7 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_message_lite.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_message_lite.cc @@ -55,8 +55,6 @@ #include #include - - namespace google { namespace protobuf { namespace compiler { @@ -75,6 +73,11 @@ ImmutableMessageLiteGenerator::ImmutableMessageLiteGenerator( GOOGLE_CHECK(!HasDescriptorMethods(descriptor->file(), context->EnforceLite())) << "Generator factory error: A lite message generator is used to " "generate non-lite messages."; + for (int i = 0; i < descriptor_->field_count(); i++) { + if (IsRealOneof(descriptor_->field(i))) { + oneofs_.insert(descriptor_->field(i)->containing_oneof()); + } + } } ImmutableMessageLiteGenerator::~ImmutableMessageLiteGenerator() {} @@ -136,15 +139,13 @@ void ImmutableMessageLiteGenerator::GenerateInterface(io::Printer* printer) { field_generators_.get(descriptor_->field(i)) .GenerateInterfaceMembers(printer); } - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { + for (auto oneof : oneofs_) { printer->Print( "\n" "public $classname$.$oneof_capitalized_name$Case " "get$oneof_capitalized_name$Case();\n", "oneof_capitalized_name", - context_->GetOneofGeneratorInfo(descriptor_->oneof_decl(i)) - ->capitalized_name, - "classname", + context_->GetOneofGeneratorInfo(oneof)->capitalized_name, "classname", context_->GetNameResolver()->GetImmutableClassName(descriptor_)); } printer->Outdent(); @@ -226,23 +227,20 @@ void ImmutableMessageLiteGenerator::Generate(io::Printer* printer) { // oneof std::map vars; - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { - const OneofDescriptor* oneof = descriptor_->oneof_decl(i); + for (auto oneof : oneofs_) { vars["oneof_name"] = context_->GetOneofGeneratorInfo(oneof)->name; vars["oneof_capitalized_name"] = context_->GetOneofGeneratorInfo(oneof)->capitalized_name; - vars["oneof_index"] = StrCat(oneof->index()); + vars["oneof_index"] = StrCat((oneof)->index()); // oneofCase_ and oneof_ printer->Print(vars, "private int $oneof_name$Case_ = 0;\n" "private java.lang.Object $oneof_name$_;\n"); // OneofCase enum - printer->Print(vars, - "public enum $oneof_capitalized_name$Case\n" - " implements com.google.protobuf.Internal.EnumLite {\n"); + printer->Print(vars, "public enum $oneof_capitalized_name$Case {\n"); printer->Indent(); - for (int j = 0; j < oneof->field_count(); j++) { - const FieldDescriptor* field = oneof->field(j); + for (int j = 0; j < (oneof)->field_count(); j++) { + const FieldDescriptor* field = (oneof)->field(j); printer->Print("$field_name$($field_number$),\n", "field_name", ToUpper(field->name()), "field_number", StrCat(field->number())); @@ -266,8 +264,8 @@ void ImmutableMessageLiteGenerator::Generate(io::Printer* printer) { "\n" "public static $oneof_capitalized_name$Case forNumber(int value) {\n" " switch (value) {\n"); - for (int j = 0; j < oneof->field_count(); j++) { - const FieldDescriptor* field = oneof->field(j); + for (int j = 0; j < (oneof)->field_count(); j++) { + const FieldDescriptor* field = (oneof)->field(j); printer->Print(" case $field_number$: return $field_name$;\n", "field_number", StrCat(field->number()), "field_name", ToUpper(field->name())); @@ -277,7 +275,8 @@ void ImmutableMessageLiteGenerator::Generate(io::Printer* printer) { " default: return null;\n" " }\n" "}\n" - "@java.lang.Override\n" + // TODO(b/135620659): Rename this to "getFieldNumber" or something to + // disambiguate it from actual proto enums. "public int getNumber() {\n" " return this.value;\n" "}\n", @@ -367,7 +366,9 @@ void ImmutableMessageLiteGenerator::Generate(io::Printer* printer) { " synchronized ($classname$.class) {\n" " parser = PARSER;\n" " if (parser == null) {\n" - " parser = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);\n" + " parser =\n" + " new DefaultInstanceBasedParser<$classname$>(\n" + " DEFAULT_INSTANCE);\n" " PARSER = parser;\n" " }\n" " }\n" @@ -419,21 +420,18 @@ void ImmutableMessageLiteGenerator::Generate(io::Printer* printer) { printer->Print( "static {\n" + " $classname$ defaultInstance = new $classname$();\n" " // New instances are implicitly immutable so no need to make\n" " // immutable.\n" - " DEFAULT_INSTANCE = new $classname$();\n" + " DEFAULT_INSTANCE = defaultInstance;\n" + // Register the default instance in a map. This map will be used by + // experimental runtime to lookup default instance given a class instance + // without using Java reflection. + " com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(\n" + " $classname$.class, defaultInstance);\n" "}\n" "\n", "classname", descriptor_->name()); - // Register the default instance in a map. This map will be used by - // experimental runtime to lookup default instance given a class instance - // without using Java reflection. - printer->Print( - "static {\n" - " com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(\n" - " $classname$.class, DEFAULT_INSTANCE);\n" - "}\n", - "classname", descriptor_->name()); printer->Print( "public static $classname$ getDefaultInstance() {\n" @@ -476,7 +474,7 @@ void ImmutableMessageLiteGenerator::GenerateDynamicMethodNewBuildMessageInfo( std::vector chars; int flags = 0; - if (SupportFieldPresence(descriptor_->file())) { + if (IsProto2(descriptor_->file())) { flags |= 0x1; } if (descriptor_->options().message_set_wire_format()) { @@ -493,9 +491,8 @@ void ImmutableMessageLiteGenerator::GenerateDynamicMethodNewBuildMessageInfo( printer->Indent(); // Record the number of oneofs. - WriteIntToUtf16CharSequence(descriptor_->oneof_decl_count(), &chars); - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { - const OneofDescriptor* oneof = descriptor_->oneof_decl(i); + WriteIntToUtf16CharSequence(oneofs_.size(), &chars); + for (auto oneof : oneofs_) { printer->Print( "\"$oneof_name$_\",\n" "\"$oneof_name$Case_\",\n", @@ -719,7 +716,7 @@ void ImmutableMessageLiteGenerator::GenerateParser(io::Printer* printer) { // =================================================================== void ImmutableMessageLiteGenerator::GenerateInitializers(io::Printer* printer) { for (int i = 0; i < descriptor_->field_count(); i++) { - if (!descriptor_->field(i)->containing_oneof()) { + if (!IsRealOneof(descriptor_->field(i))) { field_generators_.get(descriptor_->field(i)) .GenerateInitializationCode(printer); } diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_name_resolver.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_name_resolver.cc index d07c628e..361cfa98 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_name_resolver.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_name_resolver.cc @@ -33,11 +33,9 @@ #include #include - #include #include - namespace google { namespace protobuf { namespace compiler { @@ -212,9 +210,9 @@ std::string ClassNameResolver::GetClassName(const FileDescriptor* descriptor, // or outer class name. std::string ClassNameResolver::GetClassFullName( const std::string& name_without_package, const FileDescriptor* file, - bool immutable, bool multiple_files) { + bool immutable, bool is_own_file) { std::string result; - if (multiple_files) { + if (is_own_file) { result = FileJavaPackage(file, immutable); } else { result = GetClassName(file, immutable); @@ -244,7 +242,7 @@ std::string ClassNameResolver::GetClassName(const ServiceDescriptor* descriptor, bool immutable) { return GetClassFullName(ClassNameWithoutPackage(descriptor, immutable), descriptor->file(), immutable, - MultipleJavaFiles(descriptor->file(), immutable)); + IsOwnFile(descriptor, immutable)); } // Get the Java Class style full name of a message. diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_name_resolver.h b/third_party/protobuf/src/google/protobuf/compiler/java/java_name_resolver.h index 89bcb597..b92570c6 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_name_resolver.h +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_name_resolver.h @@ -108,7 +108,7 @@ class ClassNameResolver { // or outer class name. std::string GetClassFullName(const std::string& name_without_package, const FileDescriptor* file, bool immutable, - bool multiple_files); + bool is_own_file); // Get the Java Class style full name of a message. std::string GetJavaClassFullName(const std::string& name_without_package, const FileDescriptor* file, bool immutable); diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_names.h b/third_party/protobuf/src/google/protobuf/compiler/java/java_names.h index a8efbb49..73a340e9 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_names.h +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_names.h @@ -90,7 +90,7 @@ std::string FileJavaPackage(const FileDescriptor* descriptor); // Requires: // descriptor != NULL // Returns: -// Captialized camel case name field name. +// Capitalized camel case name field name. std::string CapitalizedFieldName(const FieldDescriptor* descriptor); // Requires: diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc index 9aef29bd..2572aee7 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc @@ -46,7 +46,6 @@ #include #include - namespace google { namespace protobuf { namespace compiler { @@ -134,7 +133,7 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor, } (*variables)["on_changed"] = "onChanged();"; - if (SupportFieldPresence(descriptor->file())) { + if (SupportFieldPresence(descriptor)) { // For singular messages and builders, one bit is used for the hasField bit. (*variables)["get_has_field_bit_message"] = GenerateGetBit(messageBitIndex); (*variables)["get_has_field_bit_builder"] = GenerateGetBit(builderBitIndex); @@ -162,7 +161,7 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor, } } - // For repated builders, one bit is used for whether the array is immutable. + // For repeated builders, one bit is used for whether the array is immutable. (*variables)["get_mutable_bit_builder"] = GenerateGetBit(builderBitIndex); (*variables)["set_mutable_bit_builder"] = GenerateSetBit(builderBitIndex); (*variables)["clear_mutable_bit_builder"] = GenerateClearBit(builderBitIndex); @@ -196,7 +195,7 @@ ImmutablePrimitiveFieldGenerator::ImmutablePrimitiveFieldGenerator( ImmutablePrimitiveFieldGenerator::~ImmutablePrimitiveFieldGenerator() {} int ImmutablePrimitiveFieldGenerator::GetNumBitsForMessage() const { - return SupportFieldPresence(descriptor_->file()) ? 1 : 0; + return SupportFieldPresence(descriptor_) ? 1 : 0; } int ImmutablePrimitiveFieldGenerator::GetNumBitsForBuilder() const { @@ -205,12 +204,12 @@ int ImmutablePrimitiveFieldGenerator::GetNumBitsForBuilder() const { void ImmutablePrimitiveFieldGenerator::GenerateInterfaceMembers( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print(variables_, "$deprecation$boolean has$capitalized_name$();\n"); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$$type$ get$capitalized_name$();\n"); } @@ -218,18 +217,20 @@ void ImmutablePrimitiveFieldGenerator::GenerateMembers( io::Printer* printer) const { printer->Print(variables_, "private $field_type$ $name$_;\n"); PrintExtraFieldInfo(variables_, printer); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" " return $get_has_field_bit_message$;\n" "}\n"); printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" " return $name$_;\n" "}\n"); @@ -240,24 +241,27 @@ void ImmutablePrimitiveFieldGenerator::GenerateBuilderMembers( io::Printer* printer) const { printer->Print(variables_, "private $field_type$ $name$_ $default_init$;\n"); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" " return $get_has_field_bit_builder$;\n" "}\n"); printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" " return $name$_;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$set$capitalized_name$$}$($type$ value) {\n" @@ -269,7 +273,8 @@ void ImmutablePrimitiveFieldGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -291,6 +296,7 @@ void ImmutablePrimitiveFieldGenerator::GenerateBuilderMembers( "}\n"); } + void ImmutablePrimitiveFieldGenerator::GenerateFieldBuilderInitializationCode( io::Printer* printer) const { // noop for primitives @@ -312,7 +318,7 @@ void ImmutablePrimitiveFieldGenerator::GenerateBuilderClearCode( void ImmutablePrimitiveFieldGenerator::GenerateMergingCode( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { + if (SupportFieldPresence(descriptor_)) { printer->Print(variables_, "if (other.has$capitalized_name$()) {\n" " set$capitalized_name$(other.get$capitalized_name$());\n" @@ -327,7 +333,7 @@ void ImmutablePrimitiveFieldGenerator::GenerateMergingCode( void ImmutablePrimitiveFieldGenerator::GenerateBuildingCode( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { + if (SupportFieldPresence(descriptor_)) { if (IsDefaultValueJavaDefault(descriptor_)) { printer->Print(variables_, "if ($get_has_field_bit_from_local$) {\n" @@ -491,18 +497,20 @@ ImmutablePrimitiveOneofFieldGenerator:: void ImmutablePrimitiveOneofFieldGenerator::GenerateMembers( io::Printer* printer) const { PrintExtraFieldInfo(variables_, printer); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" " return $has_oneof_case_message$;\n" "}\n"); printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" " if ($has_oneof_case_message$) {\n" " return ($boxed_type$) $oneof_name$_;\n" @@ -514,8 +522,8 @@ void ImmutablePrimitiveOneofFieldGenerator::GenerateMembers( void ImmutablePrimitiveOneofFieldGenerator::GenerateBuilderMembers( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" @@ -524,7 +532,7 @@ void ImmutablePrimitiveOneofFieldGenerator::GenerateBuilderMembers( printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" " if ($has_oneof_case_message$) {\n" @@ -534,7 +542,8 @@ void ImmutablePrimitiveOneofFieldGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$set$capitalized_name$$}$($type$ value) {\n" @@ -546,7 +555,8 @@ void ImmutablePrimitiveOneofFieldGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -642,14 +652,14 @@ int RepeatedImmutablePrimitiveFieldGenerator::GetNumBitsForBuilder() const { void RepeatedImmutablePrimitiveFieldGenerator::GenerateInterfaceMembers( io::Printer* printer) const { - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "$deprecation$java.util.List<$boxed_type$> " "get$capitalized_name$List();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print(variables_, "$deprecation$int get$capitalized_name$Count();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$$type$ get$capitalized_name$(int index);\n"); } @@ -658,21 +668,22 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateMembers( io::Printer* printer) const { printer->Print(variables_, "private $field_list_type$ $name$_;\n"); PrintExtraFieldInfo(variables_, printer); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public java.util.List<$boxed_type$>\n" " ${$get$capitalized_name$List$}$() {\n" " return $name$_;\n" // note: unmodifiable list "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print( variables_, "$deprecation$public int ${$get$capitalized_name$Count$}$() {\n" " return $name$_.size();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print( variables_, "$deprecation$public $type$ ${$get$capitalized_name$$}$(int index) {\n" @@ -712,7 +723,7 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateBuilderMembers( // could hold on to the returned list and modify it after the message // has been built, thus mutating the message which is supposed to be // immutable. - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print( variables_, "$deprecation$public java.util.List<$boxed_type$>\n" @@ -721,21 +732,22 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateBuilderMembers( " java.util.Collections.unmodifiableList($name$_) : $name$_;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print( variables_, "$deprecation$public int ${$get$capitalized_name$Count$}$() {\n" " return $name$_.size();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print( variables_, "$deprecation$public $type$ ${$get$capitalized_name$$}$(int index) {\n" " return $repeated_get$(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$set$capitalized_name$$}$(\n" " int index, $type$ value) {\n" @@ -746,7 +758,8 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$add$capitalized_name$$}$($type$ value) {\n" @@ -757,7 +770,8 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$addAll$capitalized_name$$}$(\n" " java.lang.Iterable values) {\n" @@ -768,7 +782,8 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field_lite.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field_lite.cc index 880bd92d..53366b29 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field_lite.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field_lite.cc @@ -32,6 +32,8 @@ // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. +#include + #include #include @@ -41,12 +43,10 @@ #include #include #include -#include #include #include #include - namespace google { namespace protobuf { namespace compiler { @@ -125,10 +125,9 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor, } if (IsReferenceType(javaType)) { - (*variables)["null_check"] = - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n"; + // We use `x.getClass()` as a null check because it generates less bytecode + // than an `if (x == null) { throw ... }` statement. + (*variables)["null_check"] = " value.getClass();\n"; } else { (*variables)["null_check"] = ""; } @@ -141,7 +140,7 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor, (*variables)["fixed_size"] = StrCat(fixed_size); } - if (SupportFieldPresence(descriptor->file())) { + if (SupportFieldPresence(descriptor)) { // For singular messages and builders, one bit is used for the hasField bit. (*variables)["get_has_field_bit_message"] = GenerateGetBit(messageBitIndex); @@ -166,9 +165,6 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor, } } - // For repeated builders, the underlying list tracks mutability state. - (*variables)["is_mutable"] = (*variables)["name"] + "_.isModifiable()"; - (*variables)["get_has_field_bit_from_local"] = GenerateGetBitFromLocal(builderBitIndex); (*variables)["set_has_field_bit_to_local"] = @@ -192,17 +188,17 @@ ImmutablePrimitiveFieldLiteGenerator::ImmutablePrimitiveFieldLiteGenerator( ImmutablePrimitiveFieldLiteGenerator::~ImmutablePrimitiveFieldLiteGenerator() {} int ImmutablePrimitiveFieldLiteGenerator::GetNumBitsForMessage() const { - return SupportFieldPresence(descriptor_->file()) ? 1 : 0; + return SupportFieldPresence(descriptor_) ? 1 : 0; } void ImmutablePrimitiveFieldLiteGenerator::GenerateInterfaceMembers( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print(variables_, "$deprecation$boolean has$capitalized_name$();\n"); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$$type$ get$capitalized_name$();\n"); } @@ -217,8 +213,8 @@ void ImmutablePrimitiveFieldLiteGenerator::GenerateMembers( } printer->Print(variables_, "private $field_type$ $name$_;\n"); PrintExtraFieldInfo(variables_, printer); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "@java.lang.Override\n" @@ -228,7 +224,7 @@ void ImmutablePrimitiveFieldLiteGenerator::GenerateMembers( printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" @@ -236,7 +232,7 @@ void ImmutablePrimitiveFieldLiteGenerator::GenerateMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER); printer->Print(variables_, "private void set$capitalized_name$($type$ value) {\n" "$null_check$" @@ -244,7 +240,7 @@ void ImmutablePrimitiveFieldLiteGenerator::GenerateMembers( " $name$_ = value;\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER); printer->Print(variables_, "private void clear$capitalized_name$() {\n" " $clear_has_field_bit_message$\n"); @@ -263,8 +259,8 @@ void ImmutablePrimitiveFieldLiteGenerator::GenerateMembers( void ImmutablePrimitiveFieldLiteGenerator::GenerateBuilderMembers( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "@java.lang.Override\n" @@ -274,7 +270,7 @@ void ImmutablePrimitiveFieldLiteGenerator::GenerateBuilderMembers( printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" @@ -282,7 +278,8 @@ void ImmutablePrimitiveFieldLiteGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$set$capitalized_name$$}$($type$ value) {\n" @@ -292,7 +289,8 @@ void ImmutablePrimitiveFieldLiteGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -303,12 +301,13 @@ void ImmutablePrimitiveFieldLiteGenerator::GenerateBuilderMembers( printer->Annotate("{", "}", descriptor_); } + void ImmutablePrimitiveFieldLiteGenerator::GenerateFieldInfo( io::Printer* printer, std::vector* output) const { WriteIntToUtf16CharSequence(descriptor_->number(), output); WriteIntToUtf16CharSequence(GetExperimentalJavaFieldType(descriptor_), output); - if (SupportFieldPresence(descriptor_->file())) { + if (HasHasbit(descriptor_)) { WriteIntToUtf16CharSequence(messageBitIndex_, output); } printer->Print(variables_, "\"$name$_\",\n"); @@ -346,8 +345,8 @@ ImmutablePrimitiveOneofFieldLiteGenerator:: void ImmutablePrimitiveOneofFieldLiteGenerator::GenerateMembers( io::Printer* printer) const { PrintExtraFieldInfo(variables_, printer); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "@java.lang.Override\n" @@ -357,7 +356,7 @@ void ImmutablePrimitiveOneofFieldLiteGenerator::GenerateMembers( printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" @@ -368,7 +367,7 @@ void ImmutablePrimitiveOneofFieldLiteGenerator::GenerateMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER); printer->Print(variables_, "private void set$capitalized_name$($type$ value) {\n" "$null_check$" @@ -376,7 +375,7 @@ void ImmutablePrimitiveOneofFieldLiteGenerator::GenerateMembers( " $oneof_name$_ = value;\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER); printer->Print(variables_, "private void clear$capitalized_name$() {\n" " if ($has_oneof_case_message$) {\n" @@ -396,8 +395,8 @@ void ImmutablePrimitiveOneofFieldLiteGenerator::GenerateFieldInfo( void ImmutablePrimitiveOneofFieldLiteGenerator::GenerateBuilderMembers( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "@java.lang.Override\n" @@ -407,7 +406,7 @@ void ImmutablePrimitiveOneofFieldLiteGenerator::GenerateBuilderMembers( printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" @@ -415,7 +414,8 @@ void ImmutablePrimitiveOneofFieldLiteGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$set$capitalized_name$$}$($type$ value) {\n" @@ -425,7 +425,8 @@ void ImmutablePrimitiveOneofFieldLiteGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -459,14 +460,14 @@ int RepeatedImmutablePrimitiveFieldLiteGenerator::GetNumBitsForMessage() const { void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateInterfaceMembers( io::Printer* printer) const { - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "$deprecation$java.util.List<$boxed_type$> " "get$capitalized_name$List();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print(variables_, "$deprecation$int get$capitalized_name$Count();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$$type$ get$capitalized_name$(int index);\n"); } @@ -475,7 +476,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateMembers( io::Printer* printer) const { printer->Print(variables_, "private $field_list_type$ $name$_;\n"); PrintExtraFieldInfo(variables_, printer); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public java.util.List<$boxed_type$>\n" @@ -483,7 +484,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateMembers( " return $name$_;\n" // note: unmodifiable list "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print( variables_, "@java.lang.Override\n" @@ -491,7 +492,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateMembers( " return $name$_.size();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print( variables_, "@java.lang.Override\n" @@ -509,13 +510,15 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateMembers( printer->Print( variables_, "private void ensure$capitalized_name$IsMutable() {\n" - " if (!$is_mutable$) {\n" + // Use a temporary to avoid a redundant iget-object. + " $field_list_type$ tmp = $name$_;\n" + " if (!tmp.isModifiable()) {\n" " $name$_ =\n" - " com.google.protobuf.GeneratedMessageLite.mutableCopy($name$_);\n" + " com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);\n" " }\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER); printer->Print(variables_, "private void set$capitalized_name$(\n" " int index, $type$ value) {\n" @@ -523,14 +526,14 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateMembers( " ensure$capitalized_name$IsMutable();\n" " $repeated_set$(index, value);\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER); printer->Print(variables_, "private void add$capitalized_name$($type$ value) {\n" "$null_check$" " ensure$capitalized_name$IsMutable();\n" " $repeated_add$(value);\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER); printer->Print(variables_, "private void addAll$capitalized_name$(\n" " java.lang.Iterable values) {\n" @@ -538,7 +541,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateMembers( " com.google.protobuf.AbstractMessageLite.addAll(\n" " values, $name$_);\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER); printer->Print(variables_, "private void clear$capitalized_name$() {\n" " $name$_ = $empty_list$;\n" @@ -547,7 +550,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateMembers( void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateBuilderMembers( io::Printer* printer) const { - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public java.util.List<$boxed_type$>\n" @@ -556,7 +559,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateBuilderMembers( " instance.get$capitalized_name$List());\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print( variables_, "@java.lang.Override\n" @@ -564,7 +567,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateBuilderMembers( " return instance.get$capitalized_name$Count();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print( variables_, "@java.lang.Override\n" @@ -572,7 +575,8 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateBuilderMembers( " return instance.get$capitalized_name$(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$set$capitalized_name$$}$(\n" " int index, $type$ value) {\n" @@ -581,7 +585,8 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$add$capitalized_name$$}$($type$ value) {\n" @@ -590,7 +595,8 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$addAll$capitalized_name$$}$(\n" " java.lang.Iterable values) {\n" @@ -599,7 +605,8 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_service.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_service.cc index 17d8e707..e30d155e 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_service.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_service.cc @@ -41,7 +41,6 @@ #include #include - namespace google { namespace protobuf { namespace compiler { diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_string_field.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_string_field.cc index 6ebc3e27..8e1595b8 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_string_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_string_field.cc @@ -47,7 +47,6 @@ #include #include - namespace google { namespace protobuf { namespace compiler { @@ -91,7 +90,7 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor, descriptor->options().deprecated() ? "@java.lang.Deprecated " : ""; (*variables)["on_changed"] = "onChanged();"; - if (SupportFieldPresence(descriptor->file())) { + if (SupportFieldPresence(descriptor)) { // For singular messages and builders, one bit is used for the hasField bit. (*variables)["get_has_field_bit_message"] = GenerateGetBit(messageBitIndex); (*variables)["get_has_field_bit_builder"] = GenerateGetBit(builderBitIndex); @@ -148,7 +147,7 @@ ImmutableStringFieldGenerator::ImmutableStringFieldGenerator( ImmutableStringFieldGenerator::~ImmutableStringFieldGenerator() {} int ImmutableStringFieldGenerator::GetNumBitsForMessage() const { - return SupportFieldPresence(descriptor_->file()) ? 1 : 0; + return SupportFieldPresence(descriptor_) ? 1 : 0; } int ImmutableStringFieldGenerator::GetNumBitsForBuilder() const { @@ -158,7 +157,7 @@ int ImmutableStringFieldGenerator::GetNumBitsForBuilder() const { // A note about how strings are handled. This code used to just store a String // in the Message. This had two issues: // -// 1. It wouldn't roundtrip byte arrays that were not vaid UTF-8 encoded +// 1. It wouldn't roundtrip byte arrays that were not valid UTF-8 encoded // strings, but rather fields that were raw bytes incorrectly marked // as strings in the proto file. This is common because in the proto1 // syntax, string was the way to indicate bytes and C++ engineers can @@ -189,15 +188,15 @@ int ImmutableStringFieldGenerator::GetNumBitsForBuilder() const { // UnmodifiableLazyStringList. void ImmutableStringFieldGenerator::GenerateInterfaceMembers( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print(variables_, "$deprecation$boolean has$capitalized_name$();\n"); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$java.lang.String get$capitalized_name$();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$com.google.protobuf.ByteString\n" " get$capitalized_name$Bytes();\n"); @@ -208,19 +207,21 @@ void ImmutableStringFieldGenerator::GenerateMembers( printer->Print(variables_, "private volatile java.lang.Object $name$_;\n"); PrintExtraFieldInfo(variables_, printer); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" " return $get_has_field_bit_message$;\n" "}\n"); printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public java.lang.String ${$get$capitalized_name$$}$() {\n" " java.lang.Object ref = $name$_;\n" " if (ref instanceof java.lang.String) {\n" @@ -242,8 +243,9 @@ void ImmutableStringFieldGenerator::GenerateMembers( " return s;\n" " }\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public com.google.protobuf.ByteString\n" " ${$get$capitalized_name$Bytes$}$() {\n" " java.lang.Object ref = $name$_;\n" @@ -264,8 +266,8 @@ void ImmutableStringFieldGenerator::GenerateBuilderMembers( io::Printer* printer) const { printer->Print(variables_, "private java.lang.Object $name$_ $default_init$;\n"); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" @@ -274,7 +276,7 @@ void ImmutableStringFieldGenerator::GenerateBuilderMembers( printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, "$deprecation$public java.lang.String ${$get$capitalized_name$$}$() {\n" @@ -299,7 +301,7 @@ void ImmutableStringFieldGenerator::GenerateBuilderMembers( " }\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$public com.google.protobuf.ByteString\n" " ${$get$capitalized_name$Bytes$}$() {\n" @@ -316,7 +318,8 @@ void ImmutableStringFieldGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$set$capitalized_name$$}$(\n" " java.lang.String value) {\n" @@ -327,7 +330,8 @@ void ImmutableStringFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -342,7 +346,8 @@ void ImmutableStringFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$set$capitalized_name$Bytes$}$(\n" @@ -379,7 +384,7 @@ void ImmutableStringFieldGenerator::GenerateBuilderClearCode( void ImmutableStringFieldGenerator::GenerateMergingCode( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { + if (SupportFieldPresence(descriptor_)) { // Allow a slight breach of abstraction here in order to avoid forcing // all string fields to Strings when copying fields from a Message. printer->Print(variables_, @@ -399,7 +404,7 @@ void ImmutableStringFieldGenerator::GenerateMergingCode( void ImmutableStringFieldGenerator::GenerateBuildingCode( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { + if (SupportFieldPresence(descriptor_)) { printer->Print(variables_, "if ($get_has_field_bit_from_local$) {\n" " $set_has_field_bit_to_local$;\n" @@ -480,8 +485,8 @@ void ImmutableStringOneofFieldGenerator::GenerateMembers( io::Printer* printer) const { PrintExtraFieldInfo(variables_, printer); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" @@ -490,7 +495,7 @@ void ImmutableStringOneofFieldGenerator::GenerateMembers( printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, "$deprecation$public java.lang.String ${$get$capitalized_name$$}$() {\n" @@ -520,7 +525,7 @@ void ImmutableStringOneofFieldGenerator::GenerateMembers( " return s;\n" " }\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$public com.google.protobuf.ByteString\n" @@ -546,19 +551,21 @@ void ImmutableStringOneofFieldGenerator::GenerateMembers( void ImmutableStringOneofFieldGenerator::GenerateBuilderMembers( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" " return $has_oneof_case_message$;\n" "}\n"); printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, + "@java.lang.Override\n" "$deprecation$public java.lang.String ${$get$capitalized_name$$}$() {\n" " java.lang.Object ref $default_init$;\n" " if ($has_oneof_case_message$) {\n" @@ -586,8 +593,9 @@ void ImmutableStringOneofFieldGenerator::GenerateBuilderMembers( " }\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, + "@java.lang.Override\n" "$deprecation$public com.google.protobuf.ByteString\n" " ${$get$capitalized_name$Bytes$}$() {\n" " java.lang.Object ref $default_init$;\n" @@ -608,7 +616,8 @@ void ImmutableStringOneofFieldGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$set$capitalized_name$$}$(\n" " java.lang.String value) {\n" @@ -619,7 +628,8 @@ void ImmutableStringOneofFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -632,7 +642,8 @@ void ImmutableStringOneofFieldGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$set$capitalized_name$Bytes$}$(\n" @@ -723,7 +734,7 @@ int RepeatedImmutableStringFieldGenerator::GetNumBitsForBuilder() const { void RepeatedImmutableStringFieldGenerator::GenerateInterfaceMembers( io::Printer* printer) const { - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print( variables_, // NOTE: the same method in the implementation class actually returns @@ -734,14 +745,15 @@ void RepeatedImmutableStringFieldGenerator::GenerateInterfaceMembers( // with different return types exist in the compiled byte code. "$deprecation$java.util.List\n" " get$capitalized_name$List();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print(variables_, "$deprecation$int get$capitalized_name$Count();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print( variables_, "$deprecation$java.lang.String get$capitalized_name$(int index);\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, + LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$com.google.protobuf.ByteString\n" " get$capitalized_name$Bytes(int index);\n"); @@ -752,28 +764,29 @@ void RepeatedImmutableStringFieldGenerator::GenerateMembers( printer->Print(variables_, "private com.google.protobuf.LazyStringList $name$_;\n"); PrintExtraFieldInfo(variables_, printer); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "$deprecation$public com.google.protobuf.ProtocolStringList\n" " ${$get$capitalized_name$List$}$() {\n" " return $name$_;\n" // note: unmodifiable list "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print( variables_, "$deprecation$public int ${$get$capitalized_name$Count$}$() {\n" " return $name$_.size();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$public java.lang.String " "${$get$capitalized_name$$}$(int index) {\n" " return $name$_.get(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, + LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$public com.google.protobuf.ByteString\n" " ${$get$capitalized_name$Bytes$}$(int index) {\n" @@ -810,35 +823,37 @@ void RepeatedImmutableStringFieldGenerator::GenerateBuilderMembers( // could hold on to the returned list and modify it after the message // has been built, thus mutating the message which is supposed to be // immutable. - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "$deprecation$public com.google.protobuf.ProtocolStringList\n" " ${$get$capitalized_name$List$}$() {\n" " return $name$_.getUnmodifiableView();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print( variables_, "$deprecation$public int ${$get$capitalized_name$Count$}$() {\n" " return $name$_.size();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$public java.lang.String " "${$get$capitalized_name$$}$(int index) {\n" " return $name$_.get(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, + LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$public com.google.protobuf.ByteString\n" " ${$get$capitalized_name$Bytes$}$(int index) {\n" " return $name$_.getByteString(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$set$capitalized_name$$}$(\n" " int index, java.lang.String value) {\n" @@ -849,7 +864,8 @@ void RepeatedImmutableStringFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$add$capitalized_name$$}$(\n" " java.lang.String value) {\n" @@ -860,7 +876,8 @@ void RepeatedImmutableStringFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$addAll$capitalized_name$$}$(\n" " java.lang.Iterable values) {\n" @@ -871,7 +888,8 @@ void RepeatedImmutableStringFieldGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -882,7 +900,8 @@ void RepeatedImmutableStringFieldGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, LIST_ADDER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$add$capitalized_name$Bytes$}$(\n" diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_string_field_lite.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_string_field_lite.cc index 40868fac..432a7895 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_string_field_lite.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_string_field_lite.cc @@ -47,7 +47,6 @@ #include #include - namespace google { namespace protobuf { namespace compiler { @@ -76,10 +75,9 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor, StrCat(static_cast(WireFormat::MakeTag(descriptor))); (*variables)["tag_size"] = StrCat( WireFormat::TagSize(descriptor->number(), GetType(descriptor))); - (*variables)["null_check"] = - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n"; + // We use `x.getClass()` as a null check because it generates less bytecode + // than an `if (x == null) { throw ... }` statement. + (*variables)["null_check"] = " value.getClass();\n"; // TODO(birdo): Add @deprecated javadoc when generating javadoc is supported // by the proto compiler @@ -87,7 +85,7 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor, descriptor->options().deprecated() ? "@java.lang.Deprecated " : ""; (*variables)["required"] = descriptor->is_required() ? "true" : "false"; - if (SupportFieldPresence(descriptor->file())) { + if (SupportFieldPresence(descriptor)) { // For singular messages and builders, one bit is used for the hasField bit. (*variables)["get_has_field_bit_message"] = GenerateGetBit(messageBitIndex); @@ -106,9 +104,6 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor, "!" + (*variables)["name"] + "_.isEmpty()"; } - // For repeated builders, the underlying list tracks mutability state. - (*variables)["is_mutable"] = (*variables)["name"] + "_.isModifiable()"; - (*variables)["get_has_field_bit_from_local"] = GenerateGetBitFromLocal(builderBitIndex); (*variables)["set_has_field_bit_to_local"] = @@ -132,14 +127,14 @@ ImmutableStringFieldLiteGenerator::ImmutableStringFieldLiteGenerator( ImmutableStringFieldLiteGenerator::~ImmutableStringFieldLiteGenerator() {} int ImmutableStringFieldLiteGenerator::GetNumBitsForMessage() const { - return SupportFieldPresence(descriptor_->file()) ? 1 : 0; + return SupportFieldPresence(descriptor_) ? 1 : 0; } // A note about how strings are handled. In the SPEED and CODE_SIZE runtimes, // strings are not stored as java.lang.String in the Message because of two // issues: // -// 1. It wouldn't roundtrip byte arrays that were not vaid UTF-8 encoded +// 1. It wouldn't roundtrip byte arrays that were not valid UTF-8 encoded // strings, but rather fields that were raw bytes incorrectly marked // as strings in the proto file. This is common because in the proto1 // syntax, string was the way to indicate bytes and C++ engineers can @@ -162,15 +157,15 @@ int ImmutableStringFieldLiteGenerator::GetNumBitsForMessage() const { // shouldn't be necessary or used on devices. void ImmutableStringFieldLiteGenerator::GenerateInterfaceMembers( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print(variables_, "$deprecation$boolean has$capitalized_name$();\n"); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$java.lang.String get$capitalized_name$();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "$deprecation$com.google.protobuf.ByteString\n" " get$capitalized_name$Bytes();\n"); @@ -181,8 +176,8 @@ void ImmutableStringFieldLiteGenerator::GenerateMembers( printer->Print(variables_, "private java.lang.String $name$_;\n"); PrintExtraFieldInfo(variables_, printer); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "@java.lang.Override\n" @@ -192,7 +187,7 @@ void ImmutableStringFieldLiteGenerator::GenerateMembers( printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, "@java.lang.Override\n" @@ -200,7 +195,7 @@ void ImmutableStringFieldLiteGenerator::GenerateMembers( " return $name$_;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, "@java.lang.Override\n" @@ -210,7 +205,7 @@ void ImmutableStringFieldLiteGenerator::GenerateMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER); printer->Print(variables_, "private void set$capitalized_name$(\n" " java.lang.String value) {\n" @@ -218,7 +213,7 @@ void ImmutableStringFieldLiteGenerator::GenerateMembers( " $set_has_field_bit_message$\n" " $name$_ = value;\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER); printer->Print(variables_, "private void clear$capitalized_name$() {\n" " $clear_has_field_bit_message$\n" @@ -228,24 +223,23 @@ void ImmutableStringFieldLiteGenerator::GenerateMembers( " $name$_ = getDefaultInstance().get$capitalized_name$();\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, SETTER); printer->Print(variables_, "private void set$capitalized_name$Bytes(\n" - " com.google.protobuf.ByteString value) {\n" - "$null_check$"); + " com.google.protobuf.ByteString value) {\n"); if (CheckUtf8(descriptor_)) { printer->Print(variables_, " checkByteStringIsUtf8(value);\n"); } printer->Print(variables_, - " $set_has_field_bit_message$\n" " $name$_ = value.toStringUtf8();\n" + " $set_has_field_bit_message$\n" "}\n"); } void ImmutableStringFieldLiteGenerator::GenerateBuilderMembers( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "@java.lang.Override\n" @@ -255,7 +249,7 @@ void ImmutableStringFieldLiteGenerator::GenerateBuilderMembers( printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, "@java.lang.Override\n" @@ -264,7 +258,7 @@ void ImmutableStringFieldLiteGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public com.google.protobuf.ByteString\n" @@ -273,7 +267,8 @@ void ImmutableStringFieldLiteGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$set$capitalized_name$$}$(\n" " java.lang.String value) {\n" @@ -282,7 +277,8 @@ void ImmutableStringFieldLiteGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -292,7 +288,8 @@ void ImmutableStringFieldLiteGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$set$capitalized_name$Bytes$}$(\n" @@ -309,7 +306,7 @@ void ImmutableStringFieldLiteGenerator::GenerateFieldInfo( WriteIntToUtf16CharSequence(descriptor_->number(), output); WriteIntToUtf16CharSequence(GetExperimentalJavaFieldType(descriptor_), output); - if (SupportFieldPresence(descriptor_->file())) { + if (HasHasbit(descriptor_)) { WriteIntToUtf16CharSequence(messageBitIndex_, output); } printer->Print(variables_, "\"$name$_\",\n"); @@ -341,8 +338,8 @@ void ImmutableStringOneofFieldLiteGenerator::GenerateMembers( io::Printer* printer) const { PrintExtraFieldInfo(variables_, printer); - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "@java.lang.Override\n" @@ -352,7 +349,7 @@ void ImmutableStringOneofFieldLiteGenerator::GenerateMembers( printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, "@java.lang.Override\n" @@ -364,8 +361,8 @@ void ImmutableStringOneofFieldLiteGenerator::GenerateMembers( " return ref;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public com.google.protobuf.ByteString\n" @@ -378,7 +375,7 @@ void ImmutableStringOneofFieldLiteGenerator::GenerateMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER); printer->Print(variables_, "private void ${$set$capitalized_name$$}$(\n" " java.lang.String value) {\n" @@ -387,7 +384,7 @@ void ImmutableStringOneofFieldLiteGenerator::GenerateMembers( " $oneof_name$_ = value;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER); printer->Print(variables_, "private void ${$clear$capitalized_name$$}$() {\n" " if ($has_oneof_case_message$) {\n" @@ -397,18 +394,17 @@ void ImmutableStringOneofFieldLiteGenerator::GenerateMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, SETTER); printer->Print(variables_, "private void ${$set$capitalized_name$Bytes$}$(\n" - " com.google.protobuf.ByteString value) {\n" - "$null_check$"); + " com.google.protobuf.ByteString value) {\n"); printer->Annotate("{", "}", descriptor_); if (CheckUtf8(descriptor_)) { printer->Print(variables_, " checkByteStringIsUtf8(value);\n"); } printer->Print(variables_, - " $set_oneof_case_message$;\n" " $oneof_name$_ = value.toStringUtf8();\n" + " $set_oneof_case_message$;\n" "}\n"); } @@ -422,8 +418,8 @@ void ImmutableStringOneofFieldLiteGenerator::GenerateFieldInfo( void ImmutableStringOneofFieldLiteGenerator::GenerateBuilderMembers( io::Printer* printer) const { - if (SupportFieldPresence(descriptor_->file())) { - WriteFieldDocComment(printer, descriptor_); + if (SupportFieldPresence(descriptor_)) { + WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "@java.lang.Override\n" @@ -433,7 +429,7 @@ void ImmutableStringOneofFieldLiteGenerator::GenerateBuilderMembers( printer->Annotate("{", "}", descriptor_); } - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, "@java.lang.Override\n" @@ -442,7 +438,7 @@ void ImmutableStringOneofFieldLiteGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public com.google.protobuf.ByteString\n" @@ -451,7 +447,8 @@ void ImmutableStringOneofFieldLiteGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$set$capitalized_name$$}$(\n" " java.lang.String value) {\n" @@ -460,7 +457,8 @@ void ImmutableStringOneofFieldLiteGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -470,7 +468,8 @@ void ImmutableStringOneofFieldLiteGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, SETTER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$set$capitalized_name$Bytes$}$(\n" @@ -503,18 +502,18 @@ int RepeatedImmutableStringFieldLiteGenerator::GetNumBitsForMessage() const { void RepeatedImmutableStringFieldLiteGenerator::GenerateInterfaceMembers( io::Printer* printer) const { - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "$deprecation$java.util.List\n" " get$capitalized_name$List();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print(variables_, "$deprecation$int get$capitalized_name$Count();\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print( variables_, "$deprecation$java.lang.String get$capitalized_name$(int index);\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$com.google.protobuf.ByteString\n" " get$capitalized_name$Bytes(int index);\n"); @@ -527,7 +526,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateMembers( "private com.google.protobuf.Internal.ProtobufList " "$name$_;\n"); PrintExtraFieldInfo(variables_, printer); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public java.util.List " @@ -535,7 +534,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateMembers( " return $name$_;\n" // note: unmodifiable list "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print( variables_, "@java.lang.Override\n" @@ -543,7 +542,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateMembers( " return $name$_.size();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public java.lang.String " @@ -551,7 +550,8 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateMembers( " return $name$_.get(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, + LIST_INDEXED_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public com.google.protobuf.ByteString\n" @@ -564,13 +564,16 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateMembers( printer->Print( variables_, "private void ensure$capitalized_name$IsMutable() {\n" - " if (!$is_mutable$) {\n" + // Use a temporary to avoid a redundant iget-object. + " com.google.protobuf.Internal.ProtobufList tmp =\n" + " $name$_;" + " if (!tmp.isModifiable()) {\n" " $name$_ =\n" - " com.google.protobuf.GeneratedMessageLite.mutableCopy($name$_);\n" + " com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);\n" " }\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER); printer->Print(variables_, "private void set$capitalized_name$(\n" " int index, java.lang.String value) {\n" @@ -578,7 +581,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateMembers( " ensure$capitalized_name$IsMutable();\n" " $name$_.set(index, value);\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER); printer->Print(variables_, "private void add$capitalized_name$(\n" " java.lang.String value) {\n" @@ -586,7 +589,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateMembers( " ensure$capitalized_name$IsMutable();\n" " $name$_.add(value);\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER); printer->Print(variables_, "private void addAll$capitalized_name$(\n" " java.lang.Iterable values) {\n" @@ -594,17 +597,16 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateMembers( " com.google.protobuf.AbstractMessageLite.addAll(\n" " values, $name$_);\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER); printer->Print(variables_, "private void clear$capitalized_name$() {\n" " $name$_ = $empty_list$;\n" "}\n"); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, LIST_ADDER); printer->Print(variables_, "private void add$capitalized_name$Bytes(\n" - " com.google.protobuf.ByteString value) {\n" - "$null_check$"); + " com.google.protobuf.ByteString value) {\n"); if (CheckUtf8(descriptor_)) { printer->Print(variables_, " checkByteStringIsUtf8(value);\n"); } @@ -616,7 +618,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateMembers( void RepeatedImmutableStringFieldLiteGenerator::GenerateBuilderMembers( io::Printer* printer) const { - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public java.util.List\n" @@ -625,7 +627,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateBuilderMembers( " instance.get$capitalized_name$List());\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print( variables_, "@java.lang.Override\n" @@ -633,7 +635,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateBuilderMembers( " return instance.get$capitalized_name$Count();\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public java.lang.String " @@ -641,7 +643,8 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateBuilderMembers( " return instance.get$capitalized_name$(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, + LIST_INDEXED_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public com.google.protobuf.ByteString\n" @@ -649,7 +652,8 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateBuilderMembers( " return instance.get$capitalized_name$Bytes(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$set$capitalized_name$$}$(\n" " int index, java.lang.String value) {\n" @@ -658,7 +662,8 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$add$capitalized_name$$}$(\n" " java.lang.String value) {\n" @@ -667,7 +672,8 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER, + /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$addAll$capitalized_name$$}$(\n" " java.lang.Iterable values) {\n" @@ -676,7 +682,8 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateBuilderMembers( " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" @@ -686,7 +693,8 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateBuilderMembers( "}\n"); printer->Annotate("{", "}", descriptor_); - WriteFieldDocComment(printer, descriptor_); + WriteFieldStringBytesAccessorDocComment(printer, descriptor_, LIST_ADDER, + /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$add$capitalized_name$Bytes$}$(\n" diff --git a/third_party/protobuf/src/google/protobuf/compiler/js/js_generator.cc b/third_party/protobuf/src/google/protobuf/compiler/js/js_generator.cc index 7b12dde9..c1216f8c 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/js/js_generator.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/js/js_generator.cc @@ -43,7 +43,6 @@ #include #include #include - #include #include #include @@ -51,7 +50,6 @@ #include #include - namespace google { namespace protobuf { namespace compiler { @@ -125,8 +123,8 @@ std::string GetJSFilename(const GeneratorOptions& options, // Given a filename like foo/bar/baz.proto, returns the root directory // path ../../ -string GetRootPath(const std::string& from_filename, - const std::string& to_filename) { +std::string GetRootPath(const std::string& from_filename, + const std::string& 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 @@ -774,7 +772,7 @@ std::string PostProcessFloat(std::string result) { exponent = exponent.substr(1); } - return mantissa + "E" + string(exp_neg ? "-" : "") + exponent; + return mantissa + "E" + std::string(exp_neg ? "-" : "") + exponent; } // Otherwise, this is an ordinary decimal number. Append ".0" if result has no @@ -1118,9 +1116,6 @@ std::string JSBinaryWriterMethodName(const GeneratorOptions& options, JSBinaryReadWriteMethodName(field, /* is_writer = */ true); } -std::string JSReturnClause(const FieldDescriptor* desc) { - return ""; -} std::string JSTypeTag(const FieldDescriptor* desc) { switch (desc->type()) { @@ -1156,10 +1151,6 @@ std::string JSTypeTag(const FieldDescriptor* desc) { return ""; } -std::string JSReturnDoc(const GeneratorOptions& options, - const FieldDescriptor* desc) { - return ""; -} bool HasRepeatedFields(const GeneratorOptions& options, const Descriptor* desc) { @@ -1426,11 +1417,6 @@ bool HasFieldPresence(const GeneratorOptions& options, return false; } - if (UseBrokenPresenceSemantics(options, field)) { - // Proto3 files with broken presence semantics have field presence. - return true; - } - return field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE || field->containing_oneof() != NULL || field->file()->syntax() == FileDescriptor::SYNTAX_PROTO2; @@ -1651,7 +1637,11 @@ bool IsWellKnownTypeFile(const FileDescriptor* file) { } // 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" @@ -1689,6 +1679,27 @@ void Generator::FindProvides(const GeneratorOptions& options, printer->Print("\n"); } +void FindProvidesForOneOfEnum(const GeneratorOptions& options, + const OneofDescriptor* oneof, + std::set* provided) { + std::string 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* 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, @@ -1703,11 +1714,13 @@ void Generator::FindProvidesForMessage(const GeneratorOptions& options, 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, @@ -2279,11 +2292,11 @@ void Generator::GenerateFieldValueExpression(io::Printer* printer, field->cpp_type() == FieldDescriptor::CPPTYPE_DOUBLE; const bool is_boolean = field->cpp_type() == FieldDescriptor::CPPTYPE_BOOL; - const string with_default = use_default ? "WithDefault" : ""; - const string default_arg = + const std::string with_default = use_default ? "WithDefault" : ""; + const std::string default_arg = use_default ? StrCat(", ", JSFieldDefault(field)) : ""; - const string cardinality = field->is_repeated() ? "Repeated" : ""; - string type = ""; + const std::string cardinality = field->is_repeated() ? "Repeated" : ""; + std::string type = ""; if (is_float_or_double) { type = "FloatingPoint"; } @@ -2366,7 +2379,7 @@ void Generator::GenerateClassFieldToObject(const GeneratorOptions& options, 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() && !UseBrokenPresenceSemantics(options, field)) { + !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. @@ -2403,18 +2416,22 @@ void Generator::GenerateObjectTypedef(const GeneratorOptions& options, "method.\n" " * @record\n" " */\n" - "$typeName$ = function() {};\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" - "$typeName$.prototype.$fieldName$;\n\n", - "typeName", type_name, "fieldName", - JSObjectFieldName(options, desc->field(i)), + " /** @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, @@ -2646,30 +2663,31 @@ void Generator::GenerateClassField(const GeneratorOptions& options, (field->label() == FieldDescriptor::LABEL_REQUIRED ? ", 1" : "")); printer->Annotate("gettername", field); printer->Print( - "/** @param {$optionaltype$} value$returndoc$ */\n" + "/**\n" + " * @param {$optionaltype$} value\n" + " * @return {!$class$} returns this\n" + "*/\n" "$class$.prototype.$settername$ = function(value) {\n" - " jspb.Message.set$oneoftag$$repeatedtag$WrapperField(", + " return jspb.Message.set$oneoftag$$repeatedtag$WrapperField(", "optionaltype", JSFieldTypeAnnotation(options, field, /* is_setter_argument = */ true, /* force_present = */ false, /* singular_if_not_packed = */ false), - "returndoc", JSReturnDoc(options, field), "class", - GetMessagePath(options, field->containing_type()), "settername", - "set" + JSGetterName(options, field), "oneoftag", + "class", GetMessagePath(options, field->containing_type()), + "settername", "set" + JSGetterName(options, field), "oneoftag", (field->containing_oneof() ? "Oneof" : ""), "repeatedtag", (field->is_repeated() ? "Repeated" : "")); printer->Annotate("settername", field); printer->Print( - "this, $index$$oneofgroup$, value);$returnvalue$\n" + "this, $index$$oneofgroup$, value);\n" "};\n" "\n" "\n", "index", JSFieldIndex(field), "oneofgroup", (field->containing_oneof() ? (", " + JSOneofArray(options, field)) - : ""), - "returnvalue", JSReturnClause(field)); + : "")); if (field->is_repeated()) { GenerateRepeatedMessageHelperMethods(options, printer, field); @@ -2756,21 +2774,18 @@ void Generator::GenerateClassField(const GeneratorOptions& options, GenerateBytesWrapper(options, printer, field, BYTES_U8); } - if (untyped) { - printer->Print( - "/**\n" - " * @param {*} value$returndoc$\n" - " */\n", - "returndoc", JSReturnDoc(options, field)); - } else { - printer->Print( - "/** @param {$optionaltype$} value$returndoc$ */\n", "optionaltype", - JSFieldTypeAnnotation(options, field, - /* is_setter_argument = */ true, - /* force_present = */ false, - /* singular_if_not_packed = */ false), - "returndoc", JSReturnDoc(options, field)); - } + 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() && @@ -2779,28 +2794,28 @@ void Generator::GenerateClassField(const GeneratorOptions& options, // setProto3*Field function. printer->Print( "$class$.prototype.$settername$ = function(value) {\n" - " jspb.Message.setProto3$typetag$Field(this, $index$, " - "value);$returnvalue$\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), "returnvalue", - JSReturnClause(field)); + JSTypeTag(field), "index", JSFieldIndex(field)); printer->Annotate("settername", field); } else { // Otherwise, use the regular setField function. printer->Print( "$class$.prototype.$settername$ = function(value) {\n" - " jspb.Message.set$oneoftag$Field(this, $index$", + " return jspb.Message.set$oneoftag$Field(this, $index$", "class", GetMessagePath(options, field->containing_type()), "settername", "set" + JSGetterName(options, field), "oneoftag", (field->containing_oneof() ? "Oneof" : ""), "index", JSFieldIndex(field)); printer->Annotate("settername", field); printer->Print( - "$oneofgroup$, $type$value$rptvalueinit$$typeclose$);$returnvalue$\n" + "$oneofgroup$, $type$value$rptvalueinit$$typeclose$);\n" "};\n" "\n" "\n", @@ -2809,16 +2824,16 @@ void Generator::GenerateClassField(const GeneratorOptions& options, "typeclose", untyped ? ")" : "", "oneofgroup", (field->containing_oneof() ? (", " + JSOneofArray(options, field)) : ""), - "returnvalue", JSReturnClause(field), "rptvalueinit", - (field->is_repeated() ? " || []" : "")); + "rptvalueinit", (field->is_repeated() ? " || []" : "")); } if (untyped) { printer->Print( "/**\n" - " * Clears the value.$returndoc$\n" + " * Clears the value.\n" + " * @return {!$class$} returns this\n" " */\n", - "returndoc", JSReturnDoc(options, field)); + "class", GetMessagePath(options, field->containing_type())); } if (field->is_repeated()) { @@ -2832,19 +2847,18 @@ void Generator::GenerateClassField(const GeneratorOptions& options, // clang-format off printer->Print( "/**\n" - " * Clears values from the map. The map will be non-null." - "$returndoc$\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();$returnvalue$\n" + " this.$gettername$().clear();\n" + " return this;" "};\n" "\n" "\n", - "returndoc", JSReturnDoc(options, field), "class", GetMessagePath(options, field->containing_type()), "clearername", "clear" + JSGetterName(options, field), - "gettername", "get" + JSGetterName(options, field), - "returnvalue", JSReturnClause(field)); + "gettername", "get" + JSGetterName(options, field)); // clang-format on printer->Annotate("clearername", field); } else if (field->is_repeated() || @@ -2854,22 +2868,21 @@ void Generator::GenerateClassField(const GeneratorOptions& options, // clang-format off printer->Print( "/**\n" - " * $jsdoc$$returndoc$\n" + " * $jsdoc$\n" + " * @return {!$class$} returns this\n" " */\n" "$class$.prototype.$clearername$ = function() {\n" - " this.$settername$($clearedvalue$);$returnvalue$\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.", - "returndoc", JSReturnDoc(options, field), "class", GetMessagePath(options, field->containing_type()), "clearername", "clear" + JSGetterName(options, field), "settername", "set" + JSGetterName(options, field), - "clearedvalue", (field->is_repeated() ? "[]" : "undefined"), - "returnvalue", JSReturnClause(field)); + "clearedvalue", (field->is_repeated() ? "[]" : "undefined")); // clang-format on printer->Annotate("clearername", field); } else if (HasFieldPresence(options, field)) { @@ -2878,12 +2891,12 @@ void Generator::GenerateClassField(const GeneratorOptions& options, // clang-format off printer->Print( "/**\n" - " * Clears the field making it undefined.$returndoc$\n" + " * Clears the field making it undefined.\n" + " * @return {!$class$} returns this\n" " */\n" "$class$.prototype.$clearername$ = function() {\n" - " jspb.Message.set$maybeoneof$Field(this, " - "$index$$maybeoneofgroup$, ", - "returndoc", JSReturnDoc(options, field), + " return jspb.Message.set$maybeoneof$Field(this, " + "$index$$maybeoneofgroup$, ", "class", GetMessagePath(options, field->containing_type()), "clearername", "clear" + JSGetterName(options, field), "maybeoneof", (field->containing_oneof() ? "Oneof" : ""), @@ -2894,12 +2907,11 @@ void Generator::GenerateClassField(const GeneratorOptions& options, // clang-format on printer->Annotate("clearername", field); printer->Print( - "$clearedvalue$);$returnvalue$\n" + "$clearedvalue$);\n" "};\n" "\n" "\n", - "clearedvalue", (field->is_repeated() ? "[]" : "undefined"), - "returnvalue", JSReturnClause(field)); + "clearedvalue", (field->is_repeated() ? "[]" : "undefined")); } if (HasFieldPresence(options, field)) { @@ -2926,10 +2938,12 @@ void Generator::GenerateRepeatedPrimitiveHelperMethods( printer->Print( "/**\n" " * @param {$optionaltype$} value\n" - " * @param {number=} opt_index$returndoc$\n" + " * @param {number=} opt_index\n" + " * @return {!$class$} returns this\n" " */\n" "$class$.prototype.$addername$ = function(value, opt_index) {\n" - " jspb.Message.addToRepeatedField(this, $index$", + " return jspb.Message.addToRepeatedField(this, " + "$index$", "class", GetMessagePath(options, field->containing_type()), "addername", "add" + JSGetterName(options, field, BYTES_DEFAULT, /* drop_list = */ true), @@ -2941,20 +2955,18 @@ void Generator::GenerateRepeatedPrimitiveHelperMethods( /* singular_if_not_packed = */ false, BYTES_DEFAULT, /* force_singular = */ true), - "index", JSFieldIndex(field), - "returndoc", JSReturnDoc(options, field)); + "index", JSFieldIndex(field)); printer->Annotate("addername", field); printer->Print( "$oneofgroup$, $type$value$rptvalueinit$$typeclose$, " - "opt_index);$returnvalue$\n" + "opt_index);\n" "};\n" "\n" "\n", "type", untyped ? "/** @type{string|number|boolean|!Uint8Array} */(" : "", "typeclose", untyped ? ")" : "", "oneofgroup", (field->containing_oneof() ? (", " + JSOneofArray(options, field)) : ""), - "rptvalueinit", "", - "returnvalue", JSReturnClause(field)); + "rptvalueinit", ""); // clang-format on } @@ -3130,6 +3142,13 @@ void Generator::GenerateClassDeserializeBinaryField( 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 { @@ -3343,12 +3362,21 @@ void Generator::GenerateEnum(const GeneratorOptions& options, enumdesc->name()); printer->Annotate("name", enumdesc); + std::set used_name; + std::vector 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 == enumdesc->value_count() - 1) ? "" : ","); + (i == valid_index.back()) ? "" : ","); printer->Annotate("name", value); } @@ -3610,7 +3638,7 @@ bool Generator::GenerateFile(const FileDescriptor* file, void Generator::GenerateFile(const GeneratorOptions& options, io::Printer* printer, const FileDescriptor* file) const { - GenerateHeader(options, printer); + GenerateHeader(options, file, printer); // Generate "require" statements. if ((options.import_style == GeneratorOptions::kImportCommonJs || @@ -3704,7 +3732,12 @@ bool Generator::GenerateAll(const std::vector& files, options.GetFileNameExtension(); std::unique_ptr output(context->Open(filename)); GOOGLE_CHECK(output.get()); - io::Printer printer(output.get(), '$'); + GeneratedCodeInfo annotations; + io::AnnotationProtoCollector 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. @@ -3716,7 +3749,11 @@ bool Generator::GenerateAll(const std::vector& files, } } - GenerateHeader(options, &printer); + if (files.size() == 1) { + GenerateHeader(options, files[0], &printer); + } else { + GenerateHeader(options, nullptr, &printer); + } std::set provided; FindProvides(options, &printer, files, &provided); @@ -3736,6 +3773,9 @@ bool Generator::GenerateAll(const std::vector& files, if (printer.failed()) { return false; } + if (options.annotate_code) { + EmbedCodeAnnotations(annotations, &printer); + } } else if (options.output_mode() == GeneratorOptions::kOneOutputFilePerSCC) { std::set have_printed; SCCAnalyzer analyzer; @@ -3776,7 +3816,7 @@ bool Generator::GenerateAll(const std::vector& files, output.get(), '$', options.annotate_code ? &annotation_collector : nullptr); - GenerateHeader(options, &printer); + GenerateHeader(options, file, &printer); std::set provided; for (auto one_desc : scc->descriptors) { @@ -3829,7 +3869,7 @@ bool Generator::GenerateAll(const std::vector& files, output.get(), '$', options.annotate_code ? &annotation_collector : nullptr); - GenerateHeader(options, &printer); + GenerateHeader(options, file, &printer); std::set provided; FindProvidesForEnum(options, &printer, enumdesc, &provided); @@ -3861,7 +3901,7 @@ bool Generator::GenerateAll(const std::vector& files, output.get(), '$', options.annotate_code ? &annotation_collector : nullptr); - GenerateHeader(options, &printer); + GenerateHeader(options, file, &printer); std::set provided; std::vector fields; diff --git a/third_party/protobuf/src/google/protobuf/compiler/js/js_generator.h b/third_party/protobuf/src/google/protobuf/compiler/js/js_generator.h index 7895b0b0..49f19f6e 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/js/js_generator.h +++ b/third_party/protobuf/src/google/protobuf/compiler/js/js_generator.h @@ -157,7 +157,7 @@ class PROTOC_EXPORT Generator : public CodeGenerator { private: void GenerateHeader(const GeneratorOptions& options, - io::Printer* printer) const; + const FileDescriptor* file, io::Printer* printer) const; // Generate goog.provides() calls. void FindProvides(const GeneratorOptions& options, io::Printer* printer, diff --git a/third_party/protobuf/src/google/protobuf/compiler/main.cc b/third_party/protobuf/src/google/protobuf/compiler/main.cc index e1c539ae..5239e093 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/main.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/main.cc @@ -32,11 +32,10 @@ #include #include +#include #include #include - #include -#include #include #include #include @@ -70,17 +69,17 @@ int ProtobufMain(int argc, char* argv[]) { // Proto2 Python python::Generator py_generator; - cli.RegisterGenerator("--python_out", &py_generator, + cli.RegisterGenerator("--python_out", "--python_opt", &py_generator, "Generate Python source file."); // PHP php::Generator php_generator; - cli.RegisterGenerator("--php_out", &php_generator, + cli.RegisterGenerator("--php_out", "--php_opt", &php_generator, "Generate PHP source file."); // Ruby ruby::Generator rb_generator; - cli.RegisterGenerator("--ruby_out", &rb_generator, + cli.RegisterGenerator("--ruby_out", "--ruby_opt", &rb_generator, "Generate Ruby source file."); // CSharp @@ -95,7 +94,7 @@ int ProtobufMain(int argc, char* argv[]) { // JavaScript js::Generator js_generator; - cli.RegisterGenerator("--js_out", &js_generator, + cli.RegisterGenerator("--js_out", "--js_opt", &js_generator, "Generate JavaScript source."); return cli.Run(argc, argv); diff --git a/third_party/protobuf/src/google/protobuf/compiler/mock_code_generator.cc b/third_party/protobuf/src/google/protobuf/compiler/mock_code_generator.cc index 07760649..8b829017 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/mock_code_generator.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/mock_code_generator.cc @@ -33,13 +33,13 @@ #include #include + #include #include #include + #include - - #include #include #include @@ -51,8 +51,8 @@ #include #include #include -#include #include +#include #ifdef major #undef major @@ -87,6 +87,15 @@ MockCodeGenerator::MockCodeGenerator(const std::string& name) : name_(name) {} MockCodeGenerator::~MockCodeGenerator() {} +uint64 MockCodeGenerator::GetSupportedFeatures() const { + uint64 all_features = CodeGenerator::FEATURE_PROTO3_OPTIONAL; + return all_features & ~suppressed_features_; +} + +void MockCodeGenerator::SuppressFeatures(uint64 features) { + suppressed_features_ = features; +} + void MockCodeGenerator::ExpectGenerated( const std::string& name, const std::string& parameter, const std::string& insertions, const std::string& file, @@ -149,7 +158,7 @@ void CheckSingleAnnotation(const std::string& expected_file, } // anonymous namespace void MockCodeGenerator::CheckGeneratedAnnotations( - const string& name, const std::string& file, + const std::string& name, const std::string& file, const std::string& output_directory) { std::string file_content; GOOGLE_CHECK_OK( @@ -320,7 +329,7 @@ std::string MockCodeGenerator::GetOutputFileContent( const std::string& file, const std::string& parsed_file_list, const std::string& first_message_name) { return strings::Substitute("$0: $1, $2, $3, $4\n", generator_name, parameter, - file, first_message_name, parsed_file_list); + file, first_message_name, parsed_file_list); } } // namespace compiler diff --git a/third_party/protobuf/src/google/protobuf/compiler/mock_code_generator.h b/third_party/protobuf/src/google/protobuf/compiler/mock_code_generator.h index 082ba18d..70a840e6 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/mock_code_generator.h +++ b/third_party/protobuf/src/google/protobuf/compiler/mock_code_generator.h @@ -106,12 +106,15 @@ class MockCodeGenerator : public CodeGenerator { // implements CodeGenerator ---------------------------------------- - virtual bool Generate(const FileDescriptor* file, - const std::string& parameter, GeneratorContext* context, - std::string* error) const; + bool Generate(const FileDescriptor* file, const std::string& parameter, + GeneratorContext* context, std::string* error) const override; + + uint64 GetSupportedFeatures() const override; + void SuppressFeatures(uint64 features); private: std::string name_; + uint64 suppressed_features_ = 0; static std::string GetOutputFileContent(const std::string& generator_name, const std::string& parameter, diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc index 9890d0a1..3893801f 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc @@ -104,13 +104,13 @@ void EnumFieldGenerator::GenerateCFunctionImplementations( "int32_t $owning_message_class$_$capitalized_name$_RawValue($owning_message_class$ *message) {\n" " GPBDescriptor *descriptor = [$owning_message_class$ descriptor];\n" " GPBFieldDescriptor *field = [descriptor fieldWithNumber:$field_number_name$];\n" - " return GPBGetMessageInt32Field(message, field);\n" + " return GPBGetMessageRawEnumField(message, field);\n" "}\n" "\n" "void Set$owning_message_class$_$capitalized_name$_RawValue($owning_message_class$ *message, int32_t value) {\n" " GPBDescriptor *descriptor = [$owning_message_class$ descriptor];\n" " GPBFieldDescriptor *field = [descriptor fieldWithNumber:$field_number_name$];\n" - " GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);\n" + " GPBSetMessageRawEnumField(message, field, value);\n" "}\n" "\n"); } diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc index bf65de3b..b514b8a7 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc @@ -84,24 +84,24 @@ void ExtensionGenerator::GenerateStaticVariablesInitialization( io::Printer* printer) { std::map vars; vars["root_class_and_method_name"] = root_class_and_method_name_; - vars["extended_type"] = ClassName(descriptor_->containing_type()); + const string containing_type = ClassName(descriptor_->containing_type()); + vars["extended_type"] = ObjCClass(containing_type); vars["number"] = StrCat(descriptor_->number()); std::vector options; if (descriptor_->is_repeated()) options.push_back("GPBExtensionRepeated"); if (descriptor_->is_packed()) options.push_back("GPBExtensionPacked"); - if (descriptor_->containing_type()->options().message_set_wire_format()) + if (descriptor_->containing_type()->options().message_set_wire_format()) { options.push_back("GPBExtensionSetWireFormat"); - + } vars["options"] = BuildFlagsString(FLAGTYPE_EXTENSION, options); ObjectiveCType objc_type = GetObjectiveCType(descriptor_); - string singular_type; if (objc_type == OBJECTIVECTYPE_MESSAGE) { - vars["type"] = string("GPBStringifySymbol(") + - ClassName(descriptor_->message_type()) + ")"; + std::string message_type = ClassName(descriptor_->message_type()); + vars["type"] = ObjCClass(message_type); } else { - vars["type"] = "NULL"; + vars["type"] = "Nil"; } vars["default_name"] = GPBGenericValueFieldName(descriptor_); @@ -124,8 +124,8 @@ void ExtensionGenerator::GenerateStaticVariablesInitialization( "{\n" " .defaultValue.$default_name$ = $default$,\n" " .singletonName = GPBStringifySymbol($root_class_and_method_name$),\n" - " .extendedClass = GPBStringifySymbol($extended_type$),\n" - " .messageOrGroupClassName = $type$,\n" + " .extendedClass.clazz = $extended_type$,\n" + " .messageOrGroupClass.clazz = $type$,\n" " .enumDescriptorFunc = $enum_desc_func_name$,\n" " .fieldNumber = $number$,\n" " .dataType = $extension_type$,\n" @@ -133,11 +133,23 @@ void ExtensionGenerator::GenerateStaticVariablesInitialization( "},\n"); } +void ExtensionGenerator::DetermineObjectiveCClassDefinitions( + std::set* fwd_decls) { + string extended_type = ClassName(descriptor_->containing_type()); + fwd_decls->insert(ObjCClassDeclaration(extended_type)); + ObjectiveCType objc_type = GetObjectiveCType(descriptor_); + if (objc_type == OBJECTIVECTYPE_MESSAGE) { + string message_type = ClassName(descriptor_->message_type()); + fwd_decls->insert(ObjCClassDeclaration(message_type)); + } +} + void ExtensionGenerator::GenerateRegistrationSource(io::Printer* printer) { printer->Print( "[registry addExtension:$root_class_and_method_name$];\n", "root_class_and_method_name", root_class_and_method_name_); } + } // namespace objectivec } // namespace compiler } // namespace protobuf diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.h b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.h index d49a4f1c..1bc19d81 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.h +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.h @@ -51,6 +51,7 @@ class ExtensionGenerator { void GenerateMembersHeader(io::Printer* printer); void GenerateStaticVariablesInitialization(io::Printer* printer); void GenerateRegistrationSource(io::Printer* printer); + void DetermineObjectiveCClassDefinitions(std::set* fwd_decls); private: string method_name_; diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.cc b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.cc index f585941e..e8360a51 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.cc @@ -91,14 +91,22 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor, if (descriptor->type() == FieldDescriptor::TYPE_ENUM) { field_flags.push_back("GPBFieldHasEnumDescriptor"); } + // It will clear on a zero value if... + // - not repeated/map + // - doesn't have presence + bool clear_on_zero = + (!descriptor->is_repeated() && !descriptor->has_presence()); + if (clear_on_zero) { + field_flags.push_back("GPBFieldClearHasIvarOnZero"); + } (*variables)["fieldflags"] = BuildFlagsString(FLAGTYPE_FIELD, field_flags); (*variables)["default"] = DefaultValue(descriptor); (*variables)["default_name"] = GPBGenericValueFieldName(descriptor); - (*variables)["dataTypeSpecific_name"] = "className"; - (*variables)["dataTypeSpecific_value"] = "NULL"; + (*variables)["dataTypeSpecific_name"] = "clazz"; + (*variables)["dataTypeSpecific_value"] = "Nil"; (*variables)["storage_offset_value"] = "(uint32_t)offsetof(" + classname + "__storage_, " + camel_case_name + ")"; @@ -181,6 +189,11 @@ void FieldGenerator::DetermineForwardDeclarations( // Nothing } +void FieldGenerator::DetermineObjectiveCClassDefinitions( + std::set* fwd_decls) const { + // Nothing +} + void FieldGenerator::GenerateFieldDescription( io::Printer* printer, bool include_default) const { // Printed in the same order as the structure decl. @@ -233,13 +246,18 @@ void FieldGenerator::SetExtraRuntimeHasBitsBase(int index_base) { } void FieldGenerator::SetOneofIndexBase(int index_base) { - if (descriptor_->containing_oneof() != NULL) { - int index = descriptor_->containing_oneof()->index() + index_base; + const OneofDescriptor *oneof = descriptor_->real_containing_oneof(); + if (oneof != NULL) { + int index = oneof->index() + index_base; // Flip the sign to mark it as a oneof. variables_["has_index"] = StrCat(-index); } } +bool FieldGenerator::WantsHasProperty(void) const { + return descriptor_->has_presence() && !descriptor_->real_containing_oneof(); +} + void FieldGenerator::FinishInitialization(void) { // If "property_type" wasn't set, make it "storage_type". if ((variables_.find("property_type") == variables_.end()) && @@ -284,20 +302,8 @@ void SingleFieldGenerator::GeneratePropertyImplementation( } } -bool SingleFieldGenerator::WantsHasProperty(void) const { - if (descriptor_->containing_oneof() != NULL) { - // If in a oneof, it uses the oneofcase instead of a has bit. - return false; - } - if (HasFieldPresence(descriptor_->file())) { - // In proto1/proto2, every field has a has_$name$() method. - return true; - } - return false; -} - bool SingleFieldGenerator::RuntimeUsesHasBit(void) const { - if (descriptor_->containing_oneof() != NULL) { + if (descriptor_->real_containing_oneof()) { // The oneof tracks what is set instead. return false; } @@ -397,13 +403,8 @@ void RepeatedFieldGenerator::GeneratePropertyDeclaration( printer->Print("\n"); } -bool RepeatedFieldGenerator::WantsHasProperty(void) const { - // Consumer check the array size/existance rather than a has bit. - return false; -} - bool RepeatedFieldGenerator::RuntimeUsesHasBit(void) const { - return false; // The array having anything is what is used. + return false; // The array (or map/dict) having anything is what is used. } FieldGeneratorMap::FieldGeneratorMap(const Descriptor* descriptor, diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.h b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.h index 24465d0a..2ebe55b2 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.h @@ -66,6 +66,7 @@ class FieldGenerator { // Exposed for subclasses, should always call it on the parent class also. virtual void DetermineForwardDeclarations(std::set* fwd_decls) const; + virtual void DetermineObjectiveCClassDefinitions(std::set* fwd_decls) const; // Used during generation, not intended to be extended by subclasses. void GenerateFieldDescription( @@ -95,7 +96,7 @@ class FieldGenerator { FieldGenerator(const FieldDescriptor* descriptor, const Options& options); virtual void FinishInitialization(void); - virtual bool WantsHasProperty(void) const = 0; + bool WantsHasProperty(void) const; const FieldDescriptor* descriptor_; std::map variables_; @@ -118,7 +119,6 @@ class SingleFieldGenerator : public FieldGenerator { protected: SingleFieldGenerator(const FieldDescriptor* descriptor, const Options& options); - virtual bool WantsHasProperty(void) const; }; // Subclass with common support for when the field ends up as an ObjC Object. @@ -155,7 +155,6 @@ class RepeatedFieldGenerator : public ObjCObjFieldGenerator { RepeatedFieldGenerator(const FieldDescriptor* descriptor, const Options& options); virtual void FinishInitialization(void); - virtual bool WantsHasProperty(void) const; }; // Convenience class which constructs FieldGenerators for a Descriptor. diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.cc b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.cc index d4a4d708..04733ca2 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.cc @@ -52,7 +52,7 @@ namespace objectivec { namespace { // This is also found in GPBBootstrap.h, and needs to be kept in sync. -const int32 GOOGLE_PROTOBUF_OBJC_VERSION = 30002; +const int32 GOOGLE_PROTOBUF_OBJC_VERSION = 30004; const char* kHeaderExtension = ".pbobjc.h"; @@ -192,27 +192,21 @@ FileGenerator::FileGenerator(const FileDescriptor *file, const Options& options) options_(options) { for (int i = 0; i < file_->enum_type_count(); i++) { EnumGenerator *generator = new EnumGenerator(file_->enum_type(i)); - enum_generators_.push_back(generator); + enum_generators_.emplace_back(generator); } for (int i = 0; i < file_->message_type_count(); i++) { MessageGenerator *generator = new MessageGenerator(root_class_name_, file_->message_type(i), options_); - message_generators_.push_back(generator); + message_generators_.emplace_back(generator); } for (int i = 0; i < file_->extension_count(); i++) { ExtensionGenerator *generator = new ExtensionGenerator(root_class_name_, file_->extension(i)); - extension_generators_.push_back(generator); + extension_generators_.emplace_back(generator); } } -FileGenerator::~FileGenerator() { - STLDeleteContainerPointers(enum_generators_.begin(), enum_generators_.end()); - STLDeleteContainerPointers(message_generators_.begin(), - message_generators_.end()); - STLDeleteContainerPointers(extension_generators_.begin(), - extension_generators_.end()); -} +FileGenerator::~FileGenerator() {} void FileGenerator::GenerateHeader(io::Printer *printer) { std::set headers; @@ -270,9 +264,8 @@ void FileGenerator::GenerateHeader(io::Printer *printer) { "\n"); std::set fwd_decls; - for (std::vector::iterator iter = message_generators_.begin(); - iter != message_generators_.end(); ++iter) { - (*iter)->DetermineForwardDeclarations(&fwd_decls); + for (const auto& generator : message_generators_) { + generator->DetermineForwardDeclarations(&fwd_decls); } for (std::set::const_iterator i(fwd_decls.begin()); i != fwd_decls.end(); ++i) { @@ -287,14 +280,12 @@ void FileGenerator::GenerateHeader(io::Printer *printer) { "\n"); // need to write out all enums first - for (std::vector::iterator iter = enum_generators_.begin(); - iter != enum_generators_.end(); ++iter) { - (*iter)->GenerateHeader(printer); + for (const auto& generator : enum_generators_) { + generator->GenerateHeader(printer); } - for (std::vector::iterator iter = message_generators_.begin(); - iter != message_generators_.end(); ++iter) { - (*iter)->GenerateEnumHeader(printer); + for (const auto& generator : message_generators_) { + generator->GenerateEnumHeader(printer); } // For extensions to chain together, the Root gets created even if there @@ -312,29 +303,26 @@ void FileGenerator::GenerateHeader(io::Printer *printer) { " * which is a @c GPBExtensionRegistry that includes all the extensions defined by\n" " * this file and all files that it depends on.\n" " **/\n" - "@interface $root_class_name$ : GPBRootObject\n" + "GPB_FINAL @interface $root_class_name$ : GPBRootObject\n" "@end\n" "\n", "root_class_name", root_class_name_); - if (extension_generators_.size() > 0) { + if (!extension_generators_.empty()) { // The dynamic methods block is only needed if there are extensions. printer->Print( "@interface $root_class_name$ (DynamicMethods)\n", "root_class_name", root_class_name_); - for (std::vector::iterator iter = - extension_generators_.begin(); - iter != extension_generators_.end(); ++iter) { - (*iter)->GenerateMembersHeader(printer); + for (const auto& generator : extension_generators_) { + generator->GenerateMembersHeader(printer); } printer->Print("@end\n\n"); - } // extension_generators_.size() > 0 + } // !extension_generators_.empty() - for (std::vector::iterator iter = message_generators_.begin(); - iter != message_generators_.end(); ++iter) { - (*iter)->GenerateMessageHeader(printer); + for (const auto& generator : message_generators_) { + generator->GenerateMessageHeader(printer); } printer->Print( @@ -403,18 +391,27 @@ void FileGenerator::GenerateSource(io::Printer *printer) { } bool includes_oneof = false; - for (std::vector::iterator iter = message_generators_.begin(); - iter != message_generators_.end(); ++iter) { - if ((*iter)->IncludesOneOfDefinition()) { + for (const auto& generator : message_generators_) { + if (generator->IncludesOneOfDefinition()) { includes_oneof = true; break; } } + std::set fwd_decls; + for (const auto& generator : message_generators_) { + generator->DetermineObjectiveCClassDefinitions(&fwd_decls); + } + for (const auto& generator : extension_generators_) { + generator->DetermineObjectiveCClassDefinitions(&fwd_decls); + } + // Note: // deprecated-declarations suppression is only needed if some place in this // proto file is something deprecated or if it references something from // another file that is deprecated. + // dollar-in-identifier-extension is needed because we use references to + // objc class names that have $ in identifiers. printer->Print( "// @@protoc_insertion_point(imports)\n" "\n" @@ -427,9 +424,26 @@ void FileGenerator::GenerateSource(io::Printer *printer) { printer->Print( "#pragma clang diagnostic ignored \"-Wdirect-ivar-access\"\n"); } - + if (!fwd_decls.empty()) { + printer->Print( + "#pragma clang diagnostic ignored \"-Wdollar-in-identifier-extension\"\n"); + } + printer->Print( + "\n"); + if (!fwd_decls.empty()) { + printer->Print( + "#pragma mark - Objective C Class declarations\n" + "// Forward declarations of Objective C classes that we can use as\n" + "// static values in struct initializers.\n" + "// We don't use [Foo class] because it is not a static value.\n"); + } + for (const auto& i : fwd_decls) { + printer->Print("$value$\n", "value", i); + } + if (!fwd_decls.empty()) { + printer->Print("\n"); + } printer->Print( - "\n" "#pragma mark - $root_class_name$\n" "\n" "@implementation $root_class_name$\n\n", @@ -456,22 +470,19 @@ void FileGenerator::GenerateSource(io::Printer *printer) { printer->Print( "static GPBExtensionDescription descriptions[] = {\n"); printer->Indent(); - for (std::vector::iterator iter = - extension_generators_.begin(); - iter != extension_generators_.end(); ++iter) { - (*iter)->GenerateStaticVariablesInitialization(printer); + for (const auto& generator : extension_generators_) { + generator->GenerateStaticVariablesInitialization(printer); } - for (std::vector::iterator iter = - message_generators_.begin(); - iter != message_generators_.end(); ++iter) { - (*iter)->GenerateStaticVariablesInitialization(printer); + for (const auto& generator : message_generators_) { + generator->GenerateStaticVariablesInitialization(printer); } printer->Outdent(); printer->Print( "};\n" "for (size_t i = 0; i < sizeof(descriptions) / sizeof(descriptions[0]); ++i) {\n" " GPBExtensionDescriptor *extension =\n" - " [[GPBExtensionDescriptor alloc] initWithExtensionDescription:&descriptions[i]];\n" + " [[GPBExtensionDescriptor alloc] initWithExtensionDescription:&descriptions[i]\n" + " usesClassRefs:YES];\n" " [registry addExtension:extension];\n" " [self globallyRegisterExtension:extension];\n" " [extension release];\n" @@ -517,7 +528,7 @@ void FileGenerator::GenerateSource(io::Printer *printer) { printer->Print("\n@end\n\n"); // File descriptor only needed if there are messages to use it. - if (message_generators_.size() > 0) { + if (!message_generators_.empty()) { std::map vars; vars["root_class_name"] = root_class_name_; vars["package"] = file_->package(); @@ -542,7 +553,7 @@ void FileGenerator::GenerateSource(io::Printer *printer) { " static GPBFileDescriptor *descriptor = NULL;\n" " if (!descriptor) {\n" " GPB_DEBUG_CHECK_RUNTIME_VERSIONS();\n"); - if (vars["objc_prefix"].size() > 0) { + if (!vars["objc_prefix"].empty()) { printer->Print( vars, " descriptor = [[GPBFileDescriptor alloc] initWithPackage:@\"$package$\"\n" @@ -561,13 +572,11 @@ void FileGenerator::GenerateSource(io::Printer *printer) { "\n"); } - for (std::vector::iterator iter = enum_generators_.begin(); - iter != enum_generators_.end(); ++iter) { - (*iter)->GenerateSource(printer); + for (const auto& generator : enum_generators_) { + generator->GenerateSource(printer); } - for (std::vector::iterator iter = message_generators_.begin(); - iter != message_generators_.end(); ++iter) { - (*iter)->GenerateSource(printer); + for (const auto& generator : message_generators_) { + generator->GenerateSource(printer); } printer->Print( diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.h b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.h index ed7fad80..fd572634 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.h +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.h @@ -65,9 +65,9 @@ class FileGenerator { string root_class_name_; bool is_bundled_proto_; - std::vector enum_generators_; - std::vector message_generators_; - std::vector extension_generators_; + std::vector> enum_generators_; + std::vector> message_generators_; + std::vector> extension_generators_; const Options options_; diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_generator.h b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_generator.h index d10efc20..b09e2b2d 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_generator.h +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_generator.h @@ -57,15 +57,19 @@ class PROTOC_EXPORT ObjectiveCGenerator : public CodeGenerator { ObjectiveCGenerator& operator=(const ObjectiveCGenerator&) = delete; // implements CodeGenerator ---------------------------------------- - bool HasGenerateAll() const; + bool HasGenerateAll() const override; bool Generate(const FileDescriptor* file, const string& parameter, GeneratorContext* context, - string* error) const; + string* error) const override; bool GenerateAll(const std::vector& files, const string& parameter, GeneratorContext* context, - string* error) const; + string* error) const override; + + uint64 GetSupportedFeatures() const override { + return FEATURE_PROTO3_OPTIONAL; + } }; } // namespace objectivec diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc index e8d6d9e1..df11689f 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc @@ -48,7 +48,8 @@ #include #include #include -#include +#include +#include #include // NOTE: src/google/protobuf/compiler/plugin.cc makes use of cerr for some @@ -584,6 +585,14 @@ string OneofNameCapitalized(const OneofDescriptor* descriptor) { return result; } +string ObjCClass(const string& class_name) { + return string("GPBObjCClass(") + class_name + ")"; +} + +string ObjCClassDeclaration(const string& class_name) { + return string("GPBObjCClassDeclaration(") + class_name + ");"; +} + string UnCamelCaseFieldName(const string& name, const FieldDescriptor* field) { string worker(name); if (HasSuffixString(worker, "_p")) { @@ -909,7 +918,7 @@ bool HasNonZeroDefaultValue(const FieldDescriptor* field) { string BuildFlagsString(const FlagType flag_type, const std::vector& strings) { - if (strings.size() == 0) { + if (strings.empty()) { return GetZeroEnumNameForFlagType(flag_type); } else if (strings.size() == 1) { return strings[0]; @@ -931,12 +940,12 @@ string BuildCommentsString(const SourceLocation& location, ? location.trailing_comments : location.leading_comments; std::vector lines; - SplitStringAllowEmpty(comments, "\n", &lines); + lines = Split(comments, "\n", false); while (!lines.empty() && lines.back().empty()) { lines.pop_back(); } // If there are no comments, just return an empty string. - if (lines.size() == 0) { + if (lines.empty()) { return ""; } @@ -1292,14 +1301,14 @@ class DecodeDataBuilder { } private: - static const uint8 kAddUnderscore = 0x80; + static constexpr uint8 kAddUnderscore = 0x80; - static const uint8 kOpAsIs = 0x00; - static const uint8 kOpFirstUpper = 0x40; - static const uint8 kOpFirstLower = 0x20; - static const uint8 kOpAllUpper = 0x60; + static constexpr uint8 kOpAsIs = 0x00; + static constexpr uint8 kOpFirstUpper = 0x40; + static constexpr uint8 kOpFirstLower = 0x20; + static constexpr uint8 kOpAllUpper = 0x60; - static const int kMaxSegmentLen = 0x1f; + static constexpr int kMaxSegmentLen = 0x1f; void AddChar(const char desired) { ++segment_len_; @@ -1396,7 +1405,7 @@ string DirectDecodeString(const string& str) { // static string TextFormatDecodeData::DecodeDataForString(const string& input_for_decode, const string& desired_output) { - if ((input_for_decode.size() == 0) || (desired_output.size() == 0)) { + if (input_for_decode.empty() || desired_output.empty()) { std::cerr << "error: got empty string for making TextFormat data, input: \"" << input_for_decode << "\", desired: \"" << desired_output << "\"." << std::endl; @@ -1506,7 +1515,7 @@ bool Parser::ParseLoop() { ++line_; RemoveComment(&line); TrimWhitespace(&line); - if (line.size() == 0) { + if (line.empty()) { continue; // Blank line. } if (!line_consumer_->ConsumeLine(line, &error_str_)) { @@ -1569,16 +1578,15 @@ ImportWriter::~ImportWriter() {} void ImportWriter::AddFile(const FileDescriptor* file, const string& header_extension) { - const string file_path(FilePath(file)); - if (IsProtobufLibraryBundledProtoFile(file)) { // The imports of the WKTs are only needed within the library itself, // in other cases, they get skipped because the generated code already // import GPBProtocolBuffers.h and hence proves them. if (include_wkt_imports_) { - protobuf_framework_imports_.push_back( - FilePathBasename(file) + header_extension); - protobuf_non_framework_imports_.push_back(file_path + header_extension); + const string header_name = + "GPB" + FilePathBasename(file) + header_extension; + protobuf_framework_imports_.push_back(header_name); + protobuf_non_framework_imports_.push_back(header_name); } return; } @@ -1604,7 +1612,7 @@ void ImportWriter::AddFile(const FileDescriptor* file, return; } - other_imports_.push_back(file_path + header_extension); + other_imports_.push_back(FilePath(file) + header_extension); } void ImportWriter::Print(io::Printer* printer) const { @@ -1613,7 +1621,7 @@ void ImportWriter::Print(io::Printer* printer) const { bool add_blank_line = false; - if (protobuf_framework_imports_.size() > 0) { + if (!protobuf_framework_imports_.empty()) { const string framework_name(ProtobufLibraryFrameworkName); const string cpp_symbol(ProtobufFrameworkImportSymbol(framework_name)); @@ -1641,7 +1649,7 @@ void ImportWriter::Print(io::Printer* printer) const { add_blank_line = true; } - if (other_framework_imports_.size() > 0) { + if (!other_framework_imports_.empty()) { if (add_blank_line) { printer->Print("\n"); } @@ -1656,7 +1664,7 @@ void ImportWriter::Print(io::Printer* printer) const { add_blank_line = true; } - if (other_imports_.size() > 0) { + if (!other_imports_.empty()) { if (add_blank_line) { printer->Print("\n"); } @@ -1708,7 +1716,7 @@ bool ImportWriter::ProtoFrameworkCollector::ConsumeLine( StringPiece proto_file = proto_file_list.substr(start, offset - start); TrimWhitespace(&proto_file); - if (proto_file.size() != 0) { + if (!proto_file.empty()) { std::map::iterator existing_entry = map_->find(string(proto_file)); if (existing_entry != map_->end()) { diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h index 98ec7db8..5f91f4e4 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h @@ -118,9 +118,13 @@ string PROTOC_EXPORT OneofEnumName(const OneofDescriptor* descriptor); string PROTOC_EXPORT OneofName(const OneofDescriptor* descriptor); string PROTOC_EXPORT OneofNameCapitalized(const OneofDescriptor* descriptor); -inline bool HasFieldPresence(const FileDescriptor* file) { - return file->syntax() != FileDescriptor::SYNTAX_PROTO3; -} +// Returns a symbol that can be used in C code to refer to an Objective C +// class without initializing the class. +string PROTOC_EXPORT ObjCClass(const string& class_name); + +// Declares an Objective C class without initializing the class so that it can +// be refrerred to by ObjCClass. +string PROTOC_EXPORT ObjCClassDeclaration(const string& class_name); inline bool HasPreservingUnknownEnumSemantics(const FileDescriptor* file) { return file->syntax() == FileDescriptor::SYNTAX_PROTO3; diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc index 6abad8bd..545660db 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc @@ -85,9 +85,9 @@ MapFieldGenerator::MapFieldGenerator(const FieldDescriptor* descriptor, const Options& options) : RepeatedFieldGenerator(descriptor, options) { const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); + descriptor->message_type()->map_key(); const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); + descriptor->message_type()->map_value(); value_field_generator_.reset(FieldGenerator::Make(value_descriptor, options)); // Pull over some variables_ from the value. @@ -112,6 +112,7 @@ MapFieldGenerator::MapFieldGenerator(const FieldDescriptor* descriptor, if (value_field_flags.find("GPBFieldHasEnumDescriptor") != string::npos) { field_flags.push_back("GPBFieldHasEnumDescriptor"); } + variables_["fieldflags"] = BuildFlagsString(FLAGTYPE_FIELD, field_flags); ObjectiveCType value_objc_type = GetObjectiveCType(value_descriptor); @@ -170,6 +171,17 @@ void MapFieldGenerator::DetermineForwardDeclarations( } } +void MapFieldGenerator::DetermineObjectiveCClassDefinitions( + std::set* fwd_decls) const { + // Class name is already in "storage_type". + const FieldDescriptor* value_descriptor = + descriptor_->message_type()->FindFieldByName("value"); + if (GetObjectiveCType(value_descriptor) == OBJECTIVECTYPE_MESSAGE) { + fwd_decls->insert(ObjCClassDeclaration( + value_field_generator_->variable("storage_type"))); + } +} + } // namespace objectivec } // namespace compiler diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.h b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.h index c3085019..da18d579 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.h @@ -54,6 +54,7 @@ class MapFieldGenerator : public RepeatedFieldGenerator { MapFieldGenerator(const FieldDescriptor* descriptor, const Options& options); virtual ~MapFieldGenerator(); + virtual void DetermineObjectiveCClassDefinitions(std::set* fwd_decls) const; virtual void DetermineForwardDeclarations(std::set* fwd_decls) const; private: diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.cc b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.cc index a9e84539..0684021c 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.cc @@ -50,9 +50,6 @@ namespace protobuf { namespace compiler { namespace objectivec { -using internal::WireFormat; -using internal::WireFormatLite; - namespace { struct FieldOrderingByNumber { inline bool operator()(const FieldDescriptor* a, @@ -184,18 +181,18 @@ MessageGenerator::MessageGenerator(const string& root_classname, GetOptionalDeprecatedAttribute(descriptor, descriptor->file(), false, true)) { for (int i = 0; i < descriptor_->extension_count(); i++) { - extension_generators_.push_back( + extension_generators_.emplace_back( new ExtensionGenerator(class_name_, descriptor_->extension(i))); } - for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { + for (int i = 0; i < descriptor_->real_oneof_decl_count(); i++) { OneofGenerator* generator = new OneofGenerator(descriptor_->oneof_decl(i)); - oneof_generators_.push_back(generator); + oneof_generators_.emplace_back(generator); } for (int i = 0; i < descriptor_->enum_type_count(); i++) { EnumGenerator* generator = new EnumGenerator(descriptor_->enum_type(i)); - enum_generators_.push_back(generator); + enum_generators_.emplace_back(generator); } for (int i = 0; i < descriptor_->nested_type_count(); i++) { @@ -203,32 +200,20 @@ MessageGenerator::MessageGenerator(const string& root_classname, new MessageGenerator(root_classname_, descriptor_->nested_type(i), options); - nested_message_generators_.push_back(generator); + nested_message_generators_.emplace_back(generator); } } -MessageGenerator::~MessageGenerator() { - STLDeleteContainerPointers(extension_generators_.begin(), - extension_generators_.end()); - STLDeleteContainerPointers(enum_generators_.begin(), enum_generators_.end()); - STLDeleteContainerPointers(nested_message_generators_.begin(), - nested_message_generators_.end()); - STLDeleteContainerPointers(oneof_generators_.begin(), - oneof_generators_.end()); -} +MessageGenerator::~MessageGenerator() {} void MessageGenerator::GenerateStaticVariablesInitialization( io::Printer* printer) { - for (std::vector::iterator iter = - extension_generators_.begin(); - iter != extension_generators_.end(); ++iter) { - (*iter)->GenerateStaticVariablesInitialization(printer); + for (const auto& generator : extension_generators_) { + generator->GenerateStaticVariablesInitialization(printer); } - for (std::vector::iterator iter = - nested_message_generators_.begin(); - iter != nested_message_generators_.end(); ++iter) { - (*iter)->GenerateStaticVariablesInitialization(printer); + for (const auto& generator : nested_message_generators_) { + generator->GenerateStaticVariablesInitialization(printer); } } @@ -241,10 +226,32 @@ void MessageGenerator::DetermineForwardDeclarations(std::set* fwd_decls) } } - for (std::vector::iterator iter = - nested_message_generators_.begin(); - iter != nested_message_generators_.end(); ++iter) { - (*iter)->DetermineForwardDeclarations(fwd_decls); + for (const auto& generator : nested_message_generators_) { + generator->DetermineForwardDeclarations(fwd_decls); + } +} + +void MessageGenerator::DetermineObjectiveCClassDefinitions(std::set* fwd_decls) { + if (!IsMapEntryMessage(descriptor_)) { + for (int i = 0; i < descriptor_->field_count(); i++) { + const FieldDescriptor* fieldDescriptor = descriptor_->field(i); + field_generators_.get(fieldDescriptor) + .DetermineObjectiveCClassDefinitions(fwd_decls); + } + } + + for (const auto& generator : extension_generators_) { + generator->DetermineObjectiveCClassDefinitions(fwd_decls); + } + + for (const auto& generator : nested_message_generators_) { + generator->DetermineObjectiveCClassDefinitions(fwd_decls); + } + + const Descriptor* containing_descriptor = descriptor_->containing_type(); + if (containing_descriptor != NULL) { + string containing_class = ClassName(containing_descriptor); + fwd_decls->insert(ObjCClassDeclaration(containing_class)); } } @@ -253,10 +260,8 @@ bool MessageGenerator::IncludesOneOfDefinition() const { return true; } - for (std::vector::const_iterator iter = - nested_message_generators_.begin(); - iter != nested_message_generators_.end(); ++iter) { - if ((*iter)->IncludesOneOfDefinition()) { + for (const auto& generator : nested_message_generators_) { + if (generator->IncludesOneOfDefinition()) { return true; } } @@ -265,40 +270,31 @@ bool MessageGenerator::IncludesOneOfDefinition() const { } void MessageGenerator::GenerateEnumHeader(io::Printer* printer) { - for (std::vector::iterator iter = enum_generators_.begin(); - iter != enum_generators_.end(); ++iter) { - (*iter)->GenerateHeader(printer); + for (const auto& generator : enum_generators_) { + generator->GenerateHeader(printer); } - for (std::vector::iterator iter = - nested_message_generators_.begin(); - iter != nested_message_generators_.end(); ++iter) { - (*iter)->GenerateEnumHeader(printer); + for (const auto& generator : nested_message_generators_) { + generator->GenerateEnumHeader(printer); } } void MessageGenerator::GenerateExtensionRegistrationSource( io::Printer* printer) { - for (std::vector::iterator iter = - extension_generators_.begin(); - iter != extension_generators_.end(); ++iter) { - (*iter)->GenerateRegistrationSource(printer); + for (const auto& generator : extension_generators_) { + generator->GenerateRegistrationSource(printer); } - for (std::vector::iterator iter = - nested_message_generators_.begin(); - iter != nested_message_generators_.end(); ++iter) { - (*iter)->GenerateExtensionRegistrationSource(printer); + for (const auto& generator : nested_message_generators_) { + generator->GenerateExtensionRegistrationSource(printer); } } void MessageGenerator::GenerateMessageHeader(io::Printer* printer) { // This a a map entry message, just recurse and do nothing directly. if (IsMapEntryMessage(descriptor_)) { - for (std::vector::iterator iter = - nested_message_generators_.begin(); - iter != nested_message_generators_.end(); ++iter) { - (*iter)->GenerateMessageHeader(printer); + for (const auto& generator : nested_message_generators_) { + generator->GenerateMessageHeader(printer); } return; } @@ -325,9 +321,8 @@ void MessageGenerator::GenerateMessageHeader(io::Printer* printer) { printer->Print("};\n\n"); } - for (std::vector::iterator iter = oneof_generators_.begin(); - iter != oneof_generators_.end(); ++iter) { - (*iter)->GenerateCaseEnum(printer); + for (const auto& generator : oneof_generators_) { + generator->GenerateCaseEnum(printer); } string message_comments; @@ -339,16 +334,17 @@ void MessageGenerator::GenerateMessageHeader(io::Printer* printer) { } printer->Print( - "$comments$$deprecated_attribute$@interface $classname$ : GPBMessage\n\n", + "$comments$$deprecated_attribute$GPB_FINAL @interface $classname$ : GPBMessage\n\n", "classname", class_name_, "deprecated_attribute", deprecated_attribute_, "comments", message_comments); - std::vector seen_oneofs(descriptor_->oneof_decl_count(), 0); + std::vector seen_oneofs(oneof_generators_.size(), 0); for (int i = 0; i < descriptor_->field_count(); i++) { const FieldDescriptor* field = descriptor_->field(i); - if (field->containing_oneof() != NULL) { - const int oneof_index = field->containing_oneof()->index(); + const OneofDescriptor *oneof = field->real_containing_oneof(); + if (oneof) { + const int oneof_index = oneof->index(); if (!seen_oneofs[oneof_index]) { seen_oneofs[oneof_index] = 1; oneof_generators_[oneof_index]->GeneratePublicCasePropertyDeclaration( @@ -366,9 +362,8 @@ void MessageGenerator::GenerateMessageHeader(io::Printer* printer) { } if (!oneof_generators_.empty()) { - for (std::vector::iterator iter = oneof_generators_.begin(); - iter != oneof_generators_.end(); ++iter) { - (*iter)->GenerateClearFunctionDeclaration(printer); + for (const auto& generator : oneof_generators_) { + generator->GenerateClearFunctionDeclaration(printer); } printer->Print("\n"); } @@ -376,18 +371,14 @@ void MessageGenerator::GenerateMessageHeader(io::Printer* printer) { if (descriptor_->extension_count() > 0) { printer->Print("@interface $classname$ (DynamicMethods)\n\n", "classname", class_name_); - for (std::vector::iterator iter = - extension_generators_.begin(); - iter != extension_generators_.end(); ++iter) { - (*iter)->GenerateMembersHeader(printer); + for (const auto& generator : extension_generators_) { + generator->GenerateMembersHeader(printer); } printer->Print("@end\n\n"); } - for (std::vector::iterator iter = - nested_message_generators_.begin(); - iter != nested_message_generators_.end(); ++iter) { - (*iter)->GenerateMessageHeader(printer); + for (const auto& generator : nested_message_generators_) { + generator->GenerateMessageHeader(printer); } } @@ -409,9 +400,8 @@ void MessageGenerator::GenerateSource(io::Printer* printer) { printer->Print("@implementation $classname$\n\n", "classname", class_name_); - for (std::vector::iterator iter = oneof_generators_.begin(); - iter != oneof_generators_.end(); ++iter) { - (*iter)->GeneratePropertyImplementation(printer); + for (const auto& generator : oneof_generators_) { + generator->GeneratePropertyImplementation(printer); } for (int i = 0; i < descriptor_->field_count(); i++) { @@ -425,6 +415,7 @@ void MessageGenerator::GenerateSource(io::Printer* printer) { SortFieldsByStorageSize(descriptor_)); std::vector sorted_extensions; + sorted_extensions.reserve(descriptor_->extension_range_count()); for (int i = 0; i < descriptor_->extension_range_count(); ++i) { sorted_extensions.push_back(descriptor_->extension_range(i)); } @@ -447,14 +438,13 @@ void MessageGenerator::GenerateSource(io::Printer* printer) { sizeof_has_storage = 1; } // Tell all the fields the oneof base. - for (std::vector::iterator iter = oneof_generators_.begin(); - iter != oneof_generators_.end(); ++iter) { - (*iter)->SetOneofIndexBase(sizeof_has_storage); + for (const auto& generator : oneof_generators_) { + generator->SetOneofIndexBase(sizeof_has_storage); } field_generators_.SetOneofIndexBase(sizeof_has_storage); // sizeof_has_storage needs enough bits for the single fields that aren't in // any oneof, and then one int32 for each oneof (to store the field number). - sizeof_has_storage += descriptor_->oneof_decl_count(); + sizeof_has_storage += oneof_generators_.size(); printer->Print( "\n" @@ -490,12 +480,12 @@ void MessageGenerator::GenerateSource(io::Printer* printer) { field_description_type = "GPBMessageFieldDescription"; } if (has_fields) { + printer->Indent(); + printer->Indent(); printer->Print( - " static $field_description_type$ fields[] = {\n", + "static $field_description_type$ fields[] = {\n", "field_description_type", field_description_type); printer->Indent(); - printer->Indent(); - printer->Indent(); for (int i = 0; i < descriptor_->field_count(); ++i) { const FieldGenerator& field_generator = field_generators_.get(sorted_fields[i]); @@ -507,10 +497,10 @@ void MessageGenerator::GenerateSource(io::Printer* printer) { } } printer->Outdent(); - printer->Outdent(); - printer->Outdent(); printer->Print( - " };\n"); + "};\n"); + printer->Outdent(); + printer->Outdent(); } std::map vars; @@ -525,6 +515,8 @@ void MessageGenerator::GenerateSource(io::Printer* printer) { } std::vector init_flags; + init_flags.push_back("GPBDescriptorInitializationFlag_UsesClassRefs"); + init_flags.push_back("GPBDescriptorInitializationFlag_Proto3OptionalKnown"); if (need_defaults) { init_flags.push_back("GPBDescriptorInitializationFlag_FieldsWithDefault"); } @@ -544,14 +536,12 @@ void MessageGenerator::GenerateSource(io::Printer* printer) { " fieldCount:$fields_count$\n" " storageSize:sizeof($classname$__storage_)\n" " flags:$init_flags$];\n"); - if (oneof_generators_.size() != 0) { + if (!oneof_generators_.empty()) { printer->Print( " static const char *oneofs[] = {\n"); - for (std::vector::iterator iter = oneof_generators_.begin(); - iter != oneof_generators_.end(); ++iter) { - printer->Print( - " \"$name$\",\n", - "name", (*iter)->DescriptorName()); + for (const auto& generator : oneof_generators_) { + printer->Print(" \"$name$\",\n", "name", + generator->DescriptorName()); } printer->Print( " };\n" @@ -577,7 +567,7 @@ void MessageGenerator::GenerateSource(io::Printer* printer) { " [localDescriptor setupExtraTextInfo:extraTextFormatInfo];\n" "#endif // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS\n"); } - if (sorted_extensions.size() != 0) { + if (!sorted_extensions.empty()) { printer->Print( " static const GPBExtensionRange ranges[] = {\n"); for (int i = 0; i < sorted_extensions.size(); i++) { @@ -591,14 +581,15 @@ void MessageGenerator::GenerateSource(io::Printer* printer) { " count:(uint32_t)(sizeof(ranges) / sizeof(GPBExtensionRange))];\n"); } if (descriptor_->containing_type() != NULL) { - string parent_class_name = ClassName(descriptor_->containing_type()); + string containing_class = ClassName(descriptor_->containing_type()); + string parent_class_ref = ObjCClass(containing_class); printer->Print( - " [localDescriptor setupContainingMessageClassName:GPBStringifySymbol($parent_name$)];\n", - "parent_name", parent_class_name); + " [localDescriptor setupContainingMessageClass:$parent_class_ref$];\n", + "parent_class_ref", parent_class_ref); } string suffix_added; ClassName(descriptor_, &suffix_added); - if (suffix_added.size() > 0) { + if (!suffix_added.empty()) { printer->Print( " [localDescriptor setupMessageClassNameSuffix:@\"$suffix$\"];\n", "suffix", suffix_added); @@ -624,21 +615,17 @@ void MessageGenerator::GenerateSource(io::Printer* printer) { .GenerateCFunctionImplementations(printer); } - for (std::vector::iterator iter = oneof_generators_.begin(); - iter != oneof_generators_.end(); ++iter) { - (*iter)->GenerateClearFunctionImplementation(printer); + for (const auto& generator : oneof_generators_) { + generator->GenerateClearFunctionImplementation(printer); } } - for (std::vector::iterator iter = enum_generators_.begin(); - iter != enum_generators_.end(); ++iter) { - (*iter)->GenerateSource(printer); + for (const auto& generator : enum_generators_) { + generator->GenerateSource(printer); } - for (std::vector::iterator iter = - nested_message_generators_.begin(); - iter != nested_message_generators_.end(); ++iter) { - (*iter)->GenerateSource(printer); + for (const auto& generator : nested_message_generators_) { + generator->GenerateSource(printer); } } diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.h b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.h index 1d41628f..138e6202 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.h +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.h @@ -63,6 +63,7 @@ class MessageGenerator { void GenerateMessageHeader(io::Printer* printer); void GenerateSource(io::Printer* printer); void GenerateExtensionRegistrationSource(io::Printer* printer); + void DetermineObjectiveCClassDefinitions(std::set* fwd_decls); void DetermineForwardDeclarations(std::set* fwd_decls); // Checks if the message or a nested message includes a oneof definition. @@ -85,10 +86,10 @@ class MessageGenerator { FieldGeneratorMap field_generators_; const string class_name_; const string deprecated_attribute_; - std::vector extension_generators_; - std::vector enum_generators_; - std::vector nested_message_generators_; - std::vector oneof_generators_; + std::vector> extension_generators_; + std::vector> enum_generators_; + std::vector> nested_message_generators_; + std::vector> oneof_generators_; }; } // namespace objectivec diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc index 8a0299e7..7bf33f4c 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc @@ -46,13 +46,13 @@ namespace { void SetMessageVariables(const FieldDescriptor* descriptor, std::map* variables) { const string& message_type = ClassName(descriptor->message_type()); + const string& containing_class = ClassName(descriptor->containing_type()); (*variables)["type"] = message_type; - (*variables)["containing_class"] = ClassName(descriptor->containing_type()); + (*variables)["containing_class"] = containing_class; (*variables)["storage_type"] = message_type; (*variables)["group_or_message"] = (descriptor->type() == FieldDescriptor::TYPE_GROUP) ? "Group" : "Message"; - - (*variables)["dataTypeSpecific_value"] = "GPBStringifySymbol(" + message_type + ")"; + (*variables)["dataTypeSpecific_value"] = ObjCClass(message_type); } } // namespace @@ -72,14 +72,9 @@ void MessageFieldGenerator::DetermineForwardDeclarations( fwd_decls->insert("@class " + variable("storage_type")); } -bool MessageFieldGenerator::WantsHasProperty(void) const { - if (descriptor_->containing_oneof() != NULL) { - // If in a oneof, it uses the oneofcase instead of a has bit. - return false; - } - // In both proto2 & proto3, message fields have a has* property to tell - // when it is a non default value. - return true; +void MessageFieldGenerator::DetermineObjectiveCClassDefinitions( + std::set* fwd_decls) const { + fwd_decls->insert(ObjCClassDeclaration(variable("storage_type"))); } RepeatedMessageFieldGenerator::RepeatedMessageFieldGenerator( @@ -100,6 +95,10 @@ void RepeatedMessageFieldGenerator::DetermineForwardDeclarations( fwd_decls->insert("@class " + variable("storage_type")); } +void RepeatedMessageFieldGenerator::DetermineObjectiveCClassDefinitions( + std::set* fwd_decls) const { + fwd_decls->insert(ObjCClassDeclaration(variable("storage_type"))); +} } // namespace objectivec } // namespace compiler diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.h b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.h index 98d45794..a53c4a54 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.h +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.h @@ -52,10 +52,10 @@ class MessageFieldGenerator : public ObjCObjFieldGenerator { MessageFieldGenerator& operator=(const MessageFieldGenerator&) = delete; virtual ~MessageFieldGenerator(); - virtual bool WantsHasProperty(void) const; public: virtual void DetermineForwardDeclarations(std::set* fwd_decls) const; + virtual void DetermineObjectiveCClassDefinitions(std::set* fwd_decls) const; }; class RepeatedMessageFieldGenerator : public RepeatedFieldGenerator { @@ -72,6 +72,7 @@ class RepeatedMessageFieldGenerator : public RepeatedFieldGenerator { public: virtual void DetermineForwardDeclarations(std::set* fwd_decls) const; + virtual void DetermineObjectiveCClassDefinitions(std::set* fwd_decls) const; }; } // namespace objectivec diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc index 5b37c4e9..badebf55 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc @@ -120,9 +120,9 @@ void OneofGenerator::GenerateClearFunctionImplementation(io::Printer* printer) { printer->Print( variables_, "void $owning_message_class$_Clear$capitalized_name$OneOfCase($owning_message_class$ *message) {\n" - " GPBDescriptor *descriptor = [message descriptor];\n" + " GPBDescriptor *descriptor = [$owning_message_class$ descriptor];\n" " GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:$raw_index$];\n" - " GPBMaybeClearOneof(message, oneof, $index$, 0);\n" + " GPBClearOneof(message, oneof);\n" "}\n"); } diff --git a/third_party/protobuf/src/google/protobuf/compiler/parser.cc b/third_party/protobuf/src/google/protobuf/compiler/parser.cc index 235c1024..d92cd558 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/parser.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/parser.cc @@ -34,23 +34,24 @@ // // Recursive descent FTW. +#include + #include + #include #include - - -#include +#include #include #include #include -#include #include #include #include #include #include #include +#include namespace google { namespace protobuf { @@ -120,7 +121,7 @@ bool IsLowercase(char c) { return c >= 'a' && c <= 'z'; } bool IsNumber(char c) { return c >= '0' && c <= '9'; } -bool IsUpperCamelCase(const string& name) { +bool IsUpperCamelCase(const std::string& name) { if (name.empty()) { return true; } @@ -137,7 +138,7 @@ bool IsUpperCamelCase(const string& name) { return true; } -bool IsUpperUnderscore(const string& name) { +bool IsUpperUnderscore(const std::string& name) { for (int i = 0; i < name.length(); i++) { const char c = name[i]; if (!IsUppercase(c) && c != '_' && !IsNumber(c)) { @@ -147,7 +148,7 @@ bool IsUpperUnderscore(const string& name) { return true; } -bool IsLowerUnderscore(const string& name) { +bool IsLowerUnderscore(const std::string& name) { for (int i = 0; i < name.length(); i++) { const char c = name[i]; if (!IsLowercase(c) && c != '_' && !IsNumber(c)) { @@ -157,6 +158,16 @@ bool IsLowerUnderscore(const string& name) { return true; } +bool IsNumberFollowUnderscore(const std::string& name) { + for (int i = 1; i < name.length(); i++) { + const char c = name[i]; + if (IsNumber(c) && name[i - 1] == '_') { + return true; + } + } + return false; +} + } // anonymous namespace // Makes code slightly more readable. The meaning of "DO(foo)" is @@ -214,7 +225,7 @@ bool Parser::Consume(const char* text) { if (TryConsume(text)) { return true; } else { - AddError("Expected \"" + string(text) + "\"."); + AddError("Expected \"" + std::string(text) + "\"."); return false; } } @@ -360,7 +371,7 @@ bool Parser::ConsumeEndOfDeclaration(const char* text, if (TryConsumeEndOfDeclaration(text, location)) { return true; } else { - AddError("Expected \"" + string(text) + "\"."); + AddError("Expected \"" + std::string(text) + "\"."); return false; } } @@ -378,7 +389,7 @@ void Parser::AddError(const std::string& error) { AddError(input_->current().line, input_->current().column, error); } -void Parser::AddWarning(const string& warning) { +void Parser::AddWarning(const std::string& warning) { if (error_collector_ != nullptr) { error_collector_->AddWarning(input_->current().line, input_->current().column, warning); @@ -468,7 +479,7 @@ void Parser::LocationRecorder::RecordLegacyLocation( } void Parser::LocationRecorder::RecordLegacyImportLocation( - const Message* descriptor, const string& name) { + const Message* descriptor, const std::string& name) { if (parser_->source_location_table_ != nullptr) { parser_->source_location_table_->AddImport( descriptor, name, location_->span(0), location_->span(1)); @@ -756,6 +767,43 @@ bool Parser::ParseMessageDefinition( } } DO(ParseMessageBlock(message, message_location, containing_file)); + + if (syntax_identifier_ == "proto3") { + // Add synthetic one-field oneofs for optional fields, except messages which + // already have presence in proto3. + // + // We have to make sure the oneof names don't conflict with any other + // field or oneof. + std::unordered_set names; + for (const auto& field : message->field()) { + names.insert(field.name()); + } + for (const auto& oneof : message->oneof_decl()) { + names.insert(oneof.name()); + } + + for (auto& field : *message->mutable_field()) { + if (field.proto3_optional()) { + std::string oneof_name = field.name(); + + // Prepend 'XXXXX_' until we are no longer conflicting. + // Avoid prepending a double-underscore because such names are + // reserved in C++. + if (oneof_name.empty() || oneof_name[0] != '_') { + oneof_name = '_' + oneof_name; + } + while (names.count(oneof_name) > 0) { + oneof_name = 'X' + oneof_name; + } + + names.insert(oneof_name); + field.set_oneof_index(message->oneof_decl_size()); + OneofDescriptorProto* oneof = message->add_oneof_decl(); + oneof->set_name(oneof_name); + } + } + } + return true; } @@ -893,17 +941,12 @@ bool Parser::ParseMessageField(FieldDescriptorProto* field, const LocationRecorder& field_location, const FileDescriptorProto* containing_file) { { - LocationRecorder location(field_location, - FieldDescriptorProto::kLabelFieldNumber); FieldDescriptorProto::Label label; - if (ParseLabel(&label, containing_file)) { + if (ParseLabel(&label, field_location, containing_file)) { field->set_label(label); if (label == FieldDescriptorProto::LABEL_OPTIONAL && syntax_identifier_ == "proto3") { - AddError( - "Explicit 'optional' labels are disallowed in the Proto3 syntax. " - "To define 'optional' fields in Proto3, simply remove the " - "'optional' label, as fields are 'optional' by default."); + field->set_proto3_optional(true); } } } @@ -1004,6 +1047,12 @@ bool Parser::ParseMessageFieldNoLabel( "Field name should be lowercase. Found: " + field->name() + ". See: https://developers.google.com/protocol-buffers/docs/style"); } + if (IsNumberFollowUnderscore(field->name())) { + AddWarning( + "Number should not come right after an underscore. Found: " + + field->name() + + ". See: https://developers.google.com/protocol-buffers/docs/style"); + } } DO(Consume("=", "Missing field number.")); @@ -1282,7 +1331,7 @@ bool Parser::ParseDefaultAssignment( break; case FieldDescriptorProto::TYPE_STRING: - // Note: When file opton java_string_check_utf8 is true, if a + // Note: When file option java_string_check_utf8 is true, if a // non-string representation (eg byte[]) is later supported, it must // be checked for UTF-8-ness. DO(ConsumeString(default_value, @@ -2191,18 +2240,23 @@ bool Parser::ParseMethodOptions(const LocationRecorder& parent_location, // ------------------------------------------------------------------- bool Parser::ParseLabel(FieldDescriptorProto::Label* label, + const LocationRecorder& field_location, const FileDescriptorProto* containing_file) { + if (!LookingAt("optional") && !LookingAt("repeated") && + !LookingAt("required")) { + return false; + } + LocationRecorder location(field_location, + FieldDescriptorProto::kLabelFieldNumber); if (TryConsume("optional")) { *label = FieldDescriptorProto::LABEL_OPTIONAL; - return true; } else if (TryConsume("repeated")) { *label = FieldDescriptorProto::LABEL_REPEATED; - return true; - } else if (TryConsume("required")) { + } else { + Consume("required"); *label = FieldDescriptorProto::LABEL_REQUIRED; - return true; } - return false; + return true; } bool Parser::ParseType(FieldDescriptorProto::Type* type, @@ -2309,7 +2363,7 @@ bool Parser::ParseImport(RepeatedPtrField* dependency, *weak_dependency->Add() = dependency->size(); } - string import_file; + std::string import_file; DO(ConsumeString(&import_file, "Expected a string naming the file to import.")); *dependency->Add() = import_file; @@ -2343,7 +2397,7 @@ bool SourceLocationTable::Find( } bool SourceLocationTable::FindImport(const Message* descriptor, - const string& name, int* line, + const std::string& name, int* line, int* column) const { const std::pair* result = FindOrNull(import_location_map_, std::make_pair(descriptor, name)); @@ -2367,7 +2421,8 @@ void SourceLocationTable::Add( } void SourceLocationTable::AddImport(const Message* descriptor, - const string& name, int line, int column) { + const std::string& name, int line, + int column) { import_location_map_[std::make_pair(descriptor, name)] = std::make_pair(line, column); } diff --git a/third_party/protobuf/src/google/protobuf/compiler/parser.h b/third_party/protobuf/src/google/protobuf/compiler/parser.h index 9e2dc5f5..e8afdbc4 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/parser.h +++ b/third_party/protobuf/src/google/protobuf/compiler/parser.h @@ -208,7 +208,7 @@ class PROTOBUF_EXPORT Parser { // Invokes error_collector_->AddWarning() with the line and column number // of the current token. - void AddWarning(const string& warning); + void AddWarning(const std::string& warning); // Records a location in the SourceCodeInfo.location table (see // descriptor.proto). We use RAII to ensure that the start and end locations @@ -262,7 +262,7 @@ class PROTOBUF_EXPORT Parser { const Message* descriptor, DescriptorPool::ErrorCollector::ErrorLocation location); void RecordLegacyImportLocation(const Message* descriptor, - const string& name); + const std::string& name); // Returns the number of path components in the recorder's current location. int CurrentPathSize() const; @@ -440,6 +440,7 @@ class PROTOBUF_EXPORT Parser { // Parse "required", "optional", or "repeated" and fill in "label" // with the value. Returns true if such a label is consumed. bool ParseLabel(FieldDescriptorProto::Label* label, + const LocationRecorder& field_location, const FileDescriptorProto* containing_file); // Parse a type name and fill in "type" (if it is a primitive) or @@ -567,14 +568,14 @@ class PROTOBUF_EXPORT SourceLocationTable { bool Find(const Message* descriptor, DescriptorPool::ErrorCollector::ErrorLocation location, int* line, int* column) const; - bool FindImport(const Message* descriptor, const string& name, int* line, + bool FindImport(const Message* descriptor, const std::string& name, int* line, int* column) const; // Adds a location to the table. void Add(const Message* descriptor, DescriptorPool::ErrorCollector::ErrorLocation location, int line, int column); - void AddImport(const Message* descriptor, const string& name, int line, + void AddImport(const Message* descriptor, const std::string& name, int line, int column); // Clears the contents of the table. @@ -586,7 +587,7 @@ class PROTOBUF_EXPORT SourceLocationTable { std::pair > LocationMap; LocationMap location_map_; - std::map, std::pair > + std::map, std::pair > import_location_map_; }; diff --git a/third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc b/third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc index 80e01a50..4a3a228e 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc @@ -32,13 +32,13 @@ // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. +#include + #include #include #include #include -#include - #include #include #include @@ -47,12 +47,10 @@ #include #include #include -#include - -#include - #include #include +#include +#include namespace google { namespace protobuf { @@ -65,9 +63,14 @@ class MockErrorCollector : public io::ErrorCollector { MockErrorCollector() = default; ~MockErrorCollector() override = default; + std::string warning_; std::string text_; // implements ErrorCollector --------------------------------------- + void AddWarning(int line, int column, const std::string& message) override { + strings::SubstituteAndAppend(&warning_, "$0:$1: $2\n", line, column, message); + } + void AddError(int line, int column, const std::string& message) override { strings::SubstituteAndAppend(&text_, "$0:$1: $2\n", line, column, message); } @@ -220,7 +223,44 @@ TEST_F(ParserTest, WarnIfSyntaxIdentifierOmmitted) { CaptureTestStderr(); EXPECT_TRUE(parser_->Parse(input_.get(), &file)); EXPECT_TRUE(GetCapturedTestStderr().find("No syntax specified") != - string::npos); + std::string::npos); +} + +TEST_F(ParserTest, WarnIfFieldNameIsNotUpperCamel) { + SetupParser( + "syntax = \"proto2\";" + "message abc {}"); + FileDescriptorProto file; + EXPECT_TRUE(parser_->Parse(input_.get(), &file)); + EXPECT_TRUE(error_collector_.warning_.find( + "Message name should be in UpperCamelCase. Found: abc.") != + std::string::npos); +} + +TEST_F(ParserTest, WarnIfFieldNameIsNotLowerUnderscore) { + SetupParser( + "syntax = \"proto2\";" + "message A {" + " optional string SongName = 1;" + "}"); + FileDescriptorProto file; + EXPECT_TRUE(parser_->Parse(input_.get(), &file)); + EXPECT_TRUE(error_collector_.warning_.find( + "Field name should be lowercase. Found: SongName") != + std::string::npos); +} + +TEST_F(ParserTest, WarnIfFieldNameContainsNumberImmediatelyFollowUnderscore) { + SetupParser( + "syntax = \"proto2\";" + "message A {" + " optional string song_name_1 = 1;" + "}"); + FileDescriptorProto file; + EXPECT_TRUE(parser_->Parse(input_.get(), &file)); + EXPECT_TRUE(error_collector_.warning_.find( + "Number should not come right after an underscore. Found: " + "song_name_1.") != std::string::npos); } // =================================================================== @@ -968,6 +1008,43 @@ TEST_F(ParseMessageTest, OptionalLabelProto3) { "}"); } +TEST_F(ParseMessageTest, ExplicitOptionalLabelProto3) { + ExpectParsesTo( + "syntax = 'proto3';\n" + "message TestMessage {\n" + " optional int32 foo = 1;\n" + "}\n", + + "syntax: \"proto3\" " + "message_type {" + " name: \"TestMessage\"" + " field { name:\"foo\" label:LABEL_OPTIONAL type:TYPE_INT32 number:1 " + " proto3_optional: true oneof_index: 0 } " + " oneof_decl { name:\"_foo\" } " + "}"); + + // Handle collisions in the synthetic oneof name. + ExpectParsesTo( + "syntax = 'proto3';\n" + "message TestMessage {\n" + " optional int32 foo = 1;\n" + " oneof _foo {\n" + " int32 __foo = 2;\n" + " }\n" + "}\n", + + "syntax: \"proto3\" " + "message_type {" + " name: \"TestMessage\"" + " field { name:\"foo\" label:LABEL_OPTIONAL type:TYPE_INT32 number:1 " + " proto3_optional: true oneof_index: 1 } " + " field { name:\"__foo\" label:LABEL_OPTIONAL type:TYPE_INT32 number:2 " + " oneof_index: 0 } " + " oneof_decl { name:\"_foo\" } " + " oneof_decl { name:\"X_foo\" } " + "}"); +} + // =================================================================== typedef ParserTest ParseEnumTest; @@ -1534,17 +1611,6 @@ TEST_F(ParseErrorTest, EofInAggregateValue) { "1:0: Unexpected end of stream while parsing aggregate value.\n"); } -TEST_F(ParseErrorTest, ExplicitOptionalLabelProto3) { - ExpectHasErrors( - "syntax = 'proto3';\n" - "message TestMessage {\n" - " optional int32 foo = 1;\n" - "}\n", - "2:11: Explicit 'optional' labels are disallowed in the Proto3 syntax. " - "To define 'optional' fields in Proto3, simply remove the 'optional' " - "label, as fields are 'optional' by default.\n"); -} - // ------------------------------------------------------------------- // Enum errors @@ -1998,7 +2064,7 @@ TEST_F(ParserValidationErrorTest, MethodOutputTypeError) { } -TEST_F(ParserValidationErrorTest, ResovledUndefinedError) { +TEST_F(ParserValidationErrorTest, ResolvedUndefinedError) { // Create another file which defines symbol ".base.bar". FileDescriptorProto other_file; other_file.set_name("base.proto"); @@ -2043,14 +2109,14 @@ TEST_F(ParserValidationErrorTest, ResovledUndefinedOptionError) { FieldDescriptorProto* field(message->add_field()); field->set_name("foo"); field->set_number(1); - field->set_label(FieldDescriptorProto_Label_LABEL_OPTIONAL); - field->set_type(FieldDescriptorProto_Type_TYPE_INT32); + field->set_label(FieldDescriptorProto::LABEL_OPTIONAL); + field->set_type(FieldDescriptorProto::TYPE_INT32); FieldDescriptorProto* extension(other_file.add_extension()); extension->set_name("bar"); extension->set_number(7672757); - extension->set_label(FieldDescriptorProto_Label_LABEL_OPTIONAL); - extension->set_type(FieldDescriptorProto_Type_TYPE_MESSAGE); + extension->set_label(FieldDescriptorProto::LABEL_OPTIONAL); + extension->set_type(FieldDescriptorProto::TYPE_MESSAGE); extension->set_type_name("Bar"); extension->set_extendee("google.protobuf.FileOptions"); @@ -2362,9 +2428,9 @@ TEST_F(ParseDescriptorDebugTest, TestMaps) { // Make sure the debug string uses map syntax and does not have the auto // generated entry. std::string debug_string = file->DebugString(); - EXPECT_TRUE(debug_string.find("map<") != string::npos); - EXPECT_TRUE(debug_string.find("option map_entry") == string::npos); - EXPECT_TRUE(debug_string.find("MapEntry") == string::npos); + EXPECT_TRUE(debug_string.find("map<") != std::string::npos); + EXPECT_TRUE(debug_string.find("option map_entry") == std::string::npos); + EXPECT_TRUE(debug_string.find("MapEntry") == std::string::npos); // Make sure the descriptor debug string is parsable. FileDescriptorProto parsed; @@ -2766,6 +2832,35 @@ TEST_F(SourceInfoTest, Fields) { EXPECT_TRUE(HasSpan(file_.message_type(0), "name")); } +TEST_F(SourceInfoTest, Proto3Fields) { + EXPECT_TRUE( + Parse("syntax = \"proto3\";\n" + "message Foo {\n" + " $a$int32$b$ $c$bar$d$ = $e$1$f$;$g$\n" + " $h$repeated$i$ $j$X.Y$k$ $l$baz$m$ = $n$2$o$;$p$\n" + "}\n")); + + const FieldDescriptorProto& field1 = file_.message_type(0).field(0); + const FieldDescriptorProto& field2 = file_.message_type(0).field(1); + + EXPECT_TRUE(HasSpan('a', 'g', field1)); + EXPECT_TRUE(HasSpan('a', 'b', field1, "type")); + EXPECT_TRUE(HasSpan('c', 'd', field1, "name")); + EXPECT_TRUE(HasSpan('e', 'f', field1, "number")); + + EXPECT_TRUE(HasSpan('h', 'p', field2)); + EXPECT_TRUE(HasSpan('h', 'i', field2, "label")); + EXPECT_TRUE(HasSpan('j', 'k', field2, "type_name")); + EXPECT_TRUE(HasSpan('l', 'm', field2, "name")); + EXPECT_TRUE(HasSpan('n', 'o', field2, "number")); + + // Ignore these. + EXPECT_TRUE(HasSpan(file_)); + EXPECT_TRUE(HasSpan(file_, "syntax")); + EXPECT_TRUE(HasSpan(file_.message_type(0))); + EXPECT_TRUE(HasSpan(file_.message_type(0), "name")); +} + TEST_F(SourceInfoTest, Extensions) { EXPECT_TRUE( Parse("$a$extend $b$Foo$c$ {\n" diff --git a/third_party/protobuf/src/google/protobuf/compiler/php/php_generator.cc b/third_party/protobuf/src/google/protobuf/compiler/php/php_generator.cc index 8e405608..16ec9aa9 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/php/php_generator.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/php/php_generator.cc @@ -88,10 +88,12 @@ std::string GeneratedMetadataFileName(const FileDescriptor* file, std::string LabelForField(FieldDescriptor* field); std::string TypeName(FieldDescriptor* field); std::string UnderscoresToCamelCase(const string& name, bool cap_first_letter); -std::string EscapeDollor(const string& to_escape); std::string BinaryToHex(const string& binary); void Indent(io::Printer* printer); void Outdent(io::Printer* printer); +void GenerateAddFilesToPool(const FileDescriptor* file, + const std::set& aggregate_metadata_prefixes, + io::Printer* printer); void GenerateMessageDocComment(io::Printer* printer, const Descriptor* message, int is_descriptor); void GenerateMessageConstructorDocComment(io::Printer* printer, @@ -112,7 +114,6 @@ void GenerateServiceDocComment(io::Printer* printer, void GenerateServiceMethodDocComment(io::Printer* printer, const MethodDescriptor* method); - std::string ReservedNamePrefix(const string& classname, const FileDescriptor* file) { bool is_reserved = false; @@ -153,7 +154,7 @@ template std::string ClassNamePrefix(const string& classname, const DescriptorType* desc) { const string& prefix = (desc->file()->options()).php_class_prefix(); - if (prefix != "") { + if (!prefix.empty()) { return prefix; } @@ -244,13 +245,13 @@ template std::string RootPhpNamespace(const DescriptorType* desc, bool is_descriptor) { if (desc->file()->options().has_php_namespace()) { const string& php_namespace = desc->file()->options().php_namespace(); - if (php_namespace != "") { + if (!php_namespace.empty()) { return php_namespace; } return ""; } - if (desc->file()->package() != "") { + if (!desc->file()->package().empty()) { return PhpName(desc->file()->package(), is_descriptor); } return ""; @@ -260,7 +261,7 @@ template std::string FullClassName(const DescriptorType* desc, bool is_descriptor) { string classname = GeneratedClassNameImpl(desc); string php_namespace = RootPhpNamespace(desc, is_descriptor); - if (php_namespace != "") { + if (!php_namespace.empty()) { return php_namespace + "\\" + classname; } return classname; @@ -270,7 +271,7 @@ template std::string LegacyFullClassName(const DescriptorType* desc, bool is_descriptor) { string classname = LegacyGeneratedClassName(desc); string php_namespace = RootPhpNamespace(desc, is_descriptor); - if (php_namespace != "") { + if (!php_namespace.empty()) { return php_namespace + "\\" + classname; } return classname; @@ -352,7 +353,7 @@ std::string GeneratedMetadataFileName(const FileDescriptor* file, if (file->options().has_php_metadata_namespace()) { const string& php_metadata_namespace = file->options().php_metadata_namespace(); - if (php_metadata_namespace != "" && php_metadata_namespace != "\\") { + if (!php_metadata_namespace.empty() && php_metadata_namespace != "\\") { result += php_metadata_namespace; std::replace(result.begin(), result.end(), '\\', '/'); if (result.at(result.size() - 1) != '/') { @@ -552,45 +553,41 @@ std::string EnumOrMessageSuffix( // Converts a name to camel-case. If cap_first_letter is true, capitalize the // first letter. -std::string UnderscoresToCamelCase(const string& input, bool cap_first_letter) { +std::string UnderscoresToCamelCase(const string& name, bool cap_first_letter) { std::string result; - for (int i = 0; i < input.size(); i++) { - if ('a' <= input[i] && input[i] <= 'z') { + for (int i = 0; i < name.size(); i++) { + if ('a' <= name[i] && name[i] <= 'z') { if (cap_first_letter) { - result += input[i] + ('A' - 'a'); + result += name[i] + ('A' - 'a'); } else { - result += input[i]; + result += name[i]; } cap_first_letter = false; - } else if ('A' <= input[i] && input[i] <= 'Z') { + } else if ('A' <= name[i] && name[i] <= 'Z') { if (i == 0 && !cap_first_letter) { // Force first letter to lower-case unless explicitly told to // capitalize it. - result += input[i] + ('a' - 'A'); + result += name[i] + ('a' - 'A'); } else { // Capital letters after the first are left as-is. - result += input[i]; + result += name[i]; } cap_first_letter = false; - } else if ('0' <= input[i] && input[i] <= '9') { - result += input[i]; + } else if ('0' <= name[i] && name[i] <= '9') { + result += name[i]; cap_first_letter = true; } else { cap_first_letter = true; } } // Add a trailing "_" if the name should be altered. - if (input[input.size() - 1] == '#') { + if (name[name.size() - 1] == '#') { result += '_'; } return result; } -std::string EscapeDollor(const string& to_escape) { - return StringReplace(to_escape, "$", "\\$", true); -} - -std::string BinaryToHex(const string& src) { +std::string BinaryToHex(const string& binary) { string dest; size_t i; unsigned char symbol[16] = { @@ -600,12 +597,12 @@ std::string BinaryToHex(const string& src) { 'c', 'd', 'e', 'f', }; - dest.resize(src.size() * 2); + dest.resize(binary.size() * 2); char* append_ptr = &dest[0]; - for (i = 0; i < src.size(); i++) { - *append_ptr++ = symbol[(src[i] & 0xf0) >> 4]; - *append_ptr++ = symbol[src[i] & 0x0f]; + for (i = 0; i < binary.size(); i++) { + *append_ptr++ = symbol[(binary[i] & 0xf0) >> 4]; + *append_ptr++ = symbol[binary[i] & 0x0f]; } return dest; @@ -633,7 +630,7 @@ void GenerateField(const FieldDescriptor* field, io::Printer* printer, } else { GenerateFieldDocComment(printer, field, is_descriptor, kFieldProperty); printer->Print( - "private $^name^ = ^default^;\n", + "protected $^name^ = ^default^;\n", "name", field->name(), "default", DefaultForField(field)); } @@ -655,88 +652,50 @@ void GenerateOneofField(const OneofDescriptor* oneof, io::Printer* printer) { void GenerateFieldAccessor(const FieldDescriptor* field, bool is_descriptor, io::Printer* printer) { - bool need_other_name_for_accessor = false; - bool need_other_name_for_wrapper_accessor = false; - const Descriptor* desc = field->containing_type(); - - if (!field->is_repeated() && - field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && - IsWrapperType(field)) { - // Check if there is any field called xxx_value - const FieldDescriptor* other = - desc->FindFieldByName(StrCat(field->name(), "_value")); - if (other != NULL) { - need_other_name_for_wrapper_accessor = true; - } - } - - if (strings::EndsWith(field->name(), "_value")) { - std::size_t pos = (field->name()).find("_value"); - string name = (field->name()).substr(0, pos); - const FieldDescriptor* other = desc->FindFieldByName(name); - if (other != NULL && - !other->is_repeated() && - other->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && - IsWrapperType(other)) { - need_other_name_for_accessor = true; - } - } - const OneofDescriptor* oneof = field->containing_oneof(); // Generate getter. if (oneof != NULL) { GenerateFieldDocComment(printer, field, is_descriptor, kFieldGetter); printer->Print( - "public function get^camel_name^^field_number^()\n" + "public function get^camel_name^()\n" "{\n" " return $this->readOneof(^number^);\n" "}\n\n", "camel_name", UnderscoresToCamelCase(field->name(), true), - "number", IntToString(field->number()), - "field_number", need_other_name_for_accessor ? - StrCat(field->number()) : ""); + "number", IntToString(field->number())); } else { GenerateFieldDocComment(printer, field, is_descriptor, kFieldGetter); printer->Print( - "public function get^camel_name^^field_number^()\n" + "public function get^camel_name^()\n" "{\n" " return $this->^name^;\n" "}\n\n", - "camel_name", UnderscoresToCamelCase(field->name(), true), - "name", field->name(), - "field_number", need_other_name_for_accessor ? - StrCat(field->number()) : ""); + "camel_name", UnderscoresToCamelCase(field->name(), true), "name", + field->name()); } - // For wrapper types, generate an additional getXXXValue getter + // For wrapper types, generate an additional getXXXUnwrapped getter if (!field->is_map() && !field->is_repeated() && field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && IsWrapperType(field)) { GenerateWrapperFieldGetterDocComment(printer, field); - printer->Print( - "public function get^camel_name^Value^field_number1^()\n" + "public function get^camel_name^Unwrapped()\n" "{\n" - " $wrapper = $this->get^camel_name^^field_number2^();\n" - " return is_null($wrapper) ? null : $wrapper->getValue();\n" + " return $this->readWrapperValue(\"^field_name^\");\n" "}\n\n", "camel_name", UnderscoresToCamelCase(field->name(), true), - "field_number1", need_other_name_for_wrapper_accessor ? - StrCat(field->number()) : "", - "field_number2", need_other_name_for_accessor ? - StrCat(field->number()) : ""); + "field_name", field->name()); } // Generate setter. GenerateFieldDocComment(printer, field, is_descriptor, kFieldSetter); printer->Print( - "public function set^camel_name^^field_number^($var)\n" + "public function set^camel_name^($var)\n" "{\n", - "camel_name", UnderscoresToCamelCase(field->name(), true), - "field_number", need_other_name_for_accessor ? - StrCat(field->number()) : ""); + "camel_name", UnderscoresToCamelCase(field->name(), true)); Indent(printer); @@ -836,17 +795,13 @@ void GenerateFieldAccessor(const FieldDescriptor* field, bool is_descriptor, IsWrapperType(field)) { GenerateWrapperFieldSetterDocComment(printer, field); printer->Print( - "public function set^camel_name^Value^field_number1^($var)\n" + "public function set^camel_name^Unwrapped($var)\n" "{\n" - " $wrappedVar = is_null($var) ? null : new \\^wrapper_type^(['value' => $var]);\n" - " return $this->set^camel_name^^field_number2^($wrappedVar);\n" + " $this->writeWrapperValue(\"^field_name^\", $var);\n" + " return $this;" "}\n\n", "camel_name", UnderscoresToCamelCase(field->name(), true), - "wrapper_type", LegacyFullClassName(field->message_type(), is_descriptor), - "field_number1", need_other_name_for_wrapper_accessor ? - StrCat(field->number()) : "", - "field_number2", need_other_name_for_accessor ? - StrCat(field->number()) : ""); + "field_name", field->name()); } // Generate has method for proto2 only. @@ -921,7 +876,7 @@ void GenerateMessageToPool(const string& name_prefix, const Descriptor* message, "field", field->name(), "key", ToUpper(key->type_name()), "value", ToUpper(val->type_name()), - "number", SimpleItoa(field->number()), + "number", StrCat(field->number()), "other", EnumOrMessageSuffix(val, true)); } else if (!field->containing_oneof()) { printer->Print( @@ -930,7 +885,7 @@ void GenerateMessageToPool(const string& name_prefix, const Descriptor* message, "field", field->name(), "label", LabelForField(field), "type", ToUpper(field->type_name()), - "number", SimpleItoa(field->number()), + "number", StrCat(field->number()), "other", EnumOrMessageSuffix(field, true)); } } @@ -948,7 +903,7 @@ void GenerateMessageToPool(const string& name_prefix, const Descriptor* message, "\\Google\\Protobuf\\Internal\\GPBType::^type^, ^number^^other^)\n", "field", field->name(), "type", ToUpper(field->type_name()), - "number", SimpleItoa(field->number()), + "number", StrCat(field->number()), "other", EnumOrMessageSuffix(field, true)); } printer->Print("->finish()\n"); @@ -971,13 +926,20 @@ void GenerateMessageToPool(const string& name_prefix, const Descriptor* message, } } -void GenerateAddFileToPool(const FileDescriptor* file, bool is_descriptor, - io::Printer* printer) { - printer->Print( - "public static $is_initialized = false;\n\n" - "public static function initOnce() {\n"); - Indent(printer); +void GenerateAddFileToPool( + const FileDescriptor* file, + bool is_descriptor, + bool aggregate_metadata, + const std::set& aggregate_metadata_prefixes, + io::Printer* printer) { + printer->Print( + "public static $is_initialized = false;\n\n" + "public static function initOnce() {\n"); + Indent(printer); + if (aggregate_metadata) { + GenerateAddFilesToPool(file, aggregate_metadata_prefixes, printer); + } else { printer->Print( "$pool = \\Google\\Protobuf\\Internal\\" "DescriptorPool::getGeneratedPool();\n\n" @@ -985,79 +947,210 @@ void GenerateAddFileToPool(const FileDescriptor* file, bool is_descriptor, " return;\n" "}\n"); - if (is_descriptor) { - for (int i = 0; i < file->message_type_count(); i++) { - GenerateMessageToPool("", file->message_type(i), printer); - } - for (int i = 0; i < file->enum_type_count(); i++) { - GenerateEnumToPool(file->enum_type(i), printer); - } + if (is_descriptor) { + for (int i = 0; i < file->message_type_count(); i++) { + GenerateMessageToPool("", file->message_type(i), printer); + } + for (int i = 0; i < file->enum_type_count(); i++) { + GenerateEnumToPool(file->enum_type(i), printer); + } + printer->Print( + "$pool->finish();\n"); + } else { + for (int i = 0; i < file->dependency_count(); i++) { + const std::string& name = file->dependency(i)->name(); + // Currently, descriptor.proto is not ready for external usage. Skip to + // import it for now, so that its dependencies can still work as long as + // they don't use protos defined in descriptor.proto. + if (name == kDescriptorFile) { + continue; + } + std::string dependency_filename = + GeneratedMetadataFileName(file->dependency(i), is_descriptor); + printer->Print( + "\\^name^::initOnce();\n", + "name", FilenameToClassname(dependency_filename)); + } + + // Add messages and enums to descriptor pool. + FileDescriptorSet files; + FileDescriptorProto* file_proto = files.add_file(); + file->CopyTo(file_proto); + + // Filter out descriptor.proto as it cannot be depended on for now. + RepeatedPtrField* dependency = file_proto->mutable_dependency(); + for (RepeatedPtrField::iterator it = dependency->begin(); + it != dependency->end(); ++it) { + if (*it != kDescriptorFile) { + dependency->erase(it); + break; + } + } + + // Filter out all extensions, since we do not support extension yet. + file_proto->clear_extension(); + RepeatedPtrField* message_type = + file_proto->mutable_message_type(); + for (RepeatedPtrField::iterator it = message_type->begin(); + it != message_type->end(); ++it) { + it->clear_extension(); + } + + string files_data; + files.SerializeToString(&files_data); + + printer->Print("$pool->internalAddGeneratedFile(hex2bin(\n"); + Indent(printer); + + printer->Print( + "\"^data^\"\n", + "data", BinaryToHex(files_data)); + + Outdent(printer); + printer->Print( + "), true);\n\n"); + } printer->Print( - "$pool->finish();\n"); + "static::$is_initialized = true;\n"); + } + + Outdent(printer); + printer->Print("}\n"); +} + +static void AnalyzeDependencyForFile( + const FileDescriptor* file, + std::set* nodes_without_dependency, + std::map>* deps, + std::map* dependency_count) { + int count = file->dependency_count(); + for (int i = 0; i < file->dependency_count(); i++) { + const FileDescriptor* dependency = file->dependency(i); + if (dependency->name() == kDescriptorFile) { + count--; + break; + } + } + + if (count == 0) { + nodes_without_dependency->insert(file); } else { + (*dependency_count)[file] = count; for (int i = 0; i < file->dependency_count(); i++) { - const std::string& name = file->dependency(i)->name(); - // Currently, descriptor.proto is not ready for external usage. Skip to - // import it for now, so that its dependencies can still work as long as - // they don't use protos defined in descriptor.proto. - if (name == kDescriptorFile) { + const FileDescriptor* dependency = file->dependency(i); + if (dependency->name() == kDescriptorFile) { continue; } + if (deps->find(dependency) == deps->end()) { + (*deps)[dependency] = std::set(); + } + (*deps)[dependency].insert(file); + AnalyzeDependencyForFile( + dependency, nodes_without_dependency, deps, dependency_count); + } + } +} + +static bool NeedsUnwrapping( + const FileDescriptor* file, + const std::set& aggregate_metadata_prefixes) { + bool has_aggregate_metadata_prefix = false; + if (aggregate_metadata_prefixes.empty()) { + has_aggregate_metadata_prefix = true; + } else { + for (const auto& prefix : aggregate_metadata_prefixes) { + if (HasPrefixString(file->package(), prefix)) { + has_aggregate_metadata_prefix = true; + break; + } + } + } + + return has_aggregate_metadata_prefix; +} + +void GenerateAddFilesToPool( + const FileDescriptor* file, + const std::set& aggregate_metadata_prefixes, + io::Printer* printer) { + printer->Print( + "$pool = \\Google\\Protobuf\\Internal\\" + "DescriptorPool::getGeneratedPool();\n" + "if (static::$is_initialized == true) {\n" + " return;\n" + "}\n"); + + // Sort files according to dependency + std::map> deps; + std::map dependency_count; + std::set nodes_without_dependency; + FileDescriptorSet sorted_file_set; + + AnalyzeDependencyForFile( + file, &nodes_without_dependency, &deps, &dependency_count); + + while (!nodes_without_dependency.empty()) { + auto file = *nodes_without_dependency.begin(); + nodes_without_dependency.erase(file); + for (auto dependent : deps[file]) { + if (dependency_count[dependent] == 1) { + dependency_count.erase(dependent); + nodes_without_dependency.insert(dependent); + } else { + dependency_count[dependent] -= 1; + } + } + + bool needs_aggregate = NeedsUnwrapping(file, aggregate_metadata_prefixes); + + if (needs_aggregate) { + auto file_proto = sorted_file_set.add_file(); + file->CopyTo(file_proto); + + // Filter out descriptor.proto as it cannot be depended on for now. + RepeatedPtrField* dependency = file_proto->mutable_dependency(); + for (RepeatedPtrField::iterator it = dependency->begin(); + it != dependency->end(); ++it) { + if (*it != kDescriptorFile) { + dependency->erase(it); + break; + } + } + + // Filter out all extensions, since we do not support extension yet. + file_proto->clear_extension(); + RepeatedPtrField* message_type = + file_proto->mutable_message_type(); + for (RepeatedPtrField::iterator it = message_type->begin(); + it != message_type->end(); ++it) { + it->clear_extension(); + } + } else { std::string dependency_filename = - GeneratedMetadataFileName(file->dependency(i), is_descriptor); + GeneratedMetadataFileName(file, false); printer->Print( "\\^name^::initOnce();\n", "name", FilenameToClassname(dependency_filename)); } - - // Add messages and enums to descriptor pool. - FileDescriptorSet files; - FileDescriptorProto* file_proto = files.add_file(); - file->CopyTo(file_proto); - - // Filter out descriptor.proto as it cannot be depended on for now. - RepeatedPtrField* dependency = file_proto->mutable_dependency(); - for (RepeatedPtrField::iterator it = dependency->begin(); - it != dependency->end(); ++it) { - if (*it != kDescriptorFile) { - dependency->erase(it); - break; - } - } - - // Filter out all extensions, since we do not support extension yet. - file_proto->clear_extension(); - RepeatedPtrField* message_type = - file_proto->mutable_message_type(); - for (RepeatedPtrField::iterator it = message_type->begin(); - it != message_type->end(); ++it) { - it->clear_extension(); - } - - string files_data; - files.SerializeToString(&files_data); - - printer->Print("$pool->internalAddGeneratedFile(hex2bin(\n"); - Indent(printer); - - // Only write 30 bytes per line. - static const int kBytesPerLine = 30; - for (int i = 0; i < files_data.size(); i += kBytesPerLine) { - printer->Print( - "\"^data^\"^dot^\n", - "data", BinaryToHex(files_data.substr(i, kBytesPerLine)), - "dot", i + kBytesPerLine < files_data.size() ? " ." : ""); - } - - Outdent(printer); - printer->Print( - "), true);\n\n"); } + + string files_data; + sorted_file_set.SerializeToString(&files_data); + + printer->Print("$pool->internalAddGeneratedFile(hex2bin(\n"); + Indent(printer); + + printer->Print( + "\"^data^\"\n", + "data", BinaryToHex(files_data)); + + Outdent(printer); + printer->Print( + "), true);\n"); + printer->Print( "static::$is_initialized = true;\n"); - Outdent(printer); - printer->Print("}\n"); } void GenerateUseDeclaration(bool is_descriptor, io::Printer* printer) { @@ -1098,6 +1191,8 @@ std::string FilenameToClassname(const string& filename) { void GenerateMetadataFile(const FileDescriptor* file, bool is_descriptor, + bool aggregate_metadata, + const std::set& aggregate_metadata_prefixes, GeneratorContext* generator_context) { std::string filename = GeneratedMetadataFileName(file, is_descriptor); std::unique_ptr output( @@ -1126,7 +1221,8 @@ void GenerateMetadataFile(const FileDescriptor* file, } Indent(&printer); - GenerateAddFileToPool(file, is_descriptor, &printer); + GenerateAddFileToPool(file, is_descriptor, aggregate_metadata, + aggregate_metadata_prefixes, &printer); Outdent(&printer); printer.Print("}\n\n"); @@ -1145,7 +1241,7 @@ void LegacyGenerateClassFile(const FileDescriptor* file, const DescriptorType* d GenerateHead(file, &printer); std::string php_namespace = RootPhpNamespace(desc, is_descriptor); - if (php_namespace != "") { + if (!php_namespace.empty()) { printer.Print( "namespace ^name^;\n\n", "name", php_namespace); @@ -1262,7 +1358,7 @@ void GenerateEnumFile(const FileDescriptor* file, const EnumDescriptor* en, Outdent(&printer); printer.Print("}\n\n"); - // write legacy file for backwards compatiblity with nested messages and enums + // write legacy file for backwards compatibility with nested messages and enums if (en->containing_type() != NULL) { printer.Print( "// Adding a class alias for backwards compatibility with the previous class name.\n"); @@ -1276,6 +1372,7 @@ void GenerateEnumFile(const FileDescriptor* file, const EnumDescriptor* en, void GenerateMessageFile(const FileDescriptor* file, const Descriptor* message, bool is_descriptor, + bool aggregate_metadata, GeneratorContext* generator_context) { // Don't generate MapEntry messages -- we use the PHP extension's native // support for map fields instead. @@ -1332,10 +1429,12 @@ void GenerateMessageFile(const FileDescriptor* file, const Descriptor* message, GeneratedMetadataFileName(file, is_descriptor); std::string metadata_fullname = FilenameToClassname(metadata_filename); printer.Print( - "\\^fullname^::initOnce();\n" - "parent::__construct($data);\n", + "\\^fullname^::initOnce();\n", "fullname", metadata_fullname); + printer.Print( + "parent::__construct($data);\n"); + Outdent(&printer); printer.Print("}\n\n"); @@ -1361,7 +1460,7 @@ void GenerateMessageFile(const FileDescriptor* file, const Descriptor* message, Outdent(&printer); printer.Print("}\n\n"); - // write legacy file for backwards compatiblity with nested messages and enums + // write legacy file for backwards compatibility with nested messages and enums if (message->containing_type() != NULL) { printer.Print( "// Adding a class alias for backwards compatibility with the previous class name.\n"); @@ -1375,6 +1474,7 @@ void GenerateMessageFile(const FileDescriptor* file, const Descriptor* message, // Nested messages and enums. for (int i = 0; i < message->nested_type_count(); i++) { GenerateMessageFile(file, message->nested_type(i), is_descriptor, + aggregate_metadata, generator_context); } for (int i = 0; i < message->enum_type_count(); i++) { @@ -1431,10 +1531,15 @@ void GenerateServiceFile(const FileDescriptor* file, } void GenerateFile(const FileDescriptor* file, bool is_descriptor, + bool aggregate_metadata, + const std::set& aggregate_metadata_prefixes, GeneratorContext* generator_context) { - GenerateMetadataFile(file, is_descriptor, generator_context); + GenerateMetadataFile(file, is_descriptor, aggregate_metadata, + aggregate_metadata_prefixes, generator_context); + for (int i = 0; i < file->message_type_count(); i++) { GenerateMessageFile(file, file->message_type(i), is_descriptor, + aggregate_metadata, generator_context); } for (int i = 0; i < file->enum_type_count(); i++) { @@ -1444,7 +1549,7 @@ void GenerateFile(const FileDescriptor* file, bool is_descriptor, if (file->options().php_generic_services()) { for (int i = 0; i < file->service_count(); i++) { GenerateServiceFile(file, file->service(i), is_descriptor, - generator_context); + generator_context); } } } @@ -1505,7 +1610,7 @@ static void GenerateDocCommentBodyForLocation( // HTML-escape them so that they don't accidentally close the doc comment. comments = EscapePhpdoc(comments); - std::vector lines = Split(comments, "\n"); + std::vector lines = Split(comments, "\n", true); while (!lines.empty() && lines.back().empty()) { lines.pop_back(); } @@ -1700,8 +1805,17 @@ void GenerateServiceMethodDocComment(io::Printer* printer, bool Generator::Generate(const FileDescriptor* file, const string& parameter, GeneratorContext* generator_context, string* error) const { - bool is_descriptor = parameter == "internal"; + return Generate(file, false, false, std::set(), + generator_context, error); +} +bool Generator::Generate( + const FileDescriptor* file, + bool is_descriptor, + bool aggregate_metadata, + const std::set& aggregate_metadata_prefixes, + GeneratorContext* generator_context, + string* error) const { if (is_descriptor && file->name() != kDescriptorFile) { *error = "Can only generate PHP code for google/protobuf/descriptor.proto.\n"; @@ -1715,11 +1829,48 @@ bool Generator::Generate(const FileDescriptor* file, const string& parameter, return false; } - GenerateFile(file, is_descriptor, generator_context); + GenerateFile(file, is_descriptor, aggregate_metadata, + aggregate_metadata_prefixes, generator_context); return true; } +bool Generator::GenerateAll(const std::vector& files, + const std::string& parameter, + GeneratorContext* generator_context, + std::string* error) const { + bool is_descriptor = false; + bool aggregate_metadata = false; + std::set aggregate_metadata_prefixes; + + for (const auto& option : Split(parameter, ",", true)) { + const std::vector option_pair = Split(option, "=", true); + if (HasPrefixString(option_pair[0], "aggregate_metadata")) { + string options_string = option_pair[1]; + const std::vector options = + Split(options_string, "#", false); + aggregate_metadata = true; + for (int i = 0; i < options.size(); i++) { + aggregate_metadata_prefixes.insert(options[i]); + GOOGLE_LOG(INFO) << options[i]; + } + } + if (option_pair[0] == "internal") { + is_descriptor = true; + } + } + + for (auto file : files) { + if (!Generate( + file, is_descriptor, aggregate_metadata, + aggregate_metadata_prefixes, + generator_context, error)) { + return false; + } + } + return true; +} + } // namespace php } // namespace compiler } // namespace protobuf diff --git a/third_party/protobuf/src/google/protobuf/compiler/php/php_generator.h b/third_party/protobuf/src/google/protobuf/compiler/php/php_generator.h index ef708ab5..ca9d23a4 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/php/php_generator.h +++ b/third_party/protobuf/src/google/protobuf/compiler/php/php_generator.h @@ -44,10 +44,24 @@ namespace compiler { namespace php { class PROTOC_EXPORT Generator : public CodeGenerator { + public: virtual bool Generate( const FileDescriptor* file, const string& parameter, GeneratorContext* generator_context, + string* error) const override; + + bool GenerateAll(const std::vector& files, + const std::string& parameter, + GeneratorContext* generator_context, + std::string* error) const override; + private: + bool Generate( + const FileDescriptor* file, + bool is_descriptor, + bool aggregate_metadata, + const std::set& aggregate_metadata_prefixes, + GeneratorContext* generator_context, string* error) const; }; diff --git a/third_party/protobuf/src/google/protobuf/compiler/plugin.cc b/third_party/protobuf/src/google/protobuf/compiler/plugin.cc index ac383f88..7306cf44 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/plugin.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/plugin.cc @@ -45,9 +45,9 @@ #include #include #include -#include #include #include +#include namespace google { @@ -132,6 +132,8 @@ bool GenerateCode(const CodeGeneratorRequest& request, bool succeeded = generator.GenerateAll(parsed_files, request.parameter(), &context, &error); + response->set_supported_features(generator.GetSupportedFeatures()); + if (!succeeded && error.empty()) { error = "Code generator returned false but provided no error " diff --git a/third_party/protobuf/src/google/protobuf/compiler/plugin.h b/third_party/protobuf/src/google/protobuf/compiler/plugin.h index 69c5d3f5..de581c12 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/plugin.h +++ b/third_party/protobuf/src/google/protobuf/compiler/plugin.h @@ -79,7 +79,7 @@ PROTOC_EXPORT int PluginMain(int argc, char* argv[], const CodeGenerator* generator); // Generates code using the given code generator. Returns true if the code -// generation is successful. If the code geneartion fails, error_msg may be +// generation is successful. If the code generation fails, error_msg may be // populated to describe the failure cause. bool GenerateCode(const CodeGeneratorRequest& request, const CodeGenerator& generator, diff --git a/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc b/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc index 4cb497f9..6739215d 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc @@ -5,7 +5,6 @@ #include -#include #include #include #include @@ -50,7 +49,7 @@ static void InitDefaultsscc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompil } PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, { &scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base,}}; @@ -66,7 +65,7 @@ static void InitDefaultsscc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompi } PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, { &scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base,}}; static void InitDefaultsscc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { @@ -81,7 +80,7 @@ static void InitDefaultsscc_info_CodeGeneratorResponse_File_google_2fprotobuf_2f } PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, {}}; static void InitDefaultsscc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -95,10 +94,10 @@ static void InitDefaultsscc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2 } PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, {}}; static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[4]; -static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto = nullptr; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto[1]; static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto = nullptr; const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { @@ -145,15 +144,17 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fcompiler_2 ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ 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_), 0, + 1, ~0u, }; static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, 9, sizeof(PROTOBUF_NAMESPACE_ID::compiler::Version)}, { 13, 22, sizeof(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest)}, { 26, 34, sizeof(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File)}, - { 37, 44, sizeof(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse)}, + { 37, 45, sizeof(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { @@ -163,7 +164,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_default_instance_), }; -const char descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2eproto[] = +const char descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n%google/protobuf/compiler/plugin.proto\022" "\030google.protobuf.compiler\032 google/protob" "uf/descriptor.proto\"F\n\007Version\022\r\n\005major\030" @@ -173,13 +174,16 @@ const char descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2epro "\t\0228\n\nproto_file\030\017 \003(\0132$.google.protobuf." "FileDescriptorProto\022;\n\020compiler_version\030" "\003 \001(\0132!.google.protobuf.compiler.Version" - "\"\252\001\n\025CodeGeneratorResponse\022\r\n\005error\030\001 \001(" - "\t\022B\n\004file\030\017 \003(\01324.google.protobuf.compil" - "er.CodeGeneratorResponse.File\032>\n\004File\022\014\n" - "\004name\030\001 \001(\t\022\027\n\017insertion_point\030\002 \001(\t\022\017\n\007" - "content\030\017 \001(\tBg\n\034com.google.protobuf.com" - "pilerB\014PluginProtosZ9github.com/golang/p" - "rotobuf/protoc-gen-go/plugin;plugin_go" + "\"\200\002\n\025CodeGeneratorResponse\022\r\n\005error\030\001 \001(" + "\t\022\032\n\022supported_features\030\002 \001(\004\022B\n\004file\030\017 " + "\003(\01324.google.protobuf.compiler.CodeGener" + "atorResponse.File\032>\n\004File\022\014\n\004name\030\001 \001(\t\022" + "\027\n\017insertion_point\030\002 \001(\t\022\017\n\007content\030\017 \001(" + "\t\"8\n\007Feature\022\020\n\014FEATURE_NONE\020\000\022\033\n\027FEATUR" + "E_PROTO3_OPTIONAL\020\001Bg\n\034com.google.protob" + "uf.compilerB\014PluginProtosZ9github.com/go" + "lang/protobuf/protoc-gen-go/plugin;plugi" + "n_go" ; static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_deps[1] = { &::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto, @@ -191,24 +195,44 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_goo &scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once; -static bool descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto = { - &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2eproto, "google/protobuf/compiler/plugin.proto", 638, + false, false, descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2eproto, "google/protobuf/compiler/plugin.proto", 724, &descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_once, descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_sccs, descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto_deps, 4, 1, schemas, file_default_instances, TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto, 4, file_level_enum_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto, file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_google_2fprotobuf_2fcompiler_2fplugin_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto), true); +static bool dynamic_init_dummy_google_2fprotobuf_2fcompiler_2fplugin_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto)), true); PROTOBUF_NAMESPACE_OPEN namespace compiler { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CodeGeneratorResponse_Feature_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto); + return file_level_enum_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto[0]; +} +bool CodeGeneratorResponse_Feature_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) +constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse::FEATURE_NONE; +constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse::FEATURE_PROTO3_OPTIONAL; +constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse::Feature_MIN; +constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse::Feature_MAX; +constexpr int CodeGeneratorResponse::Feature_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) // =================================================================== void Version::InitAsDefaultInstance() { } -class Version::HasBitSetters { +class Version::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_major(HasBits* has_bits) { @@ -225,26 +249,20 @@ class Version::HasBitSetters { } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Version::kMajorFieldNumber; -const int Version::kMinorFieldNumber; -const int Version::kPatchFieldNumber; -const int Version::kSuffixFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Version::Version() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { +Version::Version(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.compiler.Version) + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.Version) } Version::Version(const Version& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); suffix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_suffix()) { - suffix_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.suffix_); + if (from._internal_has_suffix()) { + suffix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_suffix(), + GetArena()); } ::memcpy(&major_, &from.major_, static_cast(reinterpret_cast(&patch_) - @@ -263,12 +281,20 @@ void Version::SharedCtor() { Version::~Version() { // @@protoc_insertion_point(destructor:google.protobuf.compiler.Version) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Version::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); suffix_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } +void Version::ArenaDtor(void* object) { + Version* _this = reinterpret_cast< Version* >(object); + (void)_this; +} +void Version::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} void Version::SetCachedSize(int size) const { _cached_size_.Set(size); } @@ -286,7 +312,7 @@ void Version::Clear() { cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x00000001u) { - suffix_.ClearNonDefaultToEmptyNoArena(); + suffix_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x0000000eu) { ::memset(&major_, 0, static_cast( @@ -294,13 +320,13 @@ void Version::Clear() { reinterpret_cast(&major_)) + sizeof(patch_)); } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Version::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -309,31 +335,35 @@ const char* Version::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::in // optional int32 major = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - HasBitSetters::set_has_major(&has_bits); - major_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_major(&has_bits); + major_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional int32 minor = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - HasBitSetters::set_has_minor(&has_bits); - minor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_minor(&has_bits); + minor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional int32 patch = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - HasBitSetters::set_has_patch(&has_bits); - patch_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_patch(&has_bits); + patch_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional string suffix = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_suffix(), ptr, ctx, "google.protobuf.compiler.Version.suffix"); + auto str = _internal_mutable_suffix(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.compiler.Version.suffix"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; @@ -343,7 +373,9 @@ const char* Version::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::in ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -357,133 +389,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Version::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.compiler.Version) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional int32 major = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - HasBitSetters::set_has_major(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &major_))); - } else { - goto handle_unusual; - } - break; - } - // optional int32 minor = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - HasBitSetters::set_has_minor(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &minor_))); - } else { - goto handle_unusual; - } - break; - } - - // optional int32 patch = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { - HasBitSetters::set_has_patch(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &patch_))); - } else { - goto handle_unusual; - } - break; - } - - // optional string suffix = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_suffix())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->suffix().data(), static_cast(this->suffix().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.compiler.Version.suffix"); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.compiler.Version) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.Version) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Version::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.Version) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional int32 major = 1; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->major(), output); - } - - // optional int32 minor = 2; - if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->minor(), output); - } - - // optional int32 patch = 3; - if (cached_has_bits & 0x00000008u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->patch(), output); - } - - // optional string suffix = 4; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->suffix().data(), static_cast(this->suffix().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.compiler.Version.suffix"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 4, this->suffix(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.Version) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Version::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Version::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.Version) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -491,33 +399,35 @@ void Version::SerializeWithCachedSizes( cached_has_bits = _has_bits_[0]; // optional int32 major = 1; if (cached_has_bits & 0x00000002u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->major(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_major(), target); } // optional int32 minor = 2; if (cached_has_bits & 0x00000004u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->minor(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_minor(), target); } // optional int32 patch = 3; if (cached_has_bits & 0x00000008u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->patch(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_patch(), target); } // optional string suffix = 4; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->suffix().data(), static_cast(this->suffix().length()), + this->_internal_suffix().data(), static_cast(this->_internal_suffix().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.Version.suffix"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 4, this->suffix(), target); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_suffix(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.Version) return target; @@ -527,11 +437,6 @@ size_t Version::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.Version) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -542,31 +447,35 @@ size_t Version::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->suffix()); + this->_internal_suffix()); } // optional int32 major = 1; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->major()); + this->_internal_major()); } // optional int32 minor = 2; if (cached_has_bits & 0x00000004u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->minor()); + this->_internal_minor()); } // optional int32 patch = 3; if (cached_has_bits & 0x00000008u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->patch()); + this->_internal_patch()); } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -590,15 +499,14 @@ void Version::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Version::MergeFrom(const Version& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.Version) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x0000000fu) { if (cached_has_bits & 0x00000001u) { - _has_bits_[0] |= 0x00000001u; - suffix_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.suffix_); + _internal_set_suffix(from._internal_suffix()); } if (cached_has_bits & 0x00000002u) { major_ = from.major_; @@ -631,19 +539,17 @@ bool Version::IsInitialized() const { return true; } -void Version::Swap(Version* other) { - if (other == this) return; - InternalSwap(other); -} void Version::InternalSwap(Version* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - suffix_.Swap(&other->suffix_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(major_, other->major_); - swap(minor_, other->minor_); - swap(patch_, other->patch_); + suffix_.Swap(&other->suffix_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Version, patch_) + + sizeof(Version::patch_) + - PROTOBUF_FIELD_OFFSET(Version, major_)>( + reinterpret_cast(&major_), + reinterpret_cast(&other->major_)); } ::PROTOBUF_NAMESPACE_ID::Metadata Version::GetMetadata() const { @@ -657,7 +563,7 @@ void CodeGeneratorRequest::InitAsDefaultInstance() { PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorRequest_default_instance_._instance.get_mutable()->compiler_version_ = const_cast< PROTOBUF_NAMESPACE_ID::compiler::Version*>( PROTOBUF_NAMESPACE_ID::compiler::Version::internal_default_instance()); } -class CodeGeneratorRequest::HasBitSetters { +class CodeGeneratorRequest::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_parameter(HasBits* has_bits) { @@ -670,36 +576,32 @@ class CodeGeneratorRequest::HasBitSetters { }; const PROTOBUF_NAMESPACE_ID::compiler::Version& -CodeGeneratorRequest::HasBitSetters::compiler_version(const CodeGeneratorRequest* msg) { +CodeGeneratorRequest::_Internal::compiler_version(const CodeGeneratorRequest* msg) { return *msg->compiler_version_; } void CodeGeneratorRequest::clear_proto_file() { proto_file_.Clear(); } -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int CodeGeneratorRequest::kFileToGenerateFieldNumber; -const int CodeGeneratorRequest::kParameterFieldNumber; -const int CodeGeneratorRequest::kProtoFileFieldNumber; -const int CodeGeneratorRequest::kCompilerVersionFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -CodeGeneratorRequest::CodeGeneratorRequest() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { +CodeGeneratorRequest::CodeGeneratorRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena), + file_to_generate_(arena), + proto_file_(arena) { SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorRequest) + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorRequest) } CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), file_to_generate_(from.file_to_generate_), proto_file_(from.proto_file_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); parameter_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_parameter()) { - parameter_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parameter_); + if (from._internal_has_parameter()) { + parameter_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_parameter(), + GetArena()); } - if (from.has_compiler_version()) { + if (from._internal_has_compiler_version()) { compiler_version_ = new PROTOBUF_NAMESPACE_ID::compiler::Version(*from.compiler_version_); } else { compiler_version_ = nullptr; @@ -716,13 +618,21 @@ void CodeGeneratorRequest::SharedCtor() { CodeGeneratorRequest::~CodeGeneratorRequest() { // @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorRequest) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void CodeGeneratorRequest::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); parameter_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete compiler_version_; } +void CodeGeneratorRequest::ArenaDtor(void* object) { + CodeGeneratorRequest* _this = reinterpret_cast< CodeGeneratorRequest* >(object); + (void)_this; +} +void CodeGeneratorRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} void CodeGeneratorRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } @@ -743,7 +653,7 @@ void CodeGeneratorRequest::Clear() { cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { - parameter_.ClearNonDefaultToEmptyNoArena(); + parameter_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000002u) { GOOGLE_DCHECK(compiler_version_ != nullptr); @@ -751,13 +661,13 @@ void CodeGeneratorRequest::Clear() { } } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* CodeGeneratorRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -769,23 +679,31 @@ const char* CodeGeneratorRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAM ptr -= 1; do { ptr += 1; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(add_file_to_generate(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate"); + auto str = _internal_add_file_to_generate(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate"); + #endif // !NDEBUG CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); } else goto handle_unusual; continue; // optional string parameter = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_parameter(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorRequest.parameter"); + auto str = _internal_mutable_parameter(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.compiler.CodeGeneratorRequest.parameter"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional .google.protobuf.compiler.Version compiler_version = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ctx->ParseMessage(mutable_compiler_version(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_compiler_version(), ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -795,10 +713,10 @@ const char* CodeGeneratorRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAM ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_proto_file(), ptr); + ptr = ctx->ParseMessage(_internal_add_proto_file(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 122); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<122>(ptr)); } else goto handle_unusual; continue; default: { @@ -807,7 +725,9 @@ const char* CodeGeneratorRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAM ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -821,186 +741,53 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool CodeGeneratorRequest::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorRequest) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated string file_to_generate = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->add_file_to_generate())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->file_to_generate(this->file_to_generate_size() - 1).data(), - static_cast(this->file_to_generate(this->file_to_generate_size() - 1).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate"); - } else { - goto handle_unusual; - } - break; - } - // optional string parameter = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_parameter())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->parameter().data(), static_cast(this->parameter().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.compiler.CodeGeneratorRequest.parameter"); - } else { - goto handle_unusual; - } - break; - } - - // optional .google.protobuf.compiler.Version compiler_version = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_compiler_version())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.FileDescriptorProto proto_file = 15; - case 15: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (122 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_proto_file())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.compiler.CodeGeneratorRequest) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.CodeGeneratorRequest) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void CodeGeneratorRequest::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated string file_to_generate = 1; - for (int i = 0, n = this->file_to_generate_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->file_to_generate(i).data(), static_cast(this->file_to_generate(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( - 1, this->file_to_generate(i), output); - } - - cached_has_bits = _has_bits_[0]; - // optional string parameter = 2; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->parameter().data(), static_cast(this->parameter().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.compiler.CodeGeneratorRequest.parameter"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 2, this->parameter(), output); - } - - // optional .google.protobuf.compiler.Version compiler_version = 3; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, HasBitSetters::compiler_version(this), output); - } - - // repeated .google.protobuf.FileDescriptorProto proto_file = 15; - for (unsigned int i = 0, - n = static_cast(this->proto_file_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 15, - this->proto_file(static_cast(i)), - output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorRequest) -} - -::PROTOBUF_NAMESPACE_ID::uint8* CodeGeneratorRequest::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* CodeGeneratorRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorRequest) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated string file_to_generate = 1; - for (int i = 0, n = this->file_to_generate_size(); i < n; i++) { + for (int i = 0, n = this->_internal_file_to_generate_size(); i < n; i++) { + const auto& s = this->_internal_file_to_generate(i); ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->file_to_generate(i).data(), static_cast(this->file_to_generate(i).length()), + s.data(), static_cast(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate"); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteStringToArray(1, this->file_to_generate(i), target); + target = stream->WriteString(1, s, target); } cached_has_bits = _has_bits_[0]; // optional string parameter = 2; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->parameter().data(), static_cast(this->parameter().length()), + this->_internal_parameter().data(), static_cast(this->_internal_parameter().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorRequest.parameter"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 2, this->parameter(), target); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_parameter(), target); } // optional .google.protobuf.compiler.Version compiler_version = 3; if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 3, HasBitSetters::compiler_version(this), target); + InternalWriteMessage( + 3, _Internal::compiler_version(this), target, stream); } // repeated .google.protobuf.FileDescriptorProto proto_file = 15; for (unsigned int i = 0, - n = static_cast(this->proto_file_size()); i < n; i++) { + n = static_cast(this->_internal_proto_file_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 15, this->proto_file(static_cast(i)), target); + InternalWriteMessage(15, this->_internal_proto_file(i), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorRequest) return target; @@ -1010,32 +797,23 @@ size_t CodeGeneratorRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorRequest) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated string file_to_generate = 1; total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->file_to_generate_size()); - for (int i = 0, n = this->file_to_generate_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(file_to_generate_.size()); + for (int i = 0, n = file_to_generate_.size(); i < n; i++) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->file_to_generate(i)); + file_to_generate_.Get(i)); } // repeated .google.protobuf.FileDescriptorProto proto_file = 15; - { - unsigned int count = static_cast(this->proto_file_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->proto_file(static_cast(i))); - } + total_size += 1UL * this->_internal_proto_file_size(); + for (const auto& msg : this->proto_file_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } cached_has_bits = _has_bits_[0]; @@ -1044,7 +822,7 @@ size_t CodeGeneratorRequest::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->parameter()); + this->_internal_parameter()); } // optional .google.protobuf.compiler.Version compiler_version = 3; @@ -1055,6 +833,10 @@ size_t CodeGeneratorRequest::ByteSizeLong() const { } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -1078,7 +860,7 @@ void CodeGeneratorRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& fro void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorRequest) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1087,11 +869,10 @@ void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) { cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { - _has_bits_[0] |= 0x00000001u; - parameter_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parameter_); + _internal_set_parameter(from._internal_parameter()); } if (cached_has_bits & 0x00000002u) { - mutable_compiler_version()->PROTOBUF_NAMESPACE_ID::compiler::Version::MergeFrom(from.compiler_version()); + _internal_mutable_compiler_version()->PROTOBUF_NAMESPACE_ID::compiler::Version::MergeFrom(from._internal_compiler_version()); } } } @@ -1111,22 +892,17 @@ void CodeGeneratorRequest::CopyFrom(const CodeGeneratorRequest& from) { } bool CodeGeneratorRequest::IsInitialized() const { - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->proto_file())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(proto_file_)) return false; return true; } -void CodeGeneratorRequest::Swap(CodeGeneratorRequest* other) { - if (other == this) return; - InternalSwap(other); -} void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - file_to_generate_.InternalSwap(CastToBase(&other->file_to_generate_)); - CastToBase(&proto_file_)->InternalSwap(CastToBase(&other->proto_file_)); - parameter_.Swap(&other->parameter_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + file_to_generate_.InternalSwap(&other->file_to_generate_); + proto_file_.InternalSwap(&other->proto_file_); + parameter_.Swap(&other->parameter_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); swap(compiler_version_, other->compiler_version_); } @@ -1139,7 +915,7 @@ void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* other) { void CodeGeneratorResponse_File::InitAsDefaultInstance() { } -class CodeGeneratorResponse_File::HasBitSetters { +class CodeGeneratorResponse_File::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_name(HasBits* has_bits) { @@ -1153,33 +929,30 @@ class CodeGeneratorResponse_File::HasBitSetters { } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int CodeGeneratorResponse_File::kNameFieldNumber; -const int CodeGeneratorResponse_File::kInsertionPointFieldNumber; -const int CodeGeneratorResponse_File::kContentFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -CodeGeneratorResponse_File::CodeGeneratorResponse_File() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { +CodeGeneratorResponse_File::CodeGeneratorResponse_File(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse.File) + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorResponse.File) } CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_name()) { - name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); + if (from._internal_has_name()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } insertion_point_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_insertion_point()) { - insertion_point_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.insertion_point_); + if (from._internal_has_insertion_point()) { + insertion_point_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_insertion_point(), + GetArena()); } content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_content()) { - content_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.content_); + if (from._internal_has_content()) { + content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_content(), + GetArena()); } // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse.File) } @@ -1194,14 +967,22 @@ void CodeGeneratorResponse_File::SharedCtor() { CodeGeneratorResponse_File::~CodeGeneratorResponse_File() { // @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorResponse.File) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void CodeGeneratorResponse_File::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); insertion_point_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); content_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } +void CodeGeneratorResponse_File::ArenaDtor(void* object) { + CodeGeneratorResponse_File* _this = reinterpret_cast< CodeGeneratorResponse_File* >(object); + (void)_this; +} +void CodeGeneratorResponse_File::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} void CodeGeneratorResponse_File::SetCachedSize(int size) const { _cached_size_.Set(size); } @@ -1220,23 +1001,23 @@ void CodeGeneratorResponse_File::Clear() { cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x00000007u) { if (cached_has_bits & 0x00000001u) { - name_.ClearNonDefaultToEmptyNoArena(); + name_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000002u) { - insertion_point_.ClearNonDefaultToEmptyNoArena(); + insertion_point_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000004u) { - content_.ClearNonDefaultToEmptyNoArena(); + content_.ClearNonDefaultToEmpty(); } } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* CodeGeneratorResponse_File::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -1245,21 +1026,33 @@ const char* CodeGeneratorResponse_File::_InternalParse(const char* ptr, ::PROTOB // optional string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.File.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.compiler.CodeGeneratorResponse.File.name"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional string insertion_point = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_insertion_point(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point"); + auto str = _internal_mutable_insertion_point(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional string content = 15; case 15: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 122)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_content(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.File.content"); + auto str = _internal_mutable_content(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.compiler.CodeGeneratorResponse.File.content"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; @@ -1269,7 +1062,9 @@ const char* CodeGeneratorResponse_File::_InternalParse(const char* ptr, ::PROTOB ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -1283,129 +1078,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool CodeGeneratorResponse_File::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorResponse.File) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.compiler.CodeGeneratorResponse.File.name"); - } else { - goto handle_unusual; - } - break; - } - // optional string insertion_point = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_insertion_point())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->insertion_point().data(), static_cast(this->insertion_point().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point"); - } else { - goto handle_unusual; - } - break; - } - - // optional string content = 15; - case 15: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (122 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_content())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->content().data(), static_cast(this->content().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.compiler.CodeGeneratorResponse.File.content"); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.compiler.CodeGeneratorResponse.File) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.CodeGeneratorResponse.File) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void CodeGeneratorResponse_File::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorResponse.File) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.compiler.CodeGeneratorResponse.File.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // optional string insertion_point = 2; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->insertion_point().data(), static_cast(this->insertion_point().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 2, this->insertion_point(), output); - } - - // optional string content = 15; - if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->content().data(), static_cast(this->content().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.compiler.CodeGeneratorResponse.File.content"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 15, this->content(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorResponse.File) -} - -::PROTOBUF_NAMESPACE_ID::uint8* CodeGeneratorResponse_File::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* CodeGeneratorResponse_File::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse.File) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1414,39 +1089,36 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorResponse.File.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // optional string insertion_point = 2; if (cached_has_bits & 0x00000002u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->insertion_point().data(), static_cast(this->insertion_point().length()), + this->_internal_insertion_point().data(), static_cast(this->_internal_insertion_point().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 2, this->insertion_point(), target); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_insertion_point(), target); } // optional string content = 15; if (cached_has_bits & 0x00000004u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->content().data(), static_cast(this->content().length()), + this->_internal_content().data(), static_cast(this->_internal_content().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorResponse.File.content"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 15, this->content(), target); + target = stream->WriteStringMaybeAliased( + 15, this->_internal_content(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorResponse.File) return target; @@ -1456,11 +1128,6 @@ size_t CodeGeneratorResponse_File::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse.File) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1471,24 +1138,28 @@ size_t CodeGeneratorResponse_File::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // optional string insertion_point = 2; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->insertion_point()); + this->_internal_insertion_point()); } // optional string content = 15; if (cached_has_bits & 0x00000004u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->content()); + this->_internal_content()); } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -1512,23 +1183,20 @@ void CodeGeneratorResponse_File::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Messag 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); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x00000007u) { if (cached_has_bits & 0x00000001u) { - _has_bits_[0] |= 0x00000001u; - name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); + _internal_set_name(from._internal_name()); } if (cached_has_bits & 0x00000002u) { - _has_bits_[0] |= 0x00000002u; - insertion_point_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.insertion_point_); + _internal_set_insertion_point(from._internal_insertion_point()); } if (cached_has_bits & 0x00000004u) { - _has_bits_[0] |= 0x00000004u; - content_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.content_); + _internal_set_content(from._internal_content()); } } } @@ -1551,20 +1219,13 @@ bool CodeGeneratorResponse_File::IsInitialized() const { return true; } -void CodeGeneratorResponse_File::Swap(CodeGeneratorResponse_File* other) { - if (other == this) return; - InternalSwap(other); -} void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - insertion_point_.Swap(&other->insertion_point_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - content_.Swap(&other->content_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + insertion_point_.Swap(&other->insertion_point_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + content_.Swap(&other->content_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } ::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorResponse_File::GetMetadata() const { @@ -1576,51 +1237,61 @@ void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* other) void CodeGeneratorResponse::InitAsDefaultInstance() { } -class CodeGeneratorResponse::HasBitSetters { +class CodeGeneratorResponse::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_error(HasBits* has_bits) { (*has_bits)[0] |= 1u; } + static void set_has_supported_features(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int CodeGeneratorResponse::kErrorFieldNumber; -const int CodeGeneratorResponse::kFileFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -CodeGeneratorResponse::CodeGeneratorResponse() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { +CodeGeneratorResponse::CodeGeneratorResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena), + file_(arena) { SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse) + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorResponse) } CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), file_(from.file_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); error_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_error()) { - error_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.error_); + if (from._internal_has_error()) { + error_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_error(), + GetArena()); } + supported_features_ = from.supported_features_; // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse) } void CodeGeneratorResponse::SharedCtor() { ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); error_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + supported_features_ = PROTOBUF_ULONGLONG(0); } CodeGeneratorResponse::~CodeGeneratorResponse() { // @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorResponse) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void CodeGeneratorResponse::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); error_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } +void CodeGeneratorResponse::ArenaDtor(void* object) { + CodeGeneratorResponse* _this = reinterpret_cast< CodeGeneratorResponse* >(object); + (void)_this; +} +void CodeGeneratorResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} void CodeGeneratorResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } @@ -1639,16 +1310,17 @@ void CodeGeneratorResponse::Clear() { file_.Clear(); cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x00000001u) { - error_.ClearNonDefaultToEmptyNoArena(); + error_.ClearNonDefaultToEmpty(); } + supported_features_ = PROTOBUF_ULONGLONG(0); _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* CodeGeneratorResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -1657,7 +1329,19 @@ const char* CodeGeneratorResponse::_InternalParse(const char* ptr, ::PROTOBUF_NA // optional string error = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_error(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.error"); + auto str = _internal_mutable_error(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.compiler.CodeGeneratorResponse.error"); + #endif // !NDEBUG + CHK_(ptr); + } else goto handle_unusual; + continue; + // optional uint64 supported_features = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + _Internal::set_has_supported_features(&has_bits); + supported_features_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -1667,10 +1351,10 @@ const char* CodeGeneratorResponse::_InternalParse(const char* ptr, ::PROTOBUF_NA ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_file(), ptr); + ptr = ctx->ParseMessage(_internal_add_file(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 122); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<122>(ptr)); } else goto handle_unusual; continue; default: { @@ -1679,7 +1363,9 @@ const char* CodeGeneratorResponse::_InternalParse(const char* ptr, ::PROTOBUF_NA ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -1693,99 +1379,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool CodeGeneratorResponse::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorResponse) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string error = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_error())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->error().data(), static_cast(this->error().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.compiler.CodeGeneratorResponse.error"); - } else { - goto handle_unusual; - } - break; - } - // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; - case 15: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (122 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_file())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.compiler.CodeGeneratorResponse) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.CodeGeneratorResponse) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void CodeGeneratorResponse::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional string error = 1; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->error().data(), static_cast(this->error().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.compiler.CodeGeneratorResponse.error"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->error(), output); - } - - // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; - for (unsigned int i = 0, - n = static_cast(this->file_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 15, - this->file(static_cast(i)), - output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorResponse) -} - -::PROTOBUF_NAMESPACE_ID::uint8* CodeGeneratorResponse::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* CodeGeneratorResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1794,25 +1390,30 @@ void CodeGeneratorResponse::SerializeWithCachedSizes( // optional string error = 1; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->error().data(), static_cast(this->error().length()), + this->_internal_error().data(), static_cast(this->_internal_error().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorResponse.error"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->error(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_error(), target); + } + + // optional uint64 supported_features = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(2, this->_internal_supported_features(), target); } // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; for (unsigned int i = 0, - n = static_cast(this->file_size()); i < n; i++) { + n = static_cast(this->_internal_file_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 15, this->file(static_cast(i)), target); + InternalWriteMessage(15, this->_internal_file(i), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorResponse) return target; @@ -1822,34 +1423,38 @@ size_t CodeGeneratorResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; - { - unsigned int count = static_cast(this->file_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->file(static_cast(i))); - } + total_size += 1UL * this->_internal_file_size(); + for (const auto& msg : this->file_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - // optional string error = 1; cached_has_bits = _has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->error()); - } + if (cached_has_bits & 0x00000003u) { + // optional string error = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_error()); + } + // optional uint64 supported_features = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( + this->_internal_supported_features()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -1873,14 +1478,20 @@ void CodeGeneratorResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& fr void CodeGeneratorResponse::MergeFrom(const CodeGeneratorResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; file_.MergeFrom(from.file_); - if (from.has_error()) { - _has_bits_[0] |= 0x00000001u; - error_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.error_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_error(from._internal_error()); + } + if (cached_has_bits & 0x00000002u) { + supported_features_ = from.supported_features_; + } + _has_bits_[0] |= cached_has_bits; } } @@ -1902,17 +1513,13 @@ bool CodeGeneratorResponse::IsInitialized() const { return true; } -void CodeGeneratorResponse::Swap(CodeGeneratorResponse* other) { - if (other == this) return; - InternalSwap(other); -} void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&file_)->InternalSwap(CastToBase(&other->file_)); - error_.Swap(&other->error_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + file_.InternalSwap(&other->file_); + error_.Swap(&other->error_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + swap(supported_features_, other->supported_features_); } ::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorResponse::GetMetadata() const { @@ -1925,16 +1532,16 @@ void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* other) { PROTOBUF_NAMESPACE_CLOSE PROTOBUF_NAMESPACE_OPEN template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::Version* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::Version >(Arena* arena) { - return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::compiler::Version >(arena); + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::compiler::Version >(arena); } template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest >(Arena* arena) { - return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest >(arena); + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest >(arena); } template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >(Arena* arena) { - return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >(arena); + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >(arena); } template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse >(Arena* arena) { - return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse >(arena); + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse >(arena); } PROTOBUF_NAMESPACE_CLOSE diff --git a/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h b/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h index 9bcb1383..d57cf858 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h +++ b/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h @@ -8,12 +8,12 @@ #include #include -#if PROTOBUF_VERSION < 3008000 +#if PROTOBUF_VERSION < 3012000 #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 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3012004 < 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. @@ -26,11 +26,12 @@ #include #include #include -#include +#include #include #include #include // IWYU pragma: export #include // IWYU pragma: export +#include #include #include // @@protoc_insertion_point(includes) @@ -86,12 +87,35 @@ PROTOBUF_NAMESPACE_CLOSE PROTOBUF_NAMESPACE_OPEN namespace compiler { +enum CodeGeneratorResponse_Feature : int { + CodeGeneratorResponse_Feature_FEATURE_NONE = 0, + CodeGeneratorResponse_Feature_FEATURE_PROTO3_OPTIONAL = 1 +}; +PROTOC_EXPORT bool CodeGeneratorResponse_Feature_IsValid(int value); +constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse_Feature_Feature_MIN = CodeGeneratorResponse_Feature_FEATURE_NONE; +constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse_Feature_Feature_MAX = CodeGeneratorResponse_Feature_FEATURE_PROTO3_OPTIONAL; +constexpr int CodeGeneratorResponse_Feature_Feature_ARRAYSIZE = CodeGeneratorResponse_Feature_Feature_MAX + 1; + +PROTOC_EXPORT const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CodeGeneratorResponse_Feature_descriptor(); +template +inline const std::string& CodeGeneratorResponse_Feature_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function CodeGeneratorResponse_Feature_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + CodeGeneratorResponse_Feature_descriptor(), enum_t_value); +} +inline bool CodeGeneratorResponse_Feature_Parse( + const std::string& name, CodeGeneratorResponse_Feature* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + CodeGeneratorResponse_Feature_descriptor(), name, value); +} // =================================================================== -class PROTOC_EXPORT Version : +class PROTOC_EXPORT Version PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.Version) */ { public: - Version(); + inline Version() : Version(nullptr) {}; virtual ~Version(); Version(const Version& from); @@ -105,7 +129,7 @@ class PROTOC_EXPORT Version : return *this; } inline Version& operator=(Version&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -114,10 +138,10 @@ class PROTOC_EXPORT Version : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { @@ -139,10 +163,22 @@ class PROTOC_EXPORT Version : static constexpr int kIndexInFileMessages = 0; - void Swap(Version* other); friend void swap(Version& a, Version& b) { a.Swap(&b); } + inline void Swap(Version* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Version* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -161,16 +197,9 @@ class PROTOC_EXPORT Version : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -182,13 +211,11 @@ class PROTOC_EXPORT Version : static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.compiler.Version"; } + protected: + explicit Version(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -204,10 +231,18 @@ class PROTOC_EXPORT Version : // accessors ------------------------------------------------------- + enum : int { + kSuffixFieldNumber = 4, + kMajorFieldNumber = 1, + kMinorFieldNumber = 2, + kPatchFieldNumber = 3, + }; // optional string suffix = 4; bool has_suffix() const; + private: + bool _internal_has_suffix() const; + public: void clear_suffix(); - static const int kSuffixFieldNumber = 4; const std::string& suffix() const; void set_suffix(const std::string& value); void set_suffix(std::string&& value); @@ -216,33 +251,67 @@ class PROTOC_EXPORT Version : std::string* mutable_suffix(); std::string* release_suffix(); void set_allocated_suffix(std::string* suffix); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_suffix(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_suffix( + std::string* suffix); + private: + const std::string& _internal_suffix() const; + void _internal_set_suffix(const std::string& value); + std::string* _internal_mutable_suffix(); + public: // optional int32 major = 1; bool has_major() const; + private: + bool _internal_has_major() const; + public: void clear_major(); - static const int kMajorFieldNumber = 1; ::PROTOBUF_NAMESPACE_ID::int32 major() const; void set_major(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_major() const; + void _internal_set_major(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // optional int32 minor = 2; bool has_minor() const; + private: + bool _internal_has_minor() const; + public: void clear_minor(); - static const int kMinorFieldNumber = 2; ::PROTOBUF_NAMESPACE_ID::int32 minor() const; void set_minor(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_minor() const; + void _internal_set_minor(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // optional int32 patch = 3; bool has_patch() const; + private: + bool _internal_has_patch() const; + public: void clear_patch(); - static const int kPatchFieldNumber = 3; ::PROTOBUF_NAMESPACE_ID::int32 patch() const; void set_patch(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_patch() const; + void _internal_set_patch(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.compiler.Version) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template 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_; @@ -253,10 +322,10 @@ class PROTOC_EXPORT Version : }; // ------------------------------------------------------------------- -class PROTOC_EXPORT CodeGeneratorRequest : +class PROTOC_EXPORT CodeGeneratorRequest PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorRequest) */ { public: - CodeGeneratorRequest(); + inline CodeGeneratorRequest() : CodeGeneratorRequest(nullptr) {}; virtual ~CodeGeneratorRequest(); CodeGeneratorRequest(const CodeGeneratorRequest& from); @@ -270,7 +339,7 @@ class PROTOC_EXPORT CodeGeneratorRequest : return *this; } inline CodeGeneratorRequest& operator=(CodeGeneratorRequest&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -279,10 +348,10 @@ class PROTOC_EXPORT CodeGeneratorRequest : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { @@ -304,10 +373,22 @@ class PROTOC_EXPORT CodeGeneratorRequest : static constexpr int kIndexInFileMessages = 1; - void Swap(CodeGeneratorRequest* other); friend void swap(CodeGeneratorRequest& a, CodeGeneratorRequest& b) { a.Swap(&b); } + inline void Swap(CodeGeneratorRequest* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CodeGeneratorRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -326,16 +407,9 @@ class PROTOC_EXPORT CodeGeneratorRequest : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -347,13 +421,11 @@ class PROTOC_EXPORT CodeGeneratorRequest : static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.compiler.CodeGeneratorRequest"; } + protected: + explicit CodeGeneratorRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -369,10 +441,18 @@ class PROTOC_EXPORT CodeGeneratorRequest : // accessors ------------------------------------------------------- + enum : int { + kFileToGenerateFieldNumber = 1, + kProtoFileFieldNumber = 15, + kParameterFieldNumber = 2, + kCompilerVersionFieldNumber = 3, + }; // repeated string file_to_generate = 1; int file_to_generate_size() const; + private: + int _internal_file_to_generate_size() const; + public: void clear_file_to_generate(); - static const int kFileToGenerateFieldNumber = 1; const std::string& file_to_generate(int index) const; std::string* mutable_file_to_generate(int index); void set_file_to_generate(int index, const std::string& value); @@ -386,14 +466,24 @@ class PROTOC_EXPORT CodeGeneratorRequest : void add_file_to_generate(const char* value, size_t size); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& file_to_generate() const; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_file_to_generate(); + private: + const std::string& _internal_file_to_generate(int index) const; + std::string* _internal_add_file_to_generate(); + public: // repeated .google.protobuf.FileDescriptorProto proto_file = 15; int proto_file_size() const; + private: + int _internal_proto_file_size() const; + public: void clear_proto_file(); - static const int kProtoFileFieldNumber = 15; PROTOBUF_NAMESPACE_ID::FileDescriptorProto* mutable_proto_file(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >* mutable_proto_file(); + private: + const PROTOBUF_NAMESPACE_ID::FileDescriptorProto& _internal_proto_file(int index) const; + PROTOBUF_NAMESPACE_ID::FileDescriptorProto* _internal_add_proto_file(); + public: const PROTOBUF_NAMESPACE_ID::FileDescriptorProto& proto_file(int index) const; PROTOBUF_NAMESPACE_ID::FileDescriptorProto* add_proto_file(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >& @@ -401,8 +491,10 @@ class PROTOC_EXPORT CodeGeneratorRequest : // optional string parameter = 2; bool has_parameter() const; + private: + bool _internal_has_parameter() const; + public: void clear_parameter(); - static const int kParameterFieldNumber = 2; const std::string& parameter() const; void set_parameter(const std::string& value); void set_parameter(std::string&& value); @@ -411,21 +503,46 @@ class PROTOC_EXPORT CodeGeneratorRequest : std::string* mutable_parameter(); std::string* release_parameter(); void set_allocated_parameter(std::string* parameter); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_parameter(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_parameter( + std::string* parameter); + private: + const std::string& _internal_parameter() const; + void _internal_set_parameter(const std::string& value); + std::string* _internal_mutable_parameter(); + public: // optional .google.protobuf.compiler.Version compiler_version = 3; bool has_compiler_version() const; + private: + bool _internal_has_compiler_version() const; + public: void clear_compiler_version(); - static const int kCompilerVersionFieldNumber = 3; const PROTOBUF_NAMESPACE_ID::compiler::Version& compiler_version() const; PROTOBUF_NAMESPACE_ID::compiler::Version* release_compiler_version(); PROTOBUF_NAMESPACE_ID::compiler::Version* mutable_compiler_version(); void set_allocated_compiler_version(PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version); + private: + const PROTOBUF_NAMESPACE_ID::compiler::Version& _internal_compiler_version() const; + PROTOBUF_NAMESPACE_ID::compiler::Version* _internal_mutable_compiler_version(); + public: + void unsafe_arena_set_allocated_compiler_version( + PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version); + PROTOBUF_NAMESPACE_ID::compiler::Version* unsafe_arena_release_compiler_version(); // @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorRequest) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template 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 file_to_generate_; @@ -436,10 +553,10 @@ class PROTOC_EXPORT CodeGeneratorRequest : }; // ------------------------------------------------------------------- -class PROTOC_EXPORT CodeGeneratorResponse_File : +class PROTOC_EXPORT CodeGeneratorResponse_File PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorResponse.File) */ { public: - CodeGeneratorResponse_File(); + inline CodeGeneratorResponse_File() : CodeGeneratorResponse_File(nullptr) {}; virtual ~CodeGeneratorResponse_File(); CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from); @@ -453,7 +570,7 @@ class PROTOC_EXPORT CodeGeneratorResponse_File : return *this; } inline CodeGeneratorResponse_File& operator=(CodeGeneratorResponse_File&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -462,10 +579,10 @@ class PROTOC_EXPORT CodeGeneratorResponse_File : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { @@ -487,10 +604,22 @@ class PROTOC_EXPORT CodeGeneratorResponse_File : static constexpr int kIndexInFileMessages = 2; - void Swap(CodeGeneratorResponse_File* other); friend void swap(CodeGeneratorResponse_File& a, CodeGeneratorResponse_File& b) { a.Swap(&b); } + inline void Swap(CodeGeneratorResponse_File* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CodeGeneratorResponse_File* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -509,16 +638,9 @@ class PROTOC_EXPORT CodeGeneratorResponse_File : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -530,13 +652,11 @@ class PROTOC_EXPORT CodeGeneratorResponse_File : static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.compiler.CodeGeneratorResponse.File"; } + protected: + explicit CodeGeneratorResponse_File(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -552,10 +672,17 @@ class PROTOC_EXPORT CodeGeneratorResponse_File : // accessors ------------------------------------------------------- + enum : int { + kNameFieldNumber = 1, + kInsertionPointFieldNumber = 2, + kContentFieldNumber = 15, + }; // optional string name = 1; bool has_name() const; + private: + bool _internal_has_name() const; + public: void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -564,11 +691,27 @@ class PROTOC_EXPORT CodeGeneratorResponse_File : std::string* mutable_name(); std::string* release_name(); void set_allocated_name(std::string* name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_name( + std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // optional string insertion_point = 2; bool has_insertion_point() const; + private: + bool _internal_has_insertion_point() const; + public: void clear_insertion_point(); - static const int kInsertionPointFieldNumber = 2; const std::string& insertion_point() const; void set_insertion_point(const std::string& value); void set_insertion_point(std::string&& value); @@ -577,11 +720,27 @@ class PROTOC_EXPORT CodeGeneratorResponse_File : std::string* mutable_insertion_point(); std::string* release_insertion_point(); void set_allocated_insertion_point(std::string* insertion_point); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_insertion_point(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_insertion_point( + std::string* insertion_point); + private: + const std::string& _internal_insertion_point() const; + void _internal_set_insertion_point(const std::string& value); + std::string* _internal_mutable_insertion_point(); + public: // optional string content = 15; bool has_content() const; + private: + bool _internal_has_content() const; + public: void clear_content(); - static const int kContentFieldNumber = 15; const std::string& content() const; void set_content(const std::string& value); void set_content(std::string&& value); @@ -590,12 +749,28 @@ class PROTOC_EXPORT CodeGeneratorResponse_File : std::string* mutable_content(); std::string* release_content(); void set_allocated_content(std::string* content); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_content(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_content( + std::string* content); + private: + const std::string& _internal_content() const; + void _internal_set_content(const std::string& value); + std::string* _internal_mutable_content(); + public: // @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse.File) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template 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_; @@ -605,10 +780,10 @@ class PROTOC_EXPORT CodeGeneratorResponse_File : }; // ------------------------------------------------------------------- -class PROTOC_EXPORT CodeGeneratorResponse : +class PROTOC_EXPORT CodeGeneratorResponse PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorResponse) */ { public: - CodeGeneratorResponse(); + inline CodeGeneratorResponse() : CodeGeneratorResponse(nullptr) {}; virtual ~CodeGeneratorResponse(); CodeGeneratorResponse(const CodeGeneratorResponse& from); @@ -622,7 +797,7 @@ class PROTOC_EXPORT CodeGeneratorResponse : return *this; } inline CodeGeneratorResponse& operator=(CodeGeneratorResponse&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -631,10 +806,10 @@ class PROTOC_EXPORT CodeGeneratorResponse : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { @@ -656,10 +831,22 @@ class PROTOC_EXPORT CodeGeneratorResponse : static constexpr int kIndexInFileMessages = 3; - void Swap(CodeGeneratorResponse* other); friend void swap(CodeGeneratorResponse& a, CodeGeneratorResponse& b) { a.Swap(&b); } + inline void Swap(CodeGeneratorResponse* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CodeGeneratorResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -678,16 +865,9 @@ class PROTOC_EXPORT CodeGeneratorResponse : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -699,13 +879,11 @@ class PROTOC_EXPORT CodeGeneratorResponse : static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.compiler.CodeGeneratorResponse"; } + protected: + explicit CodeGeneratorResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -721,15 +899,56 @@ class PROTOC_EXPORT CodeGeneratorResponse : typedef CodeGeneratorResponse_File File; + typedef CodeGeneratorResponse_Feature Feature; + static constexpr Feature FEATURE_NONE = + CodeGeneratorResponse_Feature_FEATURE_NONE; + static constexpr Feature FEATURE_PROTO3_OPTIONAL = + CodeGeneratorResponse_Feature_FEATURE_PROTO3_OPTIONAL; + static inline bool Feature_IsValid(int value) { + return CodeGeneratorResponse_Feature_IsValid(value); + } + static constexpr Feature Feature_MIN = + CodeGeneratorResponse_Feature_Feature_MIN; + static constexpr Feature Feature_MAX = + CodeGeneratorResponse_Feature_Feature_MAX; + static constexpr int Feature_ARRAYSIZE = + CodeGeneratorResponse_Feature_Feature_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Feature_descriptor() { + return CodeGeneratorResponse_Feature_descriptor(); + } + template + static inline const std::string& Feature_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Feature_Name."); + return CodeGeneratorResponse_Feature_Name(enum_t_value); + } + static inline bool Feature_Parse(const std::string& name, + Feature* value) { + return CodeGeneratorResponse_Feature_Parse(name, value); + } + // accessors ------------------------------------------------------- + enum : int { + kFileFieldNumber = 15, + kErrorFieldNumber = 1, + kSupportedFeaturesFieldNumber = 2, + }; // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; int file_size() const; + private: + int _internal_file_size() const; + public: void clear_file(); - static const int kFileFieldNumber = 15; PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* mutable_file(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >* mutable_file(); + private: + const PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File& _internal_file(int index) const; + PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* _internal_add_file(); + public: const PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File& file(int index) const; PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* add_file(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >& @@ -737,8 +956,10 @@ class PROTOC_EXPORT CodeGeneratorResponse : // optional string error = 1; bool has_error() const; + private: + bool _internal_has_error() const; + public: void clear_error(); - static const int kErrorFieldNumber = 1; const std::string& error() const; void set_error(const std::string& value); void set_error(std::string&& value); @@ -747,16 +968,46 @@ class PROTOC_EXPORT CodeGeneratorResponse : std::string* mutable_error(); std::string* release_error(); void set_allocated_error(std::string* error); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_error(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_error( + std::string* error); + private: + const std::string& _internal_error() const; + void _internal_set_error(const std::string& value); + std::string* _internal_mutable_error(); + public: + + // optional uint64 supported_features = 2; + bool has_supported_features() const; + private: + bool _internal_has_supported_features() const; + public: + void clear_supported_features(); + ::PROTOBUF_NAMESPACE_ID::uint64 supported_features() const; + void set_supported_features(::PROTOBUF_NAMESPACE_ID::uint64 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint64 _internal_supported_features() const; + void _internal_set_supported_features(::PROTOBUF_NAMESPACE_ID::uint64 value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template 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_; + ::PROTOBUF_NAMESPACE_ID::uint64 supported_features_; friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto; }; // =================================================================== @@ -771,106 +1022,151 @@ class PROTOC_EXPORT CodeGeneratorResponse : // Version // optional int32 major = 1; +inline bool Version::_internal_has_major() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} inline bool Version::has_major() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_major(); } inline void Version::clear_major() { major_ = 0; _has_bits_[0] &= ~0x00000002u; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Version::major() const { - // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.major) +inline ::PROTOBUF_NAMESPACE_ID::int32 Version::_internal_major() const { return major_; } -inline void Version::set_major(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 Version::major() const { + // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.major) + return _internal_major(); +} +inline void Version::_internal_set_major(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000002u; major_ = value; +} +inline void Version::set_major(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_major(value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.major) } // optional int32 minor = 2; +inline bool Version::_internal_has_minor() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} inline bool Version::has_minor() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return _internal_has_minor(); } inline void Version::clear_minor() { minor_ = 0; _has_bits_[0] &= ~0x00000004u; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Version::minor() const { - // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.minor) +inline ::PROTOBUF_NAMESPACE_ID::int32 Version::_internal_minor() const { return minor_; } -inline void Version::set_minor(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 Version::minor() const { + // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.minor) + return _internal_minor(); +} +inline void Version::_internal_set_minor(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000004u; minor_ = value; +} +inline void Version::set_minor(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_minor(value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.minor) } // optional int32 patch = 3; +inline bool Version::_internal_has_patch() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} inline bool Version::has_patch() const { - return (_has_bits_[0] & 0x00000008u) != 0; + return _internal_has_patch(); } inline void Version::clear_patch() { patch_ = 0; _has_bits_[0] &= ~0x00000008u; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Version::patch() const { - // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.patch) +inline ::PROTOBUF_NAMESPACE_ID::int32 Version::_internal_patch() const { return patch_; } -inline void Version::set_patch(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 Version::patch() const { + // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.patch) + return _internal_patch(); +} +inline void Version::_internal_set_patch(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000008u; patch_ = value; +} +inline void Version::set_patch(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_patch(value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.patch) } // optional string suffix = 4; +inline bool Version::_internal_has_suffix() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool Version::has_suffix() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_suffix(); } inline void Version::clear_suffix() { - suffix_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + suffix_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& Version::suffix() const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.suffix) - return suffix_.GetNoArena(); + return _internal_suffix(); } inline void Version::set_suffix(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - suffix_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_suffix(value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.suffix) } +inline std::string* Version::mutable_suffix() { + // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.Version.suffix) + return _internal_mutable_suffix(); +} +inline const std::string& Version::_internal_suffix() const { + return suffix_.Get(); +} +inline void Version::_internal_set_suffix(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + suffix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Version::set_suffix(std::string&& value) { _has_bits_[0] |= 0x00000001u; - suffix_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + suffix_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.Version.suffix) } inline void Version::set_suffix(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - suffix_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + suffix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.Version.suffix) } -inline void Version::set_suffix(const char* value, size_t size) { +inline void Version::set_suffix(const char* value, + size_t size) { _has_bits_[0] |= 0x00000001u; - suffix_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + suffix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.Version.suffix) } -inline std::string* Version::mutable_suffix() { +inline std::string* Version::_internal_mutable_suffix() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.Version.suffix) - return suffix_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return suffix_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Version::release_suffix() { // @@protoc_insertion_point(field_release:google.protobuf.compiler.Version.suffix) - if (!has_suffix()) { + if (!_internal_has_suffix()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return suffix_.ReleaseNonDefaultNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return suffix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Version::set_allocated_suffix(std::string* suffix) { if (suffix != nullptr) { @@ -878,24 +1174,54 @@ inline void Version::set_allocated_suffix(std::string* suffix) { } else { _has_bits_[0] &= ~0x00000001u; } - suffix_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), suffix); + suffix_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), suffix, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.Version.suffix) } +inline std::string* Version::unsafe_arena_release_suffix() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.compiler.Version.suffix) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000001u; + return suffix_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Version::unsafe_arena_set_allocated_suffix( + std::string* suffix) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (suffix != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + suffix_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + suffix, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.compiler.Version.suffix) +} // ------------------------------------------------------------------- // CodeGeneratorRequest // repeated string file_to_generate = 1; -inline int CodeGeneratorRequest::file_to_generate_size() const { +inline int CodeGeneratorRequest::_internal_file_to_generate_size() const { return 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(); } +inline std::string* CodeGeneratorRequest::add_file_to_generate() { + // @@protoc_insertion_point(field_add_mutable:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) + return _internal_add_file_to_generate(); +} +inline const std::string& CodeGeneratorRequest::_internal_file_to_generate(int index) const { + return file_to_generate_.Get(index); +} inline const std::string& CodeGeneratorRequest::file_to_generate(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) - return file_to_generate_.Get(index); + return _internal_file_to_generate(index); } inline std::string* CodeGeneratorRequest::mutable_file_to_generate(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) @@ -919,8 +1245,7 @@ inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* va reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) } -inline std::string* CodeGeneratorRequest::add_file_to_generate() { - // @@protoc_insertion_point(field_add_mutable:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) +inline std::string* CodeGeneratorRequest::_internal_add_file_to_generate() { return file_to_generate_.Add(); } inline void CodeGeneratorRequest::add_file_to_generate(const std::string& value) { @@ -952,52 +1277,67 @@ CodeGeneratorRequest::mutable_file_to_generate() { } // optional string parameter = 2; +inline bool CodeGeneratorRequest::_internal_has_parameter() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool CodeGeneratorRequest::has_parameter() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_parameter(); } inline void CodeGeneratorRequest::clear_parameter() { - parameter_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + parameter_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& CodeGeneratorRequest::parameter() const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.parameter) - return parameter_.GetNoArena(); + return _internal_parameter(); } inline void CodeGeneratorRequest::set_parameter(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - parameter_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_parameter(value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.parameter) } +inline std::string* CodeGeneratorRequest::mutable_parameter() { + // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.parameter) + return _internal_mutable_parameter(); +} +inline const std::string& CodeGeneratorRequest::_internal_parameter() const { + return parameter_.Get(); +} +inline void CodeGeneratorRequest::_internal_set_parameter(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + parameter_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void CodeGeneratorRequest::set_parameter(std::string&& value) { _has_bits_[0] |= 0x00000001u; - parameter_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + parameter_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorRequest.parameter) } inline void CodeGeneratorRequest::set_parameter(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - parameter_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + parameter_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorRequest.parameter) } -inline void CodeGeneratorRequest::set_parameter(const char* value, size_t size) { +inline void CodeGeneratorRequest::set_parameter(const char* value, + size_t size) { _has_bits_[0] |= 0x00000001u; - parameter_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + parameter_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorRequest.parameter) } -inline std::string* CodeGeneratorRequest::mutable_parameter() { +inline std::string* CodeGeneratorRequest::_internal_mutable_parameter() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.parameter) - return parameter_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return parameter_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* CodeGeneratorRequest::release_parameter() { // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorRequest.parameter) - if (!has_parameter()) { + if (!_internal_has_parameter()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return parameter_.ReleaseNonDefaultNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return parameter_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void CodeGeneratorRequest::set_allocated_parameter(std::string* parameter) { if (parameter != nullptr) { @@ -1005,14 +1345,37 @@ inline void CodeGeneratorRequest::set_allocated_parameter(std::string* parameter } else { _has_bits_[0] &= ~0x00000001u; } - parameter_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), parameter); + parameter_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), parameter, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorRequest.parameter) } +inline std::string* CodeGeneratorRequest::unsafe_arena_release_parameter() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.compiler.CodeGeneratorRequest.parameter) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000001u; + return parameter_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void CodeGeneratorRequest::unsafe_arena_set_allocated_parameter( + std::string* parameter) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (parameter != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + parameter_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + parameter, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.compiler.CodeGeneratorRequest.parameter) +} // repeated .google.protobuf.FileDescriptorProto proto_file = 15; -inline int CodeGeneratorRequest::proto_file_size() const { +inline int CodeGeneratorRequest::_internal_proto_file_size() const { return 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); @@ -1022,13 +1385,19 @@ CodeGeneratorRequest::mutable_proto_file() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorRequest.proto_file) return &proto_file_; } +inline const PROTOBUF_NAMESPACE_ID::FileDescriptorProto& CodeGeneratorRequest::_internal_proto_file(int index) const { + return 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 proto_file_.Get(index); + return _internal_proto_file(index); +} +inline PROTOBUF_NAMESPACE_ID::FileDescriptorProto* CodeGeneratorRequest::_internal_add_proto_file() { + return proto_file_.Add(); } inline PROTOBUF_NAMESPACE_ID::FileDescriptorProto* CodeGeneratorRequest::add_proto_file() { // @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.proto_file) - return proto_file_.Add(); + return _internal_add_proto_file(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >& CodeGeneratorRequest::proto_file() const { @@ -1037,42 +1406,74 @@ CodeGeneratorRequest::proto_file() const { } // 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); + return value; +} inline bool CodeGeneratorRequest::has_compiler_version() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_compiler_version(); } inline void CodeGeneratorRequest::clear_compiler_version() { if (compiler_version_ != nullptr) compiler_version_->Clear(); _has_bits_[0] &= ~0x00000002u; } -inline const PROTOBUF_NAMESPACE_ID::compiler::Version& CodeGeneratorRequest::compiler_version() const { +inline const PROTOBUF_NAMESPACE_ID::compiler::Version& CodeGeneratorRequest::_internal_compiler_version() const { const PROTOBUF_NAMESPACE_ID::compiler::Version* p = compiler_version_; - // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.compiler_version) return p != nullptr ? *p : *reinterpret_cast( &PROTOBUF_NAMESPACE_ID::compiler::_Version_default_instance_); } +inline const PROTOBUF_NAMESPACE_ID::compiler::Version& CodeGeneratorRequest::compiler_version() const { + // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.compiler_version) + return _internal_compiler_version(); +} +inline void CodeGeneratorRequest::unsafe_arena_set_allocated_compiler_version( + PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(compiler_version_); + } + compiler_version_ = compiler_version; + if (compiler_version) { + _has_bits_[0] |= 0x00000002u; + } else { + _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() { + auto temp = unsafe_arena_release_compiler_version(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +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; return temp; } -inline PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::mutable_compiler_version() { +inline PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::_internal_mutable_compiler_version() { _has_bits_[0] |= 0x00000002u; if (compiler_version_ == nullptr) { - auto* p = CreateMaybeMessage(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArena()); compiler_version_ = p; } - // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.compiler_version) return compiler_version_; } +inline PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::mutable_compiler_version() { + // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.compiler_version) + return _internal_mutable_compiler_version(); +} inline void CodeGeneratorRequest::set_allocated_compiler_version(PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete compiler_version_; } if (compiler_version) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(compiler_version); if (message_arena != submessage_arena) { compiler_version = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, compiler_version, submessage_arena); @@ -1090,52 +1491,67 @@ inline void CodeGeneratorRequest::set_allocated_compiler_version(PROTOBUF_NAMESP // CodeGeneratorResponse_File // optional string name = 1; +inline bool CodeGeneratorResponse_File::_internal_has_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool CodeGeneratorResponse_File::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_name(); } inline void CodeGeneratorResponse_File::clear_name() { - name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& CodeGeneratorResponse_File::name() const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.name) - return name_.GetNoArena(); + return _internal_name(); } inline void CodeGeneratorResponse_File::set_name(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.name) } +inline std::string* CodeGeneratorResponse_File::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.name) + return _internal_mutable_name(); +} +inline const std::string& CodeGeneratorResponse_File::_internal_name() const { + return name_.Get(); +} +inline void CodeGeneratorResponse_File::_internal_set_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void CodeGeneratorResponse_File::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; - name_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.name) } inline void CodeGeneratorResponse_File::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.File.name) } -inline void CodeGeneratorResponse_File::set_name(const char* value, size_t size) { +inline void CodeGeneratorResponse_File::set_name(const char* value, + size_t size) { _has_bits_[0] |= 0x00000001u; - name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.name) } -inline std::string* CodeGeneratorResponse_File::mutable_name() { +inline std::string* CodeGeneratorResponse_File::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.name) - return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* CodeGeneratorResponse_File::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.name) - if (!has_name()) { + if (!_internal_has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefaultNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void CodeGeneratorResponse_File::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -1143,57 +1559,92 @@ inline void CodeGeneratorResponse_File::set_allocated_name(std::string* name) { } else { _has_bits_[0] &= ~0x00000001u; } - name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name); + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.name) } +inline std::string* CodeGeneratorResponse_File::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.compiler.CodeGeneratorResponse.File.name) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000001u; + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void CodeGeneratorResponse_File::unsafe_arena_set_allocated_name( + std::string* name) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (name != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + name, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.name) +} // optional string insertion_point = 2; +inline bool CodeGeneratorResponse_File::_internal_has_insertion_point() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} inline bool CodeGeneratorResponse_File::has_insertion_point() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_insertion_point(); } inline void CodeGeneratorResponse_File::clear_insertion_point() { - insertion_point_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + insertion_point_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000002u; } inline const std::string& CodeGeneratorResponse_File::insertion_point() const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) - return insertion_point_.GetNoArena(); + return _internal_insertion_point(); } inline void CodeGeneratorResponse_File::set_insertion_point(const std::string& value) { - _has_bits_[0] |= 0x00000002u; - insertion_point_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_insertion_point(value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) } +inline std::string* CodeGeneratorResponse_File::mutable_insertion_point() { + // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) + return _internal_mutable_insertion_point(); +} +inline const std::string& CodeGeneratorResponse_File::_internal_insertion_point() const { + return insertion_point_.Get(); +} +inline void CodeGeneratorResponse_File::_internal_set_insertion_point(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + insertion_point_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void CodeGeneratorResponse_File::set_insertion_point(std::string&& value) { _has_bits_[0] |= 0x00000002u; - insertion_point_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + insertion_point_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) } inline void CodeGeneratorResponse_File::set_insertion_point(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000002u; - insertion_point_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + insertion_point_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) } -inline void CodeGeneratorResponse_File::set_insertion_point(const char* value, size_t size) { +inline void CodeGeneratorResponse_File::set_insertion_point(const char* value, + size_t size) { _has_bits_[0] |= 0x00000002u; - insertion_point_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + insertion_point_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) } -inline std::string* CodeGeneratorResponse_File::mutable_insertion_point() { +inline std::string* CodeGeneratorResponse_File::_internal_mutable_insertion_point() { _has_bits_[0] |= 0x00000002u; - // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) - return insertion_point_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return insertion_point_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* CodeGeneratorResponse_File::release_insertion_point() { // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) - if (!has_insertion_point()) { + if (!_internal_has_insertion_point()) { return nullptr; } _has_bits_[0] &= ~0x00000002u; - return insertion_point_.ReleaseNonDefaultNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return insertion_point_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void CodeGeneratorResponse_File::set_allocated_insertion_point(std::string* insertion_point) { if (insertion_point != nullptr) { @@ -1201,57 +1652,92 @@ inline void CodeGeneratorResponse_File::set_allocated_insertion_point(std::strin } else { _has_bits_[0] &= ~0x00000002u; } - insertion_point_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), insertion_point); + insertion_point_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), insertion_point, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) } +inline std::string* CodeGeneratorResponse_File::unsafe_arena_release_insertion_point() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000002u; + return insertion_point_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void CodeGeneratorResponse_File::unsafe_arena_set_allocated_insertion_point( + std::string* insertion_point) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (insertion_point != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + insertion_point_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + insertion_point, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) +} // optional string content = 15; +inline bool CodeGeneratorResponse_File::_internal_has_content() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} inline bool CodeGeneratorResponse_File::has_content() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return _internal_has_content(); } inline void CodeGeneratorResponse_File::clear_content() { - content_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + content_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000004u; } inline const std::string& CodeGeneratorResponse_File::content() const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.content) - return content_.GetNoArena(); + return _internal_content(); } inline void CodeGeneratorResponse_File::set_content(const std::string& value) { - _has_bits_[0] |= 0x00000004u; - content_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_content(value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.content) } +inline std::string* CodeGeneratorResponse_File::mutable_content() { + // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.content) + return _internal_mutable_content(); +} +inline const std::string& CodeGeneratorResponse_File::_internal_content() const { + return content_.Get(); +} +inline void CodeGeneratorResponse_File::_internal_set_content(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void CodeGeneratorResponse_File::set_content(std::string&& value) { _has_bits_[0] |= 0x00000004u; - content_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + content_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.content) } inline void CodeGeneratorResponse_File::set_content(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000004u; - content_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.File.content) } -inline void CodeGeneratorResponse_File::set_content(const char* value, size_t size) { +inline void CodeGeneratorResponse_File::set_content(const char* value, + size_t size) { _has_bits_[0] |= 0x00000004u; - content_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.content) } -inline std::string* CodeGeneratorResponse_File::mutable_content() { +inline std::string* CodeGeneratorResponse_File::_internal_mutable_content() { _has_bits_[0] |= 0x00000004u; - // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.content) - return content_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return content_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* CodeGeneratorResponse_File::release_content() { // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.content) - if (!has_content()) { + if (!_internal_has_content()) { return nullptr; } _has_bits_[0] &= ~0x00000004u; - return content_.ReleaseNonDefaultNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return content_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void CodeGeneratorResponse_File::set_allocated_content(std::string* content) { if (content != nullptr) { @@ -1259,61 +1745,96 @@ inline void CodeGeneratorResponse_File::set_allocated_content(std::string* conte } else { _has_bits_[0] &= ~0x00000004u; } - content_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), content); + content_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), content, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.content) } +inline std::string* CodeGeneratorResponse_File::unsafe_arena_release_content() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.compiler.CodeGeneratorResponse.File.content) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000004u; + return content_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void CodeGeneratorResponse_File::unsafe_arena_set_allocated_content( + std::string* content) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (content != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + content_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + content, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.content) +} // ------------------------------------------------------------------- // CodeGeneratorResponse // optional string error = 1; +inline bool CodeGeneratorResponse::_internal_has_error() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool CodeGeneratorResponse::has_error() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_error(); } inline void CodeGeneratorResponse::clear_error() { - error_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + error_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& CodeGeneratorResponse::error() const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.error) - return error_.GetNoArena(); + return _internal_error(); } inline void CodeGeneratorResponse::set_error(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - error_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_error(value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.error) } +inline std::string* CodeGeneratorResponse::mutable_error() { + // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.error) + return _internal_mutable_error(); +} +inline const std::string& CodeGeneratorResponse::_internal_error() const { + return error_.Get(); +} +inline void CodeGeneratorResponse::_internal_set_error(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + error_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void CodeGeneratorResponse::set_error(std::string&& value) { _has_bits_[0] |= 0x00000001u; - error_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + error_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.error) } inline void CodeGeneratorResponse::set_error(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - error_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + error_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.error) } -inline void CodeGeneratorResponse::set_error(const char* value, size_t size) { +inline void CodeGeneratorResponse::set_error(const char* value, + size_t size) { _has_bits_[0] |= 0x00000001u; - error_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + error_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.error) } -inline std::string* CodeGeneratorResponse::mutable_error() { +inline std::string* CodeGeneratorResponse::_internal_mutable_error() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.error) - return error_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return error_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* CodeGeneratorResponse::release_error() { // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.error) - if (!has_error()) { + if (!_internal_has_error()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return error_.ReleaseNonDefaultNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return error_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void CodeGeneratorResponse::set_allocated_error(std::string* error) { if (error != nullptr) { @@ -1321,14 +1842,65 @@ inline void CodeGeneratorResponse::set_allocated_error(std::string* error) { } else { _has_bits_[0] &= ~0x00000001u; } - error_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), error); + error_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), error, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.error) } +inline std::string* CodeGeneratorResponse::unsafe_arena_release_error() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.compiler.CodeGeneratorResponse.error) + GOOGLE_DCHECK(GetArena() != nullptr); + _has_bits_[0] &= ~0x00000001u; + return error_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void CodeGeneratorResponse::unsafe_arena_set_allocated_error( + std::string* error) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (error != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + error_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + error, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.error) +} + +// optional uint64 supported_features = 2; +inline bool CodeGeneratorResponse::_internal_has_supported_features() const { + bool value = (_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_ = PROTOBUF_ULONGLONG(0); + _has_bits_[0] &= ~0x00000002u; +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 CodeGeneratorResponse::_internal_supported_features() const { + return supported_features_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 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(::PROTOBUF_NAMESPACE_ID::uint64 value) { + _has_bits_[0] |= 0x00000002u; + supported_features_ = value; +} +inline void CodeGeneratorResponse::set_supported_features(::PROTOBUF_NAMESPACE_ID::uint64 value) { + _internal_set_supported_features(value); + // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.supported_features) +} // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; -inline int CodeGeneratorResponse::file_size() const { +inline int CodeGeneratorResponse::_internal_file_size() const { return file_.size(); } +inline int CodeGeneratorResponse::file_size() const { + return _internal_file_size(); +} inline void CodeGeneratorResponse::clear_file() { file_.Clear(); } @@ -1341,13 +1913,19 @@ CodeGeneratorResponse::mutable_file() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorResponse.file) return &file_; } +inline const PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File& CodeGeneratorResponse::_internal_file(int index) const { + return 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 file_.Get(index); + return _internal_file(index); +} +inline PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::_internal_add_file() { + return file_.Add(); } inline PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::add_file() { // @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorResponse.file) - return file_.Add(); + return _internal_add_file(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >& CodeGeneratorResponse::file() const { @@ -1370,6 +1948,16 @@ CodeGeneratorResponse::file() const { } // namespace compiler PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_Feature> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_Feature>() { + return PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_Feature_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + // @@protoc_insertion_point(global_scope) #include diff --git a/third_party/protobuf/src/google/protobuf/compiler/plugin.proto b/third_party/protobuf/src/google/protobuf/compiler/plugin.proto index 665e5a72..492b896c 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/plugin.proto +++ b/third_party/protobuf/src/google/protobuf/compiler/plugin.proto @@ -107,6 +107,16 @@ message CodeGeneratorResponse { // exiting with a non-zero status code. optional string error = 1; + // A bitmask of supported features that the code generator supports. + // This is a bitwise "or" of values from the Feature enum. + optional uint64 supported_features = 2; + + // Sync with code_generator.h. + enum Feature { + FEATURE_NONE = 0; + FEATURE_PROTO3_OPTIONAL = 1; + } + // Represents a single generated file. message File { // The file name, relative to the output directory. The name must not diff --git a/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.cc b/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.cc index cf5b7f65..8762818a 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.cc @@ -28,8 +28,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -//#PY25 compatible generated code for GAE. -// Copyright 2007 Google Inc. All Rights Reserved. // Author: robinson@google.com (Will Robinson) // // This module outputs pure-Python protocol message classes that will @@ -44,6 +42,8 @@ // performance-minded Python code leverage the fast C++ implementation // directly. +#include + #include #include #include @@ -52,20 +52,16 @@ #include #include -#include -#include - #include #include #include +#include #include #include #include #include #include - - namespace google { namespace protobuf { namespace compiler { @@ -187,8 +183,6 @@ void PrintTopBoilerplate(io::Printer* printer, const FileDescriptor* file, "# -*- coding: utf-8 -*-\n" "# Generated by the protocol buffer compiler. DO NOT EDIT!\n" "# source: $filename$\n" - "\nimport sys\n_b=sys.version_info[0]<3 and (lambda x:x) or (lambda " - "x:x.encode('latin1'))" //##PY25 "\n", "filename", file->name()); if (HasTopLevelEnums(file)) { @@ -274,14 +268,10 @@ std::string StringifyDefaultValue(const FieldDescriptor& field) { case FieldDescriptor::CPPTYPE_ENUM: return StrCat(field.default_value_enum()->number()); case FieldDescriptor::CPPTYPE_STRING: - //##!PY25 return "b\"" + CEscape(field.default_value_string()) - //+ - //##!PY25 (field.type() != FieldDescriptor::TYPE_STRING ? "\"" - //: - //##!PY25 "\".decode('utf-8')"); - return "_b(\"" + CEscape(field.default_value_string()) + //##PY25 - (field.type() != FieldDescriptor::TYPE_STRING ? "\")" : //##PY25 - "\").decode('utf-8')"); //##PY25 + return "b\"" + CEscape(field.default_value_string()) + + (field.type() != FieldDescriptor::TYPE_STRING + ? "\"" + : "\".decode('utf-8')"); case FieldDescriptor::CPPTYPE_MESSAGE: return "None"; } @@ -307,13 +297,33 @@ std::string StringifySyntax(FileDescriptor::Syntax syntax) { } // namespace -Generator::Generator() : file_(NULL) {} +Generator::Generator() : file_(nullptr) {} Generator::~Generator() {} +uint64 Generator::GetSupportedFeatures() const { + return CodeGenerator::Feature::FEATURE_PROTO3_OPTIONAL; +} + bool Generator::Generate(const FileDescriptor* file, const std::string& parameter, GeneratorContext* context, std::string* error) const { + // ----------------------------------------------------------------- + // parse generator options + bool cpp_generated_lib_linked = false; + + std::vector > options; + ParseGeneratorParameter(parameter, &options); + + for (int i = 0; i < options.size(); i++) { + if (options[i].first == "cpp_generated_lib_linked") { + cpp_generated_lib_linked = true; + } else { + *error = "Unknown generator option: " + options[i].first; + return false; + } + } + // Completely serialize all Generate() calls on this instance. The // thread-safety constraints of the CodeGenerator interface aren't clear so @@ -329,6 +339,11 @@ bool Generator::Generate(const FileDescriptor* file, ReplaceCharacters(&filename, ".", '/'); filename += ".py"; + pure_python_workable_ = !cpp_generated_lib_linked; + if (HasPrefixString(file->name(), "google/protobuf/")) { + pure_python_workable_ = true; + } + FileDescriptorProto fdp; file_->CopyTo(&fdp); fdp.SerializeToString(&file_descriptor_serialized_); @@ -340,25 +355,31 @@ bool Generator::Generate(const FileDescriptor* file, printer_ = &printer; PrintTopBoilerplate(printer_, file_, GeneratingDescriptorProto()); - PrintImports(); + if (pure_python_workable_) { + PrintImports(); + } PrintFileDescriptor(); PrintTopLevelEnums(); PrintTopLevelExtensions(); - PrintAllNestedEnumsInFile(); - PrintMessageDescriptors(); - FixForeignFieldsInDescriptors(); + if (pure_python_workable_) { + PrintAllNestedEnumsInFile(); + PrintMessageDescriptors(); + FixForeignFieldsInDescriptors(); + } PrintMessages(); - // We have to fix up the extensions after the message classes themselves, - // since they need to call static RegisterExtension() methods on these - // classes. - FixForeignFieldsInExtensions(); - // Descriptor options may have custom extensions. These custom options - // can only be successfully parsed after we register corresponding - // extensions. Therefore we parse all options again here to recognize - // custom options that may be unknown when we define the descriptors. - // This does not apply to services because they are not used by extensions. - FixAllDescriptorOptions(); - PrintServiceDescriptors(); + if (pure_python_workable_) { + // We have to fix up the extensions after the message classes themselves, + // since they need to call static RegisterExtension() methods on these + // classes. + FixForeignFieldsInExtensions(); + // Descriptor options may have custom extensions. These custom options + // can only be successfully parsed after we register corresponding + // extensions. Therefore we parse all options again here to recognize + // custom options that may be unknown when we define the descriptors. + // This does not apply to services because they are not used by extensions. + FixAllDescriptorOptions(); + PrintServiceDescriptors(); + } if (HasGenericServices(file)) { PrintServices(); } @@ -367,20 +388,7 @@ bool Generator::Generate(const FileDescriptor* file, return !printer.failed(); } -// BEGIN GOOGLE-INTERNAL -// Strip the google3.third_party.py. prefix off of a module name as we -// NEVER want that invalid module import path to be generated in google3. -// Our sys.path has google3/third_party/py/ in it. All modules from -// that tree need to be imported using just their own name. -// See http://go/ThirdPartyPython -void StripThirdPartyPy(std::string* module_name) { - const std::string third_party_py_prefix = "google3.third_party.py."; - int len = third_party_py_prefix.length(); - if (module_name->compare(0, len, third_party_py_prefix, 0, len) == 0) { - *module_name = module_name->erase(0, len); - } -} -// END GOOGLE-INTERNAL + // Prints Python imports for all modules imported by |file|. void Generator::PrintImports() const { @@ -389,9 +397,6 @@ void Generator::PrintImports() const { std::string module_name = ModuleName(filename); std::string module_alias = ModuleAlias(filename); - // BEGIN GOOGLE-INTERNAL - StripThirdPartyPy(&module_name); - // END GOOGLE-INTERNAL if (ContainsPythonKeyword(module_name)) { // If the module path contains a Python keyword, we have to quote the // module name and import it using importlib. Otherwise the usual kind of @@ -422,9 +427,6 @@ void Generator::PrintImports() const { // Print public imports. for (int i = 0; i < file_->public_dependency_count(); ++i) { std::string module_name = ModuleName(file_->public_dependency(i)->name()); - // BEGIN GOOGLE-INTERNAL - StripThirdPartyPy(&module_name); - // END GOOGLE-INTERNAL printer_->Print("from $module$ import *\n", "module", module_name); } printer_->Print("\n"); @@ -443,31 +445,34 @@ void Generator::PrintFileDescriptor() const { " name='$name$',\n" " package='$package$',\n" " syntax='$syntax$',\n" - " serialized_options=$options$,\n"; + " serialized_options=$options$,\n" + " create_key=_descriptor._internal_create_key,\n"; printer_->Print(m, file_descriptor_template); printer_->Indent(); - printer_->Print( - //##!PY25 "serialized_pb=b'$value$'\n", - "serialized_pb=_b('$value$')\n", //##PY25 - "value", strings::CHexEscape(file_descriptor_serialized_)); - if (file_->dependency_count() != 0) { - printer_->Print(",\ndependencies=["); - for (int i = 0; i < file_->dependency_count(); ++i) { - std::string module_alias = ModuleAlias(file_->dependency(i)->name()); - printer_->Print("$module_alias$.DESCRIPTOR,", "module_alias", - module_alias); + if (pure_python_workable_) { + printer_->Print("serialized_pb=b'$value$'\n", "value", + strings::CHexEscape(file_descriptor_serialized_)); + if (file_->dependency_count() != 0) { + printer_->Print(",\ndependencies=["); + for (int i = 0; i < file_->dependency_count(); ++i) { + std::string module_alias = ModuleAlias(file_->dependency(i)->name()); + printer_->Print("$module_alias$.DESCRIPTOR,", "module_alias", + module_alias); + } + printer_->Print("]"); } - printer_->Print("]"); - } - if (file_->public_dependency_count() > 0) { - printer_->Print(",\npublic_dependencies=["); - for (int i = 0; i < file_->public_dependency_count(); ++i) { - std::string module_alias = - ModuleAlias(file_->public_dependency(i)->name()); - printer_->Print("$module_alias$.DESCRIPTOR,", "module_alias", - module_alias); + if (file_->public_dependency_count() > 0) { + printer_->Print(",\npublic_dependencies=["); + for (int i = 0; i < file_->public_dependency_count(); ++i) { + std::string module_alias = + ModuleAlias(file_->public_dependency(i)->name()); + printer_->Print("$module_alias$.DESCRIPTOR,", "module_alias", + module_alias); + } + printer_->Print("]"); } - printer_->Print("]"); + } else { + printer_->Print("serialized_pb=''\n"); } // TODO(falk): Also print options and fix the message_type, enum_type, @@ -531,16 +536,21 @@ void Generator::PrintEnum(const EnumDescriptor& enum_descriptor) const { " full_name='$full_name$',\n" " filename=None,\n" " file=$file$,\n" + " create_key=_descriptor._internal_create_key,\n" " values=[\n"; std::string options_string; enum_descriptor.options().SerializeToString(&options_string); printer_->Print(m, enum_descriptor_template); printer_->Indent(); printer_->Indent(); - for (int i = 0; i < enum_descriptor.value_count(); ++i) { - PrintEnumValueDescriptor(*enum_descriptor.value(i)); - printer_->Print(",\n"); + + if (pure_python_workable_) { + for (int i = 0; i < enum_descriptor.value_count(); ++i) { + PrintEnumValueDescriptor(*enum_descriptor.value(i)); + printer_->Print(",\n"); + } } + printer_->Outdent(); printer_->Print("],\n"); printer_->Print("containing_type=None,\n"); @@ -550,8 +560,10 @@ void Generator::PrintEnum(const EnumDescriptor& enum_descriptor) const { PrintSerializedPbInterval(enum_descriptor, edp); printer_->Outdent(); printer_->Print(")\n"); - printer_->Print("_sym_db.RegisterEnumDescriptor($name$)\n", "name", - module_level_descriptor_name); + if (pure_python_workable_) { + printer_->Print("_sym_db.RegisterEnumDescriptor($name$)\n", "name", + module_level_descriptor_name); + } printer_->Print("\n"); } @@ -629,7 +641,8 @@ void Generator::PrintServiceDescriptor( "full_name='$full_name$',\n" "file=$file$,\n" "index=$index$,\n" - "serialized_options=$options_value$,\n"; + "serialized_options=$options_value$,\n" + "create_key=_descriptor._internal_create_key,\n"; printer_->Print(m, required_function_arguments); ServiceDescriptorProto sdp; @@ -657,7 +670,8 @@ void Generator::PrintServiceDescriptor( "containing_service=None,\n" "input_type=$input_type$,\n" "output_type=$output_type$,\n" - "serialized_options=$options_value$,\n"); + "serialized_options=$options_value$,\n" + "create_key=_descriptor._internal_create_key,\n"); printer_->Outdent(); printer_->Print("),\n"); } @@ -671,11 +685,14 @@ void Generator::PrintServiceDescriptor( void Generator::PrintDescriptorKeyAndModuleName( const ServiceDescriptor& descriptor) const { + std::string name = ModuleLevelServiceDescriptorName(descriptor); + if (!pure_python_workable_) { + name = "'" + descriptor.full_name() + "'"; + } printer_->Print("$descriptor_key$ = $descriptor_name$,\n", "descriptor_key", - kDescriptorKey, "descriptor_name", - ModuleLevelServiceDescriptorName(descriptor)); - printer_->Print("__module__ = '$module_name$'\n", "module_name", - ModuleName(file_->name())); + kDescriptorKey, "descriptor_name", name); + std::string module_name = ModuleName(file_->name()); + printer_->Print("__module__ = '$module_name$'\n", "module_name", module_name); } void Generator::PrintServiceClass(const ServiceDescriptor& descriptor) const { @@ -724,7 +741,8 @@ void Generator::PrintDescriptor(const Descriptor& message_descriptor) const { "full_name='$full_name$',\n" "filename=None,\n" "file=$file$,\n" - "containing_type=None,\n"; + "containing_type=None,\n" + "create_key=_descriptor._internal_create_key,\n"; printer_->Print(m, required_function_arguments); PrintFieldsInDescriptor(message_descriptor); PrintExtensionsInDescriptor(message_descriptor); @@ -787,7 +805,8 @@ void Generator::PrintDescriptor(const Descriptor& message_descriptor) const { printer_->Print(m, "_descriptor.OneofDescriptor(\n" " name='$name$', full_name='$full_name$',\n" - " index=$index$, containing_type=None, " + " index=$index$, containing_type=None,\n" + " create_key=_descriptor._internal_create_key,\n" "fields=[]$serialized_options$),\n"); } printer_->Outdent(); @@ -862,10 +881,15 @@ void Generator::PrintMessage(const Descriptor& message_descriptor, PrintNestedMessages(message_descriptor, qualified_name, to_register); std::map m; m["descriptor_key"] = kDescriptorKey; - m["descriptor_name"] = ModuleLevelDescriptorName(message_descriptor); + if (pure_python_workable_) { + m["descriptor_name"] = ModuleLevelDescriptorName(message_descriptor); + } else { + m["descriptor_name"] = "'" + message_descriptor.full_name() + "'"; + } printer_->Print(m, "'$descriptor_key$' : $descriptor_name$,\n"); + std::string module_name = ModuleName(file_->name()); printer_->Print("'__module__' : '$module_name$'\n", "module_name", - ModuleName(file_->name())); + module_name); printer_->Print("# @@protoc_insertion_point(class_scope:$full_name$)\n", "full_name", message_descriptor.full_name()); printer_->Print("})\n"); @@ -1023,8 +1047,8 @@ std::string Generator::FieldReferencingExpression( return ResolveKeyword(field.name()); } return strings::Substitute("$0.$1['$2']", - ModuleLevelDescriptorName(*containing_type), - python_dict_name, field.name()); + ModuleLevelDescriptorName(*containing_type), + python_dict_name, field.name()); } // Prints containing_type for nested descriptors or enum descriptors. @@ -1032,7 +1056,7 @@ template void Generator::FixContainingTypeInDescriptor( const DescriptorT& descriptor, const Descriptor* containing_descriptor) const { - if (containing_descriptor != NULL) { + if (containing_descriptor != nullptr) { const std::string nested_name = ModuleLevelDescriptorName(descriptor); const std::string parent_name = ModuleLevelDescriptorName(*containing_descriptor); @@ -1047,7 +1071,7 @@ void Generator::FixContainingTypeInDescriptor( // just set everything in the initial assignment statements). void Generator::FixForeignFieldsInDescriptors() const { for (int i = 0; i < file_->message_type_count(); ++i) { - FixForeignFieldsInDescriptor(*file_->message_type(i), NULL); + FixForeignFieldsInDescriptor(*file_->message_type(i), nullptr); } for (int i = 0; i < file_->message_type_count(); ++i) { AddMessageToFileDescriptor(*file_->message_type(i)); @@ -1058,6 +1082,7 @@ void Generator::FixForeignFieldsInDescriptors() const { for (int i = 0; i < file_->extension_count(); ++i) { AddExtensionToFileDescriptor(*file_->extension(i)); } + // TODO(jieluo): Move this register to PrintFileDescriptor() when // FieldDescriptor.file is added in generated file. printer_->Print("_sym_db.RegisterFileDescriptor($name$)\n", "name", @@ -1129,7 +1154,8 @@ void Generator::PrintEnumValueDescriptor( "_descriptor.EnumValueDescriptor(\n" " name='$name$', index=$index$, number=$number$,\n" " serialized_options=$options$,\n" - " type=None)"); + " type=None,\n" + " create_key=_descriptor._internal_create_key)"); } // Returns a CEscaped string of serialized_options. @@ -1138,8 +1164,7 @@ std::string Generator::OptionsValue( if (serialized_options.length() == 0 || GeneratingDescriptorProto()) { return "None"; } else { - //##!PY25 return "b'('" + CEscape(serialized_options)+ "')"; - return "_b('" + CEscape(serialized_options) + "')"; //##PY25 + return "b'" + CEscape(serialized_options) + "'"; } } @@ -1173,7 +1198,8 @@ void Generator::PrintFieldDescriptor(const FieldDescriptor& field, "default_value=$default_value$,\n" " message_type=None, enum_type=None, containing_type=None,\n" " is_extension=$is_extension$, extension_scope=None,\n" - " serialized_options=$serialized_options$$json_name$, file=DESCRIPTOR)"; + " serialized_options=$serialized_options$$json_name$, file=DESCRIPTOR," + " create_key=_descriptor._internal_create_key)"; printer_->Print(m, field_descriptor_decl); } @@ -1371,7 +1397,7 @@ void Generator::FixOptionsForField(const FieldDescriptor& field) const { if (field_options != "None") { std::string field_name; if (field.is_extension()) { - if (field.extension_scope() == NULL) { + if (field.extension_scope() == nullptr) { // Top level extensions. field_name = field.name(); } else { diff --git a/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.h b/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.h index 46306717..fb1aee16 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.h +++ b/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.h @@ -69,10 +69,11 @@ class PROTOC_EXPORT Generator : public CodeGenerator { virtual ~Generator(); // CodeGenerator methods. - virtual bool Generate(const FileDescriptor* file, - const std::string& parameter, - GeneratorContext* generator_context, - std::string* error) const; + bool Generate(const FileDescriptor* file, const std::string& parameter, + GeneratorContext* generator_context, + std::string* error) const override; + + uint64 GetSupportedFeatures() const override; private: void PrintImports() const; @@ -166,6 +167,7 @@ class PROTOC_EXPORT Generator : public CodeGenerator { mutable const FileDescriptor* file_; // Set in Generate(). Under mutex_. mutable std::string file_descriptor_serialized_; mutable io::Printer* printer_; // Set in Generate(). Under mutex_. + mutable bool pure_python_workable_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Generator); }; diff --git a/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_code_pb.rb b/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_code_pb.rb index 0c9ed6fb..7e66d1ec 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_code_pb.rb +++ b/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_code_pb.rb @@ -68,9 +68,9 @@ end module A module B module C - TestMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage").msgclass - TestMessage::NestedMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage.NestedMessage").msgclass - TestEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestEnum").enummodule + TestMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage").msgclass + TestMessage::NestedMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage.NestedMessage").msgclass + TestEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestEnum").enummodule end end end diff --git a/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_code_proto2_pb.rb b/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_code_proto2_pb.rb index 15b340ad..c89738fe 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_code_proto2_pb.rb +++ b/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_code_proto2_pb.rb @@ -69,9 +69,9 @@ end module A module B module C - TestMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage").msgclass - TestMessage::NestedMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage.NestedMessage").msgclass - TestEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestEnum").enummodule + TestMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage").msgclass + TestMessage::NestedMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage.NestedMessage").msgclass + TestEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestEnum").enummodule end end end diff --git a/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy_pb.rb b/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy_pb.rb index 74f3bf3d..cdbbe891 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy_pb.rb +++ b/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy_pb.rb @@ -14,7 +14,7 @@ end module AA module BB module CC - Four = Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.and.Four").msgclass + Four = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.and.Four").msgclass end end end diff --git a/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb b/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb index 24ff21e1..e6d47011 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb +++ b/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb @@ -14,7 +14,7 @@ end module A module B module C - Four = Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass + Four = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass end end end diff --git a/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb b/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb index 3a1dd67d..1ac0ef7a 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb +++ b/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb @@ -14,7 +14,7 @@ end module One module Two module AThree - Four = Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass + Four = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass end end end diff --git a/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generator.cc b/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generator.cc index 23091c8f..cf61d999 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generator.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generator.cc @@ -77,6 +77,10 @@ std::string GetOutputFilename(const std::string& proto_file) { } std::string LabelForField(const FieldDescriptor* field) { + if (field->has_optional_keyword() && + field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3) { + return "proto3_optional"; + } switch (field->label()) { case FieldDescriptor::LABEL_OPTIONAL: return "optional"; case FieldDescriptor::LABEL_REQUIRED: return "required"; @@ -255,12 +259,12 @@ bool GenerateMessage(const Descriptor* message, io::Printer* printer, for (int i = 0; i < message->field_count(); i++) { const FieldDescriptor* field = message->field(i); - if (!field->containing_oneof()) { + if (!field->real_containing_oneof()) { GenerateField(field, printer); } } - for (int i = 0; i < message->oneof_decl_count(); i++) { + for (int i = 0; i < message->real_oneof_decl_count(); i++) { const OneofDescriptor* oneof = message->oneof_decl(i); GenerateOneof(oneof, printer); } @@ -371,7 +375,7 @@ void GenerateMessageAssignment(const std::string& prefix, "prefix", prefix, "name", RubifyConstant(message->name())); printer->Print( - "Google::Protobuf::DescriptorPool.generated_pool." + "::Google::Protobuf::DescriptorPool.generated_pool." "lookup(\"$full_name$\").msgclass\n", "full_name", message->full_name()); @@ -391,7 +395,7 @@ void GenerateEnumAssignment(const std::string& prefix, const EnumDescriptor* en, "prefix", prefix, "name", RubifyConstant(en->name())); printer->Print( - "Google::Protobuf::DescriptorPool.generated_pool." + "::Google::Protobuf::DescriptorPool.generated_pool." "lookup(\"$full_name$\").enummodule\n", "full_name", en->full_name()); } @@ -407,7 +411,7 @@ int GeneratePackageModules(const FileDescriptor* file, io::Printer* printer) { if (file->options().has_ruby_package()) { package_name = file->options().ruby_package(); - // If :: is in the package use the Ruby formated name as-is + // If :: is in the package use the Ruby formatted name as-is // -> A::B::C // otherwise, use the dot seperator // -> A.B.C @@ -421,7 +425,7 @@ int GeneratePackageModules(const FileDescriptor* file, io::Printer* printer) { package_name = file->package(); } - // Use the appropriate delimter + // Use the appropriate delimiter string delimiter = need_change_to_module ? "." : "::"; int delimiter_size = need_change_to_module ? 1 : 2; @@ -537,7 +541,8 @@ bool GenerateFile(const FileDescriptor* file, io::Printer* printer, } // TODO: Remove this when ruby supports extensions for proto2 syntax. - if (file->extension_count() > 0) { + if (file->syntax() == FileDescriptor::SYNTAX_PROTO2 && + file->extension_count() > 0) { *error = "Extensions are not yet supported for proto2 .proto files."; return false; } diff --git a/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generator.h b/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generator.h index 731a81a5..ea4f30a5 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generator.h +++ b/third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generator.h @@ -49,11 +49,12 @@ namespace ruby { // Ruby 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 { - virtual bool Generate( - const FileDescriptor* file, - const string& parameter, - GeneratorContext* generator_context, - string* error) const; + bool Generate(const FileDescriptor* file, const string& parameter, + GeneratorContext* generator_context, + string* error) const override; + uint64 GetSupportedFeatures() const override { + return FEATURE_PROTO3_OPTIONAL; + } }; } // namespace ruby diff --git a/third_party/protobuf/src/google/protobuf/compiler/subprocess.cc b/third_party/protobuf/src/google/protobuf/compiler/subprocess.cc index b920b2dd..7e59cd7d 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/subprocess.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/subprocess.cc @@ -255,8 +255,7 @@ bool Subprocess::Communicate(const Message& input, Message* output, child_handle_ = NULL; if (exit_code != 0) { - *error = - strings::Substitute("Plugin failed with status code $0.", exit_code); + *error = strings::Substitute("Plugin failed with status code $0.", exit_code); return false; } @@ -274,7 +273,7 @@ std::string Subprocess::Win32ErrorMessage(DWORD error_code) { // WTF? FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, error_code, 0, + NULL, error_code, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), (LPSTR)&message, // NOT A BUG! 0, NULL); @@ -338,7 +337,10 @@ void Subprocess::Start(const std::string& program, SearchMode search_mode) { // stuff that is unsafe here. int ignored; ignored = write(STDERR_FILENO, argv[0], strlen(argv[0])); - const char* message = ": program not found or is not executable\n"; + const char* message = + ": program not found or is not executable\n" + "Please specify a program using absolute path or make sure " + "the program is available in your PATH system variable\n"; ignored = write(STDERR_FILENO, message, strlen(message)); (void)ignored; diff --git a/third_party/protobuf/src/google/protobuf/compiler/subprocess.h b/third_party/protobuf/src/google/protobuf/compiler/subprocess.h index 9c4f8b76..c1ddaae5 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/subprocess.h +++ b/third_party/protobuf/src/google/protobuf/compiler/subprocess.h @@ -34,7 +34,9 @@ #define GOOGLE_PROTOBUF_COMPILER_SUBPROCESS_H__ #ifdef _WIN32 +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN // right... +#endif #include #else // _WIN32 #include diff --git a/third_party/protobuf/src/google/protobuf/compiler/zip_writer.cc b/third_party/protobuf/src/google/protobuf/compiler/zip_writer.cc index 872dd9ed..5ae02615 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/zip_writer.cc +++ b/third_party/protobuf/src/google/protobuf/compiler/zip_writer.cc @@ -28,36 +28,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// 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: ambrose@google.com (Ambrose Feinstein), // kenton@google.com (Kenton Varda) // diff --git a/third_party/protobuf/src/google/protobuf/compiler/zip_writer.h b/third_party/protobuf/src/google/protobuf/compiler/zip_writer.h index a99bb78c..3a8903a3 100644 --- a/third_party/protobuf/src/google/protobuf/compiler/zip_writer.h +++ b/third_party/protobuf/src/google/protobuf/compiler/zip_writer.h @@ -28,36 +28,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// 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) #include diff --git a/third_party/protobuf/src/google/protobuf/descriptor.cc b/third_party/protobuf/src/google/protobuf/descriptor.cc index 735c519f..ff8ba25e 100644 --- a/third_party/protobuf/src/google/protobuf/descriptor.cc +++ b/third_party/protobuf/src/google/protobuf/descriptor.cc @@ -32,6 +32,8 @@ // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. +#include + #include #include #include @@ -48,22 +50,18 @@ #include #include #include -#include #include #include #include -#include #include #include #include #include #include #include -#include #include - - - +#include +#include #include #include #include @@ -100,7 +98,7 @@ struct Symbol { const FileDescriptor* package_file_descriptor; }; - inline Symbol() : type(NULL_SYMBOL) { descriptor = NULL; } + inline Symbol() : type(NULL_SYMBOL) { descriptor = nullptr; } inline bool IsNull() const { return type == NULL_SYMBOL; } inline bool IsType() const { return type == MESSAGE || type == ENUM; } inline bool IsAggregate() const { @@ -127,7 +125,7 @@ struct Symbol { const FileDescriptor* GetFile() const { switch (type) { case NULL_SYMBOL: - return NULL; + return nullptr; case MESSAGE: return descriptor->file(); case FIELD: @@ -145,7 +143,7 @@ struct Symbol { case PACKAGE: return package_file_descriptor; } - return NULL; + return nullptr; } }; @@ -229,7 +227,7 @@ const char* FileDescriptor::SyntaxName(FileDescriptor::Syntax syntax) { return "unknown"; } GOOGLE_LOG(FATAL) << "can't reach here."; - return NULL; + return nullptr; } static const char* const kNonLinkedWeakMessageReplacementName = "google.protobuf.Empty"; @@ -494,7 +492,7 @@ std::set* NewAllowedProto3Extendee() { allowed_proto3_extendees->insert(std::string("google.protobuf.") + kOptionNames[i]); // Split the word to trick the opensource processing scripts so they - // will keep the origial package name. + // will keep the original package name. allowed_proto3_extendees->insert(std::string("proto") + "2." + kOptionNames[i]); } @@ -561,14 +559,14 @@ class DescriptorPool::Tables { // The stack of files which are currently being built. Used to detect // cyclic dependencies when loading files from a DescriptorDatabase. Not - // used when fallback_database_ == NULL. + // used when fallback_database_ == nullptr. std::vector pending_files_; // A set of files which we have tried to load from the fallback database // and encountered errors. We will not attempt to load them again during // execution of the current public API call, but for compatibility with // legacy clients, this is cleared at the beginning of each public API call. - // Not used when fallback_database_ == NULL. + // Not used when fallback_database_ == nullptr. HASH_SET known_bad_files_; // A set of symbols which we have tried to load from the fallback database @@ -581,6 +579,12 @@ class DescriptorPool::Tables { // set of extensions numbers from fallback_database_. HASH_SET extensions_loaded_from_db_; + // Maps type name to Descriptor::WellKnownType. This is logically global + // and const, but we make it a member here to simplify its construction and + // destruction. This only has 20-ish entries and is one per DescriptorPool, + // so the overhead is small. + HASH_MAP well_known_types_; + // ----------------------------------------------------------------- // Finding items. @@ -594,7 +598,7 @@ class DescriptorPool::Tables { // stuff into the header. Yay C++. Symbol FindByNameHelper(const DescriptorPool* pool, const std::string& name); - // These return NULL if not found. + // These return nullptr if not found. inline const FileDescriptor* FindFile(const std::string& key) const; inline const FieldDescriptor* FindExtension(const Descriptor* extendee, int number) const; @@ -631,6 +635,9 @@ class DescriptorPool::Tables { // The string is initialized to the given value for convenience. std::string* AllocateString(const std::string& value); + // Allocate empty string which will be destroyed when the pool is destroyed. + std::string* AllocateEmptyString(); + // Allocate a internal::call_once which will be destroyed when the pool is // destroyed. internal::once_flag* AllocateOnceDynamic(); @@ -640,19 +647,19 @@ class DescriptorPool::Tables { // in those cases we have to pass a dummy pointer of the right type as the // parameter instead of specifying the type explicitly. template - Type* AllocateMessage(Type* dummy = NULL); + Type* AllocateMessage(Type* dummy = nullptr); // Allocate a FileDescriptorTables object. FileDescriptorTables* AllocateFileTables(); private: - std::vector strings_; // All strings in the pool. - std::vector messages_; // All messages in the pool. - std::vector - once_dynamics_; // All internal::call_onces in the pool. - std::vector - file_tables_; // All file tables in the pool. - std::vector allocations_; // All other memory allocated in the pool. + // All other memory allocated in the pool. Must be first as other objects can + // point into these. + std::vector> allocations_; + std::vector> strings_; + std::vector> messages_; + std::vector> once_dynamics_; + std::vector> file_tables_; SymbolsByNameMap symbols_by_name_; FilesByNameMap files_by_name_; @@ -718,7 +725,7 @@ class FileDescriptorTables { const std::string& name, const Symbol::Type type) const; - // These return NULL if not found. + // These return nullptr if not found. inline const FieldDescriptor* FindFieldByNumber(const Descriptor* parent, int number) const; inline const FieldDescriptor* FindFieldByLowercaseName( @@ -753,7 +760,7 @@ class FileDescriptorTables { std::pair* p); // Returns the location denoted by the specified path through info, - // or NULL if not found. + // or nullptr if not found. // The value of info must be that of the corresponding FileDescriptor. // (Conceptually a pure function, but stateful as an optimisation.) const SourceCodeInfo_Location* GetSourceLocation( @@ -799,21 +806,29 @@ DescriptorPool::Tables::Tables() known_bad_symbols_(3), extensions_loaded_from_db_(3), symbols_by_name_(3), - files_by_name_(3) {} - -DescriptorPool::Tables::~Tables() { - GOOGLE_DCHECK(checkpoints_.empty()); - // Note that the deletion order is important, since the destructors of some - // messages may refer to objects in allocations_. - STLDeleteElements(&messages_); - for (int i = 0; i < allocations_.size(); i++) { - operator delete(allocations_[i]); - } - STLDeleteElements(&strings_); - STLDeleteElements(&file_tables_); - STLDeleteElements(&once_dynamics_); + files_by_name_(3) { + well_known_types_.insert({ + {"google.protobuf.DoubleValue", Descriptor::WELLKNOWNTYPE_DOUBLEVALUE}, + {"google.protobuf.FloatValue", Descriptor::WELLKNOWNTYPE_FLOATVALUE}, + {"google.protobuf.Int64Value", Descriptor::WELLKNOWNTYPE_INT64VALUE}, + {"google.protobuf.UInt64Value", Descriptor::WELLKNOWNTYPE_UINT64VALUE}, + {"google.protobuf.Int32Value", Descriptor::WELLKNOWNTYPE_INT32VALUE}, + {"google.protobuf.UInt32Value", Descriptor::WELLKNOWNTYPE_UINT32VALUE}, + {"google.protobuf.StringValue", Descriptor::WELLKNOWNTYPE_STRINGVALUE}, + {"google.protobuf.BytesValue", Descriptor::WELLKNOWNTYPE_BYTESVALUE}, + {"google.protobuf.BoolValue", Descriptor::WELLKNOWNTYPE_BOOLVALUE}, + {"google.protobuf.Any", Descriptor::WELLKNOWNTYPE_ANY}, + {"google.protobuf.FieldMask", Descriptor::WELLKNOWNTYPE_FIELDMASK}, + {"google.protobuf.Duration", Descriptor::WELLKNOWNTYPE_DURATION}, + {"google.protobuf.Timestamp", Descriptor::WELLKNOWNTYPE_TIMESTAMP}, + {"google.protobuf.Value", Descriptor::WELLKNOWNTYPE_VALUE}, + {"google.protobuf.ListValue", Descriptor::WELLKNOWNTYPE_LISTVALUE}, + {"google.protobuf.Struct", Descriptor::WELLKNOWNTYPE_STRUCT}, + }); } +DescriptorPool::Tables::~Tables() { GOOGLE_DCHECK(checkpoints_.empty()); } + FileDescriptorTables::FileDescriptorTables() // Initialize all the hash tables to start out with a small # of buckets. : symbols_by_parent_(3), @@ -873,22 +888,6 @@ void DescriptorPool::Tables::RollbackToLastCheckpoint() { extensions_after_checkpoint_.resize( checkpoint.pending_extensions_before_checkpoint); - STLDeleteContainerPointers( - strings_.begin() + checkpoint.strings_before_checkpoint, strings_.end()); - STLDeleteContainerPointers( - messages_.begin() + checkpoint.messages_before_checkpoint, - messages_.end()); - STLDeleteContainerPointers( - once_dynamics_.begin() + checkpoint.once_dynamics_before_checkpoint, - once_dynamics_.end()); - STLDeleteContainerPointers( - file_tables_.begin() + checkpoint.file_tables_before_checkpoint, - file_tables_.end()); - for (int i = checkpoint.allocations_before_checkpoint; - i < allocations_.size(); i++) { - operator delete(allocations_[i]); - } - strings_.resize(checkpoint.strings_before_checkpoint); messages_.resize(checkpoint.messages_before_checkpoint); once_dynamics_.resize(checkpoint.once_dynamics_before_checkpoint); @@ -901,7 +900,7 @@ void DescriptorPool::Tables::RollbackToLastCheckpoint() { inline Symbol DescriptorPool::Tables::FindSymbol(const std::string& key) const { const Symbol* result = FindOrNull(symbols_by_name_, key.c_str()); - if (result == NULL) { + if (result == nullptr) { return kNullSymbol; } else { return *result; @@ -912,7 +911,7 @@ inline Symbol FileDescriptorTables::FindNestedSymbol( const void* parent, const std::string& name) const { const Symbol* result = FindOrNull( symbols_by_parent_, PointerStringPair(parent, name.c_str())); - if (result == NULL) { + if (result == nullptr) { return kNullSymbol; } else { return *result; @@ -929,14 +928,22 @@ inline Symbol FileDescriptorTables::FindNestedSymbolOfType( Symbol DescriptorPool::Tables::FindByNameHelper(const DescriptorPool* pool, const std::string& name) { + if (pool->mutex_ != nullptr) { + // Fast path: the Symbol is already cached. This is just a hash lookup. + ReaderMutexLock lock(pool->mutex_); + if (known_bad_symbols_.empty() && known_bad_files_.empty()) { + Symbol result = FindSymbol(name); + if (!result.IsNull()) return result; + } + } MutexLockMaybe lock(pool->mutex_); - if (pool->fallback_database_ != NULL) { + if (pool->fallback_database_ != nullptr) { known_bad_symbols_.clear(); known_bad_files_.clear(); } Symbol result = FindSymbol(name); - if (result.IsNull() && pool->underlay_ != NULL) { + if (result.IsNull() && pool->underlay_ != nullptr) { // Symbol not found; check the underlay. result = pool->underlay_->tables_->FindByNameHelper(pool->underlay_, name); } @@ -964,7 +971,7 @@ inline const FieldDescriptor* FileDescriptorTables::FindFieldByNumber( const void* FileDescriptorTables::FindParentForFieldsByMap( const FieldDescriptor* field) const { if (field->is_extension()) { - if (field->extension_scope() == NULL) { + if (field->extension_scope() == nullptr) { return field->file(); } else { return field->extension_scope(); @@ -1035,7 +1042,7 @@ FileDescriptorTables::FindEnumValueByNumberCreatingIfUnknown( { const EnumValueDescriptor* desc = FindPtrOrNull( enum_values_by_number_, std::make_pair(parent, number)); - if (desc != NULL) { + if (desc != nullptr) { return desc; } } @@ -1044,7 +1051,7 @@ FileDescriptorTables::FindEnumValueByNumberCreatingIfUnknown( ReaderMutexLock l(&unknown_enum_values_mu_); const EnumValueDescriptor* desc = FindPtrOrNull( unknown_enum_values_by_number_, std::make_pair(parent, number)); - if (desc != NULL) { + if (desc != nullptr) { return desc; } } @@ -1054,7 +1061,7 @@ FileDescriptorTables::FindEnumValueByNumberCreatingIfUnknown( WriterMutexLock l(&unknown_enum_values_mu_); const EnumValueDescriptor* desc = FindPtrOrNull( unknown_enum_values_by_number_, std::make_pair(parent, number)); - if (desc != NULL) { + if (desc != nullptr) { return desc; } @@ -1191,26 +1198,32 @@ Type* DescriptorPool::Tables::AllocateArray(int count) { std::string* DescriptorPool::Tables::AllocateString(const std::string& value) { std::string* result = new std::string(value); - strings_.push_back(result); + strings_.emplace_back(result); + return result; +} + +std::string* DescriptorPool::Tables::AllocateEmptyString() { + std::string* result = new std::string(); + strings_.emplace_back(result); return result; } internal::once_flag* DescriptorPool::Tables::AllocateOnceDynamic() { internal::once_flag* result = new internal::once_flag(); - once_dynamics_.push_back(result); + once_dynamics_.emplace_back(result); return result; } template Type* DescriptorPool::Tables::AllocateMessage(Type* /* dummy */) { Type* result = new Type; - messages_.push_back(result); + messages_.emplace_back(result); return result; } FileDescriptorTables* DescriptorPool::Tables::AllocateFileTables() { FileDescriptorTables* result = new FileDescriptorTables; - file_tables_.push_back(result); + file_tables_.emplace_back(result); return result; } @@ -1219,11 +1232,10 @@ void* DescriptorPool::Tables::AllocateBytes(int size) { // sophisticated way? Probably not for the open source release, but for // internal use we could easily plug in one of our existing memory pool // allocators... - if (size == 0) return NULL; + if (size == 0) return nullptr; - void* result = operator new(size); - allocations_.push_back(result); - return result; + allocations_.emplace_back(size); + return allocations_.back().data(); } void FileDescriptorTables::BuildLocationsByPath( @@ -1249,10 +1261,10 @@ const SourceCodeInfo_Location* FileDescriptorTables::GetSourceLocation( DescriptorPool::ErrorCollector::~ErrorCollector() {} DescriptorPool::DescriptorPool() - : mutex_(NULL), - fallback_database_(NULL), - default_error_collector_(NULL), - underlay_(NULL), + : mutex_(nullptr), + fallback_database_(nullptr), + default_error_collector_(nullptr), + underlay_(nullptr), tables_(new Tables), enforce_dependencies_(true), lazily_build_dependencies_(false), @@ -1265,7 +1277,7 @@ DescriptorPool::DescriptorPool(DescriptorDatabase* fallback_database, : mutex_(new internal::WrappedMutex), fallback_database_(fallback_database), default_error_collector_(error_collector), - underlay_(NULL), + underlay_(nullptr), tables_(new Tables), enforce_dependencies_(true), lazily_build_dependencies_(false), @@ -1274,9 +1286,9 @@ DescriptorPool::DescriptorPool(DescriptorDatabase* fallback_database, disallow_enforce_utf8_(false) {} DescriptorPool::DescriptorPool(const DescriptorPool* underlay) - : mutex_(NULL), - fallback_database_(NULL), - default_error_collector_(NULL), + : mutex_(nullptr), + fallback_database_(nullptr), + default_error_collector_(nullptr), underlay_(underlay), tables_(new Tables), enforce_dependencies_(true), @@ -1286,7 +1298,7 @@ DescriptorPool::DescriptorPool(const DescriptorPool* underlay) disallow_enforce_utf8_(false) {} DescriptorPool::~DescriptorPool() { - if (mutex_ != NULL) delete mutex_; + if (mutex_ != nullptr) delete mutex_; } // DescriptorPool::BuildFile() defined later. @@ -1296,8 +1308,9 @@ void DescriptorPool::InternalDontEnforceDependencies() { enforce_dependencies_ = false; } -void DescriptorPool::AddUnusedImportTrackFile(const std::string& file_name) { - unused_import_track_files_.insert(file_name); +void DescriptorPool::AddUnusedImportTrackFile(const std::string& file_name, + bool is_error) { + unused_import_track_files_[file_name] = is_error; } void DescriptorPool::ClearUnusedImportTrackFiles() { @@ -1306,7 +1319,7 @@ void DescriptorPool::ClearUnusedImportTrackFiles() { bool DescriptorPool::InternalIsFileLoaded(const std::string& filename) const { MutexLockMaybe lock(mutex_); - return tables_->FindFile(filename) != NULL; + return tables_->FindFile(filename) != nullptr; } // generated_pool ==================================================== @@ -1335,11 +1348,13 @@ DescriptorPool* DescriptorPool::internal_generated_pool() { } const DescriptorPool* DescriptorPool::generated_pool() { - return internal_generated_pool(); + const DescriptorPool* pool = internal_generated_pool(); + // Ensure that descriptor.proto has been registered in the generated pool. + DescriptorProto::descriptor(); + return pool; } - void DescriptorPool::InternalAddGeneratedFile( const void* encoded_file_descriptor, int size) { // So, this function is called in the process of initializing the @@ -1377,48 +1392,48 @@ void DescriptorPool::InternalAddGeneratedFile( const FileDescriptor* DescriptorPool::FindFileByName( const std::string& name) const { MutexLockMaybe lock(mutex_); - if (fallback_database_ != NULL) { + if (fallback_database_ != nullptr) { tables_->known_bad_symbols_.clear(); tables_->known_bad_files_.clear(); } const FileDescriptor* result = tables_->FindFile(name); - if (result != NULL) return result; - if (underlay_ != NULL) { + if (result != nullptr) return result; + if (underlay_ != nullptr) { result = underlay_->FindFileByName(name); - if (result != NULL) return result; + if (result != nullptr) return result; } if (TryFindFileInFallbackDatabase(name)) { result = tables_->FindFile(name); - if (result != NULL) return result; + if (result != nullptr) return result; } - return NULL; + return nullptr; } const FileDescriptor* DescriptorPool::FindFileContainingSymbol( const std::string& symbol_name) const { MutexLockMaybe lock(mutex_); - if (fallback_database_ != NULL) { + if (fallback_database_ != nullptr) { tables_->known_bad_symbols_.clear(); tables_->known_bad_files_.clear(); } Symbol result = tables_->FindSymbol(symbol_name); if (!result.IsNull()) return result.GetFile(); - if (underlay_ != NULL) { + if (underlay_ != nullptr) { const FileDescriptor* file_result = underlay_->FindFileContainingSymbol(symbol_name); - if (file_result != NULL) return file_result; + if (file_result != nullptr) return file_result; } if (TryFindSymbolInFallbackDatabase(symbol_name)) { result = tables_->FindSymbol(symbol_name); if (!result.IsNull()) return result.GetFile(); } - return NULL; + return nullptr; } const Descriptor* DescriptorPool::FindMessageTypeByName( const std::string& name) const { Symbol result = tables_->FindByNameHelper(this, name); - return (result.type == Symbol::MESSAGE) ? result.descriptor : NULL; + return (result.type == Symbol::MESSAGE) ? result.descriptor : nullptr; } const FieldDescriptor* DescriptorPool::FindFieldByName( @@ -1428,7 +1443,7 @@ const FieldDescriptor* DescriptorPool::FindFieldByName( !result.field_descriptor->is_extension()) { return result.field_descriptor; } else { - return NULL; + return nullptr; } } @@ -1438,93 +1453,138 @@ const FieldDescriptor* DescriptorPool::FindExtensionByName( if (result.type == Symbol::FIELD && result.field_descriptor->is_extension()) { return result.field_descriptor; } else { - return NULL; + return nullptr; } } const OneofDescriptor* DescriptorPool::FindOneofByName( const std::string& name) const { Symbol result = tables_->FindByNameHelper(this, name); - return (result.type == Symbol::ONEOF) ? result.oneof_descriptor : NULL; + return (result.type == Symbol::ONEOF) ? result.oneof_descriptor : nullptr; } const EnumDescriptor* DescriptorPool::FindEnumTypeByName( const std::string& name) const { Symbol result = tables_->FindByNameHelper(this, name); - return (result.type == Symbol::ENUM) ? result.enum_descriptor : NULL; + return (result.type == Symbol::ENUM) ? result.enum_descriptor : nullptr; } const EnumValueDescriptor* DescriptorPool::FindEnumValueByName( const std::string& name) const { Symbol result = tables_->FindByNameHelper(this, name); return (result.type == Symbol::ENUM_VALUE) ? result.enum_value_descriptor - : NULL; + : nullptr; } const ServiceDescriptor* DescriptorPool::FindServiceByName( const std::string& name) const { Symbol result = tables_->FindByNameHelper(this, name); - return (result.type == Symbol::SERVICE) ? result.service_descriptor : NULL; + return (result.type == Symbol::SERVICE) ? result.service_descriptor : nullptr; } const MethodDescriptor* DescriptorPool::FindMethodByName( const std::string& name) const { Symbol result = tables_->FindByNameHelper(this, name); - return (result.type == Symbol::METHOD) ? result.method_descriptor : NULL; + return (result.type == Symbol::METHOD) ? result.method_descriptor : nullptr; } const FieldDescriptor* DescriptorPool::FindExtensionByNumber( const Descriptor* extendee, int number) const { + if (extendee->extension_range_count() == 0) return nullptr; // A faster path to reduce lock contention in finding extensions, assuming // most extensions will be cache hit. - if (mutex_ != NULL) { + if (mutex_ != nullptr) { ReaderMutexLock lock(mutex_); const FieldDescriptor* result = tables_->FindExtension(extendee, number); - if (result != NULL) { + if (result != nullptr) { return result; } } MutexLockMaybe lock(mutex_); - if (fallback_database_ != NULL) { + if (fallback_database_ != nullptr) { tables_->known_bad_symbols_.clear(); tables_->known_bad_files_.clear(); } const FieldDescriptor* result = tables_->FindExtension(extendee, number); - if (result != NULL) { + if (result != nullptr) { return result; } - if (underlay_ != NULL) { + if (underlay_ != nullptr) { result = underlay_->FindExtensionByNumber(extendee, number); - if (result != NULL) return result; + if (result != nullptr) return result; } if (TryFindExtensionInFallbackDatabase(extendee, number)) { result = tables_->FindExtension(extendee, number); - if (result != NULL) { + if (result != nullptr) { return result; } } - return NULL; + return nullptr; +} + +const FieldDescriptor* DescriptorPool::InternalFindExtensionByNumberNoLock( + const Descriptor* extendee, int number) const { + if (extendee->extension_range_count() == 0) return nullptr; + + const FieldDescriptor* result = tables_->FindExtension(extendee, number); + if (result != nullptr) { + return result; + } + + if (underlay_ != nullptr) { + result = underlay_->InternalFindExtensionByNumberNoLock(extendee, number); + if (result != nullptr) return result; + } + + return nullptr; +} + +const FieldDescriptor* DescriptorPool::FindExtensionByPrintableName( + const Descriptor* extendee, const std::string& printable_name) const { + if (extendee->extension_range_count() == 0) return nullptr; + const FieldDescriptor* result = FindExtensionByName(printable_name); + if (result != nullptr && result->containing_type() == extendee) { + return result; + } + if (extendee->options().message_set_wire_format()) { + // MessageSet extensions may be identified by type name. + const Descriptor* type = FindMessageTypeByName(printable_name); + if (type != nullptr) { + // Look for a matching extension in the foreign type's scope. + const int type_extension_count = type->extension_count(); + for (int i = 0; i < type_extension_count; i++) { + const FieldDescriptor* extension = type->extension(i); + if (extension->containing_type() == extendee && + extension->type() == FieldDescriptor::TYPE_MESSAGE && + extension->is_optional() && extension->message_type() == type) { + // Found it. + return extension; + } + } + } + } + return nullptr; } void DescriptorPool::FindAllExtensions( const Descriptor* extendee, std::vector* out) const { MutexLockMaybe lock(mutex_); - if (fallback_database_ != NULL) { + if (fallback_database_ != nullptr) { tables_->known_bad_symbols_.clear(); tables_->known_bad_files_.clear(); } // Initialize tables_->extensions_ from the fallback database first // (but do this only once per descriptor). - if (fallback_database_ != NULL && + if (fallback_database_ != nullptr && tables_->extensions_loaded_from_db_.count(extendee) == 0) { std::vector numbers; if (fallback_database_->FindAllExtensionNumbers(extendee->full_name(), &numbers)) { for (int i = 0; i < numbers.size(); ++i) { int number = numbers[i]; - if (tables_->FindExtension(extendee, number) == NULL) { + if (tables_->FindExtension(extendee, number) == nullptr) { TryFindExtensionInFallbackDatabase(extendee, number); } } @@ -1533,7 +1593,7 @@ void DescriptorPool::FindAllExtensions( } tables_->FindAllExtensions(extendee, out); - if (underlay_ != NULL) { + if (underlay_ != nullptr) { underlay_->FindAllExtensions(extendee, out); } } @@ -1543,8 +1603,8 @@ void DescriptorPool::FindAllExtensions( const FieldDescriptor* Descriptor::FindFieldByNumber(int key) const { const FieldDescriptor* result = file()->tables_->FindFieldByNumber(this, key); - if (result == NULL || result->is_extension()) { - return NULL; + if (result == nullptr || result->is_extension()) { + return nullptr; } else { return result; } @@ -1554,8 +1614,8 @@ const FieldDescriptor* Descriptor::FindFieldByLowercaseName( const std::string& key) const { const FieldDescriptor* result = file()->tables_->FindFieldByLowercaseName(this, key); - if (result == NULL || result->is_extension()) { - return NULL; + if (result == nullptr || result->is_extension()) { + return nullptr; } else { return result; } @@ -1565,8 +1625,8 @@ const FieldDescriptor* Descriptor::FindFieldByCamelcaseName( const std::string& key) const { const FieldDescriptor* result = file()->tables_->FindFieldByCamelcaseName(this, key); - if (result == NULL || result->is_extension()) { - return NULL; + if (result == nullptr || result->is_extension()) { + return nullptr; } else { return result; } @@ -1579,7 +1639,7 @@ const FieldDescriptor* Descriptor::FindFieldByName( if (!result.IsNull() && !result.field_descriptor->is_extension()) { return result.field_descriptor; } else { - return NULL; + return nullptr; } } @@ -1590,7 +1650,7 @@ const OneofDescriptor* Descriptor::FindOneofByName( if (!result.IsNull()) { return result.oneof_descriptor; } else { - return NULL; + return nullptr; } } @@ -1601,7 +1661,7 @@ const FieldDescriptor* Descriptor::FindExtensionByName( if (!result.IsNull() && result.field_descriptor->is_extension()) { return result.field_descriptor; } else { - return NULL; + return nullptr; } } @@ -1609,8 +1669,8 @@ const FieldDescriptor* Descriptor::FindExtensionByLowercaseName( const std::string& key) const { const FieldDescriptor* result = file()->tables_->FindFieldByLowercaseName(this, key); - if (result == NULL || !result->is_extension()) { - return NULL; + if (result == nullptr || !result->is_extension()) { + return nullptr; } else { return result; } @@ -1620,8 +1680,8 @@ const FieldDescriptor* Descriptor::FindExtensionByCamelcaseName( const std::string& key) const { const FieldDescriptor* result = file()->tables_->FindFieldByCamelcaseName(this, key); - if (result == NULL || !result->is_extension()) { - return NULL; + if (result == nullptr || !result->is_extension()) { + return nullptr; } else { return result; } @@ -1634,7 +1694,7 @@ const Descriptor* Descriptor::FindNestedTypeByName( if (!result.IsNull()) { return result.descriptor; } else { - return NULL; + return nullptr; } } @@ -1645,7 +1705,7 @@ const EnumDescriptor* Descriptor::FindEnumTypeByName( if (!result.IsNull()) { return result.enum_descriptor; } else { - return NULL; + return nullptr; } } @@ -1656,10 +1716,22 @@ const EnumValueDescriptor* Descriptor::FindEnumValueByName( if (!result.IsNull()) { return result.enum_value_descriptor; } else { - return NULL; + return nullptr; } } +const FieldDescriptor* Descriptor::map_key() const { + if (!options().map_entry()) return nullptr; + GOOGLE_DCHECK_EQ(field_count(), 2); + return field(0); +} + +const FieldDescriptor* Descriptor::map_value() const { + if (!options().map_entry()) return nullptr; + GOOGLE_DCHECK_EQ(field_count(), 2); + return field(1); +} + const EnumValueDescriptor* EnumDescriptor::FindValueByName( const std::string& key) const { Symbol result = @@ -1667,7 +1739,7 @@ const EnumValueDescriptor* EnumDescriptor::FindValueByName( if (!result.IsNull()) { return result.enum_value_descriptor; } else { - return NULL; + return nullptr; } } @@ -1687,7 +1759,7 @@ const MethodDescriptor* ServiceDescriptor::FindMethodByName( if (!result.IsNull()) { return result.method_descriptor; } else { - return NULL; + return nullptr; } } @@ -1697,7 +1769,7 @@ const Descriptor* FileDescriptor::FindMessageTypeByName( if (!result.IsNull()) { return result.descriptor; } else { - return NULL; + return nullptr; } } @@ -1707,7 +1779,7 @@ const EnumDescriptor* FileDescriptor::FindEnumTypeByName( if (!result.IsNull()) { return result.enum_descriptor; } else { - return NULL; + return nullptr; } } @@ -1718,7 +1790,7 @@ const EnumValueDescriptor* FileDescriptor::FindEnumValueByName( if (!result.IsNull()) { return result.enum_value_descriptor; } else { - return NULL; + return nullptr; } } @@ -1728,7 +1800,7 @@ const ServiceDescriptor* FileDescriptor::FindServiceByName( if (!result.IsNull()) { return result.service_descriptor; } else { - return NULL; + return nullptr; } } @@ -1738,15 +1810,15 @@ const FieldDescriptor* FileDescriptor::FindExtensionByName( if (!result.IsNull() && result.field_descriptor->is_extension()) { return result.field_descriptor; } else { - return NULL; + return nullptr; } } const FieldDescriptor* FileDescriptor::FindExtensionByLowercaseName( const std::string& key) const { const FieldDescriptor* result = tables_->FindFieldByLowercaseName(this, key); - if (result == NULL || !result->is_extension()) { - return NULL; + if (result == nullptr || !result->is_extension()) { + return nullptr; } else { return result; } @@ -1755,8 +1827,8 @@ const FieldDescriptor* FileDescriptor::FindExtensionByLowercaseName( const FieldDescriptor* FileDescriptor::FindExtensionByCamelcaseName( const std::string& key) const { const FieldDescriptor* result = tables_->FindFieldByCamelcaseName(this, key); - if (result == NULL || !result->is_extension()) { - return NULL; + if (result == nullptr || !result->is_extension()) { + return nullptr; } else { return result; } @@ -1781,7 +1853,7 @@ Descriptor::FindExtensionRangeContainingNumber(int number) const { return extension_range(i); } } - return NULL; + return nullptr; } const Descriptor::ReservedRange* Descriptor::FindReservedRangeContainingNumber( @@ -1792,7 +1864,7 @@ const Descriptor::ReservedRange* Descriptor::FindReservedRangeContainingNumber( return reserved_range(i); } } - return NULL; + return nullptr; } const EnumDescriptor::ReservedRange* @@ -1804,20 +1876,20 @@ EnumDescriptor::FindReservedRangeContainingNumber(int number) const { return reserved_range(i); } } - return NULL; + return nullptr; } // ------------------------------------------------------------------- bool DescriptorPool::TryFindFileInFallbackDatabase( const std::string& name) const { - if (fallback_database_ == NULL) return false; + if (fallback_database_ == nullptr) return false; if (tables_->known_bad_files_.count(name) > 0) return false; FileDescriptorProto file_proto; if (!fallback_database_->FindFileByName(name, &file_proto) || - BuildFileFromDatabase(file_proto) == NULL) { + BuildFileFromDatabase(file_proto) == nullptr) { tables_->known_bad_files_.insert(name); return false; } @@ -1839,7 +1911,7 @@ bool DescriptorPool::IsSubSymbolOfBuiltType(const std::string& name) const { return true; } } - if (underlay_ != NULL) { + if (underlay_ != nullptr) { // Check to see if any prefix of this symbol exists in the underlay. return underlay_->IsSubSymbolOfBuiltType(name); } @@ -1848,7 +1920,7 @@ bool DescriptorPool::IsSubSymbolOfBuiltType(const std::string& name) const { bool DescriptorPool::TryFindSymbolInFallbackDatabase( const std::string& name) const { - if (fallback_database_ == NULL) return false; + if (fallback_database_ == nullptr) return false; if (tables_->known_bad_symbols_.count(name) > 0) return false; @@ -1877,10 +1949,10 @@ bool DescriptorPool::TryFindSymbolInFallbackDatabase( // Check if we've already built this file. If so, it apparently doesn't // contain the symbol we're looking for. Some DescriptorDatabases // return false positives. - || tables_->FindFile(file_proto.name()) != NULL + || tables_->FindFile(file_proto.name()) != nullptr // Build the file. - || BuildFileFromDatabase(file_proto) == NULL) { + || BuildFileFromDatabase(file_proto) == nullptr) { tables_->known_bad_symbols_.insert(name); return false; } @@ -1890,7 +1962,7 @@ bool DescriptorPool::TryFindSymbolInFallbackDatabase( bool DescriptorPool::TryFindExtensionInFallbackDatabase( const Descriptor* containing_type, int field_number) const { - if (fallback_database_ == NULL) return false; + if (fallback_database_ == nullptr) return false; FileDescriptorProto file_proto; if (!fallback_database_->FindFileContainingExtension( @@ -1898,14 +1970,14 @@ bool DescriptorPool::TryFindExtensionInFallbackDatabase( return false; } - if (tables_->FindFile(file_proto.name()) != NULL) { + if (tables_->FindFile(file_proto.name()) != nullptr) { // We've already loaded this file, and it apparently doesn't contain the // extension we're looking for. Some DescriptorDatabases return false // positives. return false; } - if (BuildFileFromDatabase(file_proto) == NULL) { + if (BuildFileFromDatabase(file_proto) == nullptr) { return false; } @@ -2083,7 +2155,9 @@ void FieldDescriptor::CopyTo(FieldDescriptorProto* proto) const { if (has_json_name_) { proto->set_json_name(json_name()); } - + if (proto3_optional_) { + proto->set_proto3_optional(true); + } // Some compilers do not allow static_cast directly between two enum types, // so we must cast to int first. proto->set_label(static_cast( @@ -2120,7 +2194,7 @@ void FieldDescriptor::CopyTo(FieldDescriptorProto* proto) const { proto->set_default_value(DefaultValueAsString(false)); } - if (containing_oneof() != NULL && !is_extension()) { + if (containing_oneof() != nullptr && !is_extension()) { proto->set_oneof_index(containing_oneof()->index()); } @@ -2265,7 +2339,7 @@ bool RetrieveOptions(int depth, const Message& options, } else { const Descriptor* option_descriptor = pool->FindMessageTypeByName(options.GetDescriptor()->full_name()); - if (option_descriptor == NULL) { + if (option_descriptor == nullptr) { // descriptor.proto is not in the pool. This means no custom options are // used so we are safe to proceed with the compiled options message type. return RetrieveOptionsAssumingRightPool(depth, options, option_entries); @@ -2303,7 +2377,7 @@ bool FormatLineOptions(int depth, const Message& options, if (RetrieveOptions(depth, options, pool, &all_options)) { for (int i = 0; i < all_options.size(); i++) { strings::SubstituteAndAppend(output, "$0option $1;\n", prefix, - all_options[i]); + all_options[i]); } } return !all_options.empty(); @@ -2388,7 +2462,7 @@ std::string FileDescriptor::DebugStringWithOptions( debug_string_options); syntax_comment.AddPreComment(&contents); strings::SubstituteAndAppend(&contents, "syntax = \"$0\";\n\n", - SyntaxName(syntax())); + SyntaxName(syntax())); syntax_comment.AddPostComment(&contents); } @@ -2405,13 +2479,13 @@ std::string FileDescriptor::DebugStringWithOptions( for (int i = 0; i < dependency_count(); i++) { if (public_dependencies.count(i) > 0) { strings::SubstituteAndAppend(&contents, "import public \"$0\";\n", - dependency(i)->name()); + dependency(i)->name()); } else if (weak_dependencies.count(i) > 0) { strings::SubstituteAndAppend(&contents, "import weak \"$0\";\n", - dependency(i)->name()); + dependency(i)->name()); } else { strings::SubstituteAndAppend(&contents, "import \"$0\";\n", - dependency(i)->name()); + dependency(i)->name()); } } @@ -2456,16 +2530,15 @@ std::string FileDescriptor::DebugStringWithOptions( contents.append("\n"); } - const Descriptor* containing_type = NULL; + const Descriptor* containing_type = nullptr; for (int i = 0; i < extension_count(); i++) { if (extension(i)->containing_type() != containing_type) { if (i > 0) contents.append("}\n\n"); containing_type = extension(i)->containing_type(); strings::SubstituteAndAppend(&contents, "extend .$0 {\n", - containing_type->full_name()); + containing_type->full_name()); } - extension(i)->DebugString(1, FieldDescriptor::PRINT_LABEL, &contents, - debug_string_options); + extension(i)->DebugString(1, &contents, debug_string_options); } if (extension_count() > 0) contents.append("}\n\n"); @@ -2532,9 +2605,8 @@ void Descriptor::DebugString(int depth, std::string* contents, enum_type(i)->DebugString(depth, contents, debug_string_options); } for (int i = 0; i < field_count(); i++) { - if (field(i)->containing_oneof() == NULL) { - field(i)->DebugString(depth, FieldDescriptor::PRINT_LABEL, contents, - debug_string_options); + if (field(i)->containing_oneof() == nullptr) { + field(i)->DebugString(depth, contents, debug_string_options); } else if (field(i)->containing_oneof()->field(0) == field(i)) { // This is the first field in this oneof, so print the whole oneof. field(i)->containing_oneof()->DebugString(depth, contents, @@ -2544,21 +2616,20 @@ void Descriptor::DebugString(int depth, std::string* contents, for (int i = 0; i < extension_range_count(); i++) { strings::SubstituteAndAppend(contents, "$0 extensions $1 to $2;\n", prefix, - extension_range(i)->start, - extension_range(i)->end - 1); + extension_range(i)->start, + extension_range(i)->end - 1); } // Group extensions by what they extend, so they can be printed out together. - const Descriptor* containing_type = NULL; + const Descriptor* containing_type = nullptr; for (int i = 0; i < extension_count(); i++) { if (extension(i)->containing_type() != containing_type) { if (i > 0) strings::SubstituteAndAppend(contents, "$0 }\n", prefix); containing_type = extension(i)->containing_type(); strings::SubstituteAndAppend(contents, "$0 extend .$1 {\n", prefix, - containing_type->full_name()); + containing_type->full_name()); } - extension(i)->DebugString(depth + 1, FieldDescriptor::PRINT_LABEL, contents, - debug_string_options); + extension(i)->DebugString(depth + 1, contents, debug_string_options); } if (extension_count() > 0) strings::SubstituteAndAppend(contents, "$0 }\n", prefix); @@ -2571,7 +2642,7 @@ void Descriptor::DebugString(int depth, std::string* contents, strings::SubstituteAndAppend(contents, "$0, ", range->start); } else { strings::SubstituteAndAppend(contents, "$0 to $1, ", range->start, - range->end - 1); + range->end - 1); } } contents->replace(contents->size() - 2, 2, ";\n"); @@ -2581,7 +2652,7 @@ void Descriptor::DebugString(int depth, std::string* contents, strings::SubstituteAndAppend(contents, "$0 reserved ", prefix); for (int i = 0; i < reserved_name_count(); i++) { strings::SubstituteAndAppend(contents, "\"$0\", ", - CEscape(reserved_name(i))); + CEscape(reserved_name(i))); } contents->replace(contents->size() - 2, 2, ";\n"); } @@ -2601,10 +2672,10 @@ std::string FieldDescriptor::DebugStringWithOptions( int depth = 0; if (is_extension()) { strings::SubstituteAndAppend(&contents, "extend .$0 {\n", - containing_type()->full_name()); + containing_type()->full_name()); depth = 1; } - DebugString(depth, PRINT_LABEL, &contents, debug_string_options); + DebugString(depth, &contents, debug_string_options); if (is_extension()) { contents.append("}\n"); } @@ -2624,7 +2695,7 @@ std::string FieldDescriptor::FieldTypeNameDebugString() const { } void FieldDescriptor::DebugString( - int depth, PrintLabelFlag print_label_flag, std::string* contents, + int depth, std::string* contents, const DebugStringOptions& debug_string_options) const { std::string prefix(depth * 2, ' '); std::string field_type; @@ -2639,20 +2710,12 @@ void FieldDescriptor::DebugString( field_type = FieldTypeNameDebugString(); } - bool print_label = true; - // Determine whether to omit label: - // 1. For an optional field, omit label if it's in oneof or in proto3. - // 2. For a repeated field, omit label if it's a map. - if (is_optional() && (print_label_flag == OMIT_LABEL || - file()->syntax() == FileDescriptor::SYNTAX_PROTO3)) { - print_label = false; - } else if (is_map()) { - print_label = false; - } - std::string label; - if (print_label) { - label = kLabelToName[this->label()]; - label.push_back(' '); + std::string label = StrCat(kLabelToName[this->label()], " "); + + // Label is omitted for maps, oneof, and plain proto3 fields. + if (is_map() || containing_oneof() || + (is_optional() && !has_optional_keyword())) { + label.clear(); } SourceLocationCommentPrinter comment_printer(this, prefix, @@ -2667,7 +2730,7 @@ void FieldDescriptor::DebugString( if (has_default_value()) { bracketed = true; strings::SubstituteAndAppend(contents, " [default = $0", - DefaultValueAsString(true)); + DefaultValueAsString(true)); } if (has_json_name_) { if (!bracketed) { @@ -2737,8 +2800,7 @@ void OneofDescriptor::DebugString( } else { contents->append("\n"); for (int i = 0; i < field_count(); i++) { - field(i)->DebugString(depth, FieldDescriptor::OMIT_LABEL, contents, - debug_string_options); + field(i)->DebugString(depth, contents, debug_string_options); } strings::SubstituteAndAppend(contents, "$0}\n", prefix); } @@ -2783,7 +2845,7 @@ void EnumDescriptor::DebugString( strings::SubstituteAndAppend(contents, "$0, ", range->start); } else { strings::SubstituteAndAppend(contents, "$0 to $1, ", range->start, - range->end); + range->end); } } contents->replace(contents->size() - 2, 2, ";\n"); @@ -2793,7 +2855,7 @@ void EnumDescriptor::DebugString( strings::SubstituteAndAppend(contents, "$0 reserved ", prefix); for (int i = 0; i < reserved_name_count(); i++) { strings::SubstituteAndAppend(contents, "\"$0\", ", - CEscape(reserved_name(i))); + CEscape(reserved_name(i))); } contents->replace(contents->size() - 2, 2, ";\n"); } @@ -2899,7 +2961,7 @@ void MethodDescriptor::DebugString( if (FormatLineOptions(depth, options(), service()->file()->pool(), &formatted_options)) { strings::SubstituteAndAppend(contents, " {\n$0$1}\n", formatted_options, - prefix); + prefix); } else { contents->append(";\n"); } @@ -2943,9 +3005,9 @@ bool FileDescriptor::GetSourceLocation(SourceLocation* out_location) const { bool FieldDescriptor::is_packed() const { if (!is_packable()) return false; if (file_->syntax() == FileDescriptor::SYNTAX_PROTO2) { - return (options_ != NULL) && options_->packed(); + return (options_ != nullptr) && options_->packed(); } else { - return options_ == NULL || !options_->has_packed() || options_->packed(); + return options_ == nullptr || !options_->has_packed() || options_->packed(); } } @@ -3005,7 +3067,7 @@ void Descriptor::GetLocationPath(std::vector* output) const { void FieldDescriptor::GetLocationPath(std::vector* output) const { if (is_extension()) { - if (extension_scope() == NULL) { + if (extension_scope() == nullptr) { output->push_back(FileDescriptorProto::kExtensionFieldNumber); output->push_back(index()); } else { @@ -3212,7 +3274,7 @@ class DescriptorBuilder { // Like AddSymbol(), but succeeds if the symbol is already defined as long // as the existing definition is also a package (because it's OK to define // the same package in two different files). Also adds all parents of the - // packgae to the symbol table (e.g. AddPackage("foo.bar", ...) will add + // package to the symbol table (e.g. AddPackage("foo.bar", ...) will add // "foo.bar" and "foo" to the table). void AddPackage(const std::string& name, const Message& proto, const FileDescriptor* file); @@ -3235,7 +3297,8 @@ class DescriptorBuilder { // descriptor.proto. template void AllocateOptions(const typename DescriptorT::OptionsType& orig_options, - DescriptorT* descriptor, int options_field_tag); + DescriptorT* descriptor, int options_field_tag, + const std::string& option_name); // Specialization for FileOptions. void AllocateOptions(const FileOptions& orig_options, FileDescriptor* descriptor); @@ -3245,21 +3308,28 @@ class DescriptorBuilder { void AllocateOptionsImpl( const std::string& name_scope, const std::string& element_name, const typename DescriptorT::OptionsType& orig_options, - DescriptorT* descriptor, const std::vector& options_path); + DescriptorT* descriptor, const std::vector& options_path, + const std::string& option_name); + + // Allocate string on the string pool and initialize it to full proto name. + // Full proto name is "scope.proto_name" if scope is non-empty and + // "proto_name" otherwise. + std::string* AllocateNameString(const std::string& scope, + const std::string& proto_name); // These methods all have the same signature for the sake of the BUILD_ARRAY // macro, below. void BuildMessage(const DescriptorProto& proto, const Descriptor* parent, Descriptor* result); void BuildFieldOrExtension(const FieldDescriptorProto& proto, - const Descriptor* parent, FieldDescriptor* result, + Descriptor* parent, FieldDescriptor* result, bool is_extension); - void BuildField(const FieldDescriptorProto& proto, const Descriptor* parent, + void BuildField(const FieldDescriptorProto& proto, Descriptor* parent, FieldDescriptor* result) { BuildFieldOrExtension(proto, parent, result, false); } - void BuildExtension(const FieldDescriptorProto& proto, - const Descriptor* parent, FieldDescriptor* result) { + void BuildExtension(const FieldDescriptorProto& proto, Descriptor* parent, + FieldDescriptor* result) { BuildFieldOrExtension(proto, parent, result, true); } void BuildExtensionRange(const DescriptorProto::ExtensionRange& proto, @@ -3315,8 +3385,8 @@ class DescriptorBuilder { class OptionInterpreter { public: // Creates an interpreter that operates in the context of the pool of the - // specified builder, which must not be NULL. We don't take ownership of the - // builder. + // specified builder, which must not be nullptr. We don't take ownership of + // the builder. explicit OptionInterpreter(DescriptorBuilder* builder); ~OptionInterpreter(); @@ -3382,6 +3452,7 @@ class DescriptorBuilder { void SetUInt64(int number, uint64 value, FieldDescriptor::Type type, UnknownFieldSet* unknown_fields); + // A helper function that adds an error at the specified location of the // option we're currently interpreting, and returns false. bool AddOptionError(DescriptorPool::ErrorCollector::ErrorLocation location, @@ -3403,16 +3474,16 @@ class DescriptorBuilder { return AddOptionError(DescriptorPool::ErrorCollector::OPTION_VALUE, msg); } - // We interpret against this builder's pool. Is never NULL. We don't own + // We interpret against this builder's pool. Is never nullptr. We don't own // this pointer. DescriptorBuilder* builder_; - // The options we're currently interpreting, or NULL if we're not in a call - // to InterpretOptions. + // The options we're currently interpreting, or nullptr if we're not in a + // call to InterpretOptions. const OptionsToInterpret* options_to_interpret_; // The option we're currently interpreting within options_to_interpret_, or - // NULL if we're not in a call to InterpretOptions(). This points to a + // nullptr if we're not in a call to InterpretOptions(). This points to a // submessage of the original option, not the mutable copy. Therefore we // can use it to find locations recorded by the parser. const UninterpretedOption* uninterpreted_option_; @@ -3454,7 +3525,7 @@ class DescriptorBuilder { return descriptor->is_placeholder_; } static inline void assert_mutex_held(const DescriptorPool* pool) { - if (pool->mutex_ != NULL) { + if (pool->mutex_ != nullptr) { pool->mutex_->AssertHeld(); } } @@ -3475,6 +3546,9 @@ class DescriptorBuilder { const EnumDescriptorProto& proto); void ValidateEnumValueOptions(EnumValueDescriptor* enum_value, const EnumValueDescriptorProto& proto); + void ValidateExtensionRangeOptions( + const std::string& full_name, Descriptor::ExtensionRange* extension_range, + const DescriptorProto_ExtensionRange& proto); void ValidateServiceOptions(ServiceDescriptor* service, const ServiceDescriptorProto& proto); void ValidateMethodOptions(MethodDescriptor* method, @@ -3502,23 +3576,23 @@ class DescriptorBuilder { const FileDescriptor* DescriptorPool::BuildFile( const FileDescriptorProto& proto) { - GOOGLE_CHECK(fallback_database_ == NULL) + GOOGLE_CHECK(fallback_database_ == nullptr) << "Cannot call BuildFile on a DescriptorPool that uses a " "DescriptorDatabase. You must instead find a way to get your file " "into the underlying database."; - GOOGLE_CHECK(mutex_ == NULL); // Implied by the above GOOGLE_CHECK. + GOOGLE_CHECK(mutex_ == nullptr); // Implied by the above GOOGLE_CHECK. tables_->known_bad_symbols_.clear(); tables_->known_bad_files_.clear(); - return DescriptorBuilder(this, tables_.get(), NULL).BuildFile(proto); + return DescriptorBuilder(this, tables_.get(), nullptr).BuildFile(proto); } const FileDescriptor* DescriptorPool::BuildFileCollectingErrors( const FileDescriptorProto& proto, ErrorCollector* error_collector) { - GOOGLE_CHECK(fallback_database_ == NULL) + GOOGLE_CHECK(fallback_database_ == nullptr) << "Cannot call BuildFile on a DescriptorPool that uses a " "DescriptorDatabase. You must instead find a way to get your file " "into the underlying database."; - GOOGLE_CHECK(mutex_ == NULL); // Implied by the above GOOGLE_CHECK. + GOOGLE_CHECK(mutex_ == nullptr); // Implied by the above GOOGLE_CHECK. tables_->known_bad_symbols_.clear(); tables_->known_bad_files_.clear(); return DescriptorBuilder(this, tables_.get(), error_collector) @@ -3529,12 +3603,12 @@ const FileDescriptor* DescriptorPool::BuildFileFromDatabase( const FileDescriptorProto& proto) const { mutex_->AssertHeld(); if (tables_->known_bad_files_.count(proto.name()) > 0) { - return NULL; + return nullptr; } const FileDescriptor* result = DescriptorBuilder(this, tables_.get(), default_error_collector_) .BuildFile(proto); - if (result == NULL) { + if (result == nullptr) { tables_->known_bad_files_.insert(proto.name()); } return result; @@ -3547,7 +3621,7 @@ DescriptorBuilder::DescriptorBuilder( tables_(tables), error_collector_(error_collector), had_errors_(false), - possible_undeclared_dependency_(NULL), + possible_undeclared_dependency_(nullptr), undefine_resolved_name_("") {} DescriptorBuilder::~DescriptorBuilder() {} @@ -3556,7 +3630,7 @@ void DescriptorBuilder::AddError( const std::string& element_name, const Message& descriptor, DescriptorPool::ErrorCollector::ErrorLocation location, const std::string& error) { - if (error_collector_ == NULL) { + if (error_collector_ == nullptr) { if (!had_errors_) { GOOGLE_LOG(ERROR) << "Invalid proto descriptor for file \"" << filename_ << "\":"; @@ -3579,12 +3653,12 @@ void DescriptorBuilder::AddNotDefinedError( const std::string& element_name, const Message& descriptor, DescriptorPool::ErrorCollector::ErrorLocation location, const std::string& undefined_symbol) { - if (possible_undeclared_dependency_ == NULL && + if (possible_undeclared_dependency_ == nullptr && undefine_resolved_name_.empty()) { AddError(element_name, descriptor, location, "\"" + undefined_symbol + "\" is not defined."); } else { - if (possible_undeclared_dependency_ != NULL) { + if (possible_undeclared_dependency_ != nullptr) { AddError(element_name, descriptor, location, "\"" + possible_undeclared_dependency_name_ + "\" seems to be defined in \"" + @@ -3611,7 +3685,7 @@ void DescriptorBuilder::AddWarning( const std::string& element_name, const Message& descriptor, DescriptorPool::ErrorCollector::ErrorLocation location, const std::string& error) { - if (error_collector_ == NULL) { + if (error_collector_ == nullptr) { GOOGLE_LOG(WARNING) << filename_ << " " << element_name << ": " << error; } else { error_collector_->AddWarning(filename_, element_name, &descriptor, location, @@ -3627,8 +3701,8 @@ bool DescriptorBuilder::IsInPackage(const FileDescriptor* file, } void DescriptorBuilder::RecordPublicDependencies(const FileDescriptor* file) { - if (file == NULL || !dependencies_.insert(file).second) return; - for (int i = 0; file != NULL && i < file->public_dependency_count(); i++) { + if (file == nullptr || !dependencies_.insert(file).second) return; + for (int i = 0; file != nullptr && i < file->public_dependency_count(); i++) { RecordPublicDependencies(file->public_dependency(i)); } } @@ -3637,10 +3711,10 @@ Symbol DescriptorBuilder::FindSymbolNotEnforcingDepsHelper( const DescriptorPool* pool, const std::string& name, bool build_it) { // If we are looking at an underlay, we must lock its mutex_, since we are // accessing the underlay's tables_ directly. - MutexLockMaybe lock((pool == pool_) ? NULL : pool->mutex_); + MutexLockMaybe lock((pool == pool_) ? nullptr : pool->mutex_); Symbol result = pool->tables_->FindSymbol(name); - if (result.IsNull() && pool->underlay_ != NULL) { + if (result.IsNull() && pool->underlay_ != nullptr) { // Symbol not found; check the underlay. result = FindSymbolNotEnforcingDepsHelper(pool->underlay_, name); } @@ -3663,7 +3737,14 @@ Symbol DescriptorBuilder::FindSymbolNotEnforcingDepsHelper( Symbol DescriptorBuilder::FindSymbolNotEnforcingDeps(const std::string& name, bool build_it) { - return FindSymbolNotEnforcingDepsHelper(pool_, name, build_it); + Symbol result = FindSymbolNotEnforcingDepsHelper(pool_, name, build_it); + // Only find symbols which were defined in this file or one of its + // dependencies. + const FileDescriptor* file = result.GetFile(); + if (file == file_ || dependencies_.count(file) > 0) { + unused_dependency_.erase(file); + } + return result; } Symbol DescriptorBuilder::FindSymbol(const std::string& name, bool build_it) { @@ -3680,7 +3761,6 @@ Symbol DescriptorBuilder::FindSymbol(const std::string& name, bool build_it) { // dependencies. const FileDescriptor* file = result.GetFile(); if (file == file_ || dependencies_.count(file) > 0) { - unused_dependency_.erase(file); return result; } @@ -3696,8 +3776,8 @@ Symbol DescriptorBuilder::FindSymbol(const std::string& name, bool build_it) { for (std::set::const_iterator it = dependencies_.begin(); it != dependencies_.end(); ++it) { - // Note: A dependency may be NULL if it was not found or had errors. - if (*it != NULL && IsInPackage(*it, name)) return result; + // Note: A dependency may be nullptr if it was not found or had errors. + if (*it != nullptr && IsInPackage(*it, name)) return result; } } @@ -3709,7 +3789,7 @@ Symbol DescriptorBuilder::FindSymbol(const std::string& name, bool build_it) { Symbol DescriptorBuilder::LookupSymbolNoPlaceholder( const std::string& name, const std::string& relative_to, ResolveMode resolve_mode, bool build_it) { - possible_undeclared_dependency_ = NULL; + possible_undeclared_dependency_ = nullptr; undefine_resolved_name_.clear(); if (!name.empty() && name[0] == '.') { @@ -3940,9 +4020,9 @@ FileDescriptor* DescriptorPool::NewPlaceholderFileWithMutexHeld( placeholder->tables_ = &FileDescriptorTables::GetEmptyInstance(); placeholder->source_code_info_ = &SourceCodeInfo::default_instance(); placeholder->is_placeholder_ = true; - placeholder->syntax_ = FileDescriptor::SYNTAX_PROTO2; + placeholder->syntax_ = FileDescriptor::SYNTAX_UNKNOWN; placeholder->finished_building_ = true; - // All other fields are zero or NULL. + // All other fields are zero or nullptr. return placeholder; } @@ -3950,9 +4030,9 @@ FileDescriptor* DescriptorPool::NewPlaceholderFileWithMutexHeld( bool DescriptorBuilder::AddSymbol(const std::string& full_name, const void* parent, const std::string& name, const Message& proto, Symbol symbol) { - // If the caller passed NULL for the parent, the symbol is at file scope. + // If the caller passed nullptr for the parent, the symbol is at file scope. // Use its file as the parent instead. - if (parent == NULL) parent = file_; + if (parent == nullptr) parent = file_; if (tables_->AddSymbol(full_name, symbol)) { if (!file_tables_->AddAliasUnderParent(parent, name, symbol)) { @@ -4046,12 +4126,13 @@ void DescriptorBuilder::ValidateSymbolName(const std::string& name, template void DescriptorBuilder::AllocateOptions( const typename DescriptorT::OptionsType& orig_options, - DescriptorT* descriptor, int options_field_tag) { + DescriptorT* descriptor, int options_field_tag, + const std::string& option_name) { std::vector options_path; descriptor->GetLocationPath(&options_path); options_path.push_back(options_field_tag); AllocateOptionsImpl(descriptor->full_name(), descriptor->full_name(), - orig_options, descriptor, options_path); + orig_options, descriptor, options_path, option_name); } // We specialize for FileDescriptor. @@ -4061,19 +4142,21 @@ void DescriptorBuilder::AllocateOptions(const FileOptions& orig_options, options_path.push_back(FileDescriptorProto::kOptionsFieldNumber); // We add the dummy token so that LookupSymbol does the right thing. AllocateOptionsImpl(descriptor->package() + ".dummy", descriptor->name(), - orig_options, descriptor, options_path); + orig_options, descriptor, options_path, + "google.protobuf.FileOptions"); } template void DescriptorBuilder::AllocateOptionsImpl( const std::string& name_scope, const std::string& element_name, const typename DescriptorT::OptionsType& orig_options, - DescriptorT* descriptor, const std::vector& options_path) { + DescriptorT* descriptor, const std::vector& options_path, + const std::string& option_name) { // We need to use a dummy pointer to work around a bug in older versions of // GCC. Otherwise, the following two lines could be replaced with: // typename DescriptorT::OptionsType* options = // tables_->AllocateMessage(); - typename DescriptorT::OptionsType* const dummy = NULL; + typename DescriptorT::OptionsType* const dummy = nullptr; typename DescriptorT::OptionsType* options = tables_->AllocateMessage(dummy); if (!orig_options.IsInitialized()) { @@ -4101,6 +4184,25 @@ void DescriptorBuilder::AllocateOptionsImpl( options_to_interpret_.push_back(OptionsToInterpret( name_scope, element_name, options_path, &orig_options, options)); } + + // If the custom option is in unknown fields, no need to interpret it. + // Remove the dependency file from unused_dependency. + const UnknownFieldSet& unknown_fields = orig_options.unknown_fields(); + if (!unknown_fields.empty()) { + // Can not use options->GetDescriptor() which may case deadlock. + Symbol msg_symbol = tables_->FindSymbol(option_name); + if (msg_symbol.type == Symbol::MESSAGE) { + for (int i = 0; i < unknown_fields.field_count(); ++i) { + assert_mutex_held(pool_); + const FieldDescriptor* field = + pool_->InternalFindExtensionByNumberNoLock( + msg_symbol.descriptor, unknown_fields.field(i).number()); + if (field) { + unused_dependency_.erase(field->file()); + } + } + } + } } // A common pattern: We want to convert a repeated field in the descriptor @@ -4140,7 +4242,7 @@ void DescriptorBuilder::AddTwiceListedError(const FileDescriptorProto& proto, void DescriptorBuilder::AddImportError(const FileDescriptorProto& proto, int index) { std::string message; - if (pool_->fallback_database_ == NULL) { + if (pool_->fallback_database_ == nullptr) { message = "Import \"" + proto.dependency(index) + "\" has not been loaded."; } else { message = "Import \"" + proto.dependency(index) + @@ -4175,7 +4277,7 @@ const FileDescriptor* DescriptorBuilder::BuildFile( // This is fine, because this idempotency "feature" really only exists to // accommodate one hack in the proto1->proto2 migration layer. const FileDescriptor* existing_file = tables_->FindFile(filename_); - if (existing_file != NULL) { + if (existing_file != nullptr) { // File already in pool. Compare the existing one to the input. if (ExistingFileMatchesProto(existing_file, proto)) { // They're identical. Return the existing descriptor. @@ -4197,7 +4299,7 @@ const FileDescriptor* DescriptorBuilder::BuildFile( for (int i = 0; i < tables_->pending_files_.size(); i++) { if (tables_->pending_files_[i] == proto.name()) { AddRecursiveImportError(proto, i); - return NULL; + return nullptr; } } @@ -4205,12 +4307,13 @@ const FileDescriptor* DescriptorBuilder::BuildFile( // attempt to load all dependencies now, before checkpointing tables_. This // avoids confusion with recursive checkpoints. if (!pool_->lazily_build_dependencies_) { - if (pool_->fallback_database_ != NULL) { + if (pool_->fallback_database_ != nullptr) { tables_->pending_files_.push_back(proto.name()); for (int i = 0; i < proto.dependency_size(); i++) { - if (tables_->FindFile(proto.dependency(i)) == NULL && - (pool_->underlay_ == NULL || - pool_->underlay_->FindFileByName(proto.dependency(i)) == NULL)) { + if (tables_->FindFile(proto.dependency(i)) == nullptr && + (pool_->underlay_ == nullptr || + pool_->underlay_->FindFileByName(proto.dependency(i)) == + nullptr)) { // We don't care what this returns since we'll find out below anyway. pool_->TryFindFileInFallbackDatabase(proto.dependency(i)); } @@ -4289,7 +4392,7 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl( "A file with this name is already in the pool."); // Bail out early so that if this is actually the exact same file, we // don't end up reporting that every single symbol is already defined. - return NULL; + return nullptr; } if (!result->package().empty()) { AddPackage(result->package(), proto, result); @@ -4309,8 +4412,8 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl( sizeof(*result->dependencies_names_) * proto.dependency_size()); } } else { - result->dependencies_once_ = NULL; - result->dependencies_names_ = NULL; + result->dependencies_once_ = nullptr; + result->dependencies_names_ = nullptr; } unused_dependency_.clear(); std::set weak_deps; @@ -4323,7 +4426,7 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl( } const FileDescriptor* dependency = tables_->FindFile(proto.dependency(i)); - if (dependency == NULL && pool_->underlay_ != NULL) { + if (dependency == nullptr && pool_->underlay_ != nullptr) { dependency = pool_->underlay_->FindFileByName(proto.dependency(i)); } @@ -4331,10 +4434,10 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl( // Recursive import. dependency/result is not fully initialized, and it's // dangerous to try to do anything with it. The recursive import error // will be detected and reported in DescriptorBuilder::BuildFile(). - return NULL; + return nullptr; } - if (dependency == NULL) { + if (dependency == nullptr) { if (!pool_->lazily_build_dependencies_) { if (pool_->allow_unknown_ || (!pool_->enforce_weak_ && weak_deps.find(i) != weak_deps.end())) { @@ -4412,15 +4515,14 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl( result->weak_dependency_count_ = weak_dependency_count; // Convert children. - BUILD_ARRAY(proto, result, message_type, BuildMessage, NULL); - BUILD_ARRAY(proto, result, enum_type, BuildEnum, NULL); - BUILD_ARRAY(proto, result, service, BuildService, NULL); - BUILD_ARRAY(proto, result, extension, BuildExtension, NULL); + BUILD_ARRAY(proto, result, message_type, BuildMessage, nullptr); + BUILD_ARRAY(proto, result, enum_type, BuildEnum, nullptr); + BUILD_ARRAY(proto, result, service, BuildService, nullptr); + BUILD_ARRAY(proto, result, extension, BuildExtension, nullptr); // Copy options. - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { + result->options_ = nullptr; // Set to default_instance later if necessary. + if (proto.has_options()) { AllocateOptions(proto.options(), result); } @@ -4461,28 +4563,39 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl( // Again, see comments at InternalSetLazilyBuildDependencies about error - // checking. - if (!unused_dependency_.empty() && !pool_->lazily_build_dependencies_) { + // checking. Also, don't log unused dependencies if there were previous + // errors, since the results might be inaccurate. + if (!had_errors_ && !unused_dependency_.empty() && + !pool_->lazily_build_dependencies_) { LogUnusedDependency(proto, result); } if (had_errors_) { - return NULL; + return nullptr; } else { return result; } } +std::string* DescriptorBuilder::AllocateNameString( + const std::string& scope, const std::string& proto_name) { + std::string* full_name; + if (scope.empty()) { + full_name = tables_->AllocateString(proto_name); + } else { + full_name = tables_->AllocateEmptyString(); + *full_name = StrCat(scope, ".", proto_name); + } + return full_name; +} + void DescriptorBuilder::BuildMessage(const DescriptorProto& proto, const Descriptor* parent, Descriptor* result) { const std::string& scope = - (parent == NULL) ? file_->package() : parent->full_name(); - std::string* full_name = tables_->AllocateString(scope); - if (!full_name->empty()) full_name->append(1, '.'); - full_name->append(proto.name()); - + (parent == nullptr) ? file_->package() : parent->full_name(); + std::string* full_name = AllocateNameString(scope, proto.name()); ValidateSymbolName(proto.name(), *full_name, proto); result->name_ = tables_->AllocateString(proto.name()); @@ -4491,6 +4604,12 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto, result->containing_type_ = parent; result->is_placeholder_ = false; result->is_unqualified_placeholder_ = false; + result->well_known_type_ = Descriptor::WELLKNOWNTYPE_UNSPECIFIED; + + auto it = pool_->tables_->well_known_types_.find(*full_name); + if (it != pool_->tables_->well_known_types_.end()) { + result->well_known_type_ = it->second; + } // Build oneofs first so that fields and extension ranges can refer to them. BUILD_ARRAY(proto, result, oneof_decl, BuildOneof, result); @@ -4512,16 +4631,15 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto, } // Copy options. - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { + result->options_ = nullptr; // Set to default_instance later if necessary. + if (proto.has_options()) { AllocateOptions(proto.options(), result, - DescriptorProto::kOptionsFieldNumber); + DescriptorProto::kOptionsFieldNumber, + "google.protobuf.MessageOptions"); } AddSymbol(result->full_name(), parent, result->name(), proto, Symbol(result)); - for (int i = 0; i < proto.reserved_range_size(); i++) { const DescriptorProto_ReservedRange& range1 = proto.reserved_range(i); for (int j = i + 1; j < proto.reserved_range_size(); j++) { @@ -4530,9 +4648,9 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto, AddError(result->full_name(), proto.reserved_range(i), DescriptorPool::ErrorCollector::NUMBER, strings::Substitute("Reserved range $0 to $1 overlaps with " - "already-defined range $2 to $3.", - range2.start(), range2.end() - 1, - range1.start(), range1.end() - 1)); + "already-defined range $2 to $3.", + range2.start(), range2.end() - 1, + range1.start(), range1.end() - 1)); } } } @@ -4544,11 +4662,12 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto, reserved_name_set.insert(name); } else { AddError(name, proto, DescriptorPool::ErrorCollector::NAME, - strings::Substitute( - "Field name \"$0\" is reserved multiple times.", name)); + strings::Substitute("Field name \"$0\" is reserved multiple times.", + name)); } } + for (int i = 0; i < result->field_count(); i++) { const FieldDescriptor* field = result->field(i); for (int j = 0; j < result->extension_range_count(); j++) { @@ -4568,7 +4687,7 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto, AddError(field->full_name(), proto.reserved_range(j), DescriptorPool::ErrorCollector::NUMBER, strings::Substitute("Field \"$0\" uses reserved number $1.", - field->name(), field->number())); + field->name(), field->number())); } } if (reserved_name_set.find(field->name()) != reserved_name_set.end()) { @@ -4577,10 +4696,11 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto, DescriptorPool::ErrorCollector::NAME, strings::Substitute("Field name \"$0\" is reserved.", field->name())); } + } // Check that extension ranges don't overlap and don't include - // reserved field numbers. + // reserved field numbers or names. for (int i = 0; i < result->extension_range_count(); i++) { const Descriptor::ExtensionRange* range1 = result->extension_range(i); for (int j = 0; j < result->reserved_range_count(); j++) { @@ -4589,9 +4709,9 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto, AddError(result->full_name(), proto.extension_range(i), DescriptorPool::ErrorCollector::NUMBER, strings::Substitute("Extension range $0 to $1 overlaps with " - "reserved range $2 to $3.", - range1->start, range1->end - 1, - range2->start, range2->end - 1)); + "reserved range $2 to $3.", + range1->start, range1->end - 1, range2->start, + range2->end - 1)); } } for (int j = i + 1; j < result->extension_range_count(); j++) { @@ -4600,24 +4720,21 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto, AddError(result->full_name(), proto.extension_range(i), DescriptorPool::ErrorCollector::NUMBER, strings::Substitute("Extension range $0 to $1 overlaps with " - "already-defined range $2 to $3.", - range2->start, range2->end - 1, - range1->start, range1->end - 1)); + "already-defined range $2 to $3.", + range2->start, range2->end - 1, range1->start, + range1->end - 1)); } } } } void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto, - const Descriptor* parent, + Descriptor* parent, FieldDescriptor* result, bool is_extension) { const std::string& scope = - (parent == NULL) ? file_->package() : parent->full_name(); - std::string* full_name = tables_->AllocateString(scope); - if (!full_name->empty()) full_name->append(1, '.'); - full_name->append(proto.name()); - + (parent == nullptr) ? file_->package() : parent->full_name(); + std::string* full_name = AllocateNameString(scope, proto.name()); ValidateSymbolName(proto.name(), *full_name, proto); result->name_ = tables_->AllocateString(proto.name()); @@ -4625,6 +4742,15 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto, result->file_ = file_; result->number_ = proto.number(); result->is_extension_ = is_extension; + result->proto3_optional_ = proto.proto3_optional(); + + if (proto.proto3_optional() && + file_->syntax() != FileDescriptor::SYNTAX_PROTO3) { + AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, + "The [proto3_optional=true] option may only be set on proto3" + "fields, not " + + result->full_name()); + } // If .proto files follow the style guide then the name should already be // lower-cased. If that's the case we can just reuse the string we @@ -4659,28 +4785,29 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto, result->label_ = static_cast( implicit_cast(proto.label())); - // An extension cannot have a required field (b/13365836). - if (result->is_extension_ && - result->label_ == FieldDescriptor::LABEL_REQUIRED) { - AddError(result->full_name(), proto, - // Error location `TYPE`: we would really like to indicate - // `LABEL`, but the `ErrorLocation` enum has no entry for this, and - // we don't necessarily know about all implementations of the - // `ErrorCollector` interface to extend them to handle the new - // error location type properly. - DescriptorPool::ErrorCollector::TYPE, - "Message extensions cannot have required fields."); + if (result->label_ == FieldDescriptor::LABEL_REQUIRED) { + // An extension cannot have a required field (b/13365836). + if (result->is_extension_) { + AddError(result->full_name(), proto, + // Error location `TYPE`: we would really like to indicate + // `LABEL`, but the `ErrorLocation` enum has no entry for this, + // and we don't necessarily know about all implementations of the + // `ErrorCollector` interface to extend them to handle the new + // error location type properly. + DescriptorPool::ErrorCollector::TYPE, + "The extension " + result->full_name() + " cannot be required."); + } } // Some of these may be filled in when cross-linking. - result->containing_type_ = NULL; - result->extension_scope_ = NULL; - result->message_type_ = NULL; - result->enum_type_ = NULL; - result->type_name_ = NULL; - result->type_once_ = NULL; - result->default_value_enum_ = NULL; - result->default_value_enum_name_ = NULL; + result->containing_type_ = nullptr; + result->extension_scope_ = nullptr; + result->message_type_ = nullptr; + result->enum_type_ = nullptr; + result->type_name_ = nullptr; + result->type_once_ = nullptr; + result->default_value_enum_ = nullptr; + result->default_value_enum_name_ = nullptr; result->has_default_value_ = proto.has_default_value(); if (proto.has_default_value() && result->is_repeated()) { @@ -4691,7 +4818,7 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto, if (proto.has_type()) { if (proto.has_default_value()) { - char* end_pos = NULL; + char* end_pos = nullptr; switch (result->cpp_type()) { case FieldDescriptor::CPPTYPE_INT32: result->default_value_int32_ = @@ -4752,7 +4879,7 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto, break; case FieldDescriptor::CPPTYPE_ENUM: // This will be filled in when cross-linking. - result->default_value_enum_ = NULL; + result->default_value_enum_ = nullptr; break; case FieldDescriptor::CPPTYPE_STRING: if (result->type() == FieldDescriptor::TYPE_BYTES) { @@ -4771,10 +4898,10 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto, break; } - if (end_pos != NULL) { - // end_pos is only set non-NULL by the parsers for numeric types, above. - // This checks that the default was non-empty and had no extra junk - // after the end of the number. + if (end_pos != nullptr) { + // end_pos is only set non-null by the parsers for numeric types, + // above. This checks that the default was non-empty and had no extra + // junk after the end of the number. if (proto.default_value().empty() || *end_pos != '\0') { AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::DEFAULT_VALUE, @@ -4808,7 +4935,7 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto, break; case FieldDescriptor::CPPTYPE_ENUM: // This will be filled in when cross-linking. - result->default_value_enum_ = NULL; + result->default_value_enum_ = nullptr; break; case FieldDescriptor::CPPTYPE_STRING: result->default_value_string_ = &internal::GetEmptyString(); @@ -4833,7 +4960,7 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto, // on extension numbers. AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER, strings::Substitute("Field numbers cannot be greater than $0.", - FieldDescriptor::kMaxNumber)); + FieldDescriptor::kMaxNumber)); } else if (result->number() >= FieldDescriptor::kFirstReservedNumber && result->number() <= FieldDescriptor::kLastReservedNumber) { AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER, @@ -4860,7 +4987,7 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto, } // Fill in later (maybe). - result->containing_oneof_ = NULL; + result->containing_oneof_ = nullptr; } else { if (proto.has_extendee()) { AddError(result->full_name(), proto, @@ -4876,23 +5003,23 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto, AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, strings::Substitute("FieldDescriptorProto.oneof_index $0 is " - "out of range for type \"$1\".", - proto.oneof_index(), parent->name())); - result->containing_oneof_ = NULL; + "out of range for type \"$1\".", + proto.oneof_index(), parent->name())); + result->containing_oneof_ = nullptr; } else { result->containing_oneof_ = parent->oneof_decl(proto.oneof_index()); } } else { - result->containing_oneof_ = NULL; + result->containing_oneof_ = nullptr; } } // Copy options. - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { + result->options_ = nullptr; // Set to default_instance later if necessary. + if (proto.has_options()) { AllocateOptions(proto.options(), result, - FieldDescriptorProto::kOptionsFieldNumber); + FieldDescriptorProto::kOptionsFieldNumber, + "google.protobuf.FieldOptions"); } @@ -4919,9 +5046,8 @@ void DescriptorBuilder::BuildExtensionRange( "Extension range end number must be greater than start number."); } - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { + result->options_ = nullptr; // Set to default_instance later if necessary. + if (proto.has_options()) { std::vector options_path; parent->GetLocationPath(&options_path); options_path.push_back(DescriptorProto::kExtensionRangeFieldNumber); @@ -4932,7 +5058,8 @@ void DescriptorBuilder::BuildExtensionRange( options_path.push_back(index); options_path.push_back(DescriptorProto_ExtensionRange::kOptionsFieldNumber); AllocateOptionsImpl(parent->full_name(), parent->full_name(), - proto.options(), result, options_path); + proto.options(), result, options_path, + "google.protobuf.ExtensionRangeOptions"); } } @@ -4962,10 +5089,8 @@ void DescriptorBuilder::BuildReservedRange( void DescriptorBuilder::BuildOneof(const OneofDescriptorProto& proto, Descriptor* parent, OneofDescriptor* result) { - std::string* full_name = tables_->AllocateString(parent->full_name()); - full_name->append(1, '.'); - full_name->append(proto.name()); - + std::string* full_name = + AllocateNameString(parent->full_name(), proto.name()); ValidateSymbolName(proto.name(), *full_name, proto); result->name_ = tables_->AllocateString(proto.name()); @@ -4975,14 +5100,14 @@ void DescriptorBuilder::BuildOneof(const OneofDescriptorProto& proto, // We need to fill these in later. result->field_count_ = 0; - result->fields_ = NULL; + result->fields_ = nullptr; + result->options_ = nullptr; // Copy options. - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { + if (proto.has_options()) { AllocateOptions(proto.options(), result, - OneofDescriptorProto::kOptionsFieldNumber); + OneofDescriptorProto::kOptionsFieldNumber, + "google.protobuf.OneofOptions"); } AddSymbol(result->full_name(), parent, result->name(), proto, Symbol(result)); @@ -5058,11 +5183,8 @@ void DescriptorBuilder::BuildEnum(const EnumDescriptorProto& proto, const Descriptor* parent, EnumDescriptor* result) { const std::string& scope = - (parent == NULL) ? file_->package() : parent->full_name(); - std::string* full_name = tables_->AllocateString(scope); - if (!full_name->empty()) full_name->append(1, '.'); - full_name->append(proto.name()); - + (parent == nullptr) ? file_->package() : parent->full_name(); + std::string* full_name = AllocateNameString(scope, proto.name()); ValidateSymbolName(proto.name(), *full_name, proto); result->name_ = tables_->AllocateString(proto.name()); @@ -5095,11 +5217,11 @@ void DescriptorBuilder::BuildEnum(const EnumDescriptorProto& proto, CheckEnumValueUniqueness(proto, result); // Copy options. - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { + result->options_ = nullptr; // Set to default_instance later if necessary. + if (proto.has_options()) { AllocateOptions(proto.options(), result, - EnumDescriptorProto::kOptionsFieldNumber); + EnumDescriptorProto::kOptionsFieldNumber, + "google.protobuf.EnumOptions"); } AddSymbol(result->full_name(), parent, result->name(), proto, Symbol(result)); @@ -5114,9 +5236,9 @@ void DescriptorBuilder::BuildEnum(const EnumDescriptorProto& proto, AddError(result->full_name(), proto.reserved_range(i), DescriptorPool::ErrorCollector::NUMBER, strings::Substitute("Reserved range $0 to $1 overlaps with " - "already-defined range $2 to $3.", - range2.start(), range2.end(), - range1.start(), range1.end())); + "already-defined range $2 to $3.", + range2.start(), range2.end(), range1.start(), + range1.end())); } } } @@ -5128,8 +5250,8 @@ void DescriptorBuilder::BuildEnum(const EnumDescriptorProto& proto, reserved_name_set.insert(name); } else { AddError(name, proto, DescriptorPool::ErrorCollector::NAME, - strings::Substitute( - "Enum value \"$0\" is reserved multiple times.", name)); + strings::Substitute("Enum value \"$0\" is reserved multiple times.", + name)); } } @@ -5138,11 +5260,10 @@ void DescriptorBuilder::BuildEnum(const EnumDescriptorProto& proto, for (int j = 0; j < result->reserved_range_count(); j++) { const EnumDescriptor::ReservedRange* range = result->reserved_range(j); if (range->start <= value->number() && value->number() <= range->end) { - AddError( - value->full_name(), proto.reserved_range(j), - DescriptorPool::ErrorCollector::NUMBER, - strings::Substitute("Enum value \"$0\" uses reserved number $1.", - value->name(), value->number())); + AddError(value->full_name(), proto.reserved_range(j), + DescriptorPool::ErrorCollector::NUMBER, + strings::Substitute("Enum value \"$0\" uses reserved number $1.", + value->name(), value->number())); } } if (reserved_name_set.find(value->name()) != reserved_name_set.end()) { @@ -5163,19 +5284,21 @@ void DescriptorBuilder::BuildEnumValue(const EnumValueDescriptorProto& proto, // Note: full_name for enum values is a sibling to the parent's name, not a // child of it. - std::string* full_name = tables_->AllocateString(*parent->full_name_); - full_name->resize(full_name->size() - parent->name_->size()); + std::string* full_name = tables_->AllocateEmptyString(); + size_t scope_len = parent->full_name_->size() - parent->name_->size(); + full_name->reserve(scope_len + result->name_->size()); + full_name->append(parent->full_name_->data(), scope_len); full_name->append(*result->name_); result->full_name_ = full_name; ValidateSymbolName(proto.name(), *full_name, proto); // Copy options. - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { + result->options_ = nullptr; // Set to default_instance later if necessary. + if (proto.has_options()) { AllocateOptions(proto.options(), result, - EnumValueDescriptorProto::kOptionsFieldNumber); + EnumValueDescriptorProto::kOptionsFieldNumber, + "google.protobuf.EnumValueOptions"); } // Again, enum values are weird because we makes them appear as siblings @@ -5197,7 +5320,7 @@ void DescriptorBuilder::BuildEnumValue(const EnumValueDescriptorProto& proto, // but it did conflict with some other symbol defined in the enum type's // scope. Let's print an additional error to explain this. std::string outer_scope; - if (parent->containing_type() == NULL) { + if (parent->containing_type() == nullptr) { outer_scope = file_->package(); } else { outer_scope = parent->containing_type()->full_name(); @@ -5226,10 +5349,7 @@ void DescriptorBuilder::BuildEnumValue(const EnumValueDescriptorProto& proto, void DescriptorBuilder::BuildService(const ServiceDescriptorProto& proto, const void* /* dummy */, ServiceDescriptor* result) { - std::string* full_name = tables_->AllocateString(file_->package()); - if (!full_name->empty()) full_name->append(1, '.'); - full_name->append(proto.name()); - + std::string* full_name = AllocateNameString(file_->package(), proto.name()); ValidateSymbolName(proto.name(), *full_name, proto); result->name_ = tables_->AllocateString(proto.name()); @@ -5239,14 +5359,15 @@ void DescriptorBuilder::BuildService(const ServiceDescriptorProto& proto, BUILD_ARRAY(proto, result, method, BuildMethod, result); // Copy options. - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { + result->options_ = nullptr; // Set to default_instance later if necessary. + if (proto.has_options()) { AllocateOptions(proto.options(), result, - ServiceDescriptorProto::kOptionsFieldNumber); + ServiceDescriptorProto::kOptionsFieldNumber, + "google.protobuf.ServiceOptions"); } - AddSymbol(result->full_name(), NULL, result->name(), proto, Symbol(result)); + AddSymbol(result->full_name(), nullptr, result->name(), proto, + Symbol(result)); } void DescriptorBuilder::BuildMethod(const MethodDescriptorProto& proto, @@ -5255,9 +5376,8 @@ void DescriptorBuilder::BuildMethod(const MethodDescriptorProto& proto, result->name_ = tables_->AllocateString(proto.name()); result->service_ = parent; - std::string* full_name = tables_->AllocateString(parent->full_name()); - full_name->append(1, '.'); - full_name->append(*result->name_); + std::string* full_name = + AllocateNameString(parent->full_name(), *result->name_); result->full_name_ = full_name; ValidateSymbolName(proto.name(), *full_name, proto); @@ -5267,11 +5387,11 @@ void DescriptorBuilder::BuildMethod(const MethodDescriptorProto& proto, result->output_type_.Init(); // Copy options. - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { + result->options_ = nullptr; // Set to default_instance later if necessary. + if (proto.has_options()) { AllocateOptions(proto.options(), result, - MethodDescriptorProto::kOptionsFieldNumber); + MethodDescriptorProto::kOptionsFieldNumber, + "google.protobuf.MethodOptions"); } result->client_streaming_ = proto.client_streaming(); @@ -5286,7 +5406,7 @@ void DescriptorBuilder::BuildMethod(const MethodDescriptorProto& proto, void DescriptorBuilder::CrossLinkFile(FileDescriptor* file, const FileDescriptorProto& proto) { - if (file->options_ == NULL) { + if (file->options_ == nullptr) { file->options_ = &FileOptions::default_instance(); } @@ -5309,7 +5429,7 @@ void DescriptorBuilder::CrossLinkFile(FileDescriptor* file, void DescriptorBuilder::CrossLinkMessage(Descriptor* message, const DescriptorProto& proto) { - if (message->options_ == NULL) { + if (message->options_ == nullptr) { message->options_ = &MessageOptions::default_instance(); } @@ -5339,7 +5459,7 @@ void DescriptorBuilder::CrossLinkMessage(Descriptor* message, // First count the number of fields per oneof. for (int i = 0; i < message->field_count(); i++) { const OneofDescriptor* oneof_decl = message->field(i)->containing_oneof(); - if (oneof_decl != NULL) { + if (oneof_decl != nullptr) { // Make sure fields belonging to the same oneof are defined consecutively. // This enables optimizations in codegens and reflection libraries to // skip fields in the oneof group, as only one of the field can be set. @@ -5376,7 +5496,7 @@ void DescriptorBuilder::CrossLinkMessage(Descriptor* message, oneof_decl->field_count_); oneof_decl->field_count_ = 0; - if (oneof_decl->options_ == NULL) { + if (oneof_decl->options_ == nullptr) { oneof_decl->options_ = &OneofOptions::default_instance(); } } @@ -5384,7 +5504,7 @@ void DescriptorBuilder::CrossLinkMessage(Descriptor* message, // Then fill them in. for (int i = 0; i < message->field_count(); i++) { const OneofDescriptor* oneof_decl = message->field(i)->containing_oneof(); - if (oneof_decl != NULL) { + if (oneof_decl != nullptr) { OneofDescriptor* mutable_oneof_decl = &message->oneof_decls_[oneof_decl->index()]; message->fields_[i].index_in_oneof_ = mutable_oneof_decl->field_count_; @@ -5392,19 +5512,55 @@ void DescriptorBuilder::CrossLinkMessage(Descriptor* message, message->field(i); } } + + for (int i = 0; i < message->field_count(); i++) { + const FieldDescriptor* field = message->field(i); + if (field->proto3_optional_) { + if (!field->containing_oneof() || + !field->containing_oneof()->is_synthetic()) { + AddError(message->full_name(), proto.field(i), + DescriptorPool::ErrorCollector::OTHER, + "Fields with proto3_optional set must be " + "a member of a one-field oneof"); + } + } + } + + // Synthetic oneofs must be last. + int first_synthetic = -1; + for (int i = 0; i < message->oneof_decl_count(); i++) { + const OneofDescriptor* oneof = message->oneof_decl(i); + if (oneof->is_synthetic()) { + if (first_synthetic == -1) { + first_synthetic = i; + } + } else { + if (first_synthetic != -1) { + AddError(message->full_name(), proto.oneof_decl(i), + DescriptorPool::ErrorCollector::OTHER, + "Synthetic oneofs must be after all other oneofs"); + } + } + } + + if (first_synthetic == -1) { + message->real_oneof_decl_count_ = message->oneof_decl_count_; + } else { + message->real_oneof_decl_count_ = first_synthetic; + } } void DescriptorBuilder::CrossLinkExtensionRange( Descriptor::ExtensionRange* range, const DescriptorProto::ExtensionRange& proto) { - if (range->options_ == NULL) { + if (range->options_ == nullptr) { range->options_ = &ExtensionRangeOptions::default_instance(); } } void DescriptorBuilder::CrossLinkField(FieldDescriptor* field, const FieldDescriptorProto& proto) { - if (field->options_ == NULL) { + if (field->options_ == nullptr) { field->options_ = &FieldOptions::default_instance(); } @@ -5432,17 +5588,24 @@ void DescriptorBuilder::CrossLinkField(FieldDescriptor* field, field->containing_type()->FindExtensionRangeContainingNumber( field->number()); - if (extension_range == NULL) { - AddError(field->full_name(), proto, - DescriptorPool::ErrorCollector::NUMBER, - strings::Substitute("\"$0\" does not declare $1 as an " - "extension number.", - field->containing_type()->full_name(), - field->number())); + if (extension_range == nullptr) { + // Set of valid extension numbers for MessageSet is different (< 2^32) + // from other extendees (< 2^29). If unknown deps are allowed, we may not + // have that information, and wrongly deem the extension as invalid. + auto skip_check = get_allow_unknown(pool_) && + proto.extendee() == "google.protobuf.bridge.MessageSet"; + if (!skip_check) { + AddError(field->full_name(), proto, + DescriptorPool::ErrorCollector::NUMBER, + strings::Substitute("\"$0\" does not declare $1 as an " + "extension number.", + field->containing_type()->full_name(), + field->number())); + } } } - if (field->containing_oneof() != NULL) { + if (field->containing_oneof() != nullptr) { if (field->label() != FieldDescriptor::LABEL_OPTIONAL) { // Note that this error will never happen when parsing .proto files. // It can only happen if you manually construct a FileDescriptorProto @@ -5460,7 +5623,7 @@ void DescriptorBuilder::CrossLinkField(FieldDescriptor* field, proto.has_default_value(); // In case of weak fields we force building the dependency. We need to know - // if the type exist or not. If it doesnt exist we substitute Empty which + // if the type exist or not. If it doesn't exist we substitute Empty which // should only be done if the type can't be found in the generated pool. // TODO(gerbens) Ideally we should query the database directly to check // if weak fields exist or not so that we don't need to force building @@ -5611,23 +5774,23 @@ void DescriptorBuilder::CrossLinkField(FieldDescriptor* field, const FieldDescriptor* conflicting_field = file_tables_->FindFieldByNumber( field->containing_type(), field->number()); std::string containing_type_name = - field->containing_type() == NULL + field->containing_type() == nullptr ? "unknown" : field->containing_type()->full_name(); if (field->is_extension()) { AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER, strings::Substitute("Extension number $0 has already been used " - "in \"$1\" by extension \"$2\".", - field->number(), containing_type_name, - conflicting_field->full_name())); + "in \"$1\" by extension \"$2\".", + field->number(), containing_type_name, + conflicting_field->full_name())); } else { AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER, strings::Substitute("Field number $0 has already been used in " - "\"$1\" by field \"$2\".", - field->number(), containing_type_name, - conflicting_field->name())); + "\"$1\" by field \"$2\".", + field->number(), containing_type_name, + conflicting_field->name())); } } else { if (field->is_extension()) { @@ -5635,7 +5798,7 @@ void DescriptorBuilder::CrossLinkField(FieldDescriptor* field, const FieldDescriptor* conflicting_field = tables_->FindExtension(field->containing_type(), field->number()); std::string containing_type_name = - field->containing_type() == NULL + field->containing_type() == nullptr ? "unknown" : field->containing_type()->full_name(); std::string error_msg = strings::Substitute( @@ -5656,7 +5819,7 @@ void DescriptorBuilder::CrossLinkField(FieldDescriptor* field, void DescriptorBuilder::CrossLinkEnum(EnumDescriptor* enum_type, const EnumDescriptorProto& proto) { - if (enum_type->options_ == NULL) { + if (enum_type->options_ == nullptr) { enum_type->options_ = &EnumOptions::default_instance(); } @@ -5668,14 +5831,14 @@ void DescriptorBuilder::CrossLinkEnum(EnumDescriptor* enum_type, void DescriptorBuilder::CrossLinkEnumValue( EnumValueDescriptor* enum_value, const EnumValueDescriptorProto& /* proto */) { - if (enum_value->options_ == NULL) { + if (enum_value->options_ == nullptr) { enum_value->options_ = &EnumValueOptions::default_instance(); } } void DescriptorBuilder::CrossLinkService(ServiceDescriptor* service, const ServiceDescriptorProto& proto) { - if (service->options_ == NULL) { + if (service->options_ == nullptr) { service->options_ = &ServiceOptions::default_instance(); } @@ -5686,7 +5849,7 @@ void DescriptorBuilder::CrossLinkService(ServiceDescriptor* service, void DescriptorBuilder::CrossLinkMethod(MethodDescriptor* method, const MethodDescriptorProto& proto) { - if (method->options_ == NULL) { + if (method->options_ == nullptr) { method->options_ = &MethodOptions::default_instance(); } @@ -5744,7 +5907,8 @@ void DescriptorBuilder::CrossLinkMethod(MethodDescriptor* method, static bool IsLite(const FileDescriptor* file) { // TODO(kenton): I don't even remember how many of these conditions are // actually possible. I'm just being super-safe. - return file != NULL && &file->options() != &FileOptions::default_instance() && + return file != nullptr && + &file->options() != &FileOptions::default_instance() && file->options().optimize_for() == FileOptions::LITE_RUNTIME; } @@ -5866,7 +6030,8 @@ void DescriptorBuilder::ValidateProto3Field(FieldDescriptor* field, } if (field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM && field->enum_type() && - field->enum_type()->file()->syntax() != FileDescriptor::SYNTAX_PROTO3) { + field->enum_type()->file()->syntax() != FileDescriptor::SYNTAX_PROTO3 && + field->enum_type()->file()->syntax() != FileDescriptor::SYNTAX_UNKNOWN) { // Proto3 messages can only use Proto3 enum types; otherwise we can't // guarantee that the default value is zero. AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, @@ -5903,12 +6068,15 @@ void DescriptorBuilder::ValidateMessageOptions(Descriptor* message, : FieldDescriptor::kMaxNumber); for (int i = 0; i < message->extension_range_count(); ++i) { if (message->extension_range(i)->end > max_extension_range + 1) { - AddError( - message->full_name(), proto.extension_range(i), - DescriptorPool::ErrorCollector::NUMBER, - strings::Substitute("Extension numbers cannot be greater than $0.", - max_extension_range)); + AddError(message->full_name(), proto.extension_range(i), + DescriptorPool::ErrorCollector::NUMBER, + strings::Substitute("Extension numbers cannot be greater than $0.", + max_extension_range)); } + + ValidateExtensionRangeOptions(message->full_name(), + message->extension_ranges_ + i, + proto.extension_range(i)); } } @@ -5935,7 +6103,7 @@ void DescriptorBuilder::ValidateFieldOptions( // Note: Default instance may not yet be initialized here, so we have to // avoid reading from it. - if (field->containing_type_ != NULL && + if (field->containing_type_ != nullptr && &field->containing_type()->options() != &MessageOptions::default_instance() && field->containing_type()->options().message_set_wire_format()) { @@ -5953,7 +6121,7 @@ void DescriptorBuilder::ValidateFieldOptions( } // Lite extensions can only be of Lite types. - if (IsLite(field->file()) && field->containing_type_ != NULL && + if (IsLite(field->file()) && field->containing_type_ != nullptr && !IsLite(field->containing_type()->file())) { AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::EXTENDEE, @@ -6023,6 +6191,12 @@ void DescriptorBuilder::ValidateEnumValueOptions( const EnumValueDescriptorProto& /* proto */) { // Nothing to do so far. } + +void DescriptorBuilder::ValidateExtensionRangeOptions( + const std::string& full_name, Descriptor::ExtensionRange* extension_range, + const DescriptorProto_ExtensionRange& proto) { +} + void DescriptorBuilder::ValidateServiceOptions( ServiceDescriptor* service, const ServiceDescriptorProto& proto) { if (IsLite(service->file()) && @@ -6031,7 +6205,7 @@ void DescriptorBuilder::ValidateServiceOptions( AddError(service->full_name(), proto, DescriptorPool::ErrorCollector::NAME, "Files with optimize_for = LITE_RUNTIME cannot define services " "unless you set both options cc_generic_services and " - "java_generic_sevices to false."); + "java_generic_services to false."); } VALIDATE_OPTIONS_FROM_ARRAY(service, method, Method); @@ -6060,8 +6234,8 @@ bool DescriptorBuilder::ValidateMapEntry(FieldDescriptor* field, return false; } - const FieldDescriptor* key = message->field(0); - const FieldDescriptor* value = message->field(1); + const FieldDescriptor* key = message->map_key(); + const FieldDescriptor* value = message->map_value(); if (key->label() != FieldDescriptor::LABEL_OPTIONAL || key->number() != 1 || key->name() != "key") { return false; @@ -6218,6 +6392,7 @@ DescriptorBuilder::OptionInterpreter::OptionInterpreter( DescriptorBuilder::OptionInterpreter::~OptionInterpreter() {} + bool DescriptorBuilder::OptionInterpreter::InterpretOptions( OptionsToInterpret* options_to_interpret) { // Note that these may be in different pools, so we can't use the same @@ -6232,7 +6407,7 @@ bool DescriptorBuilder::OptionInterpreter::InterpretOptions( // and clear them, since we're about to interpret them. const FieldDescriptor* uninterpreted_options_field = options->GetDescriptor()->FindFieldByName("uninterpreted_option"); - GOOGLE_CHECK(uninterpreted_options_field != NULL) + GOOGLE_CHECK(uninterpreted_options_field != nullptr) << "No field named \"uninterpreted_option\" in the Options proto."; options->GetReflection()->ClearField(options, uninterpreted_options_field); @@ -6243,7 +6418,7 @@ bool DescriptorBuilder::OptionInterpreter::InterpretOptions( const FieldDescriptor* original_uninterpreted_options_field = original_options->GetDescriptor()->FindFieldByName( "uninterpreted_option"); - GOOGLE_CHECK(original_uninterpreted_options_field != NULL) + GOOGLE_CHECK(original_uninterpreted_options_field != nullptr) << "No field named \"uninterpreted_option\" in the Options proto."; const int num_uninterpreted_options = @@ -6263,8 +6438,8 @@ bool DescriptorBuilder::OptionInterpreter::InterpretOptions( src_path.pop_back(); } // Reset these, so we don't have any dangling pointers. - uninterpreted_option_ = NULL; - options_to_interpret_ = NULL; + uninterpreted_option_ = nullptr; + options_to_interpret_ = nullptr; if (!failed) { // InterpretSingleOption() added the interpreted options in the @@ -6297,6 +6472,8 @@ bool DescriptorBuilder::OptionInterpreter::InterpretOptions( options->GetReflection()->Swap(unparsed_options.get(), options); } } + + return !failed; } @@ -6315,7 +6492,7 @@ bool DescriptorBuilder::OptionInterpreter::InterpretSingleOption( "\"uninterpreted_option\"."); } - const Descriptor* options_descriptor = NULL; + const Descriptor* options_descriptor = nullptr; // Get the options message's descriptor from the builder's pool, so that we // get the version that knows about any extension options declared in the file // we're currently building. The descriptor should be there as long as the @@ -6345,13 +6522,14 @@ bool DescriptorBuilder::OptionInterpreter::InterpretSingleOption( // through in |intermediate_fields|. As we go, we reconstruct the full option // name in |debug_msg_name|, for use in error messages. const Descriptor* descriptor = options_descriptor; - const FieldDescriptor* field = NULL; + const FieldDescriptor* field = nullptr; std::vector intermediate_fields; std::string debug_msg_name = ""; std::vector dest_path = options_path; for (int i = 0; i < uninterpreted_option_->name_size(); ++i) { + builder_->undefine_resolved_name_.clear(); const std::string& name_part = uninterpreted_option_->name(i).name_part(); if (debug_msg_name.size() > 0) { debug_msg_name += "."; @@ -6378,7 +6556,7 @@ bool DescriptorBuilder::OptionInterpreter::InterpretSingleOption( field = descriptor->FindFieldByName(name_part); } - if (field == NULL) { + if (field == nullptr) { if (get_allow_unknown(builder_->pool_)) { // We can't find the option, but AllowUnknownDependencies() is enabled, // so we will just leave it as uninterpreted. @@ -6606,7 +6784,7 @@ void DescriptorBuilder::OptionInterpreter::AddWithoutInterpreting( const UninterpretedOption& uninterpreted_option, Message* options) { const FieldDescriptor* field = options->GetDescriptor()->FindFieldByName("uninterpreted_option"); - GOOGLE_CHECK(field != NULL); + GOOGLE_CHECK(field != nullptr); options->GetReflection() ->AddMessage(options, field) @@ -6821,7 +6999,7 @@ bool DescriptorBuilder::OptionInterpreter::SetOptionValue( } const EnumDescriptor* enum_type = option_field->enum_type(); const std::string& value_name = uninterpreted_option_->identifier_value(); - const EnumValueDescriptor* enum_value = NULL; + const EnumValueDescriptor* enum_value = nullptr; if (enum_type->file()->pool() != DescriptorPool::generated_pool()) { // Note that the enum value's fully-qualified name is a sibling of the @@ -6854,7 +7032,7 @@ bool DescriptorBuilder::OptionInterpreter::SetOptionValue( enum_value = enum_type->FindValueByName(value_name); } - if (enum_value == NULL) { + if (enum_value == nullptr) { return AddValueError("Enum type \"" + option_field->enum_type()->full_name() + "\" has no value named \"" + value_name + @@ -6926,7 +7104,7 @@ class DescriptorBuilder::OptionInterpreter::AggregateOptionFinder } } } - return NULL; + return nullptr; } }; @@ -6969,7 +7147,7 @@ bool DescriptorBuilder::OptionInterpreter::SetAggregateOption( const Descriptor* type = option_field->message_type(); std::unique_ptr dynamic(dynamic_factory_.GetPrototype(type)->New()); - GOOGLE_CHECK(dynamic.get() != NULL) + GOOGLE_CHECK(dynamic.get() != nullptr) << "Could not create an instance of " << option_field->DebugString(); AggregateErrorCollector collector; @@ -7084,32 +7262,17 @@ void DescriptorBuilder::LogUnusedDependency(const FileDescriptorProto& proto, const FileDescriptor* result) { if (!unused_dependency_.empty()) { - std::set annotation_extensions; - annotation_extensions.insert("google.protobuf.MessageOptions"); - annotation_extensions.insert("google.protobuf.FileOptions"); - annotation_extensions.insert("google.protobuf.FieldOptions"); - annotation_extensions.insert("google.protobuf.EnumOptions"); - annotation_extensions.insert("google.protobuf.EnumValueOptions"); - annotation_extensions.insert("google.protobuf.EnumValueOptions"); - annotation_extensions.insert("google.protobuf.ServiceOptions"); - annotation_extensions.insert("google.protobuf.MethodOptions"); - annotation_extensions.insert("google.protobuf.StreamOptions"); + auto itr = pool_->unused_import_track_files_.find(proto.name()); + bool is_error = + itr != pool_->unused_import_track_files_.end() && itr->second; for (std::set::const_iterator it = unused_dependency_.begin(); it != unused_dependency_.end(); ++it) { - // Do not log warnings for proto files which extend annotations. - int i; - for (i = 0; i < (*it)->extension_count(); ++i) { - if (annotation_extensions.find( - (*it)->extension(i)->containing_type()->full_name()) != - annotation_extensions.end()) { - break; - } - } - // Log warnings for unused imported files. - if (i == (*it)->extension_count()) { - std::string error_message = - "Import " + (*it)->name() + " but not used."; + std::string error_message = "Import " + (*it)->name() + " is unused."; + if (is_error) { + AddError((*it)->name(), proto, DescriptorPool::ErrorCollector::IMPORT, + error_message); + } else { AddWarning((*it)->name(), proto, DescriptorPool::ErrorCollector::IMPORT, error_message); } @@ -7198,6 +7361,15 @@ const EnumValueDescriptor* FieldDescriptor::default_value_enum() const { return default_value_enum_; } +const std::string& FieldDescriptor::PrintableNameForExtension() const { + const bool is_message_set_extension = + is_extension() && + containing_type()->options().message_set_wire_format() && + type() == FieldDescriptor::TYPE_MESSAGE && is_optional() && + extension_scope() == message_type(); + return is_message_set_extension ? message_type()->full_name() : full_name(); +} + void FileDescriptor::InternalDependenciesOnceInit() const { GOOGLE_CHECK(finished_building_ == true); for (int i = 0; i < dependency_count(); i++) { @@ -7213,7 +7385,7 @@ void FileDescriptor::DependenciesOnceInit(const FileDescriptor* to_init) { const FileDescriptor* FileDescriptor::dependency(int index) const { if (dependencies_once_) { - // Do once init for all indicies, as it's unlikely only a single index would + // Do once init for all indices, as it's unlikely only a single index would // be called, and saves on internal::call_once allocations. internal::call_once(*dependencies_once_, FileDescriptor::DependenciesOnceInit, this); diff --git a/third_party/protobuf/src/google/protobuf/descriptor.h b/third_party/protobuf/src/google/protobuf/descriptor.h index 7a873f0e..08b03a85 100644 --- a/third_party/protobuf/src/google/protobuf/descriptor.h +++ b/third_party/protobuf/src/google/protobuf/descriptor.h @@ -54,14 +54,15 @@ #ifndef GOOGLE_PROTOBUF_DESCRIPTOR_H__ #define GOOGLE_PROTOBUF_DESCRIPTOR_H__ +#include #include #include #include #include + #include #include #include - #include // TYPE_BOOL is defined in the MacOS's ConditionalMacros.h. @@ -113,6 +114,7 @@ class SourceCodeInfo; // Defined in message.h class Message; +class Reflection; // Defined in descriptor.cc class DescriptorBuilder; @@ -122,11 +124,6 @@ struct Symbol; // Defined in unknown_field_set.h. class UnknownField; -// Defined in generated_message_reflection.h. -namespace internal { -class GeneratedMessageReflection; -} // namespace internal - // Defined in command_line_interface.cc namespace compiler { class CommandLineInterface; @@ -188,10 +185,10 @@ class PROTOBUF_EXPORT LazyDescriptor { // Init function to be called at init time of a descriptor containing // a LazyDescriptor. void Init() { - descriptor_ = NULL; - name_ = NULL; - once_ = NULL; - file_ = NULL; + descriptor_ = nullptr; + name_ = nullptr; + once_ = nullptr; + file_ = nullptr; } // Sets the value of the descriptor if it is known during the descriptor @@ -250,11 +247,11 @@ class PROTOBUF_EXPORT Descriptor { // type array. int index() const; - // The .proto file in which this message type was defined. Never NULL. + // The .proto file in which this message type was defined. Never nullptr. const FileDescriptor* file() const; // If this Descriptor describes a nested type, this returns the type - // in which it is nested. Otherwise, returns NULL. + // in which it is nested. Otherwise, returns nullptr. const Descriptor* containing_type() const; // Get options for this message type. These are specified in the .proto file @@ -268,7 +265,7 @@ class PROTOBUF_EXPORT Descriptor { // isn't, the result may be garbage. void CopyTo(DescriptorProto* proto) const; - // Write the contents of this decriptor in a human-readable form. Output + // Write the contents of this descriptor in a human-readable form. Output // will be suitable for re-parsing. std::string DebugString() const; @@ -281,6 +278,36 @@ class PROTOBUF_EXPORT Descriptor { // with AllowUnknownDependencies() set. bool is_placeholder() const; + enum WellKnownType { + WELLKNOWNTYPE_UNSPECIFIED, // Not a well-known type. + + // Wrapper types. + WELLKNOWNTYPE_DOUBLEVALUE, // google.protobuf.DoubleValue + WELLKNOWNTYPE_FLOATVALUE, // google.protobuf.FloatValue + WELLKNOWNTYPE_INT64VALUE, // google.protobuf.Int64Value + WELLKNOWNTYPE_UINT64VALUE, // google.protobuf.UInt64Value + WELLKNOWNTYPE_INT32VALUE, // google.protobuf.Int32Value + WELLKNOWNTYPE_UINT32VALUE, // google.protobuf.UInt32Value + WELLKNOWNTYPE_STRINGVALUE, // google.protobuf.StringValue + WELLKNOWNTYPE_BYTESVALUE, // google.protobuf.BytesValue + WELLKNOWNTYPE_BOOLVALUE, // google.protobuf.BoolValue + + // Other well known types. + WELLKNOWNTYPE_ANY, // google.protobuf.Any + WELLKNOWNTYPE_FIELDMASK, // google.protobuf.FieldMask + WELLKNOWNTYPE_DURATION, // google.protobuf.Duration + WELLKNOWNTYPE_TIMESTAMP, // google.protobuf.Timestamp + WELLKNOWNTYPE_VALUE, // google.protobuf.Value + WELLKNOWNTYPE_LISTVALUE, // google.protobuf.ListValue + WELLKNOWNTYPE_STRUCT, // google.protobuf.Struct + + // New well-known types may be added in the future. + // Please make sure any switch() statements have a 'default' case. + __WELLKNOWNTYPE__DO_NOT_USE__ADD_DEFAULT_INSTEAD__, + }; + + WellKnownType well_known_type() const; + // Field stuff ----------------------------------------------------- // The number of fields in this message type. @@ -289,10 +316,10 @@ class PROTOBUF_EXPORT Descriptor { // These are returned in the order they were defined in the .proto file. const FieldDescriptor* field(int index) const; - // Looks up a field by declared tag number. Returns NULL if no such field + // Looks up a field by declared tag number. Returns nullptr if no such field // exists. const FieldDescriptor* FindFieldByNumber(int number) const; - // Looks up a field by name. Returns NULL if no such field exists. + // Looks up a field by name. Returns nullptr if no such field exists. const FieldDescriptor* FindFieldByName(const std::string& name) const; // Looks up a field by lowercased name (as returned by lowercase_name()). @@ -310,11 +337,15 @@ class PROTOBUF_EXPORT Descriptor { // The number of oneofs in this message type. int oneof_decl_count() const; + // The number of oneofs in this message type, excluding synthetic oneofs. + // Real oneofs always come first, so iterating up to real_oneof_decl_cout() + // will yield all real oneofs. + int real_oneof_decl_count() const; // Get a oneof by index, where 0 <= index < oneof_decl_count(). // These are returned in the order they were defined in the .proto file. const OneofDescriptor* oneof_decl(int index) const; - // Looks up a oneof by name. Returns NULL if no such oneof exists. + // Looks up a oneof by name. Returns nullptr if no such oneof exists. const OneofDescriptor* FindOneofByName(const std::string& name) const; // Nested type stuff ----------------------------------------------- @@ -325,7 +356,7 @@ class PROTOBUF_EXPORT Descriptor { // These are returned in the order they were defined in the .proto file. const Descriptor* nested_type(int index) const; - // Looks up a nested type by name. Returns NULL if no such nested type + // Looks up a nested type by name. Returns nullptr if no such nested type // exists. const Descriptor* FindNestedTypeByName(const std::string& name) const; @@ -337,11 +368,12 @@ class PROTOBUF_EXPORT Descriptor { // These are returned in the order they were defined in the .proto file. const EnumDescriptor* enum_type(int index) const; - // Looks up an enum type by name. Returns NULL if no such enum type exists. + // Looks up an enum type by name. Returns nullptr if no such enum type + // exists. const EnumDescriptor* FindEnumTypeByName(const std::string& name) const; // Looks up an enum value by name, among all enum types in this message. - // Returns NULL if no such value exists. + // Returns nullptr if no such value exists. const EnumValueDescriptor* FindEnumValueByName(const std::string& name) const; // Extensions ------------------------------------------------------ @@ -372,11 +404,33 @@ class PROTOBUF_EXPORT Descriptor { // Returns true if the number is in one of the extension ranges. bool IsExtensionNumber(int number) const; - // Returns NULL if no extension range contains the given number. + // Returns nullptr if no extension range contains the given number. const ExtensionRange* FindExtensionRangeContainingNumber(int number) const; - // The number of extensions -- extending *other* messages -- that were - // defined nested within this message type's scope. + // The number of extensions defined nested within this message type's scope. + // See doc: + // https://developers.google.com/protocol-buffers/docs/proto#nested-extensions + // + // Note that the extensions may be extending *other* messages. + // + // For example: + // message M1 { + // extensions 1 to max; + // } + // + // message M2 { + // extend M1 { + // optional int32 foo = 1; + // } + // } + // + // In this case, + // DescriptorPool::generated_pool() + // ->FindMessageTypeByName("M2") + // ->extension(0) + // will return "foo", even though "foo" is an extension of M1. + // To find all known extensions of a given message, instead use + // DescriptorPool::FindAllExtensions. int extension_count() const; // Get an extension by index, where 0 <= index < extension_count(). // These are returned in the order they were defined in the .proto file. @@ -414,7 +468,7 @@ class PROTOBUF_EXPORT Descriptor { // Returns true if the number is in one of the reserved ranges. bool IsReservedNumber(int number) const; - // Returns NULL if no reserved range contains the given number. + // Returns nullptr if no reserved range contains the given number. const ReservedRange* FindReservedRangeContainingNumber(int number) const; // The number of reserved field names in this message type. @@ -433,6 +487,16 @@ class PROTOBUF_EXPORT Descriptor { // |*out_location| unchanged iff location information was not available. bool GetSourceLocation(SourceLocation* out_location) const; + // Maps -------------------------------------------------------------- + + // Returns the FieldDescriptor for the "key" field. If this isn't a map entry + // field, returns nullptr. + const FieldDescriptor* map_key() const; + + // Returns the FieldDescriptor for the "value" field. If this isn't a map + // entry field, returns nullptr. + const FieldDescriptor* map_value() const; + private: typedef MessageOptions OptionsType; @@ -476,6 +540,7 @@ class PROTOBUF_EXPORT Descriptor { int field_count_; int oneof_decl_count_; + int real_oneof_decl_count_; int nested_type_count_; int enum_type_count_; int extension_range_count_; @@ -487,6 +552,8 @@ class PROTOBUF_EXPORT Descriptor { bool is_placeholder_; // True if this is a placeholder and the type name wasn't fully-qualified. bool is_unqualified_placeholder_; + // Well known type. Stored as char to conserve space. + char well_known_type_; // IMPORTANT: If you add a new field, make sure to search for all instances // of Allocate() and AllocateArray() in descriptor.cc @@ -512,10 +579,8 @@ class PROTOBUF_EXPORT Descriptor { // - Get the Descriptor or FileDescriptor for its containing scope, then // call Descriptor::FindExtensionByName() or // FileDescriptor::FindExtensionByName(). -// - Given a DescriptorPool, call DescriptorPool::FindExtensionByNumber(). -// - Given a Reflection for a message object, call -// Reflection::FindKnownExtensionByName() or -// Reflection::FindKnownExtensionByNumber(). +// - Given a DescriptorPool, call DescriptorPool::FindExtensionByNumber() or +// DescriptorPool::FindExtensionByPrintableName(). // Use DescriptorPool to construct your own descriptors. class PROTOBUF_EXPORT FieldDescriptor { public: @@ -634,6 +699,19 @@ class PROTOBUF_EXPORT FieldDescriptor { bool is_map() const; // shorthand for type() == TYPE_MESSAGE && // message_type()->options().map_entry() + // Returns true if this field was syntactically written with "optional" in the + // .proto file. Excludes singular proto3 fields that do not have a label. + bool has_optional_keyword() const; + + // Returns true if this field tracks presence, ie. does the field + // distinguish between "unset" and "present with default value." + // This includes required, optional, and oneof fields. It excludes maps, + // repeated fields, and singular proto3 fields without "optional". + // + // For fields where has_presence() == true, the return value of + // Reflection::HasField() is semantically meaningful. + bool has_presence() const; + // Index of this field within the message's field array, or the file or // extension scope's extensions array. int index() const; @@ -669,26 +747,30 @@ class PROTOBUF_EXPORT FieldDescriptor { // Get the field default value if cpp_type() == CPPTYPE_ENUM. If no // explicit default was defined, the default is the first value defined // in the enum type (all enum types are required to have at least one value). - // This never returns NULL. + // This never returns nullptr. const EnumValueDescriptor* default_value_enum() const; // Get the field default value if cpp_type() == CPPTYPE_STRING. If no // explicit default was defined, the default is the empty string. const std::string& default_value_string() const; // The Descriptor for the message of which this is a field. For extensions, - // this is the extended type. Never NULL. + // this is the extended type. Never nullptr. const Descriptor* containing_type() const; // If the field is a member of a oneof, this is the one, otherwise this is - // NULL. + // nullptr. const OneofDescriptor* containing_oneof() const; + // If the field is a member of a non-synthetic oneof, returns the descriptor + // for the oneof, otherwise returns nullptr. + const OneofDescriptor* real_containing_oneof() const; + // If the field is a member of a oneof, returns the index in that oneof. int index_in_oneof() const; // An extension may be declared within the scope of another message. If this // field is an extension (is_extension() is true), then extension_scope() - // returns that message, or NULL if the extension was declared at global + // returns that message, or nullptr if the extension was declared at global // scope. If this is not an extension, extension_scope() is undefined (may // assert-fail). const Descriptor* extension_scope() const; @@ -728,6 +810,21 @@ class PROTOBUF_EXPORT FieldDescriptor { // Return true iff [packed = true] is valid for fields of this type. static inline bool IsTypePackable(Type field_type); + // Returns full_name() except if the field is a MessageSet extension, + // in which case it returns the full_name() of the containing message type + // for backwards compatibility with proto1. + // + // A MessageSet extension is defined as an optional message extension + // whose containing type has the message_set_wire_format option set. + // This should be true of extensions of google.protobuf.bridge.MessageSet; + // by convention, such extensions are named "message_set_extension". + // + // The opposite operation (looking up an extension's FieldDescriptor given + // its printable name) can be accomplished with + // message->file()->pool()->FindExtensionByPrintableName(message, name) + // where the extension extends "message". + const std::string& PrintableNameForExtension() const; + // Source Location --------------------------------------------------- // Updates |*out_location| to the source location of the complete @@ -746,9 +843,7 @@ class PROTOBUF_EXPORT FieldDescriptor { void CopyJsonNameTo(FieldDescriptorProto* proto) const; // See Descriptor::DebugString(). - enum PrintLabelFlag { PRINT_LABEL, OMIT_LABEL }; - void DebugString(int depth, PrintLabelFlag print_label_flag, - std::string* contents, + void DebugString(int depth, std::string* contents, const DebugStringOptions& options) const; // formats the default value appropriately and returns it as a string. @@ -780,6 +875,7 @@ class PROTOBUF_EXPORT FieldDescriptor { mutable Type type_; Label label_; bool has_default_value_; + bool proto3_optional_; // Whether the user has specified the json_name field option in the .proto // file. bool has_json_name_; @@ -840,7 +936,11 @@ class PROTOBUF_EXPORT OneofDescriptor { // Index of this oneof within the message's oneof array. int index() const; - // The .proto file in which this oneof was defined. Never NULL. + // Returns whether this oneof was inserted by the compiler to wrap a proto3 + // optional field. If this returns true, code generators should *not* emit it. + bool is_synthetic() const; + + // The .proto file in which this oneof was defined. Never nullptr. const FileDescriptor* file() const; // The Descriptor for the message containing this oneof. const Descriptor* containing_type() const; @@ -918,7 +1018,7 @@ class PROTOBUF_EXPORT EnumDescriptor { // Index of this enum within the file or containing message's enum array. int index() const; - // The .proto file in which this enum type was defined. Never NULL. + // The .proto file in which this enum type was defined. Never nullptr. const FileDescriptor* file() const; // The number of values for this EnumDescriptor. Guaranteed to be greater @@ -928,14 +1028,14 @@ class PROTOBUF_EXPORT EnumDescriptor { // These are returned in the order they were defined in the .proto file. const EnumValueDescriptor* value(int index) const; - // Looks up a value by name. Returns NULL if no such value exists. + // Looks up a value by name. Returns nullptr if no such value exists. const EnumValueDescriptor* FindValueByName(const std::string& name) const; - // Looks up a value by number. Returns NULL if no such value exists. If + // Looks up a value by number. Returns nullptr if no such value exists. If // multiple values have this number, the first one defined is returned. const EnumValueDescriptor* FindValueByNumber(int number) const; // If this enum type is nested in a message type, this is that message type. - // Otherwise, NULL. + // Otherwise, nullptr. const Descriptor* containing_type() const; // Get options for this enum type. These are specified in the .proto file by @@ -976,7 +1076,7 @@ class PROTOBUF_EXPORT EnumDescriptor { // Returns true if the number is in one of the reserved ranges. bool IsReservedNumber(int number) const; - // Returns NULL if no reserved range contains the given number. + // Returns nullptr if no reserved range contains the given number. const EnumDescriptor::ReservedRange* FindReservedRangeContainingNumber( int number) const; @@ -1008,9 +1108,9 @@ class PROTOBUF_EXPORT EnumDescriptor { // unknown. If a new descriptor is created, this is done in a thread-safe way, // and future calls will return the same value descriptor pointer. // - // This is private but is used by GeneratedMessageReflection (which is - // friended below) to return a valid EnumValueDescriptor from GetEnum() when - // this feature is enabled. + // This is private but is used by Reflection (which is friended below) to + // return a valid EnumValueDescriptor from GetEnum() when this feature is + // enabled. const EnumValueDescriptor* FindValueByNumberCreatingIfUnknown( int number) const; @@ -1053,7 +1153,7 @@ class PROTOBUF_EXPORT EnumDescriptor { friend class EnumValueDescriptor; friend class FileDescriptor; friend class DescriptorPool; - friend class internal::GeneratedMessageReflection; + friend class Reflection; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumDescriptor); }; @@ -1077,9 +1177,9 @@ class PROTOBUF_EXPORT EnumValueDescriptor { // with C++ scoping rules for enums. const std::string& full_name() const; - // The .proto file in which this value was defined. Never NULL. + // The .proto file in which this value was defined. Never nullptr. const FileDescriptor* file() const; - // The type of this value. Never NULL. + // The type of this value. Never nullptr. const EnumDescriptor* type() const; // Get options for this enum value. These are specified in the .proto file by @@ -1150,7 +1250,7 @@ class PROTOBUF_EXPORT ServiceDescriptor { // Index of this service within the file's services array. int index() const; - // The .proto file in which this service was defined. Never NULL. + // The .proto file in which this service was defined. Never nullptr. const FileDescriptor* file() const; // Get options for this service type. These are specified in the .proto file @@ -1232,9 +1332,9 @@ class PROTOBUF_EXPORT MethodDescriptor { // Index within the service's Descriptor. int index() const; - // The .proto file in which this method was defined. Never NULL. + // The .proto file in which this method was defined. Never nullptr. const FileDescriptor* file() const; - // Gets the service to which this method belongs. Never NULL. + // Gets the service to which this method belongs. Never nullptr. const ServiceDescriptor* service() const; // Gets the type of protocol message which this method accepts as input. @@ -1319,7 +1419,7 @@ class PROTOBUF_EXPORT FileDescriptor { const std::string& package() const; // The DescriptorPool in which this FileDescriptor and all its contents were - // allocated. Never NULL. + // allocated. Never nullptr. const DescriptorPool* pool() const; // The number of files imported by this one. @@ -1386,16 +1486,17 @@ class PROTOBUF_EXPORT FileDescriptor { Syntax syntax() const; static const char* SyntaxName(Syntax syntax); - // Find a top-level message type by name. Returns NULL if not found. + // Find a top-level message type by name. Returns nullptr if not found. const Descriptor* FindMessageTypeByName(const std::string& name) const; - // Find a top-level enum type by name. Returns NULL if not found. + // Find a top-level enum type by name. Returns nullptr if not found. const EnumDescriptor* FindEnumTypeByName(const std::string& name) const; - // Find an enum value defined in any top-level enum by name. Returns NULL if - // not found. + // Find an enum value defined in any top-level enum by name. Returns nullptr + // if not found. const EnumValueDescriptor* FindEnumValueByName(const std::string& name) const; - // Find a service definition by name. Returns NULL if not found. + // Find a service definition by name. Returns nullptr if not found. const ServiceDescriptor* FindServiceByName(const std::string& name) const; - // Find a top-level extension definition by name. Returns NULL if not found. + // Find a top-level extension definition by name. Returns nullptr if not + // found. const FieldDescriptor* FindExtensionByName(const std::string& name) const; // Similar to FindExtensionByName(), but searches by lowercased-name. See // Descriptor::FindFieldByLowercaseName(). @@ -1451,7 +1552,7 @@ class PROTOBUF_EXPORT FileDescriptor { static void DependenciesOnceInit(const FileDescriptor* to_init); void InternalDependenciesOnceInit() const; - // These are arranged to minimze padding on 64-bit. + // These are arranged to minimize padding on 64-bit. int dependency_count_; int public_dependency_count_; int weak_dependency_count_; @@ -1555,7 +1656,7 @@ class PROTOBUF_EXPORT DescriptorPool { // in subsequent lookups in the DescriptorPool. class ErrorCollector; explicit DescriptorPool(DescriptorDatabase* fallback_database, - ErrorCollector* error_collector = NULL); + ErrorCollector* error_collector = nullptr); ~DescriptorPool(); @@ -1565,20 +1666,20 @@ class PROTOBUF_EXPORT DescriptorPool { static const DescriptorPool* generated_pool(); - // Find a FileDescriptor in the pool by file name. Returns NULL if not + // Find a FileDescriptor in the pool by file name. Returns nullptr if not // found. const FileDescriptor* FindFileByName(const std::string& name) const; // Find the FileDescriptor in the pool which defines the given symbol. // If any of the Find*ByName() methods below would succeed, then this is // equivalent to calling that method and calling the result's file() method. - // Otherwise this returns NULL. + // Otherwise this returns nullptr. const FileDescriptor* FindFileContainingSymbol( const std::string& symbol_name) const; // Looking up descriptors ------------------------------------------ // These find descriptors by fully-qualified name. These will find both - // top-level descriptors and nested descriptors. They return NULL if not + // top-level descriptors and nested descriptors. They return nullptr if not // found. const Descriptor* FindMessageTypeByName(const std::string& name) const; @@ -1595,6 +1696,14 @@ class PROTOBUF_EXPORT DescriptorPool { const FieldDescriptor* FindExtensionByNumber(const Descriptor* extendee, int number) const; + // Finds an extension of the given type by its printable name. + // See comments above PrintableNameForExtension() for the definition of + // "printable name". The extendee must be a member of this DescriptorPool + // or one of its underlays. Returns nullptr if there is no known message + // extension with the given printable name. + const FieldDescriptor* FindExtensionByPrintableName( + const Descriptor* extendee, const std::string& printable_name) const; + // Finds extensions of extendee. The extensions will be appended to // out in an undefined order. Only extensions defined directly in // this DescriptorPool or one of its underlays are guaranteed to be @@ -1658,7 +1767,7 @@ class PROTOBUF_EXPORT DescriptorPool { // Convert the FileDescriptorProto to real descriptors and place them in // this DescriptorPool. All dependencies of the file must already be in - // the pool. Returns the resulting FileDescriptor, or NULL if there were + // the pool. Returns the resulting FileDescriptor, or nullptr if there were // problems with the input (e.g. the message was invalid, or dependencies // were missing). Details about the errors are written to GOOGLE_LOG(ERROR). const FileDescriptor* BuildFile(const FileDescriptorProto& proto); @@ -1764,8 +1873,9 @@ class PROTOBUF_EXPORT DescriptorPool { bool InternalIsFileLoaded(const std::string& filename) const; // Add a file to unused_import_track_files_. DescriptorBuilder will log - // warnings for those files if there is any unused import. - void AddUnusedImportTrackFile(const std::string& file_name); + // warnings or errors for those files if there is any unused import. + void AddUnusedImportTrackFile(const std::string& file_name, + bool is_error = false); void ClearUnusedImportTrackFiles(); private: @@ -1794,6 +1904,12 @@ class PROTOBUF_EXPORT DescriptorPool { bool TryFindExtensionInFallbackDatabase(const Descriptor* containing_type, int field_number) const; + // This internal find extension method only check with its table and underlay + // descriptor_pool's table. It does not check with fallback DB and no + // additional proto file will be build in this method. + const FieldDescriptor* InternalFindExtensionByNumberNoLock( + const Descriptor* extendee, int number) const; + // Like BuildFile() but called internally when the file has been loaded from // fallback_database_. Declared const because it is called by (semantically) // const methods. @@ -1824,8 +1940,8 @@ class PROTOBUF_EXPORT DescriptorPool { Symbol NewPlaceholderWithMutexHeld(const std::string& name, PlaceholderType placeholder_type) const; - // If fallback_database_ is NULL, this is NULL. Otherwise, this is a mutex - // which must be locked while accessing tables_. + // If fallback_database_ is nullptr, this is nullptr. Otherwise, this is a + // mutex which must be locked while accessing tables_. internal::WrappedMutex* mutex_; // See constructor. @@ -1843,7 +1959,10 @@ class PROTOBUF_EXPORT DescriptorPool { bool allow_unknown_; bool enforce_weak_; bool disallow_enforce_utf8_; - std::set unused_import_track_files_; + + // Set of files to track for unused imports. The bool value when true means + // unused imports are treated as errors (and as warnings when false). + std::map unused_import_track_files_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DescriptorPool); }; @@ -1873,6 +1992,7 @@ PROTOBUF_DEFINE_ACCESSOR(Descriptor, containing_type, const Descriptor*) PROTOBUF_DEFINE_ACCESSOR(Descriptor, field_count, int) PROTOBUF_DEFINE_ACCESSOR(Descriptor, oneof_decl_count, int) +PROTOBUF_DEFINE_ACCESSOR(Descriptor, real_oneof_decl_count, int) PROTOBUF_DEFINE_ACCESSOR(Descriptor, nested_type_count, int) PROTOBUF_DEFINE_ACCESSOR(Descriptor, enum_type_count, int) @@ -1988,12 +2108,16 @@ PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, extension, // A few accessors differ from the macros... +inline Descriptor::WellKnownType Descriptor::well_known_type() const { + return static_cast(well_known_type_); +} + inline bool Descriptor::IsExtensionNumber(int number) const { - return FindExtensionRangeContainingNumber(number) != NULL; + return FindExtensionRangeContainingNumber(number) != nullptr; } inline bool Descriptor::IsReservedNumber(int number) const { - return FindReservedRangeContainingNumber(number) != NULL; + return FindReservedRangeContainingNumber(number) != nullptr; } inline bool Descriptor::IsReservedName(const std::string& name) const { @@ -2012,7 +2136,7 @@ inline const std::string& Descriptor::reserved_name(int index) const { } inline bool EnumDescriptor::IsReservedNumber(int number) const { - return FindReservedRangeContainingNumber(number) != NULL; + return FindReservedRangeContainingNumber(number) != nullptr; } inline bool EnumDescriptor::IsReservedName(const std::string& name) const { @@ -2057,12 +2181,30 @@ inline bool FieldDescriptor::is_map() const { return type() == TYPE_MESSAGE && is_map_message_type(); } +inline bool FieldDescriptor::has_optional_keyword() const { + return proto3_optional_ || + (file()->syntax() == FileDescriptor::SYNTAX_PROTO2 && is_optional() && + !containing_oneof()); +} + +inline const OneofDescriptor* FieldDescriptor::real_containing_oneof() const { + return containing_oneof_ && !containing_oneof_->is_synthetic() + ? containing_oneof_ + : nullptr; +} + +inline bool FieldDescriptor::has_presence() const { + if (is_repeated()) return false; + return cpp_type() == CPPTYPE_MESSAGE || containing_oneof() || + file()->syntax() == FileDescriptor::SYNTAX_PROTO2; +} + // To save space, index() is computed by looking at the descriptor's position // in the parent's array of children. inline int FieldDescriptor::index() const { if (!is_extension_) { return static_cast(this - containing_type()->fields_); - } else if (extension_scope_ != NULL) { + } else if (extension_scope_ != nullptr) { return static_cast(this - extension_scope_->extensions_); } else { return static_cast(this - file_->extensions_); @@ -2070,7 +2212,7 @@ inline int FieldDescriptor::index() const { } inline int Descriptor::index() const { - if (containing_type_ == NULL) { + if (containing_type_ == nullptr) { return static_cast(this - file_->message_types_); } else { return static_cast(this - containing_type_->nested_types_); @@ -2085,8 +2227,12 @@ inline int OneofDescriptor::index() const { return static_cast(this - containing_type_->oneof_decls_); } +inline bool OneofDescriptor::is_synthetic() const { + return field_count() == 1 && field(0)->proto3_optional_; +} + inline int EnumDescriptor::index() const { - if (containing_type_ == NULL) { + if (containing_type_ == nullptr) { return static_cast(this - file_->enum_types_); } else { return static_cast(this - containing_type_->enum_types_); diff --git a/third_party/protobuf/src/google/protobuf/descriptor.pb.cc b/third_party/protobuf/src/google/protobuf/descriptor.pb.cc index 6924023d..471351c4 100644 --- a/third_party/protobuf/src/google/protobuf/descriptor.pb.cc +++ b/third_party/protobuf/src/google/protobuf/descriptor.pb.cc @@ -5,7 +5,6 @@ #include -#include #include #include #include @@ -162,7 +161,7 @@ static void InitDefaultsscc_info_DescriptorProto_google_2fprotobuf_2fdescriptor_ } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<6> scc_info_DescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 6, InitDefaultsscc_info_DescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 6, 0, InitDefaultsscc_info_DescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_FieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_DescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto.base, @@ -182,7 +181,7 @@ static void InitDefaultsscc_info_DescriptorProto_ExtensionRange_google_2fprotobu } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_DescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_DescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_DescriptorProto_ReservedRange_google_2fprotobuf_2fdescriptor_2eproto() { @@ -197,7 +196,7 @@ static void InitDefaultsscc_info_DescriptorProto_ReservedRange_google_2fprotobuf } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DescriptorProto_ReservedRange_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_DescriptorProto_ReservedRange_google_2fprotobuf_2fdescriptor_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_DescriptorProto_ReservedRange_google_2fprotobuf_2fdescriptor_2eproto}, {}}; static void InitDefaultsscc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -211,7 +210,7 @@ static void InitDefaultsscc_info_EnumDescriptorProto_google_2fprotobuf_2fdescrip } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_EnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_EnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto.base,}}; @@ -228,7 +227,7 @@ static void InitDefaultsscc_info_EnumDescriptorProto_EnumReservedRange_google_2f } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_EnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_EnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_EnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto}, {}}; static void InitDefaultsscc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -242,7 +241,7 @@ static void InitDefaultsscc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2epr } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_EnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto() { @@ -257,7 +256,7 @@ static void InitDefaultsscc_info_EnumValueDescriptorProto_google_2fprotobuf_2fde } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_EnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_EnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto() { @@ -272,7 +271,7 @@ static void InitDefaultsscc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto() { @@ -287,7 +286,7 @@ static void InitDefaultsscc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescr } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_FieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto() { @@ -302,7 +301,7 @@ static void InitDefaultsscc_info_FieldDescriptorProto_google_2fprotobuf_2fdescri } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_FieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_FieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2eproto() { @@ -317,7 +316,7 @@ static void InitDefaultsscc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2ep } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto() { @@ -332,7 +331,7 @@ static void InitDefaultsscc_info_FileDescriptorProto_google_2fprotobuf_2fdescrip } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<6> scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 6, InitDefaultsscc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 6, 0, InitDefaultsscc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_DescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_ServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, @@ -352,7 +351,7 @@ static void InitDefaultsscc_info_FileDescriptorSet_google_2fprotobuf_2fdescripto } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FileDescriptorSet_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_FileDescriptorSet_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_FileDescriptorSet_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_FileOptions_google_2fprotobuf_2fdescriptor_2eproto() { @@ -367,7 +366,7 @@ static void InitDefaultsscc_info_FileOptions_google_2fprotobuf_2fdescriptor_2epr } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FileOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_FileOptions_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_FileOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_GeneratedCodeInfo_google_2fprotobuf_2fdescriptor_2eproto() { @@ -382,7 +381,7 @@ static void InitDefaultsscc_info_GeneratedCodeInfo_google_2fprotobuf_2fdescripto } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_GeneratedCodeInfo_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_GeneratedCodeInfo_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_GeneratedCodeInfo_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto() { @@ -397,7 +396,7 @@ static void InitDefaultsscc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_ } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto}, {}}; static void InitDefaultsscc_info_MessageOptions_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -411,7 +410,7 @@ static void InitDefaultsscc_info_MessageOptions_google_2fprotobuf_2fdescriptor_2 } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_MessageOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_MessageOptions_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_MessageOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_MethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto() { @@ -426,7 +425,7 @@ static void InitDefaultsscc_info_MethodDescriptorProto_google_2fprotobuf_2fdescr } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_MethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_MethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_MethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2eproto() { @@ -441,7 +440,7 @@ static void InitDefaultsscc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2e } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_OneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto() { @@ -456,7 +455,7 @@ static void InitDefaultsscc_info_OneofDescriptorProto_google_2fprotobuf_2fdescri } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_OneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_OneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_OneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2eproto() { @@ -471,7 +470,7 @@ static void InitDefaultsscc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2ep } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_ServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto() { @@ -486,7 +485,7 @@ static void InitDefaultsscc_info_ServiceDescriptorProto_google_2fprotobuf_2fdesc } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_ServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_ServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_MethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_ServiceOptions_google_2fprotobuf_2fdescriptor_2eproto.base,}}; @@ -502,7 +501,7 @@ static void InitDefaultsscc_info_ServiceOptions_google_2fprotobuf_2fdescriptor_2 } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ServiceOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ServiceOptions_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_ServiceOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_SourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto() { @@ -517,7 +516,7 @@ static void InitDefaultsscc_info_SourceCodeInfo_google_2fprotobuf_2fdescriptor_2 } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_SourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_SourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto() { @@ -532,7 +531,7 @@ static void InitDefaultsscc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdes } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto}, {}}; static void InitDefaultsscc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -546,7 +545,7 @@ static void InitDefaultsscc_info_UninterpretedOption_google_2fprotobuf_2fdescrip } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsscc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto() { @@ -561,20 +560,19 @@ static void InitDefaultsscc_info_UninterpretedOption_NamePart_google_2fprotobuf_ } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto}, {}}; static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[27]; static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[6]; static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fdescriptor_2eproto = nullptr; const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorSet, _has_bits_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorSet, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorSet, file_), - ~0u, PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _has_bits_), PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _internal_metadata_), ~0u, // no _extensions_ @@ -649,13 +647,12 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor 1, ~0u, ~0u, - PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, _has_bits_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, _internal_metadata_), PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, _extensions_), ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, uninterpreted_option_), - ~0u, PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _has_bits_), PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _internal_metadata_), ~0u, // no _extensions_ @@ -671,16 +668,18 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor 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_), 0, 6, - 8, 9, + 10, 2, 1, 3, 7, 4, 5, + 8, PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, _has_bits_), PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, _internal_metadata_), ~0u, // no _extensions_ @@ -784,14 +783,14 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor 10, 11, 12, - 19, + 18, 2, 13, 14, 15, 16, 17, - 18, + 19, 3, 4, 5, @@ -834,13 +833,12 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor 3, 4, ~0u, - PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofOptions, _has_bits_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofOptions, _internal_metadata_), PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofOptions, _extensions_), ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofOptions, uninterpreted_option_), - ~0u, PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumOptions, _has_bits_), PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumOptions, _internal_metadata_), PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumOptions, _extensions_), @@ -924,13 +922,12 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor 0, 1, ~0u, - PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo, _has_bits_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo, location_), - ~0u, PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, _has_bits_), PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, _internal_metadata_), ~0u, // no _extensions_ @@ -944,22 +941,21 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor 0, 1, 2, - PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo, _has_bits_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo, annotation_), - ~0u, }; static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 6, sizeof(PROTOBUF_NAMESPACE_ID::FileDescriptorSet)}, - { 7, 24, sizeof(PROTOBUF_NAMESPACE_ID::FileDescriptorProto)}, - { 36, 44, sizeof(PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange)}, - { 47, 54, sizeof(PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange)}, - { 56, 71, sizeof(PROTOBUF_NAMESPACE_ID::DescriptorProto)}, - { 81, 87, sizeof(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions)}, - { 88, 103, sizeof(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto)}, + { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::FileDescriptorSet)}, + { 6, 23, sizeof(PROTOBUF_NAMESPACE_ID::FileDescriptorProto)}, + { 35, 43, sizeof(PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange)}, + { 46, 53, sizeof(PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange)}, + { 55, 70, sizeof(PROTOBUF_NAMESPACE_ID::DescriptorProto)}, + { 80, -1, sizeof(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions)}, + { 86, 102, sizeof(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto)}, { 113, 120, sizeof(PROTOBUF_NAMESPACE_ID::OneofDescriptorProto)}, { 122, 129, sizeof(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange)}, { 131, 141, sizeof(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto)}, @@ -969,17 +965,17 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB { 185, 211, sizeof(PROTOBUF_NAMESPACE_ID::FileOptions)}, { 232, 242, sizeof(PROTOBUF_NAMESPACE_ID::MessageOptions)}, { 247, 259, sizeof(PROTOBUF_NAMESPACE_ID::FieldOptions)}, - { 266, 272, sizeof(PROTOBUF_NAMESPACE_ID::OneofOptions)}, - { 273, 281, sizeof(PROTOBUF_NAMESPACE_ID::EnumOptions)}, - { 284, 291, sizeof(PROTOBUF_NAMESPACE_ID::EnumValueOptions)}, - { 293, 300, sizeof(PROTOBUF_NAMESPACE_ID::ServiceOptions)}, - { 302, 310, sizeof(PROTOBUF_NAMESPACE_ID::MethodOptions)}, - { 313, 320, sizeof(PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart)}, - { 322, 334, sizeof(PROTOBUF_NAMESPACE_ID::UninterpretedOption)}, - { 341, 351, sizeof(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location)}, - { 356, 362, sizeof(PROTOBUF_NAMESPACE_ID::SourceCodeInfo)}, - { 363, 372, sizeof(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation)}, - { 376, 382, sizeof(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo)}, + { 266, -1, sizeof(PROTOBUF_NAMESPACE_ID::OneofOptions)}, + { 272, 280, sizeof(PROTOBUF_NAMESPACE_ID::EnumOptions)}, + { 283, 290, sizeof(PROTOBUF_NAMESPACE_ID::EnumValueOptions)}, + { 292, 299, sizeof(PROTOBUF_NAMESPACE_ID::ServiceOptions)}, + { 301, 309, sizeof(PROTOBUF_NAMESPACE_ID::MethodOptions)}, + { 312, 319, sizeof(PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart)}, + { 321, 333, sizeof(PROTOBUF_NAMESPACE_ID::UninterpretedOption)}, + { 340, 350, sizeof(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location)}, + { 355, -1, sizeof(PROTOBUF_NAMESPACE_ID::SourceCodeInfo)}, + { 361, 370, sizeof(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation)}, + { 374, -1, sizeof(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { @@ -1012,7 +1008,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_GeneratedCodeInfo_default_instance_), }; -const char descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto[] = +const char descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n google/protobuf/descriptor.proto\022\017goog" "le.protobuf\"G\n\021FileDescriptorSet\0222\n\004file" "\030\001 \003(\0132$.google.protobuf.FileDescriptorP" @@ -1047,7 +1043,7 @@ const char descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto[] = "s\032+\n\rReservedRange\022\r\n\005start\030\001 \001(\005\022\013\n\003end" "\030\002 \001(\005\"g\n\025ExtensionRangeOptions\022C\n\024unint" "erpreted_option\030\347\007 \003(\0132$.google.protobuf" - ".UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"\274\005\n\024Fiel" + ".UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"\325\005\n\024Fiel" "dDescriptorProto\022\014\n\004name\030\001 \001(\t\022\016\n\006number" "\030\003 \001(\005\022:\n\005label\030\004 \001(\0162+.google.protobuf." "FieldDescriptorProto.Label\0228\n\004type\030\005 \001(\016" @@ -1055,115 +1051,116 @@ const char descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto[] = "Type\022\021\n\ttype_name\030\006 \001(\t\022\020\n\010extendee\030\002 \001(" "\t\022\025\n\rdefault_value\030\007 \001(\t\022\023\n\013oneof_index\030" "\t \001(\005\022\021\n\tjson_name\030\n \001(\t\022.\n\007options\030\010 \001(" - "\0132\035.google.protobuf.FieldOptions\"\266\002\n\004Typ" - "e\022\017\n\013TYPE_DOUBLE\020\001\022\016\n\nTYPE_FLOAT\020\002\022\016\n\nTY" - "PE_INT64\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n\nTYPE_INT3" - "2\020\005\022\020\n\014TYPE_FIXED64\020\006\022\020\n\014TYPE_FIXED32\020\007\022" - "\r\n\tTYPE_BOOL\020\010\022\017\n\013TYPE_STRING\020\t\022\016\n\nTYPE_" - "GROUP\020\n\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\nTYPE_BYTES\020" - "\014\022\017\n\013TYPE_UINT32\020\r\022\r\n\tTYPE_ENUM\020\016\022\021\n\rTYP" - "E_SFIXED32\020\017\022\021\n\rTYPE_SFIXED64\020\020\022\017\n\013TYPE_" - "SINT32\020\021\022\017\n\013TYPE_SINT64\020\022\"C\n\005Label\022\022\n\016LA" - "BEL_OPTIONAL\020\001\022\022\n\016LABEL_REQUIRED\020\002\022\022\n\016LA" - "BEL_REPEATED\020\003\"T\n\024OneofDescriptorProto\022\014" - "\n\004name\030\001 \001(\t\022.\n\007options\030\002 \001(\0132\035.google.p" - "rotobuf.OneofOptions\"\244\002\n\023EnumDescriptorP" - "roto\022\014\n\004name\030\001 \001(\t\0228\n\005value\030\002 \003(\0132).goog" - "le.protobuf.EnumValueDescriptorProto\022-\n\007" - "options\030\003 \001(\0132\034.google.protobuf.EnumOpti" - "ons\022N\n\016reserved_range\030\004 \003(\01326.google.pro" - "tobuf.EnumDescriptorProto.EnumReservedRa" - "nge\022\025\n\rreserved_name\030\005 \003(\t\032/\n\021EnumReserv" - "edRange\022\r\n\005start\030\001 \001(\005\022\013\n\003end\030\002 \001(\005\"l\n\030E" - "numValueDescriptorProto\022\014\n\004name\030\001 \001(\t\022\016\n" - "\006number\030\002 \001(\005\0222\n\007options\030\003 \001(\0132!.google." - "protobuf.EnumValueOptions\"\220\001\n\026ServiceDes" - "criptorProto\022\014\n\004name\030\001 \001(\t\0226\n\006method\030\002 \003" - "(\0132&.google.protobuf.MethodDescriptorPro" - "to\0220\n\007options\030\003 \001(\0132\037.google.protobuf.Se" - "rviceOptions\"\301\001\n\025MethodDescriptorProto\022\014" - "\n\004name\030\001 \001(\t\022\022\n\ninput_type\030\002 \001(\t\022\023\n\013outp" - "ut_type\030\003 \001(\t\022/\n\007options\030\004 \001(\0132\036.google." - "protobuf.MethodOptions\022\037\n\020client_streami" - "ng\030\005 \001(\010:\005false\022\037\n\020server_streaming\030\006 \001(" - "\010:\005false\"\246\006\n\013FileOptions\022\024\n\014java_package" - "\030\001 \001(\t\022\034\n\024java_outer_classname\030\010 \001(\t\022\"\n\023" - "java_multiple_files\030\n \001(\010:\005false\022)\n\035java" - "_generate_equals_and_hash\030\024 \001(\010B\002\030\001\022%\n\026j" - "ava_string_check_utf8\030\033 \001(\010:\005false\022F\n\014op" - "timize_for\030\t \001(\0162).google.protobuf.FileO" - "ptions.OptimizeMode:\005SPEED\022\022\n\ngo_package" - "\030\013 \001(\t\022\"\n\023cc_generic_services\030\020 \001(\010:\005fal" - "se\022$\n\025java_generic_services\030\021 \001(\010:\005false" - "\022\"\n\023py_generic_services\030\022 \001(\010:\005false\022#\n\024" - "php_generic_services\030* \001(\010:\005false\022\031\n\ndep" - "recated\030\027 \001(\010:\005false\022\037\n\020cc_enable_arenas" - "\030\037 \001(\010:\005false\022\031\n\021objc_class_prefix\030$ \001(\t" - "\022\030\n\020csharp_namespace\030% \001(\t\022\024\n\014swift_pref" - "ix\030\' \001(\t\022\030\n\020php_class_prefix\030( \001(\t\022\025\n\rph" - "p_namespace\030) \001(\t\022\036\n\026php_metadata_namesp" - "ace\030, \001(\t\022\024\n\014ruby_package\030- \001(\t\022C\n\024unint" - "erpreted_option\030\347\007 \003(\0132$.google.protobuf" - ".UninterpretedOption\":\n\014OptimizeMode\022\t\n\005" - "SPEED\020\001\022\r\n\tCODE_SIZE\020\002\022\020\n\014LITE_RUNTIME\020\003" - "*\t\010\350\007\020\200\200\200\200\002J\004\010&\020\'\"\362\001\n\016MessageOptions\022&\n\027" - "message_set_wire_format\030\001 \001(\010:\005false\022.\n\037" - "no_standard_descriptor_accessor\030\002 \001(\010:\005f" - "alse\022\031\n\ndeprecated\030\003 \001(\010:\005false\022\021\n\tmap_e" - "ntry\030\007 \001(\010\022C\n\024uninterpreted_option\030\347\007 \003(" - "\0132$.google.protobuf.UninterpretedOption*" - "\t\010\350\007\020\200\200\200\200\002J\004\010\010\020\tJ\004\010\t\020\n\"\236\003\n\014FieldOptions\022" - ":\n\005ctype\030\001 \001(\0162#.google.protobuf.FieldOp" - "tions.CType:\006STRING\022\016\n\006packed\030\002 \001(\010\022\?\n\006j" - "stype\030\006 \001(\0162$.google.protobuf.FieldOptio" - "ns.JSType:\tJS_NORMAL\022\023\n\004lazy\030\005 \001(\010:\005fals" - "e\022\031\n\ndeprecated\030\003 \001(\010:\005false\022\023\n\004weak\030\n \001" - "(\010:\005false\022C\n\024uninterpreted_option\030\347\007 \003(\013" - "2$.google.protobuf.UninterpretedOption\"/" - "\n\005CType\022\n\n\006STRING\020\000\022\010\n\004CORD\020\001\022\020\n\014STRING_" - "PIECE\020\002\"5\n\006JSType\022\r\n\tJS_NORMAL\020\000\022\r\n\tJS_S" - "TRING\020\001\022\r\n\tJS_NUMBER\020\002*\t\010\350\007\020\200\200\200\200\002J\004\010\004\020\005\"" - "^\n\014OneofOptions\022C\n\024uninterpreted_option\030" + "\0132\035.google.protobuf.FieldOptions\022\027\n\017prot" + "o3_optional\030\021 \001(\010\"\266\002\n\004Type\022\017\n\013TYPE_DOUBL" + "E\020\001\022\016\n\nTYPE_FLOAT\020\002\022\016\n\nTYPE_INT64\020\003\022\017\n\013T" + "YPE_UINT64\020\004\022\016\n\nTYPE_INT32\020\005\022\020\n\014TYPE_FIX" + "ED64\020\006\022\020\n\014TYPE_FIXED32\020\007\022\r\n\tTYPE_BOOL\020\010\022" + "\017\n\013TYPE_STRING\020\t\022\016\n\nTYPE_GROUP\020\n\022\020\n\014TYPE" + "_MESSAGE\020\013\022\016\n\nTYPE_BYTES\020\014\022\017\n\013TYPE_UINT3" + "2\020\r\022\r\n\tTYPE_ENUM\020\016\022\021\n\rTYPE_SFIXED32\020\017\022\021\n" + "\rTYPE_SFIXED64\020\020\022\017\n\013TYPE_SINT32\020\021\022\017\n\013TYP" + "E_SINT64\020\022\"C\n\005Label\022\022\n\016LABEL_OPTIONAL\020\001\022" + "\022\n\016LABEL_REQUIRED\020\002\022\022\n\016LABEL_REPEATED\020\003\"" + "T\n\024OneofDescriptorProto\022\014\n\004name\030\001 \001(\t\022.\n" + "\007options\030\002 \001(\0132\035.google.protobuf.OneofOp" + "tions\"\244\002\n\023EnumDescriptorProto\022\014\n\004name\030\001 " + "\001(\t\0228\n\005value\030\002 \003(\0132).google.protobuf.Enu" + "mValueDescriptorProto\022-\n\007options\030\003 \001(\0132\034" + ".google.protobuf.EnumOptions\022N\n\016reserved" + "_range\030\004 \003(\01326.google.protobuf.EnumDescr" + "iptorProto.EnumReservedRange\022\025\n\rreserved" + "_name\030\005 \003(\t\032/\n\021EnumReservedRange\022\r\n\005star" + "t\030\001 \001(\005\022\013\n\003end\030\002 \001(\005\"l\n\030EnumValueDescrip" + "torProto\022\014\n\004name\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\0222" + "\n\007options\030\003 \001(\0132!.google.protobuf.EnumVa" + "lueOptions\"\220\001\n\026ServiceDescriptorProto\022\014\n" + "\004name\030\001 \001(\t\0226\n\006method\030\002 \003(\0132&.google.pro" + "tobuf.MethodDescriptorProto\0220\n\007options\030\003" + " \001(\0132\037.google.protobuf.ServiceOptions\"\301\001" + "\n\025MethodDescriptorProto\022\014\n\004name\030\001 \001(\t\022\022\n" + "\ninput_type\030\002 \001(\t\022\023\n\013output_type\030\003 \001(\t\022/" + "\n\007options\030\004 \001(\0132\036.google.protobuf.Method" + "Options\022\037\n\020client_streaming\030\005 \001(\010:\005false" + "\022\037\n\020server_streaming\030\006 \001(\010:\005false\"\245\006\n\013Fi" + "leOptions\022\024\n\014java_package\030\001 \001(\t\022\034\n\024java_" + "outer_classname\030\010 \001(\t\022\"\n\023java_multiple_f" + "iles\030\n \001(\010:\005false\022)\n\035java_generate_equal" + "s_and_hash\030\024 \001(\010B\002\030\001\022%\n\026java_string_chec" + "k_utf8\030\033 \001(\010:\005false\022F\n\014optimize_for\030\t \001(" + "\0162).google.protobuf.FileOptions.Optimize" + "Mode:\005SPEED\022\022\n\ngo_package\030\013 \001(\t\022\"\n\023cc_ge" + "neric_services\030\020 \001(\010:\005false\022$\n\025java_gene" + "ric_services\030\021 \001(\010:\005false\022\"\n\023py_generic_" + "services\030\022 \001(\010:\005false\022#\n\024php_generic_ser" + "vices\030* \001(\010:\005false\022\031\n\ndeprecated\030\027 \001(\010:\005" + "false\022\036\n\020cc_enable_arenas\030\037 \001(\010:\004true\022\031\n" + "\021objc_class_prefix\030$ \001(\t\022\030\n\020csharp_names" + "pace\030% \001(\t\022\024\n\014swift_prefix\030\' \001(\t\022\030\n\020php_" + "class_prefix\030( \001(\t\022\025\n\rphp_namespace\030) \001(" + "\t\022\036\n\026php_metadata_namespace\030, \001(\t\022\024\n\014rub" + "y_package\030- \001(\t\022C\n\024uninterpreted_option\030" "\347\007 \003(\0132$.google.protobuf.UninterpretedOp" - "tion*\t\010\350\007\020\200\200\200\200\002\"\223\001\n\013EnumOptions\022\023\n\013allow" - "_alias\030\002 \001(\010\022\031\n\ndeprecated\030\003 \001(\010:\005false\022" + "tion\":\n\014OptimizeMode\022\t\n\005SPEED\020\001\022\r\n\tCODE_" + "SIZE\020\002\022\020\n\014LITE_RUNTIME\020\003*\t\010\350\007\020\200\200\200\200\002J\004\010&\020" + "\'\"\362\001\n\016MessageOptions\022&\n\027message_set_wire" + "_format\030\001 \001(\010:\005false\022.\n\037no_standard_desc" + "riptor_accessor\030\002 \001(\010:\005false\022\031\n\ndeprecat" + "ed\030\003 \001(\010:\005false\022\021\n\tmap_entry\030\007 \001(\010\022C\n\024un" + "interpreted_option\030\347\007 \003(\0132$.google.proto" + "buf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002J\004\010\010\020\t" + "J\004\010\t\020\n\"\236\003\n\014FieldOptions\022:\n\005ctype\030\001 \001(\0162#" + ".google.protobuf.FieldOptions.CType:\006STR" + "ING\022\016\n\006packed\030\002 \001(\010\022\?\n\006jstype\030\006 \001(\0162$.go" + "ogle.protobuf.FieldOptions.JSType:\tJS_NO" + "RMAL\022\023\n\004lazy\030\005 \001(\010:\005false\022\031\n\ndeprecated\030" + "\003 \001(\010:\005false\022\023\n\004weak\030\n \001(\010:\005false\022C\n\024uni" + "nterpreted_option\030\347\007 \003(\0132$.google.protob" + "uf.UninterpretedOption\"/\n\005CType\022\n\n\006STRIN" + "G\020\000\022\010\n\004CORD\020\001\022\020\n\014STRING_PIECE\020\002\"5\n\006JSTyp" + "e\022\r\n\tJS_NORMAL\020\000\022\r\n\tJS_STRING\020\001\022\r\n\tJS_NU" + "MBER\020\002*\t\010\350\007\020\200\200\200\200\002J\004\010\004\020\005\"^\n\014OneofOptions\022" "C\n\024uninterpreted_option\030\347\007 \003(\0132$.google." - "protobuf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002J" - "\004\010\005\020\006\"}\n\020EnumValueOptions\022\031\n\ndeprecated\030" - "\001 \001(\010:\005false\022C\n\024uninterpreted_option\030\347\007 " - "\003(\0132$.google.protobuf.UninterpretedOptio" - "n*\t\010\350\007\020\200\200\200\200\002\"{\n\016ServiceOptions\022\031\n\ndeprec" - "ated\030! \001(\010:\005false\022C\n\024uninterpreted_optio" - "n\030\347\007 \003(\0132$.google.protobuf.Uninterpreted" - "Option*\t\010\350\007\020\200\200\200\200\002\"\255\002\n\rMethodOptions\022\031\n\nd" - "eprecated\030! \001(\010:\005false\022_\n\021idempotency_le" - "vel\030\" \001(\0162/.google.protobuf.MethodOption" - "s.IdempotencyLevel:\023IDEMPOTENCY_UNKNOWN\022" - "C\n\024uninterpreted_option\030\347\007 \003(\0132$.google." - "protobuf.UninterpretedOption\"P\n\020Idempote" - "ncyLevel\022\027\n\023IDEMPOTENCY_UNKNOWN\020\000\022\023\n\017NO_" - "SIDE_EFFECTS\020\001\022\016\n\nIDEMPOTENT\020\002*\t\010\350\007\020\200\200\200\200" - "\002\"\236\002\n\023UninterpretedOption\022;\n\004name\030\002 \003(\0132" - "-.google.protobuf.UninterpretedOption.Na" - "mePart\022\030\n\020identifier_value\030\003 \001(\t\022\032\n\022posi" - "tive_int_value\030\004 \001(\004\022\032\n\022negative_int_val" - "ue\030\005 \001(\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014string" - "_value\030\007 \001(\014\022\027\n\017aggregate_value\030\010 \001(\t\0323\n" - "\010NamePart\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_exten" - "sion\030\002 \002(\010\"\325\001\n\016SourceCodeInfo\022:\n\010locatio" - "n\030\001 \003(\0132(.google.protobuf.SourceCodeInfo" - ".Location\032\206\001\n\010Location\022\020\n\004path\030\001 \003(\005B\002\020\001" - "\022\020\n\004span\030\002 \003(\005B\002\020\001\022\030\n\020leading_comments\030\003" - " \001(\t\022\031\n\021trailing_comments\030\004 \001(\t\022!\n\031leadi" - "ng_detached_comments\030\006 \003(\t\"\247\001\n\021Generated" - "CodeInfo\022A\n\nannotation\030\001 \003(\0132-.google.pr" - "otobuf.GeneratedCodeInfo.Annotation\032O\n\nA" - "nnotation\022\020\n\004path\030\001 \003(\005B\002\020\001\022\023\n\013source_fi" - "le\030\002 \001(\t\022\r\n\005begin\030\003 \001(\005\022\013\n\003end\030\004 \001(\005B\217\001\n" - "\023com.google.protobufB\020DescriptorProtosH\001" - "Z>github.com/golang/protobuf/protoc-gen-" - "go/descriptor;descriptor\370\001\001\242\002\003GPB\252\002\032Goog" - "le.Protobuf.Reflection" + "protobuf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"" + "\223\001\n\013EnumOptions\022\023\n\013allow_alias\030\002 \001(\010\022\031\n\n" + "deprecated\030\003 \001(\010:\005false\022C\n\024uninterpreted" + "_option\030\347\007 \003(\0132$.google.protobuf.Uninter" + "pretedOption*\t\010\350\007\020\200\200\200\200\002J\004\010\005\020\006\"}\n\020EnumVal" + "ueOptions\022\031\n\ndeprecated\030\001 \001(\010:\005false\022C\n\024" + "uninterpreted_option\030\347\007 \003(\0132$.google.pro" + "tobuf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"{\n\016" + "ServiceOptions\022\031\n\ndeprecated\030! \001(\010:\005fals" + "e\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.googl" + "e.protobuf.UninterpretedOption*\t\010\350\007\020\200\200\200\200" + "\002\"\255\002\n\rMethodOptions\022\031\n\ndeprecated\030! \001(\010:" + "\005false\022_\n\021idempotency_level\030\" \001(\0162/.goog" + "le.protobuf.MethodOptions.IdempotencyLev" + "el:\023IDEMPOTENCY_UNKNOWN\022C\n\024uninterpreted" + "_option\030\347\007 \003(\0132$.google.protobuf.Uninter" + "pretedOption\"P\n\020IdempotencyLevel\022\027\n\023IDEM" + "POTENCY_UNKNOWN\020\000\022\023\n\017NO_SIDE_EFFECTS\020\001\022\016" + "\n\nIDEMPOTENT\020\002*\t\010\350\007\020\200\200\200\200\002\"\236\002\n\023Uninterpre" + "tedOption\022;\n\004name\030\002 \003(\0132-.google.protobu" + "f.UninterpretedOption.NamePart\022\030\n\020identi" + "fier_value\030\003 \001(\t\022\032\n\022positive_int_value\030\004" + " \001(\004\022\032\n\022negative_int_value\030\005 \001(\003\022\024\n\014doub" + "le_value\030\006 \001(\001\022\024\n\014string_value\030\007 \001(\014\022\027\n\017" + "aggregate_value\030\010 \001(\t\0323\n\010NamePart\022\021\n\tnam" + "e_part\030\001 \002(\t\022\024\n\014is_extension\030\002 \002(\010\"\325\001\n\016S" + "ourceCodeInfo\022:\n\010location\030\001 \003(\0132(.google" + ".protobuf.SourceCodeInfo.Location\032\206\001\n\010Lo" + "cation\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n\004span\030\002 \003(\005B\002" + "\020\001\022\030\n\020leading_comments\030\003 \001(\t\022\031\n\021trailing" + "_comments\030\004 \001(\t\022!\n\031leading_detached_comm" + "ents\030\006 \003(\t\"\247\001\n\021GeneratedCodeInfo\022A\n\nanno" + "tation\030\001 \003(\0132-.google.protobuf.Generated" + "CodeInfo.Annotation\032O\n\nAnnotation\022\020\n\004pat" + "h\030\001 \003(\005B\002\020\001\022\023\n\013source_file\030\002 \001(\t\022\r\n\005begi" + "n\030\003 \001(\005\022\013\n\003end\030\004 \001(\005B\217\001\n\023com.google.prot" + "obufB\020DescriptorProtosH\001Z>github.com/gol" + "ang/protobuf/protoc-gen-go/descriptor;de" + "scriptor\370\001\001\242\002\003GPB\252\002\032Google.Protobuf.Refl" + "ection" ; static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_deps[1] = { }; @@ -1197,16 +1194,15 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_goo &scc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once; -static bool descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fdescriptor_2eproto = { - &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto, "google/protobuf/descriptor.proto", 6022, + false, false, descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto, "google/protobuf/descriptor.proto", 6046, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once, descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_sccs, descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_deps, 27, 0, schemas, file_default_instances, TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto, 27, file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto, file_level_service_descriptors_google_2fprotobuf_2fdescriptor_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_google_2fprotobuf_2fdescriptor_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto), true); +static bool dynamic_init_dummy_google_2fprotobuf_2fdescriptor_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto)), true); PROTOBUF_NAMESPACE_OPEN const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldDescriptorProto_Type_descriptor() { ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); @@ -1381,23 +1377,12 @@ constexpr int MethodOptions::IdempotencyLevel_ARRAYSIZE; void FileDescriptorSet::InitAsDefaultInstance() { } -class FileDescriptorSet::HasBitSetters { +class FileDescriptorSet::_Internal { public: - using HasBits = decltype(std::declval()._has_bits_); }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int FileDescriptorSet::kFileFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -FileDescriptorSet::FileDescriptorSet() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.FileDescriptorSet) -} FileDescriptorSet::FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), file_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -1405,10 +1390,8 @@ FileDescriptorSet::FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena* arena) } FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), - _has_bits_(from._has_bits_), file_(from.file_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorSet) } @@ -1419,10 +1402,11 @@ void FileDescriptorSet::SharedCtor() { FileDescriptorSet::~FileDescriptorSet() { // @@protoc_insertion_point(destructor:google.protobuf.FileDescriptorSet) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void FileDescriptorSet::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void FileDescriptorSet::ArenaDtor(void* object) { @@ -1447,14 +1431,12 @@ void FileDescriptorSet::Clear() { (void) cached_has_bits; file_.Clear(); - _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* FileDescriptorSet::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -1466,10 +1448,10 @@ const char* FileDescriptorSet::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_file(), ptr); + ptr = ctx->ParseMessage(_internal_add_file(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); } else goto handle_unusual; continue; default: { @@ -1478,7 +1460,9 @@ const char* FileDescriptorSet::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -1491,88 +1475,24 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool FileDescriptorSet::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.FileDescriptorSet) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.protobuf.FileDescriptorProto file = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_file())); - } else { - goto handle_unusual; - } - break; - } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.FileDescriptorSet) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.FileDescriptorSet) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void FileDescriptorSet::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.FileDescriptorSet) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .google.protobuf.FileDescriptorProto file = 1; - for (unsigned int i = 0, - n = static_cast(this->file_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, - this->file(static_cast(i)), - output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorSet) -} - -::PROTOBUF_NAMESPACE_ID::uint8* FileDescriptorSet::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* FileDescriptorSet::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorSet) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.FileDescriptorProto file = 1; for (unsigned int i = 0, - n = static_cast(this->file_size()); i < n; i++) { + n = static_cast(this->_internal_file_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 1, this->file(static_cast(i)), target); + InternalWriteMessage(1, this->_internal_file(i), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorSet) return target; @@ -1582,26 +1502,21 @@ size_t FileDescriptorSet::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileDescriptorSet) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.FileDescriptorProto file = 1; - { - unsigned int count = static_cast(this->file_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->file(static_cast(i))); - } + total_size += 1UL * this->_internal_file_size(); + for (const auto& msg : this->file_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -1625,7 +1540,7 @@ void FileDescriptorSet::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) void FileDescriptorSet::MergeFrom(const FileDescriptorSet& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorSet) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1647,34 +1562,14 @@ void FileDescriptorSet::CopyFrom(const FileDescriptorSet& from) { } bool FileDescriptorSet::IsInitialized() const { - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->file())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(file_)) return false; return true; } -void FileDescriptorSet::Swap(FileDescriptorSet* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - FileDescriptorSet* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void FileDescriptorSet::UnsafeArenaSwap(FileDescriptorSet* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void FileDescriptorSet::InternalSwap(FileDescriptorSet* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&file_)->InternalSwap(CastToBase(&other->file_)); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + file_.InternalSwap(&other->file_); } ::PROTOBUF_NAMESPACE_ID::Metadata FileDescriptorSet::GetMetadata() const { @@ -1690,7 +1585,7 @@ void FileDescriptorProto::InitAsDefaultInstance() { PROTOBUF_NAMESPACE_ID::_FileDescriptorProto_default_instance_._instance.get_mutable()->source_code_info_ = const_cast< PROTOBUF_NAMESPACE_ID::SourceCodeInfo*>( PROTOBUF_NAMESPACE_ID::SourceCodeInfo::internal_default_instance()); } -class FileDescriptorProto::HasBitSetters { +class FileDescriptorProto::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_name(HasBits* has_bits) { @@ -1713,62 +1608,15 @@ class FileDescriptorProto::HasBitSetters { }; const PROTOBUF_NAMESPACE_ID::FileOptions& -FileDescriptorProto::HasBitSetters::options(const FileDescriptorProto* msg) { +FileDescriptorProto::_Internal::options(const FileDescriptorProto* msg) { return *msg->options_; } const PROTOBUF_NAMESPACE_ID::SourceCodeInfo& -FileDescriptorProto::HasBitSetters::source_code_info(const FileDescriptorProto* msg) { +FileDescriptorProto::_Internal::source_code_info(const FileDescriptorProto* msg) { return *msg->source_code_info_; } -void FileDescriptorProto::unsafe_arena_set_allocated_options( - PROTOBUF_NAMESPACE_ID::FileOptions* options) { - if (GetArenaNoVirtual() == nullptr) { - delete options_; - } - options_ = options; - if (options) { - _has_bits_[0] |= 0x00000008u; - } else { - _has_bits_[0] &= ~0x00000008u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileDescriptorProto.options) -} -void FileDescriptorProto::unsafe_arena_set_allocated_source_code_info( - PROTOBUF_NAMESPACE_ID::SourceCodeInfo* source_code_info) { - if (GetArenaNoVirtual() == nullptr) { - delete source_code_info_; - } - source_code_info_ = source_code_info; - if (source_code_info) { - _has_bits_[0] |= 0x00000010u; - } else { - _has_bits_[0] &= ~0x00000010u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileDescriptorProto.source_code_info) -} -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int FileDescriptorProto::kNameFieldNumber; -const int FileDescriptorProto::kPackageFieldNumber; -const int FileDescriptorProto::kDependencyFieldNumber; -const int FileDescriptorProto::kPublicDependencyFieldNumber; -const int FileDescriptorProto::kWeakDependencyFieldNumber; -const int FileDescriptorProto::kMessageTypeFieldNumber; -const int FileDescriptorProto::kEnumTypeFieldNumber; -const int FileDescriptorProto::kServiceFieldNumber; -const int FileDescriptorProto::kExtensionFieldNumber; -const int FileDescriptorProto::kOptionsFieldNumber; -const int FileDescriptorProto::kSourceCodeInfoFieldNumber; -const int FileDescriptorProto::kSyntaxFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -FileDescriptorProto::FileDescriptorProto() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.FileDescriptorProto) -} FileDescriptorProto::FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), dependency_(arena), message_type_(arena), enum_type_(arena), @@ -1782,7 +1630,6 @@ FileDescriptorProto::FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) } FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), dependency_(from.dependency_), message_type_(from.message_type_), @@ -1791,28 +1638,28 @@ FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from) extension_(from.extension_), public_dependency_(from.public_dependency_), weak_dependency_(from.weak_dependency_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_name()) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), - GetArenaNoVirtual()); + if (from._internal_has_name()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_package()) { - package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.package(), - GetArenaNoVirtual()); + if (from._internal_has_package()) { + package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_package(), + GetArena()); } syntax_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_syntax()) { - syntax_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.syntax(), - GetArenaNoVirtual()); + if (from._internal_has_syntax()) { + syntax_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_syntax(), + GetArena()); } - if (from.has_options()) { + if (from._internal_has_options()) { options_ = new PROTOBUF_NAMESPACE_ID::FileOptions(*from.options_); } else { options_ = nullptr; } - if (from.has_source_code_info()) { + if (from._internal_has_source_code_info()) { source_code_info_ = new PROTOBUF_NAMESPACE_ID::SourceCodeInfo(*from.source_code_info_); } else { source_code_info_ = nullptr; @@ -1833,10 +1680,11 @@ void FileDescriptorProto::SharedCtor() { FileDescriptorProto::~FileDescriptorProto() { // @@protoc_insertion_point(destructor:google.protobuf.FileDescriptorProto) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void FileDescriptorProto::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); package_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); syntax_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -1893,14 +1741,13 @@ void FileDescriptorProto::Clear() { } } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -1909,14 +1756,22 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME // optional string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.FileDescriptorProto.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FileDescriptorProto.name"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional string package = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_package(), ptr, ctx, "google.protobuf.FileDescriptorProto.package"); + auto str = _internal_mutable_package(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FileDescriptorProto.package"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; @@ -1926,10 +1781,14 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME ptr -= 1; do { ptr += 1; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(add_dependency(), ptr, ctx, "google.protobuf.FileDescriptorProto.dependency"); + auto str = _internal_add_dependency(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FileDescriptorProto.dependency"); + #endif // !NDEBUG CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); } else goto handle_unusual; continue; // repeated .google.protobuf.DescriptorProto message_type = 4; @@ -1938,10 +1797,10 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_message_type(), ptr); + ptr = ctx->ParseMessage(_internal_add_message_type(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); } else goto handle_unusual; continue; // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; @@ -1950,10 +1809,10 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_enum_type(), ptr); + ptr = ctx->ParseMessage(_internal_add_enum_type(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 42); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); } else goto handle_unusual; continue; // repeated .google.protobuf.ServiceDescriptorProto service = 6; @@ -1962,10 +1821,10 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_service(), ptr); + ptr = ctx->ParseMessage(_internal_add_service(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 50); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); } else goto handle_unusual; continue; // repeated .google.protobuf.FieldDescriptorProto extension = 7; @@ -1974,23 +1833,23 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_extension(), ptr); + ptr = ctx->ParseMessage(_internal_add_extension(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 58); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr)); } else goto handle_unusual; continue; // optional .google.protobuf.FileOptions options = 8; case 8: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { - ptr = ctx->ParseMessage(mutable_options(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_options(), ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional .google.protobuf.SourceCodeInfo source_code_info = 9; case 9: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) { - ptr = ctx->ParseMessage(mutable_source_code_info(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_source_code_info(), ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -2000,12 +1859,12 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME ptr -= 1; do { ptr += 1; - add_public_dependency(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + _internal_add_public_dependency(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 80); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<80>(ptr)); } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_public_dependency(), ptr, ctx); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_public_dependency(), ptr, ctx); CHK_(ptr); } else goto handle_unusual; continue; @@ -2015,19 +1874,23 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME ptr -= 1; do { ptr += 1; - add_weak_dependency(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + _internal_add_weak_dependency(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 88); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<88>(ptr)); } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_weak_dependency(), ptr, ctx); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_weak_dependency(), ptr, ctx); CHK_(ptr); } else goto handle_unusual; continue; // optional string syntax = 12; case 12: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_syntax(), ptr, ctx, "google.protobuf.FileDescriptorProto.syntax"); + auto str = _internal_mutable_syntax(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FileDescriptorProto.syntax"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; @@ -2037,7 +1900,9 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -2051,313 +1916,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool FileDescriptorProto::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.FileDescriptorProto) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FileDescriptorProto.name"); - } else { - goto handle_unusual; - } - break; - } - // optional string package = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_package())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->package().data(), static_cast(this->package().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FileDescriptorProto.package"); - } else { - goto handle_unusual; - } - break; - } - - // repeated string dependency = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->add_dependency())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->dependency(this->dependency_size() - 1).data(), - static_cast(this->dependency(this->dependency_size() - 1).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FileDescriptorProto.dependency"); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.DescriptorProto message_type = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_message_type())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; - case 5: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_enum_type())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.ServiceDescriptorProto service = 6; - case 6: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_service())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.FieldDescriptorProto extension = 7; - case 7: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_extension())); - } else { - goto handle_unusual; - } - break; - } - - // optional .google.protobuf.FileOptions options = 8; - case 8: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_options())); - } else { - goto handle_unusual; - } - break; - } - - // optional .google.protobuf.SourceCodeInfo source_code_info = 9; - case 9: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (74 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_source_code_info())); - } else { - goto handle_unusual; - } - break; - } - - // repeated int32 public_dependency = 10; - case 10: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - 1, 80u, input, this->mutable_public_dependency()))); - } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (82 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitiveNoInline< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, this->mutable_public_dependency()))); - } else { - goto handle_unusual; - } - break; - } - - // repeated int32 weak_dependency = 11; - case 11: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (88 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - 1, 88u, input, this->mutable_weak_dependency()))); - } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitiveNoInline< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, this->mutable_weak_dependency()))); - } else { - goto handle_unusual; - } - break; - } - - // optional string syntax = 12; - case 12: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (98 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_syntax())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->syntax().data(), static_cast(this->syntax().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FileDescriptorProto.syntax"); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.FileDescriptorProto) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.FileDescriptorProto) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void FileDescriptorProto::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.FileDescriptorProto) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FileDescriptorProto.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // optional string package = 2; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->package().data(), static_cast(this->package().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FileDescriptorProto.package"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 2, this->package(), output); - } - - // repeated string dependency = 3; - for (int i = 0, n = this->dependency_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->dependency(i).data(), static_cast(this->dependency(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FileDescriptorProto.dependency"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( - 3, this->dependency(i), output); - } - - // repeated .google.protobuf.DescriptorProto message_type = 4; - for (unsigned int i = 0, - n = static_cast(this->message_type_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, - this->message_type(static_cast(i)), - output); - } - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; - for (unsigned int i = 0, - n = static_cast(this->enum_type_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 5, - this->enum_type(static_cast(i)), - output); - } - - // repeated .google.protobuf.ServiceDescriptorProto service = 6; - for (unsigned int i = 0, - n = static_cast(this->service_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 6, - this->service(static_cast(i)), - output); - } - - // repeated .google.protobuf.FieldDescriptorProto extension = 7; - for (unsigned int i = 0, - n = static_cast(this->extension_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 7, - this->extension(static_cast(i)), - output); - } - - // optional .google.protobuf.FileOptions options = 8; - if (cached_has_bits & 0x00000008u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 8, HasBitSetters::options(this), output); - } - - // optional .google.protobuf.SourceCodeInfo source_code_info = 9; - if (cached_has_bits & 0x00000010u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 9, HasBitSetters::source_code_info(this), output); - } - - // repeated int32 public_dependency = 10; - for (int i = 0, n = this->public_dependency_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32( - 10, this->public_dependency(i), output); - } - - // repeated int32 weak_dependency = 11; - for (int i = 0, n = this->weak_dependency_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32( - 11, this->weak_dependency(i), output); - } - - // optional string syntax = 12; - if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->syntax().data(), static_cast(this->syntax().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FileDescriptorProto.syntax"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 12, this->syntax(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorProto) -} - -::PROTOBUF_NAMESPACE_ID::uint8* FileDescriptorProto::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* FileDescriptorProto::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorProto) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2366,103 +1927,106 @@ void FileDescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // optional string package = 2; if (cached_has_bits & 0x00000002u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->package().data(), static_cast(this->package().length()), + this->_internal_package().data(), static_cast(this->_internal_package().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.package"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 2, this->package(), target); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_package(), target); } // repeated string dependency = 3; - for (int i = 0, n = this->dependency_size(); i < n; i++) { + for (int i = 0, n = this->_internal_dependency_size(); i < n; i++) { + const auto& s = this->_internal_dependency(i); ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->dependency(i).data(), static_cast(this->dependency(i).length()), + s.data(), static_cast(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.dependency"); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteStringToArray(3, this->dependency(i), target); + target = stream->WriteString(3, s, target); } // repeated .google.protobuf.DescriptorProto message_type = 4; for (unsigned int i = 0, - n = static_cast(this->message_type_size()); i < n; i++) { + n = static_cast(this->_internal_message_type_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 4, this->message_type(static_cast(i)), target); + InternalWriteMessage(4, this->_internal_message_type(i), target, stream); } // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; for (unsigned int i = 0, - n = static_cast(this->enum_type_size()); i < n; i++) { + n = static_cast(this->_internal_enum_type_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 5, this->enum_type(static_cast(i)), target); + InternalWriteMessage(5, this->_internal_enum_type(i), target, stream); } // repeated .google.protobuf.ServiceDescriptorProto service = 6; for (unsigned int i = 0, - n = static_cast(this->service_size()); i < n; i++) { + n = static_cast(this->_internal_service_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 6, this->service(static_cast(i)), target); + InternalWriteMessage(6, this->_internal_service(i), target, stream); } // repeated .google.protobuf.FieldDescriptorProto extension = 7; for (unsigned int i = 0, - n = static_cast(this->extension_size()); i < n; i++) { + n = static_cast(this->_internal_extension_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 7, this->extension(static_cast(i)), target); + InternalWriteMessage(7, this->_internal_extension(i), target, stream); } // optional .google.protobuf.FileOptions options = 8; if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 8, HasBitSetters::options(this), target); + InternalWriteMessage( + 8, _Internal::options(this), target, stream); } // optional .google.protobuf.SourceCodeInfo source_code_info = 9; if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 9, HasBitSetters::source_code_info(this), target); + InternalWriteMessage( + 9, _Internal::source_code_info(this), target, stream); } // repeated int32 public_dependency = 10; - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteInt32ToArray(10, this->public_dependency_, target); + for (int i = 0, n = this->_internal_public_dependency_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(10, this->_internal_public_dependency(i), target); + } // repeated int32 weak_dependency = 11; - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteInt32ToArray(11, this->weak_dependency_, target); + for (int i = 0, n = this->_internal_weak_dependency_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(11, this->_internal_weak_dependency(i), target); + } // optional string syntax = 12; if (cached_has_bits & 0x00000004u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->syntax().data(), static_cast(this->syntax().length()), + this->_internal_syntax().data(), static_cast(this->_internal_syntax().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.syntax"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 12, this->syntax(), target); + target = stream->WriteStringMaybeAliased( + 12, this->_internal_syntax(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorProto) return target; @@ -2472,65 +2036,44 @@ size_t FileDescriptorProto::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileDescriptorProto) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated string dependency = 3; total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->dependency_size()); - for (int i = 0, n = this->dependency_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(dependency_.size()); + for (int i = 0, n = dependency_.size(); i < n; i++) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->dependency(i)); + dependency_.Get(i)); } // repeated .google.protobuf.DescriptorProto message_type = 4; - { - unsigned int count = static_cast(this->message_type_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->message_type(static_cast(i))); - } + total_size += 1UL * this->_internal_message_type_size(); + for (const auto& msg : this->message_type_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; - { - unsigned int count = static_cast(this->enum_type_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->enum_type(static_cast(i))); - } + total_size += 1UL * this->_internal_enum_type_size(); + for (const auto& msg : this->enum_type_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated .google.protobuf.ServiceDescriptorProto service = 6; - { - unsigned int count = static_cast(this->service_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->service(static_cast(i))); - } + total_size += 1UL * this->_internal_service_size(); + for (const auto& msg : this->service_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated .google.protobuf.FieldDescriptorProto extension = 7; - { - unsigned int count = static_cast(this->extension_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->extension(static_cast(i))); - } + total_size += 1UL * this->_internal_extension_size(); + for (const auto& msg : this->extension_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated int32 public_dependency = 10; @@ -2538,7 +2081,7 @@ size_t FileDescriptorProto::ByteSizeLong() const { size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: Int32Size(this->public_dependency_); total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->public_dependency_size()); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_public_dependency_size()); total_size += data_size; } @@ -2547,7 +2090,7 @@ size_t FileDescriptorProto::ByteSizeLong() const { size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: Int32Size(this->weak_dependency_); total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->weak_dependency_size()); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_weak_dependency_size()); total_size += data_size; } @@ -2557,21 +2100,21 @@ size_t FileDescriptorProto::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // optional string package = 2; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->package()); + this->_internal_package()); } // optional string syntax = 12; if (cached_has_bits & 0x00000004u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->syntax()); + this->_internal_syntax()); } // optional .google.protobuf.FileOptions options = 8; @@ -2589,6 +2132,10 @@ size_t FileDescriptorProto::ByteSizeLong() const { } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -2612,7 +2159,7 @@ void FileDescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorProto) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2626,19 +2173,19 @@ void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) { cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x0000001fu) { if (cached_has_bits & 0x00000001u) { - set_name(from.name()); + _internal_set_name(from._internal_name()); } if (cached_has_bits & 0x00000002u) { - set_package(from.package()); + _internal_set_package(from._internal_package()); } if (cached_has_bits & 0x00000004u) { - set_syntax(from.syntax()); + _internal_set_syntax(from._internal_syntax()); } if (cached_has_bits & 0x00000008u) { - mutable_options()->PROTOBUF_NAMESPACE_ID::FileOptions::MergeFrom(from.options()); + _internal_mutable_options()->PROTOBUF_NAMESPACE_ID::FileOptions::MergeFrom(from._internal_options()); } if (cached_has_bits & 0x00000010u) { - mutable_source_code_info()->PROTOBUF_NAMESPACE_ID::SourceCodeInfo::MergeFrom(from.source_code_info()); + _internal_mutable_source_code_info()->PROTOBUF_NAMESPACE_ID::SourceCodeInfo::MergeFrom(from._internal_source_code_info()); } } } @@ -2658,54 +2205,36 @@ void FileDescriptorProto::CopyFrom(const FileDescriptorProto& from) { } bool FileDescriptorProto::IsInitialized() const { - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->message_type())) return false; - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->enum_type())) return false; - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->service())) return false; - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->extension())) return false; - if (has_options()) { - if (!this->options_->IsInitialized()) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(message_type_)) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(enum_type_)) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(service_)) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(extension_)) return false; + if (_internal_has_options()) { + if (!options_->IsInitialized()) return false; } return true; } -void FileDescriptorProto::Swap(FileDescriptorProto* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - FileDescriptorProto* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void FileDescriptorProto::UnsafeArenaSwap(FileDescriptorProto* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void FileDescriptorProto::InternalSwap(FileDescriptorProto* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - dependency_.InternalSwap(CastToBase(&other->dependency_)); - CastToBase(&message_type_)->InternalSwap(CastToBase(&other->message_type_)); - CastToBase(&enum_type_)->InternalSwap(CastToBase(&other->enum_type_)); - CastToBase(&service_)->InternalSwap(CastToBase(&other->service_)); - CastToBase(&extension_)->InternalSwap(CastToBase(&other->extension_)); + 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_); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - package_.Swap(&other->package_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - syntax_.Swap(&other->syntax_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(options_, other->options_); - swap(source_code_info_, other->source_code_info_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + package_.Swap(&other->package_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + syntax_.Swap(&other->syntax_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(FileDescriptorProto, source_code_info_) + + sizeof(FileDescriptorProto::source_code_info_) + - PROTOBUF_FIELD_OFFSET(FileDescriptorProto, options_)>( + reinterpret_cast(&options_), + reinterpret_cast(&other->options_)); } ::PROTOBUF_NAMESPACE_ID::Metadata FileDescriptorProto::GetMetadata() const { @@ -2719,7 +2248,7 @@ void DescriptorProto_ExtensionRange::InitAsDefaultInstance() { PROTOBUF_NAMESPACE_ID::_DescriptorProto_ExtensionRange_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions*>( PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions::internal_default_instance()); } -class DescriptorProto_ExtensionRange::HasBitSetters { +class DescriptorProto_ExtensionRange::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_start(HasBits* has_bits) { @@ -2735,46 +2264,20 @@ class DescriptorProto_ExtensionRange::HasBitSetters { }; const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& -DescriptorProto_ExtensionRange::HasBitSetters::options(const DescriptorProto_ExtensionRange* msg) { +DescriptorProto_ExtensionRange::_Internal::options(const DescriptorProto_ExtensionRange* msg) { return *msg->options_; } -void DescriptorProto_ExtensionRange::unsafe_arena_set_allocated_options( - PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options) { - if (GetArenaNoVirtual() == nullptr) { - delete options_; - } - options_ = options; - if (options) { - _has_bits_[0] |= 0x00000001u; - } else { - _has_bits_[0] &= ~0x00000001u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.DescriptorProto.ExtensionRange.options) -} -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int DescriptorProto_ExtensionRange::kStartFieldNumber; -const int DescriptorProto_ExtensionRange::kEndFieldNumber; -const int DescriptorProto_ExtensionRange::kOptionsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto.ExtensionRange) -} DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.DescriptorProto.ExtensionRange) } DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); - if (from.has_options()) { + _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; @@ -2795,10 +2298,11 @@ void DescriptorProto_ExtensionRange::SharedCtor() { DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() { // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto.ExtensionRange) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void DescriptorProto_ExtensionRange::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); if (this != internal_default_instance()) delete options_; } @@ -2834,14 +2338,13 @@ void DescriptorProto_ExtensionRange::Clear() { reinterpret_cast(&start_)) + sizeof(end_)); } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* DescriptorProto_ExtensionRange::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -2850,23 +2353,23 @@ const char* DescriptorProto_ExtensionRange::_InternalParse(const char* ptr, ::PR // optional int32 start = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - HasBitSetters::set_has_start(&has_bits); - start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_start(&has_bits); + start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional int32 end = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - HasBitSetters::set_has_end(&has_bits); - end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_end(&has_bits); + end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional .google.protobuf.ExtensionRangeOptions options = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ctx->ParseMessage(mutable_options(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_options(), ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -2876,7 +2379,9 @@ const char* DescriptorProto_ExtensionRange::_InternalParse(const char* ptr, ::PR ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -2890,107 +2395,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto.ExtensionRange) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional int32 start = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - HasBitSetters::set_has_start(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &start_))); - } else { - goto handle_unusual; - } - break; - } - // optional int32 end = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - HasBitSetters::set_has_end(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &end_))); - } else { - goto handle_unusual; - } - break; - } - - // optional .google.protobuf.ExtensionRangeOptions options = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_options())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto.ExtensionRange) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto.ExtensionRange) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void DescriptorProto_ExtensionRange::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto.ExtensionRange) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional int32 start = 1; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->start(), output); - } - - // optional int32 end = 2; - if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->end(), output); - } - - // optional .google.protobuf.ExtensionRangeOptions options = 3; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, HasBitSetters::options(this), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ExtensionRange) -} - -::PROTOBUF_NAMESPACE_ID::uint8* DescriptorProto_ExtensionRange::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* DescriptorProto_ExtensionRange::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ExtensionRange) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2998,24 +2405,27 @@ void DescriptorProto_ExtensionRange::SerializeWithCachedSizes( cached_has_bits = _has_bits_[0]; // optional int32 start = 1; if (cached_has_bits & 0x00000002u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_start(), target); } // optional int32 end = 2; if (cached_has_bits & 0x00000004u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_end(), target); } // optional .google.protobuf.ExtensionRangeOptions options = 3; if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 3, HasBitSetters::options(this), target); + InternalWriteMessage( + 3, _Internal::options(this), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ExtensionRange) return target; @@ -3025,11 +2435,6 @@ size_t DescriptorProto_ExtensionRange::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.DescriptorProto.ExtensionRange) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3047,17 +2452,21 @@ size_t DescriptorProto_ExtensionRange::ByteSizeLong() const { if (cached_has_bits & 0x00000002u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->start()); + this->_internal_start()); } // optional int32 end = 2; if (cached_has_bits & 0x00000004u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->end()); + this->_internal_end()); } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -3081,14 +2490,14 @@ void DescriptorProto_ExtensionRange::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Me 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); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x00000007u) { if (cached_has_bits & 0x00000001u) { - mutable_options()->PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions::MergeFrom(from.options()); + _internal_mutable_options()->PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions::MergeFrom(from._internal_options()); } if (cached_has_bits & 0x00000002u) { start_ = from.start_; @@ -3115,38 +2524,22 @@ void DescriptorProto_ExtensionRange::CopyFrom(const DescriptorProto_ExtensionRan } bool DescriptorProto_ExtensionRange::IsInitialized() const { - if (has_options()) { - if (!this->options_->IsInitialized()) return false; + if (_internal_has_options()) { + if (!options_->IsInitialized()) return false; } return true; } -void DescriptorProto_ExtensionRange::Swap(DescriptorProto_ExtensionRange* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - DescriptorProto_ExtensionRange* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void DescriptorProto_ExtensionRange::UnsafeArenaSwap(DescriptorProto_ExtensionRange* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void DescriptorProto_ExtensionRange::InternalSwap(DescriptorProto_ExtensionRange* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - swap(options_, other->options_); - swap(start_, other->start_); - swap(end_, other->end_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(DescriptorProto_ExtensionRange, end_) + + sizeof(DescriptorProto_ExtensionRange::end_) + - PROTOBUF_FIELD_OFFSET(DescriptorProto_ExtensionRange, options_)>( + reinterpret_cast(&options_), + reinterpret_cast(&other->options_)); } ::PROTOBUF_NAMESPACE_ID::Metadata DescriptorProto_ExtensionRange::GetMetadata() const { @@ -3158,7 +2551,7 @@ void DescriptorProto_ExtensionRange::InternalSwap(DescriptorProto_ExtensionRange void DescriptorProto_ReservedRange::InitAsDefaultInstance() { } -class DescriptorProto_ReservedRange::HasBitSetters { +class DescriptorProto_ReservedRange::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_start(HasBits* has_bits) { @@ -3169,28 +2562,16 @@ class DescriptorProto_ReservedRange::HasBitSetters { } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int DescriptorProto_ReservedRange::kStartFieldNumber; -const int DescriptorProto_ReservedRange::kEndFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -DescriptorProto_ReservedRange::DescriptorProto_ReservedRange() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto.ReservedRange) -} DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.DescriptorProto.ReservedRange) } DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::memcpy(&start_, &from.start_, static_cast(reinterpret_cast(&end_) - reinterpret_cast(&start_)) + sizeof(end_)); @@ -3206,10 +2587,11 @@ void DescriptorProto_ReservedRange::SharedCtor() { DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange() { // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto.ReservedRange) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void DescriptorProto_ReservedRange::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void DescriptorProto_ReservedRange::ArenaDtor(void* object) { @@ -3240,14 +2622,13 @@ void DescriptorProto_ReservedRange::Clear() { reinterpret_cast(&start_)) + sizeof(end_)); } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* DescriptorProto_ReservedRange::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -3256,16 +2637,16 @@ const char* DescriptorProto_ReservedRange::_InternalParse(const char* ptr, ::PRO // optional int32 start = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - HasBitSetters::set_has_start(&has_bits); - start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_start(&has_bits); + start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional int32 end = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - HasBitSetters::set_has_end(&has_bits); - end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_end(&has_bits); + end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -3275,7 +2656,9 @@ const char* DescriptorProto_ReservedRange::_InternalParse(const char* ptr, ::PRO ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -3289,90 +2672,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool DescriptorProto_ReservedRange::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto.ReservedRange) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional int32 start = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - HasBitSetters::set_has_start(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &start_))); - } else { - goto handle_unusual; - } - break; - } - // optional int32 end = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - HasBitSetters::set_has_end(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &end_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto.ReservedRange) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto.ReservedRange) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void DescriptorProto_ReservedRange::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto.ReservedRange) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional int32 start = 1; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->start(), output); - } - - // optional int32 end = 2; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->end(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ReservedRange) -} - -::PROTOBUF_NAMESPACE_ID::uint8* DescriptorProto_ReservedRange::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* DescriptorProto_ReservedRange::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ReservedRange) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3380,17 +2682,19 @@ void DescriptorProto_ReservedRange::SerializeWithCachedSizes( cached_has_bits = _has_bits_[0]; // optional int32 start = 1; if (cached_has_bits & 0x00000001u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_start(), target); } // optional int32 end = 2; if (cached_has_bits & 0x00000002u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_end(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ReservedRange) return target; @@ -3400,11 +2704,6 @@ size_t DescriptorProto_ReservedRange::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.DescriptorProto.ReservedRange) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3415,17 +2714,21 @@ size_t DescriptorProto_ReservedRange::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->start()); + this->_internal_start()); } // optional int32 end = 2; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->end()); + this->_internal_end()); } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -3449,7 +2752,7 @@ void DescriptorProto_ReservedRange::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Mes 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); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3483,31 +2786,16 @@ bool DescriptorProto_ReservedRange::IsInitialized() const { return true; } -void DescriptorProto_ReservedRange::Swap(DescriptorProto_ReservedRange* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - DescriptorProto_ReservedRange* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void DescriptorProto_ReservedRange::UnsafeArenaSwap(DescriptorProto_ReservedRange* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - swap(start_, other->start_); - swap(end_, other->end_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(DescriptorProto_ReservedRange, end_) + + sizeof(DescriptorProto_ReservedRange::end_) + - PROTOBUF_FIELD_OFFSET(DescriptorProto_ReservedRange, start_)>( + reinterpret_cast(&start_), + reinterpret_cast(&other->start_)); } ::PROTOBUF_NAMESPACE_ID::Metadata DescriptorProto_ReservedRange::GetMetadata() const { @@ -3521,7 +2809,7 @@ void DescriptorProto::InitAsDefaultInstance() { PROTOBUF_NAMESPACE_ID::_DescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::MessageOptions*>( PROTOBUF_NAMESPACE_ID::MessageOptions::internal_default_instance()); } -class DescriptorProto::HasBitSetters { +class DescriptorProto::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_name(HasBits* has_bits) { @@ -3534,43 +2822,11 @@ class DescriptorProto::HasBitSetters { }; const PROTOBUF_NAMESPACE_ID::MessageOptions& -DescriptorProto::HasBitSetters::options(const DescriptorProto* msg) { +DescriptorProto::_Internal::options(const DescriptorProto* msg) { return *msg->options_; } -void DescriptorProto::unsafe_arena_set_allocated_options( - PROTOBUF_NAMESPACE_ID::MessageOptions* options) { - if (GetArenaNoVirtual() == nullptr) { - delete options_; - } - options_ = options; - if (options) { - _has_bits_[0] |= 0x00000002u; - } else { - _has_bits_[0] &= ~0x00000002u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.DescriptorProto.options) -} -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int DescriptorProto::kNameFieldNumber; -const int DescriptorProto::kFieldFieldNumber; -const int DescriptorProto::kExtensionFieldNumber; -const int DescriptorProto::kNestedTypeFieldNumber; -const int DescriptorProto::kEnumTypeFieldNumber; -const int DescriptorProto::kExtensionRangeFieldNumber; -const int DescriptorProto::kOneofDeclFieldNumber; -const int DescriptorProto::kOptionsFieldNumber; -const int DescriptorProto::kReservedRangeFieldNumber; -const int DescriptorProto::kReservedNameFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -DescriptorProto::DescriptorProto() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto) -} DescriptorProto::DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), field_(arena), nested_type_(arena), enum_type_(arena), @@ -3585,7 +2841,6 @@ DescriptorProto::DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) } DescriptorProto::DescriptorProto(const DescriptorProto& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), field_(from.field_), nested_type_(from.nested_type_), @@ -3595,13 +2850,13 @@ DescriptorProto::DescriptorProto(const DescriptorProto& from) oneof_decl_(from.oneof_decl_), reserved_range_(from.reserved_range_), reserved_name_(from.reserved_name_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_name()) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), - GetArenaNoVirtual()); + if (from._internal_has_name()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } - if (from.has_options()) { + if (from._internal_has_options()) { options_ = new PROTOBUF_NAMESPACE_ID::MessageOptions(*from.options_); } else { options_ = nullptr; @@ -3618,10 +2873,11 @@ void DescriptorProto::SharedCtor() { DescriptorProto::~DescriptorProto() { // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void DescriptorProto::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete options_; } @@ -3666,14 +2922,13 @@ void DescriptorProto::Clear() { } } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -3682,7 +2937,11 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC // optional string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.DescriptorProto.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.DescriptorProto.name"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; @@ -3692,10 +2951,10 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_field(), ptr); + ptr = ctx->ParseMessage(_internal_add_field(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); } else goto handle_unusual; continue; // repeated .google.protobuf.DescriptorProto nested_type = 3; @@ -3704,10 +2963,10 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_nested_type(), ptr); + ptr = ctx->ParseMessage(_internal_add_nested_type(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); } else goto handle_unusual; continue; // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; @@ -3716,10 +2975,10 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_enum_type(), ptr); + ptr = ctx->ParseMessage(_internal_add_enum_type(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); } else goto handle_unusual; continue; // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; @@ -3728,10 +2987,10 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_extension_range(), ptr); + ptr = ctx->ParseMessage(_internal_add_extension_range(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 42); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); } else goto handle_unusual; continue; // repeated .google.protobuf.FieldDescriptorProto extension = 6; @@ -3740,16 +2999,16 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_extension(), ptr); + ptr = ctx->ParseMessage(_internal_add_extension(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 50); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); } else goto handle_unusual; continue; // optional .google.protobuf.MessageOptions options = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { - ptr = ctx->ParseMessage(mutable_options(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_options(), ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -3759,10 +3018,10 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_oneof_decl(), ptr); + ptr = ctx->ParseMessage(_internal_add_oneof_decl(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 66); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr)); } else goto handle_unusual; continue; // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; @@ -3771,10 +3030,10 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_reserved_range(), ptr); + ptr = ctx->ParseMessage(_internal_add_reserved_range(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 74); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr)); } else goto handle_unusual; continue; // repeated string reserved_name = 10; @@ -3783,10 +3042,14 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC ptr -= 1; do { ptr += 1; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(add_reserved_name(), ptr, ctx, "google.protobuf.DescriptorProto.reserved_name"); + auto str = _internal_add_reserved_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.DescriptorProto.reserved_name"); + #endif // !NDEBUG CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 82); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(ptr)); } else goto handle_unusual; continue; default: { @@ -3795,7 +3058,9 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPAC ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -3809,262 +3074,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool DescriptorProto::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.DescriptorProto.name"); - } else { - goto handle_unusual; - } - break; - } - // repeated .google.protobuf.FieldDescriptorProto field = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_field())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.DescriptorProto nested_type = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_nested_type())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_enum_type())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - case 5: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_extension_range())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.FieldDescriptorProto extension = 6; - case 6: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_extension())); - } else { - goto handle_unusual; - } - break; - } - - // optional .google.protobuf.MessageOptions options = 7; - case 7: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_options())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; - case 8: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_oneof_decl())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; - case 9: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (74 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_reserved_range())); - } else { - goto handle_unusual; - } - break; - } - - // repeated string reserved_name = 10; - case 10: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (82 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->add_reserved_name())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->reserved_name(this->reserved_name_size() - 1).data(), - static_cast(this->reserved_name(this->reserved_name_size() - 1).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.DescriptorProto.reserved_name"); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void DescriptorProto::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.DescriptorProto.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // repeated .google.protobuf.FieldDescriptorProto field = 2; - for (unsigned int i = 0, - n = static_cast(this->field_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, - this->field(static_cast(i)), - output); - } - - // repeated .google.protobuf.DescriptorProto nested_type = 3; - for (unsigned int i = 0, - n = static_cast(this->nested_type_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, - this->nested_type(static_cast(i)), - output); - } - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; - for (unsigned int i = 0, - n = static_cast(this->enum_type_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, - this->enum_type(static_cast(i)), - output); - } - - // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - for (unsigned int i = 0, - n = static_cast(this->extension_range_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 5, - this->extension_range(static_cast(i)), - output); - } - - // repeated .google.protobuf.FieldDescriptorProto extension = 6; - for (unsigned int i = 0, - n = static_cast(this->extension_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 6, - this->extension(static_cast(i)), - output); - } - - // optional .google.protobuf.MessageOptions options = 7; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 7, HasBitSetters::options(this), output); - } - - // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; - for (unsigned int i = 0, - n = static_cast(this->oneof_decl_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 8, - this->oneof_decl(static_cast(i)), - output); - } - - // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; - for (unsigned int i = 0, - n = static_cast(this->reserved_range_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 9, - this->reserved_range(static_cast(i)), - output); - } - - // repeated string reserved_name = 10; - for (int i = 0, n = this->reserved_name_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->reserved_name(i).data(), static_cast(this->reserved_name(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.DescriptorProto.reserved_name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( - 10, this->reserved_name(i), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto) -} - -::PROTOBUF_NAMESPACE_ID::uint8* DescriptorProto::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* DescriptorProto::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -4073,90 +3085,90 @@ void DescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.DescriptorProto.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // repeated .google.protobuf.FieldDescriptorProto field = 2; for (unsigned int i = 0, - n = static_cast(this->field_size()); i < n; i++) { + n = static_cast(this->_internal_field_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 2, this->field(static_cast(i)), target); + InternalWriteMessage(2, this->_internal_field(i), target, stream); } // repeated .google.protobuf.DescriptorProto nested_type = 3; for (unsigned int i = 0, - n = static_cast(this->nested_type_size()); i < n; i++) { + n = static_cast(this->_internal_nested_type_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 3, this->nested_type(static_cast(i)), target); + InternalWriteMessage(3, this->_internal_nested_type(i), target, stream); } // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; for (unsigned int i = 0, - n = static_cast(this->enum_type_size()); i < n; i++) { + n = static_cast(this->_internal_enum_type_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 4, this->enum_type(static_cast(i)), target); + InternalWriteMessage(4, this->_internal_enum_type(i), target, stream); } // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; for (unsigned int i = 0, - n = static_cast(this->extension_range_size()); i < n; i++) { + n = static_cast(this->_internal_extension_range_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 5, this->extension_range(static_cast(i)), target); + InternalWriteMessage(5, this->_internal_extension_range(i), target, stream); } // repeated .google.protobuf.FieldDescriptorProto extension = 6; for (unsigned int i = 0, - n = static_cast(this->extension_size()); i < n; i++) { + n = static_cast(this->_internal_extension_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 6, this->extension(static_cast(i)), target); + InternalWriteMessage(6, this->_internal_extension(i), target, stream); } // optional .google.protobuf.MessageOptions options = 7; if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 7, HasBitSetters::options(this), target); + InternalWriteMessage( + 7, _Internal::options(this), target, stream); } // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; for (unsigned int i = 0, - n = static_cast(this->oneof_decl_size()); i < n; i++) { + n = static_cast(this->_internal_oneof_decl_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 8, this->oneof_decl(static_cast(i)), target); + InternalWriteMessage(8, this->_internal_oneof_decl(i), target, stream); } // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; for (unsigned int i = 0, - n = static_cast(this->reserved_range_size()); i < n; i++) { + n = static_cast(this->_internal_reserved_range_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 9, this->reserved_range(static_cast(i)), target); + InternalWriteMessage(9, this->_internal_reserved_range(i), target, stream); } // repeated string reserved_name = 10; - for (int i = 0, n = this->reserved_name_size(); i < n; i++) { + for (int i = 0, n = this->_internal_reserved_name_size(); i < n; i++) { + const auto& s = this->_internal_reserved_name(i); ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->reserved_name(i).data(), static_cast(this->reserved_name(i).length()), + s.data(), static_cast(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.DescriptorProto.reserved_name"); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteStringToArray(10, this->reserved_name(i), target); + target = stream->WriteString(10, s, target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto) return target; @@ -4166,98 +3178,65 @@ size_t DescriptorProto::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.DescriptorProto) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.FieldDescriptorProto field = 2; - { - unsigned int count = static_cast(this->field_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->field(static_cast(i))); - } + total_size += 1UL * this->_internal_field_size(); + for (const auto& msg : this->field_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated .google.protobuf.DescriptorProto nested_type = 3; - { - unsigned int count = static_cast(this->nested_type_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->nested_type(static_cast(i))); - } + total_size += 1UL * this->_internal_nested_type_size(); + for (const auto& msg : this->nested_type_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; - { - unsigned int count = static_cast(this->enum_type_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->enum_type(static_cast(i))); - } + total_size += 1UL * this->_internal_enum_type_size(); + for (const auto& msg : this->enum_type_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - { - unsigned int count = static_cast(this->extension_range_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->extension_range(static_cast(i))); - } + total_size += 1UL * this->_internal_extension_range_size(); + for (const auto& msg : this->extension_range_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated .google.protobuf.FieldDescriptorProto extension = 6; - { - unsigned int count = static_cast(this->extension_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->extension(static_cast(i))); - } + total_size += 1UL * this->_internal_extension_size(); + for (const auto& msg : this->extension_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; - { - unsigned int count = static_cast(this->oneof_decl_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->oneof_decl(static_cast(i))); - } + total_size += 1UL * this->_internal_oneof_decl_size(); + for (const auto& msg : this->oneof_decl_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; - { - unsigned int count = static_cast(this->reserved_range_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->reserved_range(static_cast(i))); - } + total_size += 1UL * this->_internal_reserved_range_size(); + for (const auto& msg : this->reserved_range_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated string reserved_name = 10; total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->reserved_name_size()); - for (int i = 0, n = this->reserved_name_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(reserved_name_.size()); + for (int i = 0, n = reserved_name_.size(); i < n; i++) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->reserved_name(i)); + reserved_name_.Get(i)); } cached_has_bits = _has_bits_[0]; @@ -4266,7 +3245,7 @@ size_t DescriptorProto::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // optional .google.protobuf.MessageOptions options = 7; @@ -4277,6 +3256,10 @@ size_t DescriptorProto::ByteSizeLong() const { } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -4300,7 +3283,7 @@ void DescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void DescriptorProto::MergeFrom(const DescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -4315,10 +3298,10 @@ void DescriptorProto::MergeFrom(const DescriptorProto& from) { cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { - set_name(from.name()); + _internal_set_name(from._internal_name()); } if (cached_has_bits & 0x00000002u) { - mutable_options()->PROTOBUF_NAMESPACE_ID::MessageOptions::MergeFrom(from.options()); + _internal_mutable_options()->PROTOBUF_NAMESPACE_ID::MessageOptions::MergeFrom(from._internal_options()); } } } @@ -4338,51 +3321,31 @@ void DescriptorProto::CopyFrom(const DescriptorProto& from) { } bool DescriptorProto::IsInitialized() const { - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->field())) return false; - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->nested_type())) return false; - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->enum_type())) return false; - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->extension_range())) return false; - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->extension())) return false; - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->oneof_decl())) return false; - if (has_options()) { - if (!this->options_->IsInitialized()) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(field_)) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(nested_type_)) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(enum_type_)) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(extension_range_)) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(extension_)) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(oneof_decl_)) return false; + if (_internal_has_options()) { + if (!options_->IsInitialized()) return false; } return true; } -void DescriptorProto::Swap(DescriptorProto* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - DescriptorProto* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void DescriptorProto::UnsafeArenaSwap(DescriptorProto* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void DescriptorProto::InternalSwap(DescriptorProto* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&field_)->InternalSwap(CastToBase(&other->field_)); - CastToBase(&nested_type_)->InternalSwap(CastToBase(&other->nested_type_)); - CastToBase(&enum_type_)->InternalSwap(CastToBase(&other->enum_type_)); - CastToBase(&extension_range_)->InternalSwap(CastToBase(&other->extension_range_)); - CastToBase(&extension_)->InternalSwap(CastToBase(&other->extension_)); - CastToBase(&oneof_decl_)->InternalSwap(CastToBase(&other->oneof_decl_)); - CastToBase(&reserved_range_)->InternalSwap(CastToBase(&other->reserved_range_)); - reserved_name_.InternalSwap(CastToBase(&other->reserved_name_)); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + 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_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); swap(options_, other->options_); } @@ -4395,24 +3358,13 @@ void DescriptorProto::InternalSwap(DescriptorProto* other) { void ExtensionRangeOptions::InitAsDefaultInstance() { } -class ExtensionRangeOptions::HasBitSetters { +class ExtensionRangeOptions::_Internal { public: - using HasBits = decltype(std::declval()._has_bits_); }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ExtensionRangeOptions::kUninterpretedOptionFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -ExtensionRangeOptions::ExtensionRangeOptions() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.ExtensionRangeOptions) -} ExtensionRangeOptions::ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), _extensions_(arena), - _internal_metadata_(arena), uninterpreted_option_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -4420,10 +3372,8 @@ ExtensionRangeOptions::ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* are } ExtensionRangeOptions::ExtensionRangeOptions(const ExtensionRangeOptions& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), - _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _extensions_.MergeFrom(from._extensions_); // @@protoc_insertion_point(copy_constructor:google.protobuf.ExtensionRangeOptions) } @@ -4435,10 +3385,11 @@ void ExtensionRangeOptions::SharedCtor() { ExtensionRangeOptions::~ExtensionRangeOptions() { // @@protoc_insertion_point(destructor:google.protobuf.ExtensionRangeOptions) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void ExtensionRangeOptions::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void ExtensionRangeOptions::ArenaDtor(void* object) { @@ -4464,14 +3415,12 @@ void ExtensionRangeOptions::Clear() { _extensions_.Clear(); uninterpreted_option_.Clear(); - _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* ExtensionRangeOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -4483,10 +3432,10 @@ const char* ExtensionRangeOptions::_InternalParse(const char* ptr, ::PROTOBUF_NA ptr -= 2; do { ptr += 2; - ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); + ptr = ctx->ParseMessage(_internal_add_uninterpreted_option(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint16>(ptr) == 16058); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<7994>(ptr)); } else goto handle_unusual; continue; default: { @@ -4501,7 +3450,9 @@ const char* ExtensionRangeOptions::_InternalParse(const char* ptr, ::PROTOBUF_NA CHK_(ptr != nullptr); continue; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -4514,101 +3465,28 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool ExtensionRangeOptions::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.ExtensionRangeOptions) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_uninterpreted_option())); - } else { - goto handle_unusual; - } - break; - } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, - internal_default_instance(), - _internal_metadata_.mutable_unknown_fields())); - continue; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.ExtensionRangeOptions) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.ExtensionRangeOptions) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void ExtensionRangeOptions::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.ExtensionRangeOptions) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, - this->uninterpreted_option(static_cast(i)), - output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes(1000, 536870912, output); - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.ExtensionRangeOptions) -} - -::PROTOBUF_NAMESPACE_ID::uint8* ExtensionRangeOptions::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* ExtensionRangeOptions::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ExtensionRangeOptions) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { + n = static_cast(this->_internal_uninterpreted_option_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 999, this->uninterpreted_option(static_cast(i)), target); + InternalWriteMessage(999, this->_internal_uninterpreted_option(i), target, stream); } // Extension range [1000, 536870912) - target = _extensions_.InternalSerializeWithCachedSizesToArray( - 1000, 536870912, target); + target = _extensions_._InternalSerialize( + 1000, 536870912, target, stream); - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ExtensionRangeOptions) return target; @@ -4620,26 +3498,21 @@ size_t ExtensionRangeOptions::ByteSizeLong() const { total_size += _extensions_.ByteSize(); - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - unsigned int count = static_cast(this->uninterpreted_option_size()); - total_size += 2UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->uninterpreted_option(static_cast(i))); - } + total_size += 2UL * this->_internal_uninterpreted_option_size(); + for (const auto& msg : this->uninterpreted_option_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -4664,7 +3537,7 @@ void ExtensionRangeOptions::MergeFrom(const ExtensionRangeOptions& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ExtensionRangeOptions) GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -4690,35 +3563,15 @@ bool ExtensionRangeOptions::IsInitialized() const { return false; } - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false; return true; } -void ExtensionRangeOptions::Swap(ExtensionRangeOptions* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - ExtensionRangeOptions* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void ExtensionRangeOptions::UnsafeArenaSwap(ExtensionRangeOptions* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void ExtensionRangeOptions::InternalSwap(ExtensionRangeOptions* other) { using std::swap; _extensions_.Swap(&other->_extensions_); - _internal_metadata_.Swap(&other->_internal_metadata_); - swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&uninterpreted_option_)->InternalSwap(CastToBase(&other->uninterpreted_option_)); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); } ::PROTOBUF_NAMESPACE_ID::Metadata ExtensionRangeOptions::GetMetadata() const { @@ -4732,7 +3585,7 @@ void FieldDescriptorProto::InitAsDefaultInstance() { PROTOBUF_NAMESPACE_ID::_FieldDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::FieldOptions*>( PROTOBUF_NAMESPACE_ID::FieldOptions::internal_default_instance()); } -class FieldDescriptorProto::HasBitSetters { +class FieldDescriptorProto::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_name(HasBits* has_bits) { @@ -4742,10 +3595,10 @@ class FieldDescriptorProto::HasBitSetters { (*has_bits)[0] |= 64u; } static void set_has_label(HasBits* has_bits) { - (*has_bits)[0] |= 256u; + (*has_bits)[0] |= 512u; } static void set_has_type(HasBits* has_bits) { - (*has_bits)[0] |= 512u; + (*has_bits)[0] |= 1024u; } static void set_has_type_name(HasBits* has_bits) { (*has_bits)[0] |= 4u; @@ -4766,81 +3619,51 @@ class FieldDescriptorProto::HasBitSetters { static void set_has_options(HasBits* has_bits) { (*has_bits)[0] |= 32u; } + static void set_has_proto3_optional(HasBits* has_bits) { + (*has_bits)[0] |= 256u; + } }; const PROTOBUF_NAMESPACE_ID::FieldOptions& -FieldDescriptorProto::HasBitSetters::options(const FieldDescriptorProto* msg) { +FieldDescriptorProto::_Internal::options(const FieldDescriptorProto* msg) { return *msg->options_; } -void FieldDescriptorProto::unsafe_arena_set_allocated_options( - PROTOBUF_NAMESPACE_ID::FieldOptions* options) { - if (GetArenaNoVirtual() == nullptr) { - delete options_; - } - options_ = options; - if (options) { - _has_bits_[0] |= 0x00000020u; - } else { - _has_bits_[0] &= ~0x00000020u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FieldDescriptorProto.options) -} -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int FieldDescriptorProto::kNameFieldNumber; -const int FieldDescriptorProto::kNumberFieldNumber; -const int FieldDescriptorProto::kLabelFieldNumber; -const int FieldDescriptorProto::kTypeFieldNumber; -const int FieldDescriptorProto::kTypeNameFieldNumber; -const int FieldDescriptorProto::kExtendeeFieldNumber; -const int FieldDescriptorProto::kDefaultValueFieldNumber; -const int FieldDescriptorProto::kOneofIndexFieldNumber; -const int FieldDescriptorProto::kJsonNameFieldNumber; -const int FieldDescriptorProto::kOptionsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -FieldDescriptorProto::FieldDescriptorProto() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.FieldDescriptorProto) -} FieldDescriptorProto::FieldDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldDescriptorProto) } FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_name()) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), - GetArenaNoVirtual()); + if (from._internal_has_name()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } extendee_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_extendee()) { - extendee_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.extendee(), - GetArenaNoVirtual()); + if (from._internal_has_extendee()) { + extendee_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_extendee(), + GetArena()); } type_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_type_name()) { - type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.type_name(), - GetArenaNoVirtual()); + if (from._internal_has_type_name()) { + type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_type_name(), + GetArena()); } default_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_default_value()) { - default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.default_value(), - GetArenaNoVirtual()); + if (from._internal_has_default_value()) { + default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_default_value(), + GetArena()); } json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_json_name()) { - json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.json_name(), - GetArenaNoVirtual()); + if (from._internal_has_json_name()) { + json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_json_name(), + GetArena()); } - if (from.has_options()) { + if (from._internal_has_options()) { options_ = new PROTOBUF_NAMESPACE_ID::FieldOptions(*from.options_); } else { options_ = nullptr; @@ -4859,8 +3682,8 @@ void FieldDescriptorProto::SharedCtor() { default_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&options_, 0, static_cast( - reinterpret_cast(&oneof_index_) - - reinterpret_cast(&options_)) + sizeof(oneof_index_)); + reinterpret_cast(&proto3_optional_) - + reinterpret_cast(&options_)) + sizeof(proto3_optional_)); label_ = 1; type_ = 1; } @@ -4868,10 +3691,11 @@ void FieldDescriptorProto::SharedCtor() { FieldDescriptorProto::~FieldDescriptorProto() { // @@protoc_insertion_point(destructor:google.protobuf.FieldDescriptorProto) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void FieldDescriptorProto::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); extendee_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); type_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -4928,19 +3752,19 @@ void FieldDescriptorProto::Clear() { reinterpret_cast(&oneof_index_) - reinterpret_cast(&number_)) + sizeof(oneof_index_)); } - if (cached_has_bits & 0x00000300u) { + if (cached_has_bits & 0x00000700u) { + proto3_optional_ = false; label_ = 1; type_ = 1; } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -4949,32 +3773,40 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM // optional string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.FieldDescriptorProto.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FieldDescriptorProto.name"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional string extendee = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_extendee(), ptr, ctx, "google.protobuf.FieldDescriptorProto.extendee"); + auto str = _internal_mutable_extendee(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FieldDescriptorProto.extendee"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional int32 number = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - HasBitSetters::set_has_number(&has_bits); - number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_number(&has_bits); + number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional .google.protobuf.FieldDescriptorProto.Label label = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); if (PROTOBUF_PREDICT_TRUE(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label_IsValid(val))) { - set_label(static_cast(val)); + _internal_set_label(static_cast(val)); } else { ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields()); } @@ -4983,10 +3815,10 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM // optional .google.protobuf.FieldDescriptorProto.Type type = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); if (PROTOBUF_PREDICT_TRUE(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type_IsValid(val))) { - set_type(static_cast(val)); + _internal_set_type(static_cast(val)); } else { ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields()); } @@ -4995,36 +3827,56 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM // optional string type_name = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_type_name(), ptr, ctx, "google.protobuf.FieldDescriptorProto.type_name"); + auto str = _internal_mutable_type_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FieldDescriptorProto.type_name"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional string default_value = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_default_value(), ptr, ctx, "google.protobuf.FieldDescriptorProto.default_value"); + auto str = _internal_mutable_default_value(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FieldDescriptorProto.default_value"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional .google.protobuf.FieldOptions options = 8; case 8: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { - ptr = ctx->ParseMessage(mutable_options(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_options(), ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional int32 oneof_index = 9; case 9: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - HasBitSetters::set_has_oneof_index(&has_bits); - oneof_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_oneof_index(&has_bits); + oneof_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional string json_name = 10; case 10: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_json_name(), ptr, ctx, "google.protobuf.FieldDescriptorProto.json_name"); + auto str = _internal_mutable_json_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FieldDescriptorProto.json_name"); + #endif // !NDEBUG + CHK_(ptr); + } else goto handle_unusual; + continue; + // optional bool proto3_optional = 17; + case 17: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { + _Internal::set_has_proto3_optional(&has_bits); + proto3_optional_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -5034,7 +3886,9 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -5048,282 +3902,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool FieldDescriptorProto::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.FieldDescriptorProto) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FieldDescriptorProto.name"); - } else { - goto handle_unusual; - } - break; - } - // optional string extendee = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_extendee())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->extendee().data(), static_cast(this->extendee().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FieldDescriptorProto.extendee"); - } else { - goto handle_unusual; - } - break; - } - - // optional int32 number = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { - HasBitSetters::set_has_number(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &number_))); - } else { - goto handle_unusual; - } - break; - } - - // optional .google.protobuf.FieldDescriptorProto.Label label = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { - int value = 0; - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label_IsValid(value)) { - set_label(static_cast< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label >(value)); - } else { - mutable_unknown_fields()->AddVarint( - 4, static_cast<::PROTOBUF_NAMESPACE_ID::uint64>(value)); - } - } else { - goto handle_unusual; - } - break; - } - - // optional .google.protobuf.FieldDescriptorProto.Type type = 5; - case 5: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { - int value = 0; - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type_IsValid(value)) { - set_type(static_cast< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type >(value)); - } else { - mutable_unknown_fields()->AddVarint( - 5, static_cast<::PROTOBUF_NAMESPACE_ID::uint64>(value)); - } - } else { - goto handle_unusual; - } - break; - } - - // optional string type_name = 6; - case 6: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_type_name())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->type_name().data(), static_cast(this->type_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FieldDescriptorProto.type_name"); - } else { - goto handle_unusual; - } - break; - } - - // optional string default_value = 7; - case 7: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_default_value())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->default_value().data(), static_cast(this->default_value().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FieldDescriptorProto.default_value"); - } else { - goto handle_unusual; - } - break; - } - - // optional .google.protobuf.FieldOptions options = 8; - case 8: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_options())); - } else { - goto handle_unusual; - } - break; - } - - // optional int32 oneof_index = 9; - case 9: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) { - HasBitSetters::set_has_oneof_index(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &oneof_index_))); - } else { - goto handle_unusual; - } - break; - } - - // optional string json_name = 10; - case 10: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (82 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_json_name())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->json_name().data(), static_cast(this->json_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FieldDescriptorProto.json_name"); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.FieldDescriptorProto) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.FieldDescriptorProto) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void FieldDescriptorProto::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.FieldDescriptorProto) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FieldDescriptorProto.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // optional string extendee = 2; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->extendee().data(), static_cast(this->extendee().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FieldDescriptorProto.extendee"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 2, this->extendee(), output); - } - - // optional int32 number = 3; - if (cached_has_bits & 0x00000040u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->number(), output); - } - - // optional .google.protobuf.FieldDescriptorProto.Label label = 4; - if (cached_has_bits & 0x00000100u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( - 4, this->label(), output); - } - - // optional .google.protobuf.FieldDescriptorProto.Type type = 5; - if (cached_has_bits & 0x00000200u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( - 5, this->type(), output); - } - - // optional string type_name = 6; - if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->type_name().data(), static_cast(this->type_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FieldDescriptorProto.type_name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 6, this->type_name(), output); - } - - // optional string default_value = 7; - if (cached_has_bits & 0x00000008u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->default_value().data(), static_cast(this->default_value().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FieldDescriptorProto.default_value"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 7, this->default_value(), output); - } - - // optional .google.protobuf.FieldOptions options = 8; - if (cached_has_bits & 0x00000020u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 8, HasBitSetters::options(this), output); - } - - // optional int32 oneof_index = 9; - if (cached_has_bits & 0x00000080u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(9, this->oneof_index(), output); - } - - // optional string json_name = 10; - if (cached_has_bits & 0x00000010u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->json_name().data(), static_cast(this->json_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FieldDescriptorProto.json_name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 10, this->json_name(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.FieldDescriptorProto) -} - -::PROTOBUF_NAMESPACE_ID::uint8* FieldDescriptorProto::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* FieldDescriptorProto::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldDescriptorProto) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -5332,90 +3913,96 @@ void FieldDescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // optional string extendee = 2; if (cached_has_bits & 0x00000002u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->extendee().data(), static_cast(this->extendee().length()), + this->_internal_extendee().data(), static_cast(this->_internal_extendee().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.extendee"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 2, this->extendee(), target); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_extendee(), target); } // optional int32 number = 3; if (cached_has_bits & 0x00000040u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->number(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_number(), target); } // optional .google.protobuf.FieldDescriptorProto.Label label = 4; - if (cached_has_bits & 0x00000100u) { + if (cached_has_bits & 0x00000200u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 4, this->label(), target); + 4, this->_internal_label(), target); } // optional .google.protobuf.FieldDescriptorProto.Type type = 5; - if (cached_has_bits & 0x00000200u) { + if (cached_has_bits & 0x00000400u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 5, this->type(), target); + 5, this->_internal_type(), target); } // optional string type_name = 6; if (cached_has_bits & 0x00000004u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->type_name().data(), static_cast(this->type_name().length()), + this->_internal_type_name().data(), static_cast(this->_internal_type_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.type_name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 6, this->type_name(), target); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_type_name(), target); } // optional string default_value = 7; if (cached_has_bits & 0x00000008u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->default_value().data(), static_cast(this->default_value().length()), + this->_internal_default_value().data(), static_cast(this->_internal_default_value().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.default_value"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 7, this->default_value(), target); + target = stream->WriteStringMaybeAliased( + 7, this->_internal_default_value(), target); } // optional .google.protobuf.FieldOptions options = 8; if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 8, HasBitSetters::options(this), target); + InternalWriteMessage( + 8, _Internal::options(this), target, stream); } // optional int32 oneof_index = 9; if (cached_has_bits & 0x00000080u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(9, this->oneof_index(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(9, this->_internal_oneof_index(), target); } // optional string json_name = 10; if (cached_has_bits & 0x00000010u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->json_name().data(), static_cast(this->json_name().length()), + this->_internal_json_name().data(), static_cast(this->_internal_json_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.json_name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 10, this->json_name(), target); + target = stream->WriteStringMaybeAliased( + 10, this->_internal_json_name(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + // optional bool proto3_optional = 17; + if (cached_has_bits & 0x00000100u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->_internal_proto3_optional(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldDescriptorProto) return target; @@ -5425,11 +4012,6 @@ size_t FieldDescriptorProto::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldDescriptorProto) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -5440,35 +4022,35 @@ size_t FieldDescriptorProto::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // optional string extendee = 2; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->extendee()); + this->_internal_extendee()); } // optional string type_name = 6; if (cached_has_bits & 0x00000004u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->type_name()); + this->_internal_type_name()); } // optional string default_value = 7; if (cached_has_bits & 0x00000008u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->default_value()); + this->_internal_default_value()); } // optional string json_name = 10; if (cached_has_bits & 0x00000010u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->json_name()); + this->_internal_json_name()); } // optional .google.protobuf.FieldOptions options = 8; @@ -5482,31 +4064,40 @@ size_t FieldDescriptorProto::ByteSizeLong() const { if (cached_has_bits & 0x00000040u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->number()); + this->_internal_number()); } // optional int32 oneof_index = 9; if (cached_has_bits & 0x00000080u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->oneof_index()); + this->_internal_oneof_index()); } } - if (cached_has_bits & 0x00000300u) { - // optional .google.protobuf.FieldDescriptorProto.Label label = 4; + if (cached_has_bits & 0x00000700u) { + // optional bool proto3_optional = 17; if (cached_has_bits & 0x00000100u) { + total_size += 2 + 1; + } + + // optional .google.protobuf.FieldDescriptorProto.Label label = 4; + if (cached_has_bits & 0x00000200u) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->label()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_label()); } // optional .google.protobuf.FieldDescriptorProto.Type type = 5; - if (cached_has_bits & 0x00000200u) { + if (cached_has_bits & 0x00000400u) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->type()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type()); } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -5530,29 +4121,29 @@ void FieldDescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& fro void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldDescriptorProto) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x000000ffu) { if (cached_has_bits & 0x00000001u) { - set_name(from.name()); + _internal_set_name(from._internal_name()); } if (cached_has_bits & 0x00000002u) { - set_extendee(from.extendee()); + _internal_set_extendee(from._internal_extendee()); } if (cached_has_bits & 0x00000004u) { - set_type_name(from.type_name()); + _internal_set_type_name(from._internal_type_name()); } if (cached_has_bits & 0x00000008u) { - set_default_value(from.default_value()); + _internal_set_default_value(from._internal_default_value()); } if (cached_has_bits & 0x00000010u) { - set_json_name(from.json_name()); + _internal_set_json_name(from._internal_json_name()); } if (cached_has_bits & 0x00000020u) { - mutable_options()->PROTOBUF_NAMESPACE_ID::FieldOptions::MergeFrom(from.options()); + _internal_mutable_options()->PROTOBUF_NAMESPACE_ID::FieldOptions::MergeFrom(from._internal_options()); } if (cached_has_bits & 0x00000040u) { number_ = from.number_; @@ -5562,11 +4153,14 @@ void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) { } _has_bits_[0] |= cached_has_bits; } - if (cached_has_bits & 0x00000300u) { + if (cached_has_bits & 0x00000700u) { if (cached_has_bits & 0x00000100u) { - label_ = from.label_; + proto3_optional_ = from.proto3_optional_; } if (cached_has_bits & 0x00000200u) { + label_ = from.label_; + } + if (cached_has_bits & 0x00000400u) { type_ = from.type_; } _has_bits_[0] |= cached_has_bits; @@ -5588,48 +4182,27 @@ void FieldDescriptorProto::CopyFrom(const FieldDescriptorProto& from) { } bool FieldDescriptorProto::IsInitialized() const { - if (has_options()) { - if (!this->options_->IsInitialized()) return false; + if (_internal_has_options()) { + if (!options_->IsInitialized()) return false; } return true; } -void FieldDescriptorProto::Swap(FieldDescriptorProto* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - FieldDescriptorProto* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void FieldDescriptorProto::UnsafeArenaSwap(FieldDescriptorProto* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - extendee_.Swap(&other->extendee_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - type_name_.Swap(&other->type_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - default_value_.Swap(&other->default_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - json_name_.Swap(&other->json_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(options_, other->options_); - swap(number_, other->number_); - swap(oneof_index_, other->oneof_index_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + extendee_.Swap(&other->extendee_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + type_name_.Swap(&other->type_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + default_value_.Swap(&other->default_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + json_name_.Swap(&other->json_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(FieldDescriptorProto, proto3_optional_) + + sizeof(FieldDescriptorProto::proto3_optional_) + - PROTOBUF_FIELD_OFFSET(FieldDescriptorProto, options_)>( + reinterpret_cast(&options_), + reinterpret_cast(&other->options_)); swap(label_, other->label_); swap(type_, other->type_); } @@ -5645,7 +4218,7 @@ void OneofDescriptorProto::InitAsDefaultInstance() { PROTOBUF_NAMESPACE_ID::_OneofDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::OneofOptions*>( PROTOBUF_NAMESPACE_ID::OneofOptions::internal_default_instance()); } -class OneofDescriptorProto::HasBitSetters { +class OneofDescriptorProto::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_name(HasBits* has_bits) { @@ -5658,50 +4231,25 @@ class OneofDescriptorProto::HasBitSetters { }; const PROTOBUF_NAMESPACE_ID::OneofOptions& -OneofDescriptorProto::HasBitSetters::options(const OneofDescriptorProto* msg) { +OneofDescriptorProto::_Internal::options(const OneofDescriptorProto* msg) { return *msg->options_; } -void OneofDescriptorProto::unsafe_arena_set_allocated_options( - PROTOBUF_NAMESPACE_ID::OneofOptions* options) { - if (GetArenaNoVirtual() == nullptr) { - delete options_; - } - options_ = options; - if (options) { - _has_bits_[0] |= 0x00000002u; - } else { - _has_bits_[0] &= ~0x00000002u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.OneofDescriptorProto.options) -} -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int OneofDescriptorProto::kNameFieldNumber; -const int OneofDescriptorProto::kOptionsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -OneofDescriptorProto::OneofDescriptorProto() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.OneofDescriptorProto) -} OneofDescriptorProto::OneofDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.OneofDescriptorProto) } OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_name()) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), - GetArenaNoVirtual()); + if (from._internal_has_name()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } - if (from.has_options()) { + if (from._internal_has_options()) { options_ = new PROTOBUF_NAMESPACE_ID::OneofOptions(*from.options_); } else { options_ = nullptr; @@ -5718,10 +4266,11 @@ void OneofDescriptorProto::SharedCtor() { OneofDescriptorProto::~OneofDescriptorProto() { // @@protoc_insertion_point(destructor:google.protobuf.OneofDescriptorProto) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void OneofDescriptorProto::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete options_; } @@ -5758,14 +4307,13 @@ void OneofDescriptorProto::Clear() { } } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* OneofDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -5774,14 +4322,18 @@ const char* OneofDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM // optional string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.OneofDescriptorProto.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.OneofDescriptorProto.name"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional .google.protobuf.OneofOptions options = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ctx->ParseMessage(mutable_options(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_options(), ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -5791,7 +4343,9 @@ const char* OneofDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAM ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -5805,96 +4359,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool OneofDescriptorProto::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.OneofDescriptorProto) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.OneofDescriptorProto.name"); - } else { - goto handle_unusual; - } - break; - } - // optional .google.protobuf.OneofOptions options = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_options())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.OneofDescriptorProto) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.OneofDescriptorProto) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void OneofDescriptorProto::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.OneofDescriptorProto) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.OneofDescriptorProto.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // optional .google.protobuf.OneofOptions options = 2; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, HasBitSetters::options(this), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.OneofDescriptorProto) -} - -::PROTOBUF_NAMESPACE_ID::uint8* OneofDescriptorProto::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* OneofDescriptorProto::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofDescriptorProto) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -5903,24 +4370,24 @@ void OneofDescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.OneofDescriptorProto.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // optional .google.protobuf.OneofOptions options = 2; if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 2, HasBitSetters::options(this), target); + InternalWriteMessage( + 2, _Internal::options(this), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.OneofDescriptorProto) return target; @@ -5930,11 +4397,6 @@ size_t OneofDescriptorProto::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.OneofDescriptorProto) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -5945,7 +4407,7 @@ size_t OneofDescriptorProto::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // optional .google.protobuf.OneofOptions options = 2; @@ -5956,6 +4418,10 @@ size_t OneofDescriptorProto::ByteSizeLong() const { } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -5979,17 +4445,17 @@ void OneofDescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& fro void OneofDescriptorProto::MergeFrom(const OneofDescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofDescriptorProto) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { - set_name(from.name()); + _internal_set_name(from._internal_name()); } if (cached_has_bits & 0x00000002u) { - mutable_options()->PROTOBUF_NAMESPACE_ID::OneofOptions::MergeFrom(from.options()); + _internal_mutable_options()->PROTOBUF_NAMESPACE_ID::OneofOptions::MergeFrom(from._internal_options()); } } } @@ -6009,37 +4475,17 @@ void OneofDescriptorProto::CopyFrom(const OneofDescriptorProto& from) { } bool OneofDescriptorProto::IsInitialized() const { - if (has_options()) { - if (!this->options_->IsInitialized()) return false; + if (_internal_has_options()) { + if (!options_->IsInitialized()) return false; } return true; } -void OneofDescriptorProto::Swap(OneofDescriptorProto* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - OneofDescriptorProto* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void OneofDescriptorProto::UnsafeArenaSwap(OneofDescriptorProto* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); swap(options_, other->options_); } @@ -6052,7 +4498,7 @@ void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* other) { void EnumDescriptorProto_EnumReservedRange::InitAsDefaultInstance() { } -class EnumDescriptorProto_EnumReservedRange::HasBitSetters { +class EnumDescriptorProto_EnumReservedRange::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_start(HasBits* has_bits) { @@ -6063,28 +4509,16 @@ class EnumDescriptorProto_EnumReservedRange::HasBitSetters { } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int EnumDescriptorProto_EnumReservedRange::kStartFieldNumber; -const int EnumDescriptorProto_EnumReservedRange::kEndFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.EnumDescriptorProto.EnumReservedRange) -} EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumDescriptorProto.EnumReservedRange) } EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(const EnumDescriptorProto_EnumReservedRange& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::memcpy(&start_, &from.start_, static_cast(reinterpret_cast(&end_) - reinterpret_cast(&start_)) + sizeof(end_)); @@ -6100,10 +4534,11 @@ void EnumDescriptorProto_EnumReservedRange::SharedCtor() { EnumDescriptorProto_EnumReservedRange::~EnumDescriptorProto_EnumReservedRange() { // @@protoc_insertion_point(destructor:google.protobuf.EnumDescriptorProto.EnumReservedRange) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void EnumDescriptorProto_EnumReservedRange::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void EnumDescriptorProto_EnumReservedRange::ArenaDtor(void* object) { @@ -6134,14 +4569,13 @@ void EnumDescriptorProto_EnumReservedRange::Clear() { reinterpret_cast(&start_)) + sizeof(end_)); } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* EnumDescriptorProto_EnumReservedRange::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -6150,16 +4584,16 @@ const char* EnumDescriptorProto_EnumReservedRange::_InternalParse(const char* pt // optional int32 start = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - HasBitSetters::set_has_start(&has_bits); - start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_start(&has_bits); + start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional int32 end = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - HasBitSetters::set_has_end(&has_bits); - end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_end(&has_bits); + end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -6169,7 +4603,9 @@ const char* EnumDescriptorProto_EnumReservedRange::_InternalParse(const char* pt ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -6183,90 +4619,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool EnumDescriptorProto_EnumReservedRange::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional int32 start = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - HasBitSetters::set_has_start(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &start_))); - } else { - goto handle_unusual; - } - break; - } - // optional int32 end = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - HasBitSetters::set_has_end(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &end_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.EnumDescriptorProto.EnumReservedRange) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.EnumDescriptorProto.EnumReservedRange) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void EnumDescriptorProto_EnumReservedRange::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional int32 start = 1; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->start(), output); - } - - // optional int32 end = 2; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->end(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.EnumDescriptorProto.EnumReservedRange) -} - -::PROTOBUF_NAMESPACE_ID::uint8* EnumDescriptorProto_EnumReservedRange::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* EnumDescriptorProto_EnumReservedRange::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -6274,17 +4629,19 @@ void EnumDescriptorProto_EnumReservedRange::SerializeWithCachedSizes( cached_has_bits = _has_bits_[0]; // optional int32 start = 1; if (cached_has_bits & 0x00000001u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_start(), target); } // optional int32 end = 2; if (cached_has_bits & 0x00000002u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_end(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumDescriptorProto.EnumReservedRange) return target; @@ -6294,11 +4651,6 @@ size_t EnumDescriptorProto_EnumReservedRange::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -6309,17 +4661,21 @@ size_t EnumDescriptorProto_EnumReservedRange::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->start()); + this->_internal_start()); } // optional int32 end = 2; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->end()); + this->_internal_end()); } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -6343,7 +4699,7 @@ void EnumDescriptorProto_EnumReservedRange::MergeFrom(const ::PROTOBUF_NAMESPACE 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); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -6377,31 +4733,16 @@ bool EnumDescriptorProto_EnumReservedRange::IsInitialized() const { return true; } -void EnumDescriptorProto_EnumReservedRange::Swap(EnumDescriptorProto_EnumReservedRange* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - EnumDescriptorProto_EnumReservedRange* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void EnumDescriptorProto_EnumReservedRange::UnsafeArenaSwap(EnumDescriptorProto_EnumReservedRange* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void EnumDescriptorProto_EnumReservedRange::InternalSwap(EnumDescriptorProto_EnumReservedRange* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - swap(start_, other->start_); - swap(end_, other->end_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(EnumDescriptorProto_EnumReservedRange, end_) + + sizeof(EnumDescriptorProto_EnumReservedRange::end_) + - PROTOBUF_FIELD_OFFSET(EnumDescriptorProto_EnumReservedRange, start_)>( + reinterpret_cast(&start_), + reinterpret_cast(&other->start_)); } ::PROTOBUF_NAMESPACE_ID::Metadata EnumDescriptorProto_EnumReservedRange::GetMetadata() const { @@ -6415,7 +4756,7 @@ void EnumDescriptorProto::InitAsDefaultInstance() { PROTOBUF_NAMESPACE_ID::_EnumDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::EnumOptions*>( PROTOBUF_NAMESPACE_ID::EnumOptions::internal_default_instance()); } -class EnumDescriptorProto::HasBitSetters { +class EnumDescriptorProto::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_name(HasBits* has_bits) { @@ -6428,38 +4769,11 @@ class EnumDescriptorProto::HasBitSetters { }; const PROTOBUF_NAMESPACE_ID::EnumOptions& -EnumDescriptorProto::HasBitSetters::options(const EnumDescriptorProto* msg) { +EnumDescriptorProto::_Internal::options(const EnumDescriptorProto* msg) { return *msg->options_; } -void EnumDescriptorProto::unsafe_arena_set_allocated_options( - PROTOBUF_NAMESPACE_ID::EnumOptions* options) { - if (GetArenaNoVirtual() == nullptr) { - delete options_; - } - options_ = options; - if (options) { - _has_bits_[0] |= 0x00000002u; - } else { - _has_bits_[0] &= ~0x00000002u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.EnumDescriptorProto.options) -} -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int EnumDescriptorProto::kNameFieldNumber; -const int EnumDescriptorProto::kValueFieldNumber; -const int EnumDescriptorProto::kOptionsFieldNumber; -const int EnumDescriptorProto::kReservedRangeFieldNumber; -const int EnumDescriptorProto::kReservedNameFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -EnumDescriptorProto::EnumDescriptorProto() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.EnumDescriptorProto) -} EnumDescriptorProto::EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), value_(arena), reserved_range_(arena), reserved_name_(arena) { @@ -6469,18 +4783,17 @@ EnumDescriptorProto::EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) } EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), value_(from.value_), reserved_range_(from.reserved_range_), reserved_name_(from.reserved_name_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_name()) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), - GetArenaNoVirtual()); + if (from._internal_has_name()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } - if (from.has_options()) { + if (from._internal_has_options()) { options_ = new PROTOBUF_NAMESPACE_ID::EnumOptions(*from.options_); } else { options_ = nullptr; @@ -6497,10 +4810,11 @@ void EnumDescriptorProto::SharedCtor() { EnumDescriptorProto::~EnumDescriptorProto() { // @@protoc_insertion_point(destructor:google.protobuf.EnumDescriptorProto) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void EnumDescriptorProto::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete options_; } @@ -6540,14 +4854,13 @@ void EnumDescriptorProto::Clear() { } } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -6556,7 +4869,11 @@ const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME // optional string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.EnumDescriptorProto.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.EnumDescriptorProto.name"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; @@ -6566,16 +4883,16 @@ const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_value(), ptr); + ptr = ctx->ParseMessage(_internal_add_value(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); } else goto handle_unusual; continue; // optional .google.protobuf.EnumOptions options = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ctx->ParseMessage(mutable_options(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_options(), ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -6585,10 +4902,10 @@ const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_reserved_range(), ptr); + ptr = ctx->ParseMessage(_internal_add_reserved_range(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); } else goto handle_unusual; continue; // repeated string reserved_name = 5; @@ -6597,10 +4914,14 @@ const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME ptr -= 1; do { ptr += 1; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(add_reserved_name(), ptr, ctx, "google.protobuf.EnumDescriptorProto.reserved_name"); + auto str = _internal_add_reserved_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.EnumDescriptorProto.reserved_name"); + #endif // !NDEBUG CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 42); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); } else goto handle_unusual; continue; default: { @@ -6609,7 +4930,9 @@ const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAME ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -6623,162 +4946,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool EnumDescriptorProto::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.EnumDescriptorProto) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.EnumDescriptorProto.name"); - } else { - goto handle_unusual; - } - break; - } - // repeated .google.protobuf.EnumValueDescriptorProto value = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_value())); - } else { - goto handle_unusual; - } - break; - } - - // optional .google.protobuf.EnumOptions options = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_options())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_reserved_range())); - } else { - goto handle_unusual; - } - break; - } - - // repeated string reserved_name = 5; - case 5: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->add_reserved_name())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->reserved_name(this->reserved_name_size() - 1).data(), - static_cast(this->reserved_name(this->reserved_name_size() - 1).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.EnumDescriptorProto.reserved_name"); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.EnumDescriptorProto) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.EnumDescriptorProto) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void EnumDescriptorProto::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.EnumDescriptorProto) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.EnumDescriptorProto.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // repeated .google.protobuf.EnumValueDescriptorProto value = 2; - for (unsigned int i = 0, - n = static_cast(this->value_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, - this->value(static_cast(i)), - output); - } - - // optional .google.protobuf.EnumOptions options = 3; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, HasBitSetters::options(this), output); - } - - // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; - for (unsigned int i = 0, - n = static_cast(this->reserved_range_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, - this->reserved_range(static_cast(i)), - output); - } - - // repeated string reserved_name = 5; - for (int i = 0, n = this->reserved_name_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->reserved_name(i).data(), static_cast(this->reserved_name(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.EnumDescriptorProto.reserved_name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( - 5, this->reserved_name(i), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.EnumDescriptorProto) -} - -::PROTOBUF_NAMESPACE_ID::uint8* EnumDescriptorProto::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* EnumDescriptorProto::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -6787,50 +4957,50 @@ void EnumDescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.EnumDescriptorProto.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // repeated .google.protobuf.EnumValueDescriptorProto value = 2; for (unsigned int i = 0, - n = static_cast(this->value_size()); i < n; i++) { + n = static_cast(this->_internal_value_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 2, this->value(static_cast(i)), target); + InternalWriteMessage(2, this->_internal_value(i), target, stream); } // optional .google.protobuf.EnumOptions options = 3; if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 3, HasBitSetters::options(this), target); + InternalWriteMessage( + 3, _Internal::options(this), target, stream); } // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; for (unsigned int i = 0, - n = static_cast(this->reserved_range_size()); i < n; i++) { + n = static_cast(this->_internal_reserved_range_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 4, this->reserved_range(static_cast(i)), target); + InternalWriteMessage(4, this->_internal_reserved_range(i), target, stream); } // repeated string reserved_name = 5; - for (int i = 0, n = this->reserved_name_size(); i < n; i++) { + for (int i = 0, n = this->_internal_reserved_name_size(); i < n; i++) { + const auto& s = this->_internal_reserved_name(i); ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->reserved_name(i).data(), static_cast(this->reserved_name(i).length()), + s.data(), static_cast(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.EnumDescriptorProto.reserved_name"); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteStringToArray(5, this->reserved_name(i), target); + target = stream->WriteString(5, s, target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumDescriptorProto) return target; @@ -6840,43 +5010,30 @@ size_t EnumDescriptorProto::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumDescriptorProto) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.EnumValueDescriptorProto value = 2; - { - unsigned int count = static_cast(this->value_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->value(static_cast(i))); - } + total_size += 1UL * this->_internal_value_size(); + for (const auto& msg : this->value_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; - { - unsigned int count = static_cast(this->reserved_range_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->reserved_range(static_cast(i))); - } + total_size += 1UL * this->_internal_reserved_range_size(); + for (const auto& msg : this->reserved_range_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated string reserved_name = 5; total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->reserved_name_size()); - for (int i = 0, n = this->reserved_name_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(reserved_name_.size()); + for (int i = 0, n = reserved_name_.size(); i < n; i++) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->reserved_name(i)); + reserved_name_.Get(i)); } cached_has_bits = _has_bits_[0]; @@ -6885,7 +5042,7 @@ size_t EnumDescriptorProto::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // optional .google.protobuf.EnumOptions options = 3; @@ -6896,6 +5053,10 @@ size_t EnumDescriptorProto::ByteSizeLong() const { } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -6919,7 +5080,7 @@ void EnumDescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumDescriptorProto) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -6929,10 +5090,10 @@ void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) { cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { - set_name(from.name()); + _internal_set_name(from._internal_name()); } if (cached_has_bits & 0x00000002u) { - mutable_options()->PROTOBUF_NAMESPACE_ID::EnumOptions::MergeFrom(from.options()); + _internal_mutable_options()->PROTOBUF_NAMESPACE_ID::EnumOptions::MergeFrom(from._internal_options()); } } } @@ -6952,41 +5113,21 @@ void EnumDescriptorProto::CopyFrom(const EnumDescriptorProto& from) { } bool EnumDescriptorProto::IsInitialized() const { - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->value())) return false; - if (has_options()) { - if (!this->options_->IsInitialized()) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(value_)) return false; + if (_internal_has_options()) { + if (!options_->IsInitialized()) return false; } return true; } -void EnumDescriptorProto::Swap(EnumDescriptorProto* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - EnumDescriptorProto* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void EnumDescriptorProto::UnsafeArenaSwap(EnumDescriptorProto* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&value_)->InternalSwap(CastToBase(&other->value_)); - CastToBase(&reserved_range_)->InternalSwap(CastToBase(&other->reserved_range_)); - reserved_name_.InternalSwap(CastToBase(&other->reserved_name_)); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + value_.InternalSwap(&other->value_); + reserved_range_.InternalSwap(&other->reserved_range_); + reserved_name_.InternalSwap(&other->reserved_name_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); swap(options_, other->options_); } @@ -7001,7 +5142,7 @@ void EnumValueDescriptorProto::InitAsDefaultInstance() { PROTOBUF_NAMESPACE_ID::_EnumValueDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::EnumValueOptions*>( PROTOBUF_NAMESPACE_ID::EnumValueOptions::internal_default_instance()); } -class EnumValueDescriptorProto::HasBitSetters { +class EnumValueDescriptorProto::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_name(HasBits* has_bits) { @@ -7017,51 +5158,25 @@ class EnumValueDescriptorProto::HasBitSetters { }; const PROTOBUF_NAMESPACE_ID::EnumValueOptions& -EnumValueDescriptorProto::HasBitSetters::options(const EnumValueDescriptorProto* msg) { +EnumValueDescriptorProto::_Internal::options(const EnumValueDescriptorProto* msg) { return *msg->options_; } -void EnumValueDescriptorProto::unsafe_arena_set_allocated_options( - PROTOBUF_NAMESPACE_ID::EnumValueOptions* options) { - if (GetArenaNoVirtual() == nullptr) { - delete options_; - } - options_ = options; - if (options) { - _has_bits_[0] |= 0x00000002u; - } else { - _has_bits_[0] &= ~0x00000002u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.EnumValueDescriptorProto.options) -} -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int EnumValueDescriptorProto::kNameFieldNumber; -const int EnumValueDescriptorProto::kNumberFieldNumber; -const int EnumValueDescriptorProto::kOptionsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -EnumValueDescriptorProto::EnumValueDescriptorProto() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.EnumValueDescriptorProto) -} EnumValueDescriptorProto::EnumValueDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValueDescriptorProto) } EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProto& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_name()) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), - GetArenaNoVirtual()); + if (from._internal_has_name()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } - if (from.has_options()) { + if (from._internal_has_options()) { options_ = new PROTOBUF_NAMESPACE_ID::EnumValueOptions(*from.options_); } else { options_ = nullptr; @@ -7081,10 +5196,11 @@ void EnumValueDescriptorProto::SharedCtor() { EnumValueDescriptorProto::~EnumValueDescriptorProto() { // @@protoc_insertion_point(destructor:google.protobuf.EnumValueDescriptorProto) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void EnumValueDescriptorProto::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete options_; } @@ -7122,14 +5238,13 @@ void EnumValueDescriptorProto::Clear() { } number_ = 0; _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* EnumValueDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -7138,22 +5253,26 @@ const char* EnumValueDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF // optional string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.EnumValueDescriptorProto.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.EnumValueDescriptorProto.name"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional int32 number = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - HasBitSetters::set_has_number(&has_bits); - number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_number(&has_bits); + number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional .google.protobuf.EnumValueOptions options = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ctx->ParseMessage(mutable_options(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_options(), ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -7163,7 +5282,9 @@ const char* EnumValueDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -7177,114 +5298,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool EnumValueDescriptorProto::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.EnumValueDescriptorProto) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.EnumValueDescriptorProto.name"); - } else { - goto handle_unusual; - } - break; - } - // optional int32 number = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - HasBitSetters::set_has_number(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &number_))); - } else { - goto handle_unusual; - } - break; - } - - // optional .google.protobuf.EnumValueOptions options = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_options())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.EnumValueDescriptorProto) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValueDescriptorProto) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void EnumValueDescriptorProto::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValueDescriptorProto) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.EnumValueDescriptorProto.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // optional int32 number = 2; - if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->number(), output); - } - - // optional .google.protobuf.EnumValueOptions options = 3; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, HasBitSetters::options(this), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueDescriptorProto) -} - -::PROTOBUF_NAMESPACE_ID::uint8* EnumValueDescriptorProto::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* EnumValueDescriptorProto::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueDescriptorProto) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -7293,29 +5309,30 @@ void EnumValueDescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.EnumValueDescriptorProto.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // optional int32 number = 2; if (cached_has_bits & 0x00000004u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->number(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_number(), target); } // optional .google.protobuf.EnumValueOptions options = 3; if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 3, HasBitSetters::options(this), target); + InternalWriteMessage( + 3, _Internal::options(this), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueDescriptorProto) return target; @@ -7325,11 +5342,6 @@ size_t EnumValueDescriptorProto::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValueDescriptorProto) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -7340,7 +5352,7 @@ size_t EnumValueDescriptorProto::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // optional .google.protobuf.EnumValueOptions options = 3; @@ -7354,10 +5366,14 @@ size_t EnumValueDescriptorProto::ByteSizeLong() const { if (cached_has_bits & 0x00000004u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->number()); + this->_internal_number()); } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -7381,17 +5397,17 @@ void EnumValueDescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValueDescriptorProto) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x00000007u) { if (cached_has_bits & 0x00000001u) { - set_name(from.name()); + _internal_set_name(from._internal_name()); } if (cached_has_bits & 0x00000002u) { - mutable_options()->PROTOBUF_NAMESPACE_ID::EnumValueOptions::MergeFrom(from.options()); + _internal_mutable_options()->PROTOBUF_NAMESPACE_ID::EnumValueOptions::MergeFrom(from._internal_options()); } if (cached_has_bits & 0x00000004u) { number_ = from.number_; @@ -7415,39 +5431,23 @@ void EnumValueDescriptorProto::CopyFrom(const EnumValueDescriptorProto& from) { } bool EnumValueDescriptorProto::IsInitialized() const { - if (has_options()) { - if (!this->options_->IsInitialized()) return false; + if (_internal_has_options()) { + if (!options_->IsInitialized()) return false; } return true; } -void EnumValueDescriptorProto::Swap(EnumValueDescriptorProto* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - EnumValueDescriptorProto* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void EnumValueDescriptorProto::UnsafeArenaSwap(EnumValueDescriptorProto* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void EnumValueDescriptorProto::InternalSwap(EnumValueDescriptorProto* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(options_, other->options_); - swap(number_, other->number_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(EnumValueDescriptorProto, number_) + + sizeof(EnumValueDescriptorProto::number_) + - PROTOBUF_FIELD_OFFSET(EnumValueDescriptorProto, options_)>( + reinterpret_cast(&options_), + reinterpret_cast(&other->options_)); } ::PROTOBUF_NAMESPACE_ID::Metadata EnumValueDescriptorProto::GetMetadata() const { @@ -7461,7 +5461,7 @@ void ServiceDescriptorProto::InitAsDefaultInstance() { PROTOBUF_NAMESPACE_ID::_ServiceDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::ServiceOptions*>( PROTOBUF_NAMESPACE_ID::ServiceOptions::internal_default_instance()); } -class ServiceDescriptorProto::HasBitSetters { +class ServiceDescriptorProto::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_name(HasBits* has_bits) { @@ -7474,36 +5474,11 @@ class ServiceDescriptorProto::HasBitSetters { }; const PROTOBUF_NAMESPACE_ID::ServiceOptions& -ServiceDescriptorProto::HasBitSetters::options(const ServiceDescriptorProto* msg) { +ServiceDescriptorProto::_Internal::options(const ServiceDescriptorProto* msg) { return *msg->options_; } -void ServiceDescriptorProto::unsafe_arena_set_allocated_options( - PROTOBUF_NAMESPACE_ID::ServiceOptions* options) { - if (GetArenaNoVirtual() == nullptr) { - delete options_; - } - options_ = options; - if (options) { - _has_bits_[0] |= 0x00000002u; - } else { - _has_bits_[0] &= ~0x00000002u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.ServiceDescriptorProto.options) -} -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ServiceDescriptorProto::kNameFieldNumber; -const int ServiceDescriptorProto::kMethodFieldNumber; -const int ServiceDescriptorProto::kOptionsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -ServiceDescriptorProto::ServiceDescriptorProto() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.ServiceDescriptorProto) -} ServiceDescriptorProto::ServiceDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), method_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -7511,16 +5486,15 @@ ServiceDescriptorProto::ServiceDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* a } ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), method_(from.method_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_name()) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), - GetArenaNoVirtual()); + if (from._internal_has_name()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } - if (from.has_options()) { + if (from._internal_has_options()) { options_ = new PROTOBUF_NAMESPACE_ID::ServiceOptions(*from.options_); } else { options_ = nullptr; @@ -7537,10 +5511,11 @@ void ServiceDescriptorProto::SharedCtor() { ServiceDescriptorProto::~ServiceDescriptorProto() { // @@protoc_insertion_point(destructor:google.protobuf.ServiceDescriptorProto) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void ServiceDescriptorProto::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete options_; } @@ -7578,14 +5553,13 @@ void ServiceDescriptorProto::Clear() { } } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* ServiceDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -7594,7 +5568,11 @@ const char* ServiceDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_N // optional string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.ServiceDescriptorProto.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.ServiceDescriptorProto.name"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; @@ -7604,16 +5582,16 @@ const char* ServiceDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_N ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_method(), ptr); + ptr = ctx->ParseMessage(_internal_add_method(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); } else goto handle_unusual; continue; // optional .google.protobuf.ServiceOptions options = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ctx->ParseMessage(mutable_options(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_options(), ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -7623,7 +5601,9 @@ const char* ServiceDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_N ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -7637,116 +5617,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool ServiceDescriptorProto::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.ServiceDescriptorProto) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.ServiceDescriptorProto.name"); - } else { - goto handle_unusual; - } - break; - } - // repeated .google.protobuf.MethodDescriptorProto method = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_method())); - } else { - goto handle_unusual; - } - break; - } - - // optional .google.protobuf.ServiceOptions options = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_options())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.ServiceDescriptorProto) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.ServiceDescriptorProto) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void ServiceDescriptorProto::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.ServiceDescriptorProto) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.ServiceDescriptorProto.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // repeated .google.protobuf.MethodDescriptorProto method = 2; - for (unsigned int i = 0, - n = static_cast(this->method_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, - this->method(static_cast(i)), - output); - } - - // optional .google.protobuf.ServiceOptions options = 3; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, HasBitSetters::options(this), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceDescriptorProto) -} - -::PROTOBUF_NAMESPACE_ID::uint8* ServiceDescriptorProto::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* ServiceDescriptorProto::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceDescriptorProto) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -7755,32 +5628,32 @@ void ServiceDescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.ServiceDescriptorProto.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // repeated .google.protobuf.MethodDescriptorProto method = 2; for (unsigned int i = 0, - n = static_cast(this->method_size()); i < n; i++) { + n = static_cast(this->_internal_method_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 2, this->method(static_cast(i)), target); + InternalWriteMessage(2, this->_internal_method(i), target, stream); } // optional .google.protobuf.ServiceOptions options = 3; if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 3, HasBitSetters::options(this), target); + InternalWriteMessage( + 3, _Internal::options(this), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceDescriptorProto) return target; @@ -7790,24 +5663,15 @@ size_t ServiceDescriptorProto::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ServiceDescriptorProto) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.MethodDescriptorProto method = 2; - { - unsigned int count = static_cast(this->method_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->method(static_cast(i))); - } + total_size += 1UL * this->_internal_method_size(); + for (const auto& msg : this->method_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } cached_has_bits = _has_bits_[0]; @@ -7816,7 +5680,7 @@ size_t ServiceDescriptorProto::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // optional .google.protobuf.ServiceOptions options = 3; @@ -7827,6 +5691,10 @@ size_t ServiceDescriptorProto::ByteSizeLong() const { } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -7850,7 +5718,7 @@ void ServiceDescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& f void ServiceDescriptorProto::MergeFrom(const ServiceDescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ServiceDescriptorProto) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -7858,10 +5726,10 @@ void ServiceDescriptorProto::MergeFrom(const ServiceDescriptorProto& from) { cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { - set_name(from.name()); + _internal_set_name(from._internal_name()); } if (cached_has_bits & 0x00000002u) { - mutable_options()->PROTOBUF_NAMESPACE_ID::ServiceOptions::MergeFrom(from.options()); + _internal_mutable_options()->PROTOBUF_NAMESPACE_ID::ServiceOptions::MergeFrom(from._internal_options()); } } } @@ -7881,39 +5749,19 @@ void ServiceDescriptorProto::CopyFrom(const ServiceDescriptorProto& from) { } bool ServiceDescriptorProto::IsInitialized() const { - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->method())) return false; - if (has_options()) { - if (!this->options_->IsInitialized()) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(method_)) return false; + if (_internal_has_options()) { + if (!options_->IsInitialized()) return false; } return true; } -void ServiceDescriptorProto::Swap(ServiceDescriptorProto* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - ServiceDescriptorProto* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void ServiceDescriptorProto::UnsafeArenaSwap(ServiceDescriptorProto* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void ServiceDescriptorProto::InternalSwap(ServiceDescriptorProto* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&method_)->InternalSwap(CastToBase(&other->method_)); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + method_.InternalSwap(&other->method_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); swap(options_, other->options_); } @@ -7928,7 +5776,7 @@ void MethodDescriptorProto::InitAsDefaultInstance() { PROTOBUF_NAMESPACE_ID::_MethodDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::MethodOptions*>( PROTOBUF_NAMESPACE_ID::MethodOptions::internal_default_instance()); } -class MethodDescriptorProto::HasBitSetters { +class MethodDescriptorProto::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_name(HasBits* has_bits) { @@ -7953,64 +5801,35 @@ class MethodDescriptorProto::HasBitSetters { }; const PROTOBUF_NAMESPACE_ID::MethodOptions& -MethodDescriptorProto::HasBitSetters::options(const MethodDescriptorProto* msg) { +MethodDescriptorProto::_Internal::options(const MethodDescriptorProto* msg) { return *msg->options_; } -void MethodDescriptorProto::unsafe_arena_set_allocated_options( - PROTOBUF_NAMESPACE_ID::MethodOptions* options) { - if (GetArenaNoVirtual() == nullptr) { - delete options_; - } - options_ = options; - if (options) { - _has_bits_[0] |= 0x00000008u; - } else { - _has_bits_[0] &= ~0x00000008u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.MethodDescriptorProto.options) -} -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int MethodDescriptorProto::kNameFieldNumber; -const int MethodDescriptorProto::kInputTypeFieldNumber; -const int MethodDescriptorProto::kOutputTypeFieldNumber; -const int MethodDescriptorProto::kOptionsFieldNumber; -const int MethodDescriptorProto::kClientStreamingFieldNumber; -const int MethodDescriptorProto::kServerStreamingFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -MethodDescriptorProto::MethodDescriptorProto() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.MethodDescriptorProto) -} MethodDescriptorProto::MethodDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.MethodDescriptorProto) } MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_name()) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), - GetArenaNoVirtual()); + if (from._internal_has_name()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } input_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_input_type()) { - input_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.input_type(), - GetArenaNoVirtual()); + if (from._internal_has_input_type()) { + input_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_input_type(), + GetArena()); } output_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_output_type()) { - output_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.output_type(), - GetArenaNoVirtual()); + if (from._internal_has_output_type()) { + output_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_output_type(), + GetArena()); } - if (from.has_options()) { + if (from._internal_has_options()) { options_ = new PROTOBUF_NAMESPACE_ID::MethodOptions(*from.options_); } else { options_ = nullptr; @@ -8034,10 +5853,11 @@ void MethodDescriptorProto::SharedCtor() { MethodDescriptorProto::~MethodDescriptorProto() { // @@protoc_insertion_point(destructor:google.protobuf.MethodDescriptorProto) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void MethodDescriptorProto::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); input_type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); output_type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -8085,14 +5905,13 @@ void MethodDescriptorProto::Clear() { reinterpret_cast(&server_streaming_) - reinterpret_cast(&client_streaming_)) + sizeof(server_streaming_)); _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -8101,44 +5920,56 @@ const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NA // optional string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.MethodDescriptorProto.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.MethodDescriptorProto.name"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional string input_type = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_input_type(), ptr, ctx, "google.protobuf.MethodDescriptorProto.input_type"); + auto str = _internal_mutable_input_type(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.MethodDescriptorProto.input_type"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional string output_type = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_output_type(), ptr, ctx, "google.protobuf.MethodDescriptorProto.output_type"); + auto str = _internal_mutable_output_type(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.MethodDescriptorProto.output_type"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional .google.protobuf.MethodOptions options = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr = ctx->ParseMessage(mutable_options(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_options(), ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional bool client_streaming = 5 [default = false]; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - HasBitSetters::set_has_client_streaming(&has_bits); - client_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_client_streaming(&has_bits); + client_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional bool server_streaming = 6 [default = false]; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - HasBitSetters::set_has_server_streaming(&has_bits); - server_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_server_streaming(&has_bits); + server_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -8148,7 +5979,9 @@ const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NA ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -8162,182 +5995,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool MethodDescriptorProto::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.MethodDescriptorProto) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.MethodDescriptorProto.name"); - } else { - goto handle_unusual; - } - break; - } - // optional string input_type = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_input_type())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->input_type().data(), static_cast(this->input_type().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.MethodDescriptorProto.input_type"); - } else { - goto handle_unusual; - } - break; - } - - // optional string output_type = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_output_type())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->output_type().data(), static_cast(this->output_type().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.MethodDescriptorProto.output_type"); - } else { - goto handle_unusual; - } - break; - } - - // optional .google.protobuf.MethodOptions options = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_options())); - } else { - goto handle_unusual; - } - break; - } - - // optional bool client_streaming = 5 [default = false]; - case 5: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { - HasBitSetters::set_has_client_streaming(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &client_streaming_))); - } else { - goto handle_unusual; - } - break; - } - - // optional bool server_streaming = 6 [default = false]; - case 6: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { - HasBitSetters::set_has_server_streaming(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &server_streaming_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.MethodDescriptorProto) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.MethodDescriptorProto) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void MethodDescriptorProto::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.MethodDescriptorProto) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional string name = 1; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.MethodDescriptorProto.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // optional string input_type = 2; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->input_type().data(), static_cast(this->input_type().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.MethodDescriptorProto.input_type"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 2, this->input_type(), output); - } - - // optional string output_type = 3; - if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->output_type().data(), static_cast(this->output_type().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.MethodDescriptorProto.output_type"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 3, this->output_type(), output); - } - - // optional .google.protobuf.MethodOptions options = 4; - if (cached_has_bits & 0x00000008u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, HasBitSetters::options(this), output); - } - - // optional bool client_streaming = 5 [default = false]; - if (cached_has_bits & 0x00000010u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(5, this->client_streaming(), output); - } - - // optional bool server_streaming = 6 [default = false]; - if (cached_has_bits & 0x00000020u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(6, this->server_streaming(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.MethodDescriptorProto) -} - -::PROTOBUF_NAMESPACE_ID::uint8* MethodDescriptorProto::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* MethodDescriptorProto::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodDescriptorProto) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -8346,56 +6006,56 @@ void MethodDescriptorProto::SerializeWithCachedSizes( // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // optional string input_type = 2; if (cached_has_bits & 0x00000002u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->input_type().data(), static_cast(this->input_type().length()), + this->_internal_input_type().data(), static_cast(this->_internal_input_type().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.input_type"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 2, this->input_type(), target); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_input_type(), target); } // optional string output_type = 3; if (cached_has_bits & 0x00000004u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->output_type().data(), static_cast(this->output_type().length()), + this->_internal_output_type().data(), static_cast(this->_internal_output_type().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.output_type"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 3, this->output_type(), target); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_output_type(), target); } // optional .google.protobuf.MethodOptions options = 4; if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 4, HasBitSetters::options(this), target); + InternalWriteMessage( + 4, _Internal::options(this), target, stream); } // optional bool client_streaming = 5 [default = false]; if (cached_has_bits & 0x00000010u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->client_streaming(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_client_streaming(), target); } // optional bool server_streaming = 6 [default = false]; if (cached_has_bits & 0x00000020u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->server_streaming(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_server_streaming(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodDescriptorProto) return target; @@ -8405,11 +6065,6 @@ size_t MethodDescriptorProto::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.MethodDescriptorProto) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -8420,21 +6075,21 @@ size_t MethodDescriptorProto::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // optional string input_type = 2; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->input_type()); + this->_internal_input_type()); } // optional string output_type = 3; if (cached_has_bits & 0x00000004u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->output_type()); + this->_internal_output_type()); } // optional .google.protobuf.MethodOptions options = 4; @@ -8455,6 +6110,10 @@ size_t MethodDescriptorProto::ByteSizeLong() const { } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -8478,23 +6137,23 @@ void MethodDescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& fr void MethodDescriptorProto::MergeFrom(const MethodDescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MethodDescriptorProto) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x0000003fu) { if (cached_has_bits & 0x00000001u) { - set_name(from.name()); + _internal_set_name(from._internal_name()); } if (cached_has_bits & 0x00000002u) { - set_input_type(from.input_type()); + _internal_set_input_type(from._internal_input_type()); } if (cached_has_bits & 0x00000004u) { - set_output_type(from.output_type()); + _internal_set_output_type(from._internal_output_type()); } if (cached_has_bits & 0x00000008u) { - mutable_options()->PROTOBUF_NAMESPACE_ID::MethodOptions::MergeFrom(from.options()); + _internal_mutable_options()->PROTOBUF_NAMESPACE_ID::MethodOptions::MergeFrom(from._internal_options()); } if (cached_has_bits & 0x00000010u) { client_streaming_ = from.client_streaming_; @@ -8521,44 +6180,25 @@ void MethodDescriptorProto::CopyFrom(const MethodDescriptorProto& from) { } bool MethodDescriptorProto::IsInitialized() const { - if (has_options()) { - if (!this->options_->IsInitialized()) return false; + if (_internal_has_options()) { + if (!options_->IsInitialized()) return false; } return true; } -void MethodDescriptorProto::Swap(MethodDescriptorProto* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - MethodDescriptorProto* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void MethodDescriptorProto::UnsafeArenaSwap(MethodDescriptorProto* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void MethodDescriptorProto::InternalSwap(MethodDescriptorProto* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - input_type_.Swap(&other->input_type_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - output_type_.Swap(&other->output_type_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(options_, other->options_); - swap(client_streaming_, other->client_streaming_); - swap(server_streaming_, other->server_streaming_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + input_type_.Swap(&other->input_type_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + output_type_.Swap(&other->output_type_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(MethodDescriptorProto, server_streaming_) + + sizeof(MethodDescriptorProto::server_streaming_) + - PROTOBUF_FIELD_OFFSET(MethodDescriptorProto, options_)>( + reinterpret_cast(&options_), + reinterpret_cast(&other->options_)); } ::PROTOBUF_NAMESPACE_ID::Metadata MethodDescriptorProto::GetMetadata() const { @@ -8570,7 +6210,7 @@ void MethodDescriptorProto::InternalSwap(MethodDescriptorProto* other) { void FileOptions::InitAsDefaultInstance() { } -class FileOptions::HasBitSetters { +class FileOptions::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_java_package(HasBits* has_bits) { @@ -8589,7 +6229,7 @@ class FileOptions::HasBitSetters { (*has_bits)[0] |= 4096u; } static void set_has_optimize_for(HasBits* has_bits) { - (*has_bits)[0] |= 524288u; + (*has_bits)[0] |= 262144u; } static void set_has_go_package(HasBits* has_bits) { (*has_bits)[0] |= 4u; @@ -8610,7 +6250,7 @@ class FileOptions::HasBitSetters { (*has_bits)[0] |= 131072u; } static void set_has_cc_enable_arenas(HasBits* has_bits) { - (*has_bits)[0] |= 262144u; + (*has_bits)[0] |= 524288u; } static void set_has_objc_class_prefix(HasBits* has_bits) { (*has_bits)[0] |= 8u; @@ -8635,39 +6275,9 @@ class FileOptions::HasBitSetters { } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int FileOptions::kJavaPackageFieldNumber; -const int FileOptions::kJavaOuterClassnameFieldNumber; -const int FileOptions::kJavaMultipleFilesFieldNumber; -const int FileOptions::kJavaGenerateEqualsAndHashFieldNumber; -const int FileOptions::kJavaStringCheckUtf8FieldNumber; -const int FileOptions::kOptimizeForFieldNumber; -const int FileOptions::kGoPackageFieldNumber; -const int FileOptions::kCcGenericServicesFieldNumber; -const int FileOptions::kJavaGenericServicesFieldNumber; -const int FileOptions::kPyGenericServicesFieldNumber; -const int FileOptions::kPhpGenericServicesFieldNumber; -const int FileOptions::kDeprecatedFieldNumber; -const int FileOptions::kCcEnableArenasFieldNumber; -const int FileOptions::kObjcClassPrefixFieldNumber; -const int FileOptions::kCsharpNamespaceFieldNumber; -const int FileOptions::kSwiftPrefixFieldNumber; -const int FileOptions::kPhpClassPrefixFieldNumber; -const int FileOptions::kPhpNamespaceFieldNumber; -const int FileOptions::kPhpMetadataNamespaceFieldNumber; -const int FileOptions::kRubyPackageFieldNumber; -const int FileOptions::kUninterpretedOptionFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -FileOptions::FileOptions() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.FileOptions) -} FileOptions::FileOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), _extensions_(arena), - _internal_metadata_(arena), uninterpreted_option_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -8675,64 +6285,63 @@ FileOptions::FileOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) } FileOptions::FileOptions(const FileOptions& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _extensions_.MergeFrom(from._extensions_); java_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_java_package()) { - java_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.java_package(), - GetArenaNoVirtual()); + if (from._internal_has_java_package()) { + java_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_java_package(), + GetArena()); } java_outer_classname_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_java_outer_classname()) { - java_outer_classname_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.java_outer_classname(), - GetArenaNoVirtual()); + if (from._internal_has_java_outer_classname()) { + java_outer_classname_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_java_outer_classname(), + GetArena()); } go_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_go_package()) { - go_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.go_package(), - GetArenaNoVirtual()); + if (from._internal_has_go_package()) { + go_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_go_package(), + GetArena()); } objc_class_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_objc_class_prefix()) { - objc_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.objc_class_prefix(), - GetArenaNoVirtual()); + if (from._internal_has_objc_class_prefix()) { + objc_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_objc_class_prefix(), + GetArena()); } csharp_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_csharp_namespace()) { - csharp_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.csharp_namespace(), - GetArenaNoVirtual()); + if (from._internal_has_csharp_namespace()) { + csharp_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_csharp_namespace(), + GetArena()); } swift_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_swift_prefix()) { - swift_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.swift_prefix(), - GetArenaNoVirtual()); + if (from._internal_has_swift_prefix()) { + swift_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_swift_prefix(), + GetArena()); } php_class_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_php_class_prefix()) { - php_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.php_class_prefix(), - GetArenaNoVirtual()); + if (from._internal_has_php_class_prefix()) { + php_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_php_class_prefix(), + GetArena()); } php_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_php_namespace()) { - php_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.php_namespace(), - GetArenaNoVirtual()); + if (from._internal_has_php_namespace()) { + php_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_php_namespace(), + GetArena()); } php_metadata_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_php_metadata_namespace()) { - php_metadata_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.php_metadata_namespace(), - GetArenaNoVirtual()); + if (from._internal_has_php_metadata_namespace()) { + php_metadata_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_php_metadata_namespace(), + GetArena()); } ruby_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_ruby_package()) { - ruby_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.ruby_package(), - GetArenaNoVirtual()); + if (from._internal_has_ruby_package()) { + ruby_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_ruby_package(), + GetArena()); } ::memcpy(&java_multiple_files_, &from.java_multiple_files_, - static_cast(reinterpret_cast(&optimize_for_) - - reinterpret_cast(&java_multiple_files_)) + sizeof(optimize_for_)); + static_cast(reinterpret_cast(&cc_enable_arenas_) - + reinterpret_cast(&java_multiple_files_)) + sizeof(cc_enable_arenas_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.FileOptions) } @@ -8749,18 +6358,20 @@ void FileOptions::SharedCtor() { php_metadata_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ruby_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&java_multiple_files_, 0, static_cast( - reinterpret_cast(&cc_enable_arenas_) - - reinterpret_cast(&java_multiple_files_)) + sizeof(cc_enable_arenas_)); + reinterpret_cast(&deprecated_) - + reinterpret_cast(&java_multiple_files_)) + sizeof(deprecated_)); optimize_for_ = 1; + cc_enable_arenas_ = true; } FileOptions::~FileOptions() { // @@protoc_insertion_point(destructor:google.protobuf.FileOptions) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void FileOptions::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); java_package_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); java_outer_classname_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); go_package_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -8838,19 +6449,19 @@ void FileOptions::Clear() { } if (cached_has_bits & 0x000f0000u) { ::memset(&php_generic_services_, 0, static_cast( - reinterpret_cast(&cc_enable_arenas_) - - reinterpret_cast(&php_generic_services_)) + sizeof(cc_enable_arenas_)); + reinterpret_cast(&deprecated_) - + reinterpret_cast(&php_generic_services_)) + sizeof(deprecated_)); optimize_for_ = 1; + cc_enable_arenas_ = true; } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -8859,24 +6470,32 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID // optional string java_package = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_java_package(), ptr, ctx, "google.protobuf.FileOptions.java_package"); + auto str = _internal_mutable_java_package(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FileOptions.java_package"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional string java_outer_classname = 8; case 8: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_java_outer_classname(), ptr, ctx, "google.protobuf.FileOptions.java_outer_classname"); + auto str = _internal_mutable_java_outer_classname(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FileOptions.java_outer_classname"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; case 9: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); if (PROTOBUF_PREDICT_TRUE(PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode_IsValid(val))) { - set_optimize_for(static_cast(val)); + _internal_set_optimize_for(static_cast(val)); } else { ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(9, val, mutable_unknown_fields()); } @@ -8885,128 +6504,160 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID // optional bool java_multiple_files = 10 [default = false]; case 10: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { - HasBitSetters::set_has_java_multiple_files(&has_bits); - java_multiple_files_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_java_multiple_files(&has_bits); + java_multiple_files_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional string go_package = 11; case 11: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_go_package(), ptr, ctx, "google.protobuf.FileOptions.go_package"); + auto str = _internal_mutable_go_package(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FileOptions.go_package"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional bool cc_generic_services = 16 [default = false]; case 16: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) { - HasBitSetters::set_has_cc_generic_services(&has_bits); - cc_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_cc_generic_services(&has_bits); + cc_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional bool java_generic_services = 17 [default = false]; case 17: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { - HasBitSetters::set_has_java_generic_services(&has_bits); - java_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_java_generic_services(&has_bits); + java_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional bool py_generic_services = 18 [default = false]; case 18: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) { - HasBitSetters::set_has_py_generic_services(&has_bits); - py_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_py_generic_services(&has_bits); + py_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional bool java_generate_equals_and_hash = 20 [deprecated = true]; case 20: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) { - HasBitSetters::set_has_java_generate_equals_and_hash(&has_bits); - java_generate_equals_and_hash_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_java_generate_equals_and_hash(&has_bits); + java_generate_equals_and_hash_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional bool deprecated = 23 [default = false]; case 23: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) { - HasBitSetters::set_has_deprecated(&has_bits); - deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_deprecated(&has_bits); + deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional bool java_string_check_utf8 = 27 [default = false]; case 27: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 216)) { - HasBitSetters::set_has_java_string_check_utf8(&has_bits); - java_string_check_utf8_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_java_string_check_utf8(&has_bits); + java_string_check_utf8_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // optional bool cc_enable_arenas = 31 [default = false]; + // optional bool cc_enable_arenas = 31 [default = true]; case 31: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 248)) { - HasBitSetters::set_has_cc_enable_arenas(&has_bits); - cc_enable_arenas_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_cc_enable_arenas(&has_bits); + cc_enable_arenas_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional string objc_class_prefix = 36; case 36: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_objc_class_prefix(), ptr, ctx, "google.protobuf.FileOptions.objc_class_prefix"); + auto str = _internal_mutable_objc_class_prefix(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FileOptions.objc_class_prefix"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional string csharp_namespace = 37; case 37: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_csharp_namespace(), ptr, ctx, "google.protobuf.FileOptions.csharp_namespace"); + auto str = _internal_mutable_csharp_namespace(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FileOptions.csharp_namespace"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional string swift_prefix = 39; case 39: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_swift_prefix(), ptr, ctx, "google.protobuf.FileOptions.swift_prefix"); + auto str = _internal_mutable_swift_prefix(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FileOptions.swift_prefix"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional string php_class_prefix = 40; case 40: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_php_class_prefix(), ptr, ctx, "google.protobuf.FileOptions.php_class_prefix"); + auto str = _internal_mutable_php_class_prefix(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FileOptions.php_class_prefix"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional string php_namespace = 41; case 41: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_php_namespace(), ptr, ctx, "google.protobuf.FileOptions.php_namespace"); + auto str = _internal_mutable_php_namespace(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FileOptions.php_namespace"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional bool php_generic_services = 42 [default = false]; case 42: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { - HasBitSetters::set_has_php_generic_services(&has_bits); - php_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_php_generic_services(&has_bits); + php_generic_services_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional string php_metadata_namespace = 44; case 44: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_php_metadata_namespace(), ptr, ctx, "google.protobuf.FileOptions.php_metadata_namespace"); + auto str = _internal_mutable_php_metadata_namespace(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FileOptions.php_metadata_namespace"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional string ruby_package = 45; case 45: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 106)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_ruby_package(), ptr, ctx, "google.protobuf.FileOptions.ruby_package"); + auto str = _internal_mutable_ruby_package(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FileOptions.ruby_package"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; @@ -9016,10 +6667,10 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID ptr -= 2; do { ptr += 2; - ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); + ptr = ctx->ParseMessage(_internal_add_uninterpreted_option(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint16>(ptr) == 16058); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<7994>(ptr)); } else goto handle_unusual; continue; default: { @@ -9034,7 +6685,9 @@ const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID CHK_(ptr != nullptr); continue; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -9048,520 +6701,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool FileOptions::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.FileOptions) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string java_package = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_java_package())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->java_package().data(), static_cast(this->java_package().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FileOptions.java_package"); - } else { - goto handle_unusual; - } - break; - } - // optional string java_outer_classname = 8; - case 8: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_java_outer_classname())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->java_outer_classname().data(), static_cast(this->java_outer_classname().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FileOptions.java_outer_classname"); - } else { - goto handle_unusual; - } - break; - } - - // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; - case 9: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) { - int value = 0; - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode_IsValid(value)) { - set_optimize_for(static_cast< PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode >(value)); - } else { - mutable_unknown_fields()->AddVarint( - 9, static_cast<::PROTOBUF_NAMESPACE_ID::uint64>(value)); - } - } else { - goto handle_unusual; - } - break; - } - - // optional bool java_multiple_files = 10 [default = false]; - case 10: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) { - HasBitSetters::set_has_java_multiple_files(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &java_multiple_files_))); - } else { - goto handle_unusual; - } - break; - } - - // optional string go_package = 11; - case 11: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_go_package())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->go_package().data(), static_cast(this->go_package().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FileOptions.go_package"); - } else { - goto handle_unusual; - } - break; - } - - // optional bool cc_generic_services = 16 [default = false]; - case 16: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (128 & 0xFF)) { - HasBitSetters::set_has_cc_generic_services(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &cc_generic_services_))); - } else { - goto handle_unusual; - } - break; - } - - // optional bool java_generic_services = 17 [default = false]; - case 17: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (136 & 0xFF)) { - HasBitSetters::set_has_java_generic_services(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &java_generic_services_))); - } else { - goto handle_unusual; - } - break; - } - - // optional bool py_generic_services = 18 [default = false]; - case 18: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (144 & 0xFF)) { - HasBitSetters::set_has_py_generic_services(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &py_generic_services_))); - } else { - goto handle_unusual; - } - break; - } - - // optional bool java_generate_equals_and_hash = 20 [deprecated = true]; - case 20: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (160 & 0xFF)) { - HasBitSetters::set_has_java_generate_equals_and_hash(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &java_generate_equals_and_hash_))); - } else { - goto handle_unusual; - } - break; - } - - // optional bool deprecated = 23 [default = false]; - case 23: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (184 & 0xFF)) { - HasBitSetters::set_has_deprecated(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &deprecated_))); - } else { - goto handle_unusual; - } - break; - } - - // optional bool java_string_check_utf8 = 27 [default = false]; - case 27: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (216 & 0xFF)) { - HasBitSetters::set_has_java_string_check_utf8(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &java_string_check_utf8_))); - } else { - goto handle_unusual; - } - break; - } - - // optional bool cc_enable_arenas = 31 [default = false]; - case 31: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (248 & 0xFF)) { - HasBitSetters::set_has_cc_enable_arenas(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &cc_enable_arenas_))); - } else { - goto handle_unusual; - } - break; - } - - // optional string objc_class_prefix = 36; - case 36: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (290 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_objc_class_prefix())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->objc_class_prefix().data(), static_cast(this->objc_class_prefix().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FileOptions.objc_class_prefix"); - } else { - goto handle_unusual; - } - break; - } - - // optional string csharp_namespace = 37; - case 37: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (298 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_csharp_namespace())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->csharp_namespace().data(), static_cast(this->csharp_namespace().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FileOptions.csharp_namespace"); - } else { - goto handle_unusual; - } - break; - } - - // optional string swift_prefix = 39; - case 39: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (314 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_swift_prefix())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->swift_prefix().data(), static_cast(this->swift_prefix().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FileOptions.swift_prefix"); - } else { - goto handle_unusual; - } - break; - } - - // optional string php_class_prefix = 40; - case 40: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (322 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_php_class_prefix())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->php_class_prefix().data(), static_cast(this->php_class_prefix().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FileOptions.php_class_prefix"); - } else { - goto handle_unusual; - } - break; - } - - // optional string php_namespace = 41; - case 41: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (330 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_php_namespace())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->php_namespace().data(), static_cast(this->php_namespace().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FileOptions.php_namespace"); - } else { - goto handle_unusual; - } - break; - } - - // optional bool php_generic_services = 42 [default = false]; - case 42: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (336 & 0xFF)) { - HasBitSetters::set_has_php_generic_services(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &php_generic_services_))); - } else { - goto handle_unusual; - } - break; - } - - // optional string php_metadata_namespace = 44; - case 44: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (354 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_php_metadata_namespace())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->php_metadata_namespace().data(), static_cast(this->php_metadata_namespace().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FileOptions.php_metadata_namespace"); - } else { - goto handle_unusual; - } - break; - } - - // optional string ruby_package = 45; - case 45: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (362 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_ruby_package())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->ruby_package().data(), static_cast(this->ruby_package().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.FileOptions.ruby_package"); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_uninterpreted_option())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, - internal_default_instance(), - _internal_metadata_.mutable_unknown_fields())); - continue; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.FileOptions) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.FileOptions) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void FileOptions::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.FileOptions) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional string java_package = 1; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->java_package().data(), static_cast(this->java_package().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.java_package"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->java_package(), output); - } - - // optional string java_outer_classname = 8; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->java_outer_classname().data(), static_cast(this->java_outer_classname().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.java_outer_classname"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 8, this->java_outer_classname(), output); - } - - // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; - if (cached_has_bits & 0x00080000u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( - 9, this->optimize_for(), output); - } - - // optional bool java_multiple_files = 10 [default = false]; - if (cached_has_bits & 0x00000400u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(10, this->java_multiple_files(), output); - } - - // optional string go_package = 11; - if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->go_package().data(), static_cast(this->go_package().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.go_package"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 11, this->go_package(), output); - } - - // optional bool cc_generic_services = 16 [default = false]; - if (cached_has_bits & 0x00002000u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(16, this->cc_generic_services(), output); - } - - // optional bool java_generic_services = 17 [default = false]; - if (cached_has_bits & 0x00004000u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(17, this->java_generic_services(), output); - } - - // optional bool py_generic_services = 18 [default = false]; - if (cached_has_bits & 0x00008000u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(18, this->py_generic_services(), output); - } - - // optional bool java_generate_equals_and_hash = 20 [deprecated = true]; - if (cached_has_bits & 0x00000800u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(20, this->java_generate_equals_and_hash(), output); - } - - // optional bool deprecated = 23 [default = false]; - if (cached_has_bits & 0x00020000u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(23, this->deprecated(), output); - } - - // optional bool java_string_check_utf8 = 27 [default = false]; - if (cached_has_bits & 0x00001000u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(27, this->java_string_check_utf8(), output); - } - - // optional bool cc_enable_arenas = 31 [default = false]; - if (cached_has_bits & 0x00040000u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(31, this->cc_enable_arenas(), output); - } - - // optional string objc_class_prefix = 36; - if (cached_has_bits & 0x00000008u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->objc_class_prefix().data(), static_cast(this->objc_class_prefix().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.objc_class_prefix"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 36, this->objc_class_prefix(), output); - } - - // optional string csharp_namespace = 37; - if (cached_has_bits & 0x00000010u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->csharp_namespace().data(), static_cast(this->csharp_namespace().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.csharp_namespace"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 37, this->csharp_namespace(), output); - } - - // optional string swift_prefix = 39; - if (cached_has_bits & 0x00000020u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->swift_prefix().data(), static_cast(this->swift_prefix().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.swift_prefix"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 39, this->swift_prefix(), output); - } - - // optional string php_class_prefix = 40; - if (cached_has_bits & 0x00000040u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->php_class_prefix().data(), static_cast(this->php_class_prefix().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.php_class_prefix"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 40, this->php_class_prefix(), output); - } - - // optional string php_namespace = 41; - if (cached_has_bits & 0x00000080u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->php_namespace().data(), static_cast(this->php_namespace().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.php_namespace"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 41, this->php_namespace(), output); - } - - // optional bool php_generic_services = 42 [default = false]; - if (cached_has_bits & 0x00010000u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(42, this->php_generic_services(), output); - } - - // optional string php_metadata_namespace = 44; - if (cached_has_bits & 0x00000100u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->php_metadata_namespace().data(), static_cast(this->php_metadata_namespace().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.php_metadata_namespace"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 44, this->php_metadata_namespace(), output); - } - - // optional string ruby_package = 45; - if (cached_has_bits & 0x00000200u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->ruby_package().data(), static_cast(this->ruby_package().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.FileOptions.ruby_package"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 45, this->ruby_package(), output); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, - this->uninterpreted_option(static_cast(i)), - output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes(1000, 536870912, output); - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.FileOptions) -} - -::PROTOBUF_NAMESPACE_ID::uint8* FileOptions::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* FileOptions::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileOptions) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -9570,179 +6712,179 @@ void FileOptions::SerializeWithCachedSizes( // optional string java_package = 1; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->java_package().data(), static_cast(this->java_package().length()), + this->_internal_java_package().data(), static_cast(this->_internal_java_package().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.java_package"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->java_package(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_java_package(), target); } // optional string java_outer_classname = 8; if (cached_has_bits & 0x00000002u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->java_outer_classname().data(), static_cast(this->java_outer_classname().length()), + this->_internal_java_outer_classname().data(), static_cast(this->_internal_java_outer_classname().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.java_outer_classname"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 8, this->java_outer_classname(), target); + target = stream->WriteStringMaybeAliased( + 8, this->_internal_java_outer_classname(), target); } // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; - if (cached_has_bits & 0x00080000u) { + if (cached_has_bits & 0x00040000u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 9, this->optimize_for(), target); + 9, this->_internal_optimize_for(), target); } // optional bool java_multiple_files = 10 [default = false]; if (cached_has_bits & 0x00000400u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->java_multiple_files(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_java_multiple_files(), target); } // optional string go_package = 11; if (cached_has_bits & 0x00000004u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->go_package().data(), static_cast(this->go_package().length()), + this->_internal_go_package().data(), static_cast(this->_internal_go_package().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.go_package"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 11, this->go_package(), target); + target = stream->WriteStringMaybeAliased( + 11, this->_internal_go_package(), target); } // optional bool cc_generic_services = 16 [default = false]; if (cached_has_bits & 0x00002000u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(16, this->cc_generic_services(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(16, this->_internal_cc_generic_services(), target); } // optional bool java_generic_services = 17 [default = false]; if (cached_has_bits & 0x00004000u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->java_generic_services(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->_internal_java_generic_services(), target); } // optional bool py_generic_services = 18 [default = false]; if (cached_has_bits & 0x00008000u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(18, this->py_generic_services(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(18, this->_internal_py_generic_services(), target); } // optional bool java_generate_equals_and_hash = 20 [deprecated = true]; if (cached_has_bits & 0x00000800u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(20, this->java_generate_equals_and_hash(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(20, this->_internal_java_generate_equals_and_hash(), target); } // optional bool deprecated = 23 [default = false]; if (cached_has_bits & 0x00020000u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->deprecated(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->_internal_deprecated(), target); } // optional bool java_string_check_utf8 = 27 [default = false]; if (cached_has_bits & 0x00001000u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(27, this->java_string_check_utf8(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(27, this->_internal_java_string_check_utf8(), target); } - // optional bool cc_enable_arenas = 31 [default = false]; - if (cached_has_bits & 0x00040000u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(31, this->cc_enable_arenas(), target); + // optional bool cc_enable_arenas = 31 [default = true]; + if (cached_has_bits & 0x00080000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(31, this->_internal_cc_enable_arenas(), target); } // optional string objc_class_prefix = 36; if (cached_has_bits & 0x00000008u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->objc_class_prefix().data(), static_cast(this->objc_class_prefix().length()), + this->_internal_objc_class_prefix().data(), static_cast(this->_internal_objc_class_prefix().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.objc_class_prefix"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 36, this->objc_class_prefix(), target); + target = stream->WriteStringMaybeAliased( + 36, this->_internal_objc_class_prefix(), target); } // optional string csharp_namespace = 37; if (cached_has_bits & 0x00000010u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->csharp_namespace().data(), static_cast(this->csharp_namespace().length()), + this->_internal_csharp_namespace().data(), static_cast(this->_internal_csharp_namespace().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.csharp_namespace"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 37, this->csharp_namespace(), target); + target = stream->WriteStringMaybeAliased( + 37, this->_internal_csharp_namespace(), target); } // optional string swift_prefix = 39; if (cached_has_bits & 0x00000020u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->swift_prefix().data(), static_cast(this->swift_prefix().length()), + this->_internal_swift_prefix().data(), static_cast(this->_internal_swift_prefix().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.swift_prefix"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 39, this->swift_prefix(), target); + target = stream->WriteStringMaybeAliased( + 39, this->_internal_swift_prefix(), target); } // optional string php_class_prefix = 40; if (cached_has_bits & 0x00000040u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->php_class_prefix().data(), static_cast(this->php_class_prefix().length()), + this->_internal_php_class_prefix().data(), static_cast(this->_internal_php_class_prefix().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.php_class_prefix"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 40, this->php_class_prefix(), target); + target = stream->WriteStringMaybeAliased( + 40, this->_internal_php_class_prefix(), target); } // optional string php_namespace = 41; if (cached_has_bits & 0x00000080u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->php_namespace().data(), static_cast(this->php_namespace().length()), + this->_internal_php_namespace().data(), static_cast(this->_internal_php_namespace().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.php_namespace"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 41, this->php_namespace(), target); + target = stream->WriteStringMaybeAliased( + 41, this->_internal_php_namespace(), target); } // optional bool php_generic_services = 42 [default = false]; if (cached_has_bits & 0x00010000u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(42, this->php_generic_services(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(42, this->_internal_php_generic_services(), target); } // optional string php_metadata_namespace = 44; if (cached_has_bits & 0x00000100u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->php_metadata_namespace().data(), static_cast(this->php_metadata_namespace().length()), + this->_internal_php_metadata_namespace().data(), static_cast(this->_internal_php_metadata_namespace().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.php_metadata_namespace"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 44, this->php_metadata_namespace(), target); + target = stream->WriteStringMaybeAliased( + 44, this->_internal_php_metadata_namespace(), target); } // optional string ruby_package = 45; if (cached_has_bits & 0x00000200u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->ruby_package().data(), static_cast(this->ruby_package().length()), + this->_internal_ruby_package().data(), static_cast(this->_internal_ruby_package().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.ruby_package"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 45, this->ruby_package(), target); + target = stream->WriteStringMaybeAliased( + 45, this->_internal_ruby_package(), target); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { + n = static_cast(this->_internal_uninterpreted_option_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 999, this->uninterpreted_option(static_cast(i)), target); + InternalWriteMessage(999, this->_internal_uninterpreted_option(i), target, stream); } // Extension range [1000, 536870912) - target = _extensions_.InternalSerializeWithCachedSizesToArray( - 1000, 536870912, target); + target = _extensions_._InternalSerialize( + 1000, 536870912, target, stream); - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileOptions) return target; @@ -9754,24 +6896,15 @@ size_t FileOptions::ByteSizeLong() const { total_size += _extensions_.ByteSize(); - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - unsigned int count = static_cast(this->uninterpreted_option_size()); - total_size += 2UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->uninterpreted_option(static_cast(i))); - } + total_size += 2UL * this->_internal_uninterpreted_option_size(); + for (const auto& msg : this->uninterpreted_option_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } cached_has_bits = _has_bits_[0]; @@ -9780,56 +6913,56 @@ size_t FileOptions::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->java_package()); + this->_internal_java_package()); } // optional string java_outer_classname = 8; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->java_outer_classname()); + this->_internal_java_outer_classname()); } // optional string go_package = 11; if (cached_has_bits & 0x00000004u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->go_package()); + this->_internal_go_package()); } // optional string objc_class_prefix = 36; if (cached_has_bits & 0x00000008u) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->objc_class_prefix()); + this->_internal_objc_class_prefix()); } // optional string csharp_namespace = 37; if (cached_has_bits & 0x00000010u) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->csharp_namespace()); + this->_internal_csharp_namespace()); } // optional string swift_prefix = 39; if (cached_has_bits & 0x00000020u) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->swift_prefix()); + this->_internal_swift_prefix()); } // optional string php_class_prefix = 40; if (cached_has_bits & 0x00000040u) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->php_class_prefix()); + this->_internal_php_class_prefix()); } // optional string php_namespace = 41; if (cached_has_bits & 0x00000080u) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->php_namespace()); + this->_internal_php_namespace()); } } @@ -9838,14 +6971,14 @@ size_t FileOptions::ByteSizeLong() const { if (cached_has_bits & 0x00000100u) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->php_metadata_namespace()); + this->_internal_php_metadata_namespace()); } // optional string ruby_package = 45; if (cached_has_bits & 0x00000200u) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->ruby_package()); + this->_internal_ruby_package()); } // optional bool java_multiple_files = 10 [default = false]; @@ -9890,17 +7023,21 @@ size_t FileOptions::ByteSizeLong() const { total_size += 2 + 1; } - // optional bool cc_enable_arenas = 31 [default = false]; + // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; if (cached_has_bits & 0x00040000u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_optimize_for()); + } + + // optional bool cc_enable_arenas = 31 [default = true]; + if (cached_has_bits & 0x00080000u) { total_size += 2 + 1; } - // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; - if (cached_has_bits & 0x00080000u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->optimize_for()); - } - + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); @@ -9926,7 +7063,7 @@ void FileOptions::MergeFrom(const FileOptions& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileOptions) GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -9934,36 +7071,36 @@ void FileOptions::MergeFrom(const FileOptions& from) { cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x000000ffu) { if (cached_has_bits & 0x00000001u) { - set_java_package(from.java_package()); + _internal_set_java_package(from._internal_java_package()); } if (cached_has_bits & 0x00000002u) { - set_java_outer_classname(from.java_outer_classname()); + _internal_set_java_outer_classname(from._internal_java_outer_classname()); } if (cached_has_bits & 0x00000004u) { - set_go_package(from.go_package()); + _internal_set_go_package(from._internal_go_package()); } if (cached_has_bits & 0x00000008u) { - set_objc_class_prefix(from.objc_class_prefix()); + _internal_set_objc_class_prefix(from._internal_objc_class_prefix()); } if (cached_has_bits & 0x00000010u) { - set_csharp_namespace(from.csharp_namespace()); + _internal_set_csharp_namespace(from._internal_csharp_namespace()); } if (cached_has_bits & 0x00000020u) { - set_swift_prefix(from.swift_prefix()); + _internal_set_swift_prefix(from._internal_swift_prefix()); } if (cached_has_bits & 0x00000040u) { - set_php_class_prefix(from.php_class_prefix()); + _internal_set_php_class_prefix(from._internal_php_class_prefix()); } if (cached_has_bits & 0x00000080u) { - set_php_namespace(from.php_namespace()); + _internal_set_php_namespace(from._internal_php_namespace()); } } if (cached_has_bits & 0x0000ff00u) { if (cached_has_bits & 0x00000100u) { - set_php_metadata_namespace(from.php_metadata_namespace()); + _internal_set_php_metadata_namespace(from._internal_php_metadata_namespace()); } if (cached_has_bits & 0x00000200u) { - set_ruby_package(from.ruby_package()); + _internal_set_ruby_package(from._internal_ruby_package()); } if (cached_has_bits & 0x00000400u) { java_multiple_files_ = from.java_multiple_files_; @@ -9993,10 +7130,10 @@ void FileOptions::MergeFrom(const FileOptions& from) { deprecated_ = from.deprecated_; } if (cached_has_bits & 0x00040000u) { - cc_enable_arenas_ = from.cc_enable_arenas_; + optimize_for_ = from.optimize_for_; } if (cached_has_bits & 0x00080000u) { - optimize_for_ = from.optimize_for_; + cc_enable_arenas_ = from.cc_enable_arenas_; } _has_bits_[0] |= cached_has_bits; } @@ -10021,65 +7158,34 @@ bool FileOptions::IsInitialized() const { return false; } - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false; return true; } -void FileOptions::Swap(FileOptions* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - FileOptions* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void FileOptions::UnsafeArenaSwap(FileOptions* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void FileOptions::InternalSwap(FileOptions* other) { using std::swap; _extensions_.Swap(&other->_extensions_); - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&uninterpreted_option_)->InternalSwap(CastToBase(&other->uninterpreted_option_)); - java_package_.Swap(&other->java_package_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - java_outer_classname_.Swap(&other->java_outer_classname_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - go_package_.Swap(&other->go_package_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - objc_class_prefix_.Swap(&other->objc_class_prefix_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - csharp_namespace_.Swap(&other->csharp_namespace_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swift_prefix_.Swap(&other->swift_prefix_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - php_class_prefix_.Swap(&other->php_class_prefix_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - php_namespace_.Swap(&other->php_namespace_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - php_metadata_namespace_.Swap(&other->php_metadata_namespace_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - ruby_package_.Swap(&other->ruby_package_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(java_multiple_files_, other->java_multiple_files_); - swap(java_generate_equals_and_hash_, other->java_generate_equals_and_hash_); - swap(java_string_check_utf8_, other->java_string_check_utf8_); - swap(cc_generic_services_, other->cc_generic_services_); - swap(java_generic_services_, other->java_generic_services_); - swap(py_generic_services_, other->py_generic_services_); - swap(php_generic_services_, other->php_generic_services_); - swap(deprecated_, other->deprecated_); - swap(cc_enable_arenas_, other->cc_enable_arenas_); + uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); + java_package_.Swap(&other->java_package_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + java_outer_classname_.Swap(&other->java_outer_classname_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + go_package_.Swap(&other->go_package_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + objc_class_prefix_.Swap(&other->objc_class_prefix_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + csharp_namespace_.Swap(&other->csharp_namespace_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + swift_prefix_.Swap(&other->swift_prefix_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + php_class_prefix_.Swap(&other->php_class_prefix_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + php_namespace_.Swap(&other->php_namespace_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + php_metadata_namespace_.Swap(&other->php_metadata_namespace_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ruby_package_.Swap(&other->ruby_package_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(FileOptions, deprecated_) + + sizeof(FileOptions::deprecated_) + - PROTOBUF_FIELD_OFFSET(FileOptions, java_multiple_files_)>( + reinterpret_cast(&java_multiple_files_), + reinterpret_cast(&other->java_multiple_files_)); swap(optimize_for_, other->optimize_for_); + swap(cc_enable_arenas_, other->cc_enable_arenas_); } ::PROTOBUF_NAMESPACE_ID::Metadata FileOptions::GetMetadata() const { @@ -10091,7 +7197,7 @@ void FileOptions::InternalSwap(FileOptions* other) { void MessageOptions::InitAsDefaultInstance() { } -class MessageOptions::HasBitSetters { +class MessageOptions::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_message_set_wire_format(HasBits* has_bits) { @@ -10108,23 +7214,9 @@ class MessageOptions::HasBitSetters { } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int MessageOptions::kMessageSetWireFormatFieldNumber; -const int MessageOptions::kNoStandardDescriptorAccessorFieldNumber; -const int MessageOptions::kDeprecatedFieldNumber; -const int MessageOptions::kMapEntryFieldNumber; -const int MessageOptions::kUninterpretedOptionFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -MessageOptions::MessageOptions() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.MessageOptions) -} MessageOptions::MessageOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), _extensions_(arena), - _internal_metadata_(arena), uninterpreted_option_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -10132,10 +7224,9 @@ MessageOptions::MessageOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) } MessageOptions::MessageOptions(const MessageOptions& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _extensions_.MergeFrom(from._extensions_); ::memcpy(&message_set_wire_format_, &from.message_set_wire_format_, static_cast(reinterpret_cast(&map_entry_) - @@ -10153,10 +7244,11 @@ void MessageOptions::SharedCtor() { MessageOptions::~MessageOptions() { // @@protoc_insertion_point(destructor:google.protobuf.MessageOptions) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void MessageOptions::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void MessageOptions::ArenaDtor(void* object) { @@ -10186,14 +7278,13 @@ void MessageOptions::Clear() { reinterpret_cast(&map_entry_) - reinterpret_cast(&message_set_wire_format_)) + sizeof(map_entry_)); _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* MessageOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -10202,32 +7293,32 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE // optional bool message_set_wire_format = 1 [default = false]; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - HasBitSetters::set_has_message_set_wire_format(&has_bits); - message_set_wire_format_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_message_set_wire_format(&has_bits); + message_set_wire_format_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional bool no_standard_descriptor_accessor = 2 [default = false]; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - HasBitSetters::set_has_no_standard_descriptor_accessor(&has_bits); - no_standard_descriptor_accessor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_no_standard_descriptor_accessor(&has_bits); + no_standard_descriptor_accessor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional bool deprecated = 3 [default = false]; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - HasBitSetters::set_has_deprecated(&has_bits); - deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_deprecated(&has_bits); + deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional bool map_entry = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - HasBitSetters::set_has_map_entry(&has_bits); - map_entry_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_map_entry(&has_bits); + map_entry_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -10237,10 +7328,10 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE ptr -= 2; do { ptr += 2; - ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); + ptr = ctx->ParseMessage(_internal_add_uninterpreted_option(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint16>(ptr) == 16058); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<7994>(ptr)); } else goto handle_unusual; continue; default: { @@ -10255,7 +7346,9 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE CHK_(ptr != nullptr); continue; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -10269,155 +7362,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool MessageOptions::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.MessageOptions) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional bool message_set_wire_format = 1 [default = false]; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - HasBitSetters::set_has_message_set_wire_format(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &message_set_wire_format_))); - } else { - goto handle_unusual; - } - break; - } - // optional bool no_standard_descriptor_accessor = 2 [default = false]; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - HasBitSetters::set_has_no_standard_descriptor_accessor(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &no_standard_descriptor_accessor_))); - } else { - goto handle_unusual; - } - break; - } - - // optional bool deprecated = 3 [default = false]; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { - HasBitSetters::set_has_deprecated(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &deprecated_))); - } else { - goto handle_unusual; - } - break; - } - - // optional bool map_entry = 7; - case 7: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) { - HasBitSetters::set_has_map_entry(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &map_entry_))); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_uninterpreted_option())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, - internal_default_instance(), - _internal_metadata_.mutable_unknown_fields())); - continue; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.MessageOptions) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.MessageOptions) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void MessageOptions::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.MessageOptions) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional bool message_set_wire_format = 1 [default = false]; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(1, this->message_set_wire_format(), output); - } - - // optional bool no_standard_descriptor_accessor = 2 [default = false]; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(2, this->no_standard_descriptor_accessor(), output); - } - - // optional bool deprecated = 3 [default = false]; - if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); - } - - // optional bool map_entry = 7; - if (cached_has_bits & 0x00000008u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(7, this->map_entry(), output); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, - this->uninterpreted_option(static_cast(i)), - output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes(1000, 536870912, output); - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.MessageOptions) -} - -::PROTOBUF_NAMESPACE_ID::uint8* MessageOptions::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* MessageOptions::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MessageOptions) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -10425,39 +7372,43 @@ void MessageOptions::SerializeWithCachedSizes( cached_has_bits = _has_bits_[0]; // optional bool message_set_wire_format = 1 [default = false]; if (cached_has_bits & 0x00000001u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->message_set_wire_format(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_message_set_wire_format(), target); } // optional bool no_standard_descriptor_accessor = 2 [default = false]; if (cached_has_bits & 0x00000002u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->no_standard_descriptor_accessor(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_no_standard_descriptor_accessor(), target); } // optional bool deprecated = 3 [default = false]; if (cached_has_bits & 0x00000004u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_deprecated(), target); } // optional bool map_entry = 7; if (cached_has_bits & 0x00000008u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->map_entry(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_map_entry(), target); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { + n = static_cast(this->_internal_uninterpreted_option_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 999, this->uninterpreted_option(static_cast(i)), target); + InternalWriteMessage(999, this->_internal_uninterpreted_option(i), target, stream); } // Extension range [1000, 536870912) - target = _extensions_.InternalSerializeWithCachedSizesToArray( - 1000, 536870912, target); + target = _extensions_._InternalSerialize( + 1000, 536870912, target, stream); - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MessageOptions) return target; @@ -10469,24 +7420,15 @@ size_t MessageOptions::ByteSizeLong() const { total_size += _extensions_.ByteSize(); - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - unsigned int count = static_cast(this->uninterpreted_option_size()); - total_size += 2UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->uninterpreted_option(static_cast(i))); - } + total_size += 2UL * this->_internal_uninterpreted_option_size(); + for (const auto& msg : this->uninterpreted_option_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } cached_has_bits = _has_bits_[0]; @@ -10512,6 +7454,10 @@ size_t MessageOptions::ByteSizeLong() const { } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -10536,7 +7482,7 @@ void MessageOptions::MergeFrom(const MessageOptions& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MessageOptions) GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -10578,39 +7524,22 @@ bool MessageOptions::IsInitialized() const { return false; } - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false; return true; } -void MessageOptions::Swap(MessageOptions* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - MessageOptions* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void MessageOptions::UnsafeArenaSwap(MessageOptions* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void MessageOptions::InternalSwap(MessageOptions* other) { using std::swap; _extensions_.Swap(&other->_extensions_); - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&uninterpreted_option_)->InternalSwap(CastToBase(&other->uninterpreted_option_)); - swap(message_set_wire_format_, other->message_set_wire_format_); - swap(no_standard_descriptor_accessor_, other->no_standard_descriptor_accessor_); - swap(deprecated_, other->deprecated_); - swap(map_entry_, other->map_entry_); + uninterpreted_option_.InternalSwap(&other->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(&message_set_wire_format_), + reinterpret_cast(&other->message_set_wire_format_)); } ::PROTOBUF_NAMESPACE_ID::Metadata MessageOptions::GetMetadata() const { @@ -10622,7 +7551,7 @@ void MessageOptions::InternalSwap(MessageOptions* other) { void FieldOptions::InitAsDefaultInstance() { } -class FieldOptions::HasBitSetters { +class FieldOptions::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_ctype(HasBits* has_bits) { @@ -10645,25 +7574,9 @@ class FieldOptions::HasBitSetters { } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int FieldOptions::kCtypeFieldNumber; -const int FieldOptions::kPackedFieldNumber; -const int FieldOptions::kJstypeFieldNumber; -const int FieldOptions::kLazyFieldNumber; -const int FieldOptions::kDeprecatedFieldNumber; -const int FieldOptions::kWeakFieldNumber; -const int FieldOptions::kUninterpretedOptionFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -FieldOptions::FieldOptions() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.FieldOptions) -} FieldOptions::FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), _extensions_(arena), - _internal_metadata_(arena), uninterpreted_option_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -10671,10 +7584,9 @@ FieldOptions::FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) } FieldOptions::FieldOptions(const FieldOptions& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _extensions_.MergeFrom(from._extensions_); ::memcpy(&ctype_, &from.ctype_, static_cast(reinterpret_cast(&jstype_) - @@ -10692,10 +7604,11 @@ void FieldOptions::SharedCtor() { FieldOptions::~FieldOptions() { // @@protoc_insertion_point(destructor:google.protobuf.FieldOptions) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void FieldOptions::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void FieldOptions::ArenaDtor(void* object) { @@ -10728,14 +7641,13 @@ void FieldOptions::Clear() { reinterpret_cast(&ctype_)) + sizeof(jstype_)); } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* FieldOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -10744,10 +7656,10 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); if (PROTOBUF_PREDICT_TRUE(PROTOBUF_NAMESPACE_ID::FieldOptions_CType_IsValid(val))) { - set_ctype(static_cast(val)); + _internal_set_ctype(static_cast(val)); } else { ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); } @@ -10756,34 +7668,34 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I // optional bool packed = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - HasBitSetters::set_has_packed(&has_bits); - packed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_packed(&has_bits); + packed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional bool deprecated = 3 [default = false]; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - HasBitSetters::set_has_deprecated(&has_bits); - deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_deprecated(&has_bits); + deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional bool lazy = 5 [default = false]; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - HasBitSetters::set_has_lazy(&has_bits); - lazy_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_lazy(&has_bits); + lazy_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); if (PROTOBUF_PREDICT_TRUE(PROTOBUF_NAMESPACE_ID::FieldOptions_JSType_IsValid(val))) { - set_jstype(static_cast(val)); + _internal_set_jstype(static_cast(val)); } else { ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields()); } @@ -10792,8 +7704,8 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I // optional bool weak = 10 [default = false]; case 10: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { - HasBitSetters::set_has_weak(&has_bits); - weak_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_weak(&has_bits); + weak_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -10803,10 +7715,10 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I ptr -= 2; do { ptr += 2; - ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); + ptr = ctx->ParseMessage(_internal_add_uninterpreted_option(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint16>(ptr) == 16058); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<7994>(ptr)); } else goto handle_unusual; continue; default: { @@ -10821,7 +7733,9 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I CHK_(ptr != nullptr); continue; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -10835,205 +7749,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool FieldOptions::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.FieldOptions) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - int value = 0; - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (PROTOBUF_NAMESPACE_ID::FieldOptions_CType_IsValid(value)) { - set_ctype(static_cast< PROTOBUF_NAMESPACE_ID::FieldOptions_CType >(value)); - } else { - mutable_unknown_fields()->AddVarint( - 1, static_cast<::PROTOBUF_NAMESPACE_ID::uint64>(value)); - } - } else { - goto handle_unusual; - } - break; - } - // optional bool packed = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - HasBitSetters::set_has_packed(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &packed_))); - } else { - goto handle_unusual; - } - break; - } - - // optional bool deprecated = 3 [default = false]; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { - HasBitSetters::set_has_deprecated(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &deprecated_))); - } else { - goto handle_unusual; - } - break; - } - - // optional bool lazy = 5 [default = false]; - case 5: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { - HasBitSetters::set_has_lazy(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &lazy_))); - } else { - goto handle_unusual; - } - break; - } - - // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; - case 6: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { - int value = 0; - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (PROTOBUF_NAMESPACE_ID::FieldOptions_JSType_IsValid(value)) { - set_jstype(static_cast< PROTOBUF_NAMESPACE_ID::FieldOptions_JSType >(value)); - } else { - mutable_unknown_fields()->AddVarint( - 6, static_cast<::PROTOBUF_NAMESPACE_ID::uint64>(value)); - } - } else { - goto handle_unusual; - } - break; - } - - // optional bool weak = 10 [default = false]; - case 10: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) { - HasBitSetters::set_has_weak(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &weak_))); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_uninterpreted_option())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, - internal_default_instance(), - _internal_metadata_.mutable_unknown_fields())); - continue; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.FieldOptions) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.FieldOptions) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void FieldOptions::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.FieldOptions) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( - 1, this->ctype(), output); - } - - // optional bool packed = 2; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(2, this->packed(), output); - } - - // optional bool deprecated = 3 [default = false]; - if (cached_has_bits & 0x00000008u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); - } - - // optional bool lazy = 5 [default = false]; - if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(5, this->lazy(), output); - } - - // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; - if (cached_has_bits & 0x00000020u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( - 6, this->jstype(), output); - } - - // optional bool weak = 10 [default = false]; - if (cached_has_bits & 0x00000010u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(10, this->weak(), output); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, - this->uninterpreted_option(static_cast(i)), - output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes(1000, 536870912, output); - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.FieldOptions) -} - -::PROTOBUF_NAMESPACE_ID::uint8* FieldOptions::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* FieldOptions::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -11041,51 +7759,57 @@ void FieldOptions::SerializeWithCachedSizes( cached_has_bits = _has_bits_[0]; // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 1, this->ctype(), target); + 1, this->_internal_ctype(), target); } // optional bool packed = 2; if (cached_has_bits & 0x00000002u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->packed(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_packed(), target); } // optional bool deprecated = 3 [default = false]; if (cached_has_bits & 0x00000008u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_deprecated(), target); } // optional bool lazy = 5 [default = false]; if (cached_has_bits & 0x00000004u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->lazy(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_lazy(), target); } // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 6, this->jstype(), target); + 6, this->_internal_jstype(), target); } // optional bool weak = 10 [default = false]; if (cached_has_bits & 0x00000010u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->weak(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_weak(), target); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { + n = static_cast(this->_internal_uninterpreted_option_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 999, this->uninterpreted_option(static_cast(i)), target); + InternalWriteMessage(999, this->_internal_uninterpreted_option(i), target, stream); } // Extension range [1000, 536870912) - target = _extensions_.InternalSerializeWithCachedSizesToArray( - 1000, 536870912, target); + target = _extensions_._InternalSerialize( + 1000, 536870912, target, stream); - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldOptions) return target; @@ -11097,24 +7821,15 @@ size_t FieldOptions::ByteSizeLong() const { total_size += _extensions_.ByteSize(); - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - unsigned int count = static_cast(this->uninterpreted_option_size()); - total_size += 2UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->uninterpreted_option(static_cast(i))); - } + total_size += 2UL * this->_internal_uninterpreted_option_size(); + for (const auto& msg : this->uninterpreted_option_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } cached_has_bits = _has_bits_[0]; @@ -11122,7 +7837,7 @@ size_t FieldOptions::ByteSizeLong() const { // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->ctype()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_ctype()); } // optional bool packed = 2; @@ -11148,10 +7863,14 @@ size_t FieldOptions::ByteSizeLong() const { // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; if (cached_has_bits & 0x00000020u) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->jstype()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_jstype()); } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -11176,7 +7895,7 @@ void FieldOptions::MergeFrom(const FieldOptions& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldOptions) GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -11224,41 +7943,22 @@ bool FieldOptions::IsInitialized() const { return false; } - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false; return true; } -void FieldOptions::Swap(FieldOptions* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - FieldOptions* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void FieldOptions::UnsafeArenaSwap(FieldOptions* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void FieldOptions::InternalSwap(FieldOptions* other) { using std::swap; _extensions_.Swap(&other->_extensions_); - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&uninterpreted_option_)->InternalSwap(CastToBase(&other->uninterpreted_option_)); - swap(ctype_, other->ctype_); - swap(packed_, other->packed_); - swap(lazy_, other->lazy_); - swap(deprecated_, other->deprecated_); - swap(weak_, other->weak_); - swap(jstype_, other->jstype_); + uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(FieldOptions, jstype_) + + sizeof(FieldOptions::jstype_) + - PROTOBUF_FIELD_OFFSET(FieldOptions, ctype_)>( + reinterpret_cast(&ctype_), + reinterpret_cast(&other->ctype_)); } ::PROTOBUF_NAMESPACE_ID::Metadata FieldOptions::GetMetadata() const { @@ -11270,24 +7970,13 @@ void FieldOptions::InternalSwap(FieldOptions* other) { void OneofOptions::InitAsDefaultInstance() { } -class OneofOptions::HasBitSetters { +class OneofOptions::_Internal { public: - using HasBits = decltype(std::declval()._has_bits_); }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int OneofOptions::kUninterpretedOptionFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -OneofOptions::OneofOptions() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.OneofOptions) -} OneofOptions::OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), _extensions_(arena), - _internal_metadata_(arena), uninterpreted_option_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -11295,10 +7984,8 @@ OneofOptions::OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) } OneofOptions::OneofOptions(const OneofOptions& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), - _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _extensions_.MergeFrom(from._extensions_); // @@protoc_insertion_point(copy_constructor:google.protobuf.OneofOptions) } @@ -11310,10 +7997,11 @@ void OneofOptions::SharedCtor() { OneofOptions::~OneofOptions() { // @@protoc_insertion_point(destructor:google.protobuf.OneofOptions) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void OneofOptions::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void OneofOptions::ArenaDtor(void* object) { @@ -11339,14 +8027,12 @@ void OneofOptions::Clear() { _extensions_.Clear(); uninterpreted_option_.Clear(); - _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* OneofOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -11358,10 +8044,10 @@ const char* OneofOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I ptr -= 2; do { ptr += 2; - ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); + ptr = ctx->ParseMessage(_internal_add_uninterpreted_option(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint16>(ptr) == 16058); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<7994>(ptr)); } else goto handle_unusual; continue; default: { @@ -11376,7 +8062,9 @@ const char* OneofOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I CHK_(ptr != nullptr); continue; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -11389,101 +8077,28 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool OneofOptions::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.OneofOptions) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_uninterpreted_option())); - } else { - goto handle_unusual; - } - break; - } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, - internal_default_instance(), - _internal_metadata_.mutable_unknown_fields())); - continue; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.OneofOptions) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.OneofOptions) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void OneofOptions::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.OneofOptions) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, - this->uninterpreted_option(static_cast(i)), - output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes(1000, 536870912, output); - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.OneofOptions) -} - -::PROTOBUF_NAMESPACE_ID::uint8* OneofOptions::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* OneofOptions::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofOptions) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { + n = static_cast(this->_internal_uninterpreted_option_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 999, this->uninterpreted_option(static_cast(i)), target); + InternalWriteMessage(999, this->_internal_uninterpreted_option(i), target, stream); } // Extension range [1000, 536870912) - target = _extensions_.InternalSerializeWithCachedSizesToArray( - 1000, 536870912, target); + target = _extensions_._InternalSerialize( + 1000, 536870912, target, stream); - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.OneofOptions) return target; @@ -11495,26 +8110,21 @@ size_t OneofOptions::ByteSizeLong() const { total_size += _extensions_.ByteSize(); - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - unsigned int count = static_cast(this->uninterpreted_option_size()); - total_size += 2UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->uninterpreted_option(static_cast(i))); - } + total_size += 2UL * this->_internal_uninterpreted_option_size(); + for (const auto& msg : this->uninterpreted_option_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -11539,7 +8149,7 @@ void OneofOptions::MergeFrom(const OneofOptions& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofOptions) GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -11565,35 +8175,15 @@ bool OneofOptions::IsInitialized() const { return false; } - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false; return true; } -void OneofOptions::Swap(OneofOptions* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - OneofOptions* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void OneofOptions::UnsafeArenaSwap(OneofOptions* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void OneofOptions::InternalSwap(OneofOptions* other) { using std::swap; _extensions_.Swap(&other->_extensions_); - _internal_metadata_.Swap(&other->_internal_metadata_); - swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&uninterpreted_option_)->InternalSwap(CastToBase(&other->uninterpreted_option_)); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); } ::PROTOBUF_NAMESPACE_ID::Metadata OneofOptions::GetMetadata() const { @@ -11605,7 +8195,7 @@ void OneofOptions::InternalSwap(OneofOptions* other) { void EnumOptions::InitAsDefaultInstance() { } -class EnumOptions::HasBitSetters { +class EnumOptions::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_allow_alias(HasBits* has_bits) { @@ -11616,21 +8206,9 @@ class EnumOptions::HasBitSetters { } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int EnumOptions::kAllowAliasFieldNumber; -const int EnumOptions::kDeprecatedFieldNumber; -const int EnumOptions::kUninterpretedOptionFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -EnumOptions::EnumOptions() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.EnumOptions) -} EnumOptions::EnumOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), _extensions_(arena), - _internal_metadata_(arena), uninterpreted_option_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -11638,10 +8216,9 @@ EnumOptions::EnumOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) } EnumOptions::EnumOptions(const EnumOptions& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _extensions_.MergeFrom(from._extensions_); ::memcpy(&allow_alias_, &from.allow_alias_, static_cast(reinterpret_cast(&deprecated_) - @@ -11659,10 +8236,11 @@ void EnumOptions::SharedCtor() { EnumOptions::~EnumOptions() { // @@protoc_insertion_point(destructor:google.protobuf.EnumOptions) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void EnumOptions::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void EnumOptions::ArenaDtor(void* object) { @@ -11692,14 +8270,13 @@ void EnumOptions::Clear() { reinterpret_cast(&deprecated_) - reinterpret_cast(&allow_alias_)) + sizeof(deprecated_)); _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* EnumOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -11708,16 +8285,16 @@ const char* EnumOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID // optional bool allow_alias = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - HasBitSetters::set_has_allow_alias(&has_bits); - allow_alias_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_allow_alias(&has_bits); + allow_alias_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional bool deprecated = 3 [default = false]; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - HasBitSetters::set_has_deprecated(&has_bits); - deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_deprecated(&has_bits); + deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -11727,10 +8304,10 @@ const char* EnumOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID ptr -= 2; do { ptr += 2; - ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); + ptr = ctx->ParseMessage(_internal_add_uninterpreted_option(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint16>(ptr) == 16058); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<7994>(ptr)); } else goto handle_unusual; continue; default: { @@ -11745,7 +8322,9 @@ const char* EnumOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID CHK_(ptr != nullptr); continue; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -11759,119 +8338,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool EnumOptions::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.EnumOptions) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional bool allow_alias = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - HasBitSetters::set_has_allow_alias(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &allow_alias_))); - } else { - goto handle_unusual; - } - break; - } - // optional bool deprecated = 3 [default = false]; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { - HasBitSetters::set_has_deprecated(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &deprecated_))); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_uninterpreted_option())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, - internal_default_instance(), - _internal_metadata_.mutable_unknown_fields())); - continue; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.EnumOptions) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.EnumOptions) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void EnumOptions::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.EnumOptions) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional bool allow_alias = 2; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(2, this->allow_alias(), output); - } - - // optional bool deprecated = 3 [default = false]; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, - this->uninterpreted_option(static_cast(i)), - output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes(1000, 536870912, output); - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.EnumOptions) -} - -::PROTOBUF_NAMESPACE_ID::uint8* EnumOptions::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* EnumOptions::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumOptions) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -11879,29 +8348,31 @@ void EnumOptions::SerializeWithCachedSizes( cached_has_bits = _has_bits_[0]; // optional bool allow_alias = 2; if (cached_has_bits & 0x00000001u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->allow_alias(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_allow_alias(), target); } // optional bool deprecated = 3 [default = false]; if (cached_has_bits & 0x00000002u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_deprecated(), target); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { + n = static_cast(this->_internal_uninterpreted_option_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 999, this->uninterpreted_option(static_cast(i)), target); + InternalWriteMessage(999, this->_internal_uninterpreted_option(i), target, stream); } // Extension range [1000, 536870912) - target = _extensions_.InternalSerializeWithCachedSizesToArray( - 1000, 536870912, target); + target = _extensions_._InternalSerialize( + 1000, 536870912, target, stream); - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumOptions) return target; @@ -11913,24 +8384,15 @@ size_t EnumOptions::ByteSizeLong() const { total_size += _extensions_.ByteSize(); - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - unsigned int count = static_cast(this->uninterpreted_option_size()); - total_size += 2UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->uninterpreted_option(static_cast(i))); - } + total_size += 2UL * this->_internal_uninterpreted_option_size(); + for (const auto& msg : this->uninterpreted_option_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } cached_has_bits = _has_bits_[0]; @@ -11946,6 +8408,10 @@ size_t EnumOptions::ByteSizeLong() const { } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -11970,7 +8436,7 @@ void EnumOptions::MergeFrom(const EnumOptions& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumOptions) GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -12006,37 +8472,22 @@ bool EnumOptions::IsInitialized() const { return false; } - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false; return true; } -void EnumOptions::Swap(EnumOptions* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - EnumOptions* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void EnumOptions::UnsafeArenaSwap(EnumOptions* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void EnumOptions::InternalSwap(EnumOptions* other) { using std::swap; _extensions_.Swap(&other->_extensions_); - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&uninterpreted_option_)->InternalSwap(CastToBase(&other->uninterpreted_option_)); - swap(allow_alias_, other->allow_alias_); - swap(deprecated_, other->deprecated_); + uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(EnumOptions, deprecated_) + + sizeof(EnumOptions::deprecated_) + - PROTOBUF_FIELD_OFFSET(EnumOptions, allow_alias_)>( + reinterpret_cast(&allow_alias_), + reinterpret_cast(&other->allow_alias_)); } ::PROTOBUF_NAMESPACE_ID::Metadata EnumOptions::GetMetadata() const { @@ -12048,7 +8499,7 @@ void EnumOptions::InternalSwap(EnumOptions* other) { void EnumValueOptions::InitAsDefaultInstance() { } -class EnumValueOptions::HasBitSetters { +class EnumValueOptions::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_deprecated(HasBits* has_bits) { @@ -12056,20 +8507,9 @@ class EnumValueOptions::HasBitSetters { } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int EnumValueOptions::kDeprecatedFieldNumber; -const int EnumValueOptions::kUninterpretedOptionFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -EnumValueOptions::EnumValueOptions() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.EnumValueOptions) -} EnumValueOptions::EnumValueOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), _extensions_(arena), - _internal_metadata_(arena), uninterpreted_option_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -12077,10 +8517,9 @@ EnumValueOptions::EnumValueOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) } EnumValueOptions::EnumValueOptions(const EnumValueOptions& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _extensions_.MergeFrom(from._extensions_); deprecated_ = from.deprecated_; // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueOptions) @@ -12094,10 +8533,11 @@ void EnumValueOptions::SharedCtor() { EnumValueOptions::~EnumValueOptions() { // @@protoc_insertion_point(destructor:google.protobuf.EnumValueOptions) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void EnumValueOptions::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void EnumValueOptions::ArenaDtor(void* object) { @@ -12125,14 +8565,13 @@ void EnumValueOptions::Clear() { uninterpreted_option_.Clear(); deprecated_ = false; _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* EnumValueOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -12141,8 +8580,8 @@ const char* EnumValueOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPA // optional bool deprecated = 1 [default = false]; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - HasBitSetters::set_has_deprecated(&has_bits); - deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_deprecated(&has_bits); + deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -12152,10 +8591,10 @@ const char* EnumValueOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPA ptr -= 2; do { ptr += 2; - ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); + ptr = ctx->ParseMessage(_internal_add_uninterpreted_option(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint16>(ptr) == 16058); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<7994>(ptr)); } else goto handle_unusual; continue; default: { @@ -12170,7 +8609,9 @@ const char* EnumValueOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPA CHK_(ptr != nullptr); continue; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -12184,101 +8625,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool EnumValueOptions::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.EnumValueOptions) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional bool deprecated = 1 [default = false]; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - HasBitSetters::set_has_deprecated(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &deprecated_))); - } else { - goto handle_unusual; - } - break; - } - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_uninterpreted_option())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, - internal_default_instance(), - _internal_metadata_.mutable_unknown_fields())); - continue; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.EnumValueOptions) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValueOptions) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void EnumValueOptions::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValueOptions) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional bool deprecated = 1 [default = false]; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(1, this->deprecated(), output); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, - this->uninterpreted_option(static_cast(i)), - output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes(1000, 536870912, output); - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueOptions) -} - -::PROTOBUF_NAMESPACE_ID::uint8* EnumValueOptions::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* EnumValueOptions::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueOptions) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -12286,24 +8635,25 @@ void EnumValueOptions::SerializeWithCachedSizes( cached_has_bits = _has_bits_[0]; // optional bool deprecated = 1 [default = false]; if (cached_has_bits & 0x00000001u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->deprecated(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_deprecated(), target); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { + n = static_cast(this->_internal_uninterpreted_option_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 999, this->uninterpreted_option(static_cast(i)), target); + InternalWriteMessage(999, this->_internal_uninterpreted_option(i), target, stream); } // Extension range [1000, 536870912) - target = _extensions_.InternalSerializeWithCachedSizesToArray( - 1000, 536870912, target); + target = _extensions_._InternalSerialize( + 1000, 536870912, target, stream); - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueOptions) return target; @@ -12315,24 +8665,15 @@ size_t EnumValueOptions::ByteSizeLong() const { total_size += _extensions_.ByteSize(); - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - unsigned int count = static_cast(this->uninterpreted_option_size()); - total_size += 2UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->uninterpreted_option(static_cast(i))); - } + total_size += 2UL * this->_internal_uninterpreted_option_size(); + for (const auto& msg : this->uninterpreted_option_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // optional bool deprecated = 1 [default = false]; @@ -12341,6 +8682,10 @@ size_t EnumValueOptions::ByteSizeLong() const { total_size += 1 + 1; } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -12365,13 +8710,13 @@ void EnumValueOptions::MergeFrom(const EnumValueOptions& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValueOptions) GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; uninterpreted_option_.MergeFrom(from.uninterpreted_option_); - if (from.has_deprecated()) { - set_deprecated(from.deprecated()); + if (from._internal_has_deprecated()) { + _internal_set_deprecated(from._internal_deprecated()); } } @@ -12394,35 +8739,16 @@ bool EnumValueOptions::IsInitialized() const { return false; } - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false; return true; } -void EnumValueOptions::Swap(EnumValueOptions* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - EnumValueOptions* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void EnumValueOptions::UnsafeArenaSwap(EnumValueOptions* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void EnumValueOptions::InternalSwap(EnumValueOptions* other) { using std::swap; _extensions_.Swap(&other->_extensions_); - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&uninterpreted_option_)->InternalSwap(CastToBase(&other->uninterpreted_option_)); + uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); swap(deprecated_, other->deprecated_); } @@ -12435,7 +8761,7 @@ void EnumValueOptions::InternalSwap(EnumValueOptions* other) { void ServiceOptions::InitAsDefaultInstance() { } -class ServiceOptions::HasBitSetters { +class ServiceOptions::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_deprecated(HasBits* has_bits) { @@ -12443,20 +8769,9 @@ class ServiceOptions::HasBitSetters { } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ServiceOptions::kDeprecatedFieldNumber; -const int ServiceOptions::kUninterpretedOptionFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -ServiceOptions::ServiceOptions() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.ServiceOptions) -} ServiceOptions::ServiceOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), _extensions_(arena), - _internal_metadata_(arena), uninterpreted_option_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -12464,10 +8779,9 @@ ServiceOptions::ServiceOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) } ServiceOptions::ServiceOptions(const ServiceOptions& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _extensions_.MergeFrom(from._extensions_); deprecated_ = from.deprecated_; // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceOptions) @@ -12481,10 +8795,11 @@ void ServiceOptions::SharedCtor() { ServiceOptions::~ServiceOptions() { // @@protoc_insertion_point(destructor:google.protobuf.ServiceOptions) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void ServiceOptions::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void ServiceOptions::ArenaDtor(void* object) { @@ -12512,14 +8827,13 @@ void ServiceOptions::Clear() { uninterpreted_option_.Clear(); deprecated_ = false; _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* ServiceOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -12528,8 +8842,8 @@ const char* ServiceOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE // optional bool deprecated = 33 [default = false]; case 33: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - HasBitSetters::set_has_deprecated(&has_bits); - deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_deprecated(&has_bits); + deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -12539,10 +8853,10 @@ const char* ServiceOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE ptr -= 2; do { ptr += 2; - ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); + ptr = ctx->ParseMessage(_internal_add_uninterpreted_option(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint16>(ptr) == 16058); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<7994>(ptr)); } else goto handle_unusual; continue; default: { @@ -12557,7 +8871,9 @@ const char* ServiceOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE CHK_(ptr != nullptr); continue; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -12571,101 +8887,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool ServiceOptions::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.ServiceOptions) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional bool deprecated = 33 [default = false]; - case 33: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (264 & 0xFF)) { - HasBitSetters::set_has_deprecated(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &deprecated_))); - } else { - goto handle_unusual; - } - break; - } - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_uninterpreted_option())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, - internal_default_instance(), - _internal_metadata_.mutable_unknown_fields())); - continue; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.ServiceOptions) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.ServiceOptions) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void ServiceOptions::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.ServiceOptions) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional bool deprecated = 33 [default = false]; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(33, this->deprecated(), output); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, - this->uninterpreted_option(static_cast(i)), - output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes(1000, 536870912, output); - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceOptions) -} - -::PROTOBUF_NAMESPACE_ID::uint8* ServiceOptions::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* ServiceOptions::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceOptions) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -12673,24 +8897,25 @@ void ServiceOptions::SerializeWithCachedSizes( cached_has_bits = _has_bits_[0]; // optional bool deprecated = 33 [default = false]; if (cached_has_bits & 0x00000001u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(33, this->_internal_deprecated(), target); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { + n = static_cast(this->_internal_uninterpreted_option_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 999, this->uninterpreted_option(static_cast(i)), target); + InternalWriteMessage(999, this->_internal_uninterpreted_option(i), target, stream); } // Extension range [1000, 536870912) - target = _extensions_.InternalSerializeWithCachedSizesToArray( - 1000, 536870912, target); + target = _extensions_._InternalSerialize( + 1000, 536870912, target, stream); - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceOptions) return target; @@ -12702,24 +8927,15 @@ size_t ServiceOptions::ByteSizeLong() const { total_size += _extensions_.ByteSize(); - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - unsigned int count = static_cast(this->uninterpreted_option_size()); - total_size += 2UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->uninterpreted_option(static_cast(i))); - } + total_size += 2UL * this->_internal_uninterpreted_option_size(); + for (const auto& msg : this->uninterpreted_option_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // optional bool deprecated = 33 [default = false]; @@ -12728,6 +8944,10 @@ size_t ServiceOptions::ByteSizeLong() const { total_size += 2 + 1; } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -12752,13 +8972,13 @@ void ServiceOptions::MergeFrom(const ServiceOptions& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ServiceOptions) GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; uninterpreted_option_.MergeFrom(from.uninterpreted_option_); - if (from.has_deprecated()) { - set_deprecated(from.deprecated()); + if (from._internal_has_deprecated()) { + _internal_set_deprecated(from._internal_deprecated()); } } @@ -12781,35 +9001,16 @@ bool ServiceOptions::IsInitialized() const { return false; } - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false; return true; } -void ServiceOptions::Swap(ServiceOptions* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - ServiceOptions* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void ServiceOptions::UnsafeArenaSwap(ServiceOptions* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void ServiceOptions::InternalSwap(ServiceOptions* other) { using std::swap; _extensions_.Swap(&other->_extensions_); - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&uninterpreted_option_)->InternalSwap(CastToBase(&other->uninterpreted_option_)); + uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); swap(deprecated_, other->deprecated_); } @@ -12822,7 +9023,7 @@ void ServiceOptions::InternalSwap(ServiceOptions* other) { void MethodOptions::InitAsDefaultInstance() { } -class MethodOptions::HasBitSetters { +class MethodOptions::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_deprecated(HasBits* has_bits) { @@ -12833,21 +9034,9 @@ class MethodOptions::HasBitSetters { } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int MethodOptions::kDeprecatedFieldNumber; -const int MethodOptions::kIdempotencyLevelFieldNumber; -const int MethodOptions::kUninterpretedOptionFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -MethodOptions::MethodOptions() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.MethodOptions) -} MethodOptions::MethodOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), _extensions_(arena), - _internal_metadata_(arena), uninterpreted_option_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -12855,10 +9044,9 @@ MethodOptions::MethodOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) } MethodOptions::MethodOptions(const MethodOptions& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _extensions_.MergeFrom(from._extensions_); ::memcpy(&deprecated_, &from.deprecated_, static_cast(reinterpret_cast(&idempotency_level_) - @@ -12876,10 +9064,11 @@ void MethodOptions::SharedCtor() { MethodOptions::~MethodOptions() { // @@protoc_insertion_point(destructor:google.protobuf.MethodOptions) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void MethodOptions::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void MethodOptions::ArenaDtor(void* object) { @@ -12912,14 +9101,13 @@ void MethodOptions::Clear() { reinterpret_cast(&deprecated_)) + sizeof(idempotency_level_)); } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* MethodOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -12928,18 +9116,18 @@ const char* MethodOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ // optional bool deprecated = 33 [default = false]; case 33: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - HasBitSetters::set_has_deprecated(&has_bits); - deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_deprecated(&has_bits); + deprecated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; case 34: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); if (PROTOBUF_PREDICT_TRUE(PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel_IsValid(val))) { - set_idempotency_level(static_cast(val)); + _internal_set_idempotency_level(static_cast(val)); } else { ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(34, val, mutable_unknown_fields()); } @@ -12951,10 +9139,10 @@ const char* MethodOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ ptr -= 2; do { ptr += 2; - ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); + ptr = ctx->ParseMessage(_internal_add_uninterpreted_option(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint16>(ptr) == 16058); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<7994>(ptr)); } else goto handle_unusual; continue; default: { @@ -12969,7 +9157,9 @@ const char* MethodOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ CHK_(ptr != nullptr); continue; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -12983,126 +9173,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool MethodOptions::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.MethodOptions) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional bool deprecated = 33 [default = false]; - case 33: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (264 & 0xFF)) { - HasBitSetters::set_has_deprecated(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &deprecated_))); - } else { - goto handle_unusual; - } - break; - } - // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; - case 34: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (272 & 0xFF)) { - int value = 0; - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel_IsValid(value)) { - set_idempotency_level(static_cast< PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel >(value)); - } else { - mutable_unknown_fields()->AddVarint( - 34, static_cast<::PROTOBUF_NAMESPACE_ID::uint64>(value)); - } - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_uninterpreted_option())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, - internal_default_instance(), - _internal_metadata_.mutable_unknown_fields())); - continue; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.MethodOptions) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.MethodOptions) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void MethodOptions::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.MethodOptions) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // optional bool deprecated = 33 [default = false]; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(33, this->deprecated(), output); - } - - // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( - 34, this->idempotency_level(), output); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, - this->uninterpreted_option(static_cast(i)), - output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes(1000, 536870912, output); - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.MethodOptions) -} - -::PROTOBUF_NAMESPACE_ID::uint8* MethodOptions::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* MethodOptions::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodOptions) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -13110,30 +9183,32 @@ void MethodOptions::SerializeWithCachedSizes( cached_has_bits = _has_bits_[0]; // optional bool deprecated = 33 [default = false]; if (cached_has_bits & 0x00000001u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(33, this->_internal_deprecated(), target); } // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 34, this->idempotency_level(), target); + 34, this->_internal_idempotency_level(), target); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, - n = static_cast(this->uninterpreted_option_size()); i < n; i++) { + n = static_cast(this->_internal_uninterpreted_option_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 999, this->uninterpreted_option(static_cast(i)), target); + InternalWriteMessage(999, this->_internal_uninterpreted_option(i), target, stream); } // Extension range [1000, 536870912) - target = _extensions_.InternalSerializeWithCachedSizesToArray( - 1000, 536870912, target); + target = _extensions_._InternalSerialize( + 1000, 536870912, target, stream); - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodOptions) return target; @@ -13145,24 +9220,15 @@ size_t MethodOptions::ByteSizeLong() const { total_size += _extensions_.ByteSize(); - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - { - unsigned int count = static_cast(this->uninterpreted_option_size()); - total_size += 2UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->uninterpreted_option(static_cast(i))); - } + total_size += 2UL * this->_internal_uninterpreted_option_size(); + for (const auto& msg : this->uninterpreted_option_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } cached_has_bits = _has_bits_[0]; @@ -13175,10 +9241,14 @@ size_t MethodOptions::ByteSizeLong() const { // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; if (cached_has_bits & 0x00000002u) { total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->idempotency_level()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_idempotency_level()); } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -13203,7 +9273,7 @@ void MethodOptions::MergeFrom(const MethodOptions& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MethodOptions) GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -13239,37 +9309,22 @@ bool MethodOptions::IsInitialized() const { return false; } - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(uninterpreted_option_)) return false; return true; } -void MethodOptions::Swap(MethodOptions* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - MethodOptions* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void MethodOptions::UnsafeArenaSwap(MethodOptions* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void MethodOptions::InternalSwap(MethodOptions* other) { using std::swap; _extensions_.Swap(&other->_extensions_); - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&uninterpreted_option_)->InternalSwap(CastToBase(&other->uninterpreted_option_)); - swap(deprecated_, other->deprecated_); - swap(idempotency_level_, other->idempotency_level_); + uninterpreted_option_.InternalSwap(&other->uninterpreted_option_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(MethodOptions, idempotency_level_) + + sizeof(MethodOptions::idempotency_level_) + - PROTOBUF_FIELD_OFFSET(MethodOptions, deprecated_)>( + reinterpret_cast(&deprecated_), + reinterpret_cast(&other->deprecated_)); } ::PROTOBUF_NAMESPACE_ID::Metadata MethodOptions::GetMetadata() const { @@ -13281,7 +9336,7 @@ void MethodOptions::InternalSwap(MethodOptions* other) { void UninterpretedOption_NamePart::InitAsDefaultInstance() { } -class UninterpretedOption_NamePart::HasBitSetters { +class UninterpretedOption_NamePart::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_name_part(HasBits* has_bits) { @@ -13290,34 +9345,25 @@ class UninterpretedOption_NamePart::HasBitSetters { static void set_has_is_extension(HasBits* has_bits) { (*has_bits)[0] |= 2u; } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0; + } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int UninterpretedOption_NamePart::kNamePartFieldNumber; -const int UninterpretedOption_NamePart::kIsExtensionFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -UninterpretedOption_NamePart::UninterpretedOption_NamePart() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.UninterpretedOption.NamePart) -} UninterpretedOption_NamePart::UninterpretedOption_NamePart(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.UninterpretedOption.NamePart) } UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_part_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_name_part()) { - name_part_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_part(), - GetArenaNoVirtual()); + if (from._internal_has_name_part()) { + name_part_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name_part(), + GetArena()); } is_extension_ = from.is_extension_; // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption.NamePart) @@ -13332,10 +9378,11 @@ void UninterpretedOption_NamePart::SharedCtor() { UninterpretedOption_NamePart::~UninterpretedOption_NamePart() { // @@protoc_insertion_point(destructor:google.protobuf.UninterpretedOption.NamePart) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void UninterpretedOption_NamePart::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); name_part_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } @@ -13366,14 +9413,13 @@ void UninterpretedOption_NamePart::Clear() { } is_extension_ = false; _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* UninterpretedOption_NamePart::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -13382,15 +9428,19 @@ const char* UninterpretedOption_NamePart::_InternalParse(const char* ptr, ::PROT // required string name_part = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name_part(), ptr, ctx, "google.protobuf.UninterpretedOption.NamePart.name_part"); + auto str = _internal_mutable_name_part(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.UninterpretedOption.NamePart.name_part"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // required bool is_extension = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - HasBitSetters::set_has_is_extension(&has_bits); - is_extension_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_is_extension(&has_bits); + is_extension_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -13400,7 +9450,9 @@ const char* UninterpretedOption_NamePart::_InternalParse(const char* ptr, ::PROT ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -13414,97 +9466,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool UninterpretedOption_NamePart::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.UninterpretedOption.NamePart) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required string name_part = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name_part())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name_part().data(), static_cast(this->name_part().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.UninterpretedOption.NamePart.name_part"); - } else { - goto handle_unusual; - } - break; - } - // required bool is_extension = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - HasBitSetters::set_has_is_extension(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &is_extension_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.UninterpretedOption.NamePart) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.UninterpretedOption.NamePart) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void UninterpretedOption_NamePart::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.UninterpretedOption.NamePart) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = _has_bits_[0]; - // required string name_part = 1; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name_part().data(), static_cast(this->name_part().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.UninterpretedOption.NamePart.name_part"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name_part(), output); - } - - // required bool is_extension = 2; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(2, this->is_extension(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption.NamePart) -} - -::PROTOBUF_NAMESPACE_ID::uint8* UninterpretedOption_NamePart::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* UninterpretedOption_NamePart::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption.NamePart) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -13513,22 +9477,22 @@ void UninterpretedOption_NamePart::SerializeWithCachedSizes( // required string name_part = 1; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->name_part().data(), static_cast(this->name_part().length()), + this->_internal_name_part().data(), static_cast(this->_internal_name_part().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.NamePart.name_part"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name_part(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name_part(), target); } // required bool is_extension = 2; if (cached_has_bits & 0x00000002u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->is_extension(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_is_extension(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption.NamePart) return target; @@ -13538,14 +9502,14 @@ size_t UninterpretedOption_NamePart::RequiredFieldsByteSizeFallback() const { // @@protoc_insertion_point(required_fields_byte_size_fallback_start:google.protobuf.UninterpretedOption.NamePart) size_t total_size = 0; - if (has_name_part()) { + if (_internal_has_name_part()) { // required string name_part = 1; total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name_part()); + this->_internal_name_part()); } - if (has_is_extension()) { + if (_internal_has_is_extension()) { // required bool is_extension = 2; total_size += 1 + 1; } @@ -13556,16 +9520,11 @@ size_t UninterpretedOption_NamePart::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.UninterpretedOption.NamePart) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } if (((_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( - this->name_part()); + this->_internal_name_part()); // required bool is_extension = 2; total_size += 1 + 1; @@ -13577,6 +9536,10 @@ size_t UninterpretedOption_NamePart::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -13600,14 +9563,14 @@ void UninterpretedOption_NamePart::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Mess 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); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { - set_name_part(from.name_part()); + _internal_set_name_part(from._internal_name_part()); } if (cached_has_bits & 0x00000002u) { is_extension_ = from.is_extension_; @@ -13631,35 +9594,15 @@ void UninterpretedOption_NamePart::CopyFrom(const UninterpretedOption_NamePart& } bool UninterpretedOption_NamePart::IsInitialized() const { - if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + if (_Internal::MissingRequiredFields(_has_bits_)) return false; return true; } -void UninterpretedOption_NamePart::Swap(UninterpretedOption_NamePart* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - UninterpretedOption_NamePart* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void UninterpretedOption_NamePart::UnsafeArenaSwap(UninterpretedOption_NamePart* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - name_part_.Swap(&other->name_part_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + name_part_.Swap(&other->name_part_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); swap(is_extension_, other->is_extension_); } @@ -13672,7 +9615,7 @@ void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* ot void UninterpretedOption::InitAsDefaultInstance() { } -class UninterpretedOption::HasBitSetters { +class UninterpretedOption::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_identifier_value(HasBits* has_bits) { @@ -13695,24 +9638,8 @@ class UninterpretedOption::HasBitSetters { } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int UninterpretedOption::kNameFieldNumber; -const int UninterpretedOption::kIdentifierValueFieldNumber; -const int UninterpretedOption::kPositiveIntValueFieldNumber; -const int UninterpretedOption::kNegativeIntValueFieldNumber; -const int UninterpretedOption::kDoubleValueFieldNumber; -const int UninterpretedOption::kStringValueFieldNumber; -const int UninterpretedOption::kAggregateValueFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -UninterpretedOption::UninterpretedOption() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.UninterpretedOption) -} UninterpretedOption::UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), name_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -13720,24 +9647,23 @@ UninterpretedOption::UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena* arena) } UninterpretedOption::UninterpretedOption(const UninterpretedOption& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), name_(from.name_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); identifier_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_identifier_value()) { - identifier_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.identifier_value(), - GetArenaNoVirtual()); + if (from._internal_has_identifier_value()) { + identifier_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_identifier_value(), + GetArena()); } string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_string_value()) { - string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.string_value(), - GetArenaNoVirtual()); + if (from._internal_has_string_value()) { + string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_string_value(), + GetArena()); } aggregate_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_aggregate_value()) { - aggregate_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.aggregate_value(), - GetArenaNoVirtual()); + if (from._internal_has_aggregate_value()) { + aggregate_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_aggregate_value(), + GetArena()); } ::memcpy(&positive_int_value_, &from.positive_int_value_, static_cast(reinterpret_cast(&double_value_) - @@ -13758,10 +9684,11 @@ void UninterpretedOption::SharedCtor() { UninterpretedOption::~UninterpretedOption() { // @@protoc_insertion_point(destructor:google.protobuf.UninterpretedOption) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void UninterpretedOption::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); identifier_value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); string_value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); aggregate_value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -13807,14 +9734,13 @@ void UninterpretedOption::Clear() { reinterpret_cast(&positive_int_value_)) + sizeof(double_value_)); } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* UninterpretedOption::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -13826,39 +9752,43 @@ const char* UninterpretedOption::_InternalParse(const char* ptr, ::PROTOBUF_NAME ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_name(), ptr); + ptr = ctx->ParseMessage(_internal_add_name(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); } else goto handle_unusual; continue; // optional string identifier_value = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_identifier_value(), ptr, ctx, "google.protobuf.UninterpretedOption.identifier_value"); + auto str = _internal_mutable_identifier_value(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.UninterpretedOption.identifier_value"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional uint64 positive_int_value = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - HasBitSetters::set_has_positive_int_value(&has_bits); - positive_int_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_positive_int_value(&has_bits); + positive_int_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional int64 negative_int_value = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - HasBitSetters::set_has_negative_int_value(&has_bits); - negative_int_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_negative_int_value(&has_bits); + negative_int_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional double double_value = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 49)) { - HasBitSetters::set_has_double_value(&has_bits); + _Internal::set_has_double_value(&has_bits); double_value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); ptr += sizeof(double); } else goto handle_unusual; @@ -13866,14 +9796,19 @@ const char* UninterpretedOption::_InternalParse(const char* ptr, ::PROTOBUF_NAME // optional bytes string_value = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_string_value(), ptr, ctx); + auto str = _internal_mutable_string_value(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); } else goto handle_unusual; continue; // optional string aggregate_value = 8; case 8: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_aggregate_value(), ptr, ctx, "google.protobuf.UninterpretedOption.aggregate_value"); + auto str = _internal_mutable_aggregate_value(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.UninterpretedOption.aggregate_value"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; @@ -13883,7 +9818,9 @@ const char* UninterpretedOption::_InternalParse(const char* ptr, ::PROTOBUF_NAME ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -13897,255 +9834,69 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool UninterpretedOption::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.UninterpretedOption) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_name())); - } else { - goto handle_unusual; - } - break; - } - // optional string identifier_value = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_identifier_value())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->identifier_value().data(), static_cast(this->identifier_value().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.UninterpretedOption.identifier_value"); - } else { - goto handle_unusual; - } - break; - } - - // optional uint64 positive_int_value = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { - HasBitSetters::set_has_positive_int_value(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( - input, &positive_int_value_))); - } else { - goto handle_unusual; - } - break; - } - - // optional int64 negative_int_value = 5; - case 5: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { - HasBitSetters::set_has_negative_int_value(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - input, &negative_int_value_))); - } else { - goto handle_unusual; - } - break; - } - - // optional double double_value = 6; - case 6: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (49 & 0xFF)) { - HasBitSetters::set_has_double_value(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( - input, &double_value_))); - } else { - goto handle_unusual; - } - break; - } - - // optional bytes string_value = 7; - case 7: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes( - input, this->mutable_string_value())); - } else { - goto handle_unusual; - } - break; - } - - // optional string aggregate_value = 8; - case 8: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_aggregate_value())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->aggregate_value().data(), static_cast(this->aggregate_value().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.UninterpretedOption.aggregate_value"); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.UninterpretedOption) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.UninterpretedOption) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void UninterpretedOption::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.UninterpretedOption) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; - for (unsigned int i = 0, - n = static_cast(this->name_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, - this->name(static_cast(i)), - output); - } - - cached_has_bits = _has_bits_[0]; - // optional string identifier_value = 3; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->identifier_value().data(), static_cast(this->identifier_value().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.UninterpretedOption.identifier_value"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 3, this->identifier_value(), output); - } - - // optional uint64 positive_int_value = 4; - if (cached_has_bits & 0x00000008u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(4, this->positive_int_value(), output); - } - - // optional int64 negative_int_value = 5; - if (cached_has_bits & 0x00000010u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(5, this->negative_int_value(), output); - } - - // optional double double_value = 6; - if (cached_has_bits & 0x00000020u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(6, this->double_value(), output); - } - - // optional bytes string_value = 7; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased( - 7, this->string_value(), output); - } - - // optional string aggregate_value = 8; - if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->aggregate_value().data(), static_cast(this->aggregate_value().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.UninterpretedOption.aggregate_value"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 8, this->aggregate_value(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption) -} - -::PROTOBUF_NAMESPACE_ID::uint8* UninterpretedOption::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* UninterpretedOption::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; for (unsigned int i = 0, - n = static_cast(this->name_size()); i < n; i++) { + n = static_cast(this->_internal_name_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 2, this->name(static_cast(i)), target); + InternalWriteMessage(2, this->_internal_name(i), target, stream); } cached_has_bits = _has_bits_[0]; // optional string identifier_value = 3; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->identifier_value().data(), static_cast(this->identifier_value().length()), + this->_internal_identifier_value().data(), static_cast(this->_internal_identifier_value().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.identifier_value"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 3, this->identifier_value(), target); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_identifier_value(), target); } // optional uint64 positive_int_value = 4; if (cached_has_bits & 0x00000008u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(4, this->positive_int_value(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(4, this->_internal_positive_int_value(), target); } // optional int64 negative_int_value = 5; if (cached_has_bits & 0x00000010u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->negative_int_value(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->_internal_negative_int_value(), target); } // optional double double_value = 6; if (cached_has_bits & 0x00000020u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(6, this->double_value(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(6, this->_internal_double_value(), target); } // optional bytes string_value = 7; if (cached_has_bits & 0x00000002u) { - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray( - 7, this->string_value(), target); + target = stream->WriteBytesMaybeAliased( + 7, this->_internal_string_value(), target); } // optional string aggregate_value = 8; if (cached_has_bits & 0x00000004u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->aggregate_value().data(), static_cast(this->aggregate_value().length()), + this->_internal_aggregate_value().data(), static_cast(this->_internal_aggregate_value().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.aggregate_value"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 8, this->aggregate_value(), target); + target = stream->WriteStringMaybeAliased( + 8, this->_internal_aggregate_value(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption) return target; @@ -14155,24 +9906,15 @@ size_t UninterpretedOption::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.UninterpretedOption) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; - { - unsigned int count = static_cast(this->name_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->name(static_cast(i))); - } + total_size += 1UL * this->_internal_name_size(); + for (const auto& msg : this->name_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } cached_has_bits = _has_bits_[0]; @@ -14181,35 +9923,35 @@ size_t UninterpretedOption::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->identifier_value()); + this->_internal_identifier_value()); } // optional bytes string_value = 7; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->string_value()); + this->_internal_string_value()); } // optional string aggregate_value = 8; if (cached_has_bits & 0x00000004u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->aggregate_value()); + this->_internal_aggregate_value()); } // optional uint64 positive_int_value = 4; if (cached_has_bits & 0x00000008u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( - this->positive_int_value()); + this->_internal_positive_int_value()); } // optional int64 negative_int_value = 5; if (cached_has_bits & 0x00000010u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( - this->negative_int_value()); + this->_internal_negative_int_value()); } // optional double double_value = 6; @@ -14218,6 +9960,10 @@ size_t UninterpretedOption::ByteSizeLong() const { } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -14241,7 +9987,7 @@ void UninterpretedOption::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from void UninterpretedOption::MergeFrom(const UninterpretedOption& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UninterpretedOption) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -14249,13 +9995,13 @@ void UninterpretedOption::MergeFrom(const UninterpretedOption& from) { cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x0000003fu) { if (cached_has_bits & 0x00000001u) { - set_identifier_value(from.identifier_value()); + _internal_set_identifier_value(from._internal_identifier_value()); } if (cached_has_bits & 0x00000002u) { - set_string_value(from.string_value()); + _internal_set_string_value(from._internal_string_value()); } if (cached_has_bits & 0x00000004u) { - set_aggregate_value(from.aggregate_value()); + _internal_set_aggregate_value(from._internal_aggregate_value()); } if (cached_has_bits & 0x00000008u) { positive_int_value_ = from.positive_int_value_; @@ -14285,43 +10031,24 @@ void UninterpretedOption::CopyFrom(const UninterpretedOption& from) { } bool UninterpretedOption::IsInitialized() const { - if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->name())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(name_)) return false; return true; } -void UninterpretedOption::Swap(UninterpretedOption* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - UninterpretedOption* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void UninterpretedOption::UnsafeArenaSwap(UninterpretedOption* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void UninterpretedOption::InternalSwap(UninterpretedOption* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&name_)->InternalSwap(CastToBase(&other->name_)); - identifier_value_.Swap(&other->identifier_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - string_value_.Swap(&other->string_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - aggregate_value_.Swap(&other->aggregate_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(positive_int_value_, other->positive_int_value_); - swap(negative_int_value_, other->negative_int_value_); - swap(double_value_, other->double_value_); + name_.InternalSwap(&other->name_); + identifier_value_.Swap(&other->identifier_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + string_value_.Swap(&other->string_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + aggregate_value_.Swap(&other->aggregate_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(UninterpretedOption, double_value_) + + sizeof(UninterpretedOption::double_value_) + - PROTOBUF_FIELD_OFFSET(UninterpretedOption, positive_int_value_)>( + reinterpret_cast(&positive_int_value_), + reinterpret_cast(&other->positive_int_value_)); } ::PROTOBUF_NAMESPACE_ID::Metadata UninterpretedOption::GetMetadata() const { @@ -14333,7 +10060,7 @@ void UninterpretedOption::InternalSwap(UninterpretedOption* other) { void SourceCodeInfo_Location::InitAsDefaultInstance() { } -class SourceCodeInfo_Location::HasBitSetters { +class SourceCodeInfo_Location::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_leading_comments(HasBits* has_bits) { @@ -14344,22 +10071,8 @@ class SourceCodeInfo_Location::HasBitSetters { } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int SourceCodeInfo_Location::kPathFieldNumber; -const int SourceCodeInfo_Location::kSpanFieldNumber; -const int SourceCodeInfo_Location::kLeadingCommentsFieldNumber; -const int SourceCodeInfo_Location::kTrailingCommentsFieldNumber; -const int SourceCodeInfo_Location::kLeadingDetachedCommentsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -SourceCodeInfo_Location::SourceCodeInfo_Location() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.SourceCodeInfo.Location) -} SourceCodeInfo_Location::SourceCodeInfo_Location(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), path_(arena), span_(arena), leading_detached_comments_(arena) { @@ -14369,21 +10082,20 @@ SourceCodeInfo_Location::SourceCodeInfo_Location(::PROTOBUF_NAMESPACE_ID::Arena* } SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), path_(from.path_), span_(from.span_), leading_detached_comments_(from.leading_detached_comments_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); leading_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_leading_comments()) { - leading_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.leading_comments(), - GetArenaNoVirtual()); + if (from._internal_has_leading_comments()) { + leading_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_leading_comments(), + GetArena()); } trailing_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_trailing_comments()) { - trailing_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.trailing_comments(), - GetArenaNoVirtual()); + if (from._internal_has_trailing_comments()) { + trailing_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_trailing_comments(), + GetArena()); } // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo.Location) } @@ -14397,10 +10109,11 @@ void SourceCodeInfo_Location::SharedCtor() { SourceCodeInfo_Location::~SourceCodeInfo_Location() { // @@protoc_insertion_point(destructor:google.protobuf.SourceCodeInfo.Location) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void SourceCodeInfo_Location::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); leading_comments_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); trailing_comments_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } @@ -14439,14 +10152,13 @@ void SourceCodeInfo_Location::Clear() { } } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* SourceCodeInfo_Location::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -14455,34 +10167,42 @@ const char* SourceCodeInfo_Location::_InternalParse(const char* ptr, ::PROTOBUF_ // repeated int32 path = 1 [packed = true]; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_path(), ptr, ctx); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_path(), ptr, ctx); CHK_(ptr); } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8) { - add_path(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + _internal_add_path(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; // repeated int32 span = 2 [packed = true]; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_span(), ptr, ctx); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_span(), ptr, ctx); CHK_(ptr); } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) { - add_span(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + _internal_add_span(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; // optional string leading_comments = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_leading_comments(), ptr, ctx, "google.protobuf.SourceCodeInfo.Location.leading_comments"); + auto str = _internal_mutable_leading_comments(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.SourceCodeInfo.Location.leading_comments"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional string trailing_comments = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_trailing_comments(), ptr, ctx, "google.protobuf.SourceCodeInfo.Location.trailing_comments"); + auto str = _internal_mutable_trailing_comments(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.SourceCodeInfo.Location.trailing_comments"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; @@ -14492,10 +10212,14 @@ const char* SourceCodeInfo_Location::_InternalParse(const char* ptr, ::PROTOBUF_ ptr -= 1; do { ptr += 1; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(add_leading_detached_comments(), ptr, ctx, "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); + auto str = _internal_add_leading_detached_comments(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); + #endif // !NDEBUG CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 50); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); } else goto handle_unusual; continue; default: { @@ -14504,7 +10228,9 @@ const char* SourceCodeInfo_Location::_InternalParse(const char* ptr, ::PROTOBUF_ ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -14518,250 +10244,65 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool SourceCodeInfo_Location::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.SourceCodeInfo.Location) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated int32 path = 1 [packed = true]; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, this->mutable_path()))); - } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - 1, 10u, input, this->mutable_path()))); - } else { - goto handle_unusual; - } - break; - } - // repeated int32 span = 2 [packed = true]; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, this->mutable_span()))); - } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - 1, 18u, input, this->mutable_span()))); - } else { - goto handle_unusual; - } - break; - } - - // optional string leading_comments = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_leading_comments())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->leading_comments().data(), static_cast(this->leading_comments().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.SourceCodeInfo.Location.leading_comments"); - } else { - goto handle_unusual; - } - break; - } - - // optional string trailing_comments = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_trailing_comments())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->trailing_comments().data(), static_cast(this->trailing_comments().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.SourceCodeInfo.Location.trailing_comments"); - } else { - goto handle_unusual; - } - break; - } - - // repeated string leading_detached_comments = 6; - case 6: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->add_leading_detached_comments())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->leading_detached_comments(this->leading_detached_comments_size() - 1).data(), - static_cast(this->leading_detached_comments(this->leading_detached_comments_size() - 1).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.SourceCodeInfo.Location) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.SourceCodeInfo.Location) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void SourceCodeInfo_Location::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.SourceCodeInfo.Location) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated int32 path = 1 [packed = true]; - if (this->path_size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(1, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(_path_cached_byte_size_.load( - std::memory_order_relaxed)); - } - for (int i = 0, n = this->path_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32NoTag( - this->path(i), output); - } - - // repeated int32 span = 2 [packed = true]; - if (this->span_size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(2, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(_span_cached_byte_size_.load( - std::memory_order_relaxed)); - } - for (int i = 0, n = this->span_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32NoTag( - this->span(i), output); - } - - cached_has_bits = _has_bits_[0]; - // optional string leading_comments = 3; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->leading_comments().data(), static_cast(this->leading_comments().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.SourceCodeInfo.Location.leading_comments"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 3, this->leading_comments(), output); - } - - // optional string trailing_comments = 4; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->trailing_comments().data(), static_cast(this->trailing_comments().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.SourceCodeInfo.Location.trailing_comments"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 4, this->trailing_comments(), output); - } - - // repeated string leading_detached_comments = 6; - for (int i = 0, n = this->leading_detached_comments_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->leading_detached_comments(i).data(), static_cast(this->leading_detached_comments(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( - 6, this->leading_detached_comments(i), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo.Location) -} - -::PROTOBUF_NAMESPACE_ID::uint8* SourceCodeInfo_Location::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* SourceCodeInfo_Location::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo.Location) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated int32 path = 1 [packed = true]; - if (this->path_size() > 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( - 1, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, - target); - target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( - _path_cached_byte_size_.load(std::memory_order_relaxed), - target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteInt32NoTagToArray(this->path_, target); + { + int byte_size = _path_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 1, _internal_path(), byte_size, target); + } } // repeated int32 span = 2 [packed = true]; - if (this->span_size() > 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( - 2, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, - target); - target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( - _span_cached_byte_size_.load(std::memory_order_relaxed), - target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteInt32NoTagToArray(this->span_, target); + { + int byte_size = _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]; // optional string leading_comments = 3; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->leading_comments().data(), static_cast(this->leading_comments().length()), + this->_internal_leading_comments().data(), static_cast(this->_internal_leading_comments().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.leading_comments"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 3, this->leading_comments(), target); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_leading_comments(), target); } // optional string trailing_comments = 4; if (cached_has_bits & 0x00000002u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->trailing_comments().data(), static_cast(this->trailing_comments().length()), + this->_internal_trailing_comments().data(), static_cast(this->_internal_trailing_comments().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.trailing_comments"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 4, this->trailing_comments(), target); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_trailing_comments(), target); } // repeated string leading_detached_comments = 6; - for (int i = 0, n = this->leading_detached_comments_size(); i < n; i++) { + for (int i = 0, n = this->_internal_leading_detached_comments_size(); i < n; i++) { + const auto& s = this->_internal_leading_detached_comments(i); ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->leading_detached_comments(i).data(), static_cast(this->leading_detached_comments(i).length()), + s.data(), static_cast(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteStringToArray(6, this->leading_detached_comments(i), target); + target = stream->WriteString(6, s, target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo.Location) return target; @@ -14771,11 +10312,6 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceCodeInfo.Location) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -14812,10 +10348,10 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const { // repeated string leading_detached_comments = 6; total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->leading_detached_comments_size()); - for (int i = 0, n = this->leading_detached_comments_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(leading_detached_comments_.size()); + for (int i = 0, n = leading_detached_comments_.size(); i < n; i++) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->leading_detached_comments(i)); + leading_detached_comments_.Get(i)); } cached_has_bits = _has_bits_[0]; @@ -14824,17 +10360,21 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->leading_comments()); + this->_internal_leading_comments()); } // optional string trailing_comments = 4; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->trailing_comments()); + this->_internal_trailing_comments()); } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -14858,7 +10398,7 @@ void SourceCodeInfo_Location::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& 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); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -14868,10 +10408,10 @@ void SourceCodeInfo_Location::MergeFrom(const SourceCodeInfo_Location& from) { cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { - set_leading_comments(from.leading_comments()); + _internal_set_leading_comments(from._internal_leading_comments()); } if (cached_has_bits & 0x00000002u) { - set_trailing_comments(from.trailing_comments()); + _internal_set_trailing_comments(from._internal_trailing_comments()); } } } @@ -14894,36 +10434,15 @@ bool SourceCodeInfo_Location::IsInitialized() const { return true; } -void SourceCodeInfo_Location::Swap(SourceCodeInfo_Location* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - SourceCodeInfo_Location* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void SourceCodeInfo_Location::UnsafeArenaSwap(SourceCodeInfo_Location* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void SourceCodeInfo_Location::InternalSwap(SourceCodeInfo_Location* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); path_.InternalSwap(&other->path_); span_.InternalSwap(&other->span_); - leading_detached_comments_.InternalSwap(CastToBase(&other->leading_detached_comments_)); - leading_comments_.Swap(&other->leading_comments_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - trailing_comments_.Swap(&other->trailing_comments_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + leading_detached_comments_.InternalSwap(&other->leading_detached_comments_); + leading_comments_.Swap(&other->leading_comments_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + trailing_comments_.Swap(&other->trailing_comments_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } ::PROTOBUF_NAMESPACE_ID::Metadata SourceCodeInfo_Location::GetMetadata() const { @@ -14935,23 +10454,12 @@ void SourceCodeInfo_Location::InternalSwap(SourceCodeInfo_Location* other) { void SourceCodeInfo::InitAsDefaultInstance() { } -class SourceCodeInfo::HasBitSetters { +class SourceCodeInfo::_Internal { public: - using HasBits = decltype(std::declval()._has_bits_); }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int SourceCodeInfo::kLocationFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -SourceCodeInfo::SourceCodeInfo() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.SourceCodeInfo) -} SourceCodeInfo::SourceCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), location_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -14959,10 +10467,8 @@ SourceCodeInfo::SourceCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena) } SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), - _has_bits_(from._has_bits_), location_(from.location_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo) } @@ -14973,10 +10479,11 @@ void SourceCodeInfo::SharedCtor() { SourceCodeInfo::~SourceCodeInfo() { // @@protoc_insertion_point(destructor:google.protobuf.SourceCodeInfo) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void SourceCodeInfo::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void SourceCodeInfo::ArenaDtor(void* object) { @@ -15001,14 +10508,12 @@ void SourceCodeInfo::Clear() { (void) cached_has_bits; location_.Clear(); - _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* SourceCodeInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -15020,10 +10525,10 @@ const char* SourceCodeInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_location(), ptr); + ptr = ctx->ParseMessage(_internal_add_location(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); } else goto handle_unusual; continue; default: { @@ -15032,7 +10537,9 @@ const char* SourceCodeInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -15045,88 +10552,24 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool SourceCodeInfo::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.SourceCodeInfo) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.protobuf.SourceCodeInfo.Location location = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_location())); - } else { - goto handle_unusual; - } - break; - } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.SourceCodeInfo) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.SourceCodeInfo) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void SourceCodeInfo::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.SourceCodeInfo) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .google.protobuf.SourceCodeInfo.Location location = 1; - for (unsigned int i = 0, - n = static_cast(this->location_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, - this->location(static_cast(i)), - output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo) -} - -::PROTOBUF_NAMESPACE_ID::uint8* SourceCodeInfo::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* SourceCodeInfo::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.SourceCodeInfo.Location location = 1; for (unsigned int i = 0, - n = static_cast(this->location_size()); i < n; i++) { + n = static_cast(this->_internal_location_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 1, this->location(static_cast(i)), target); + InternalWriteMessage(1, this->_internal_location(i), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo) return target; @@ -15136,26 +10579,21 @@ size_t SourceCodeInfo::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceCodeInfo) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.SourceCodeInfo.Location location = 1; - { - unsigned int count = static_cast(this->location_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->location(static_cast(i))); - } + total_size += 1UL * this->_internal_location_size(); + for (const auto& msg : this->location_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -15179,7 +10617,7 @@ void SourceCodeInfo::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void SourceCodeInfo::MergeFrom(const SourceCodeInfo& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -15204,30 +10642,10 @@ bool SourceCodeInfo::IsInitialized() const { return true; } -void SourceCodeInfo::Swap(SourceCodeInfo* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - SourceCodeInfo* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void SourceCodeInfo::UnsafeArenaSwap(SourceCodeInfo* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void SourceCodeInfo::InternalSwap(SourceCodeInfo* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&location_)->InternalSwap(CastToBase(&other->location_)); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + location_.InternalSwap(&other->location_); } ::PROTOBUF_NAMESPACE_ID::Metadata SourceCodeInfo::GetMetadata() const { @@ -15239,7 +10657,7 @@ void SourceCodeInfo::InternalSwap(SourceCodeInfo* other) { void GeneratedCodeInfo_Annotation::InitAsDefaultInstance() { } -class GeneratedCodeInfo_Annotation::HasBitSetters { +class GeneratedCodeInfo_Annotation::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_source_file(HasBits* has_bits) { @@ -15253,21 +10671,8 @@ class GeneratedCodeInfo_Annotation::HasBitSetters { } }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int GeneratedCodeInfo_Annotation::kPathFieldNumber; -const int GeneratedCodeInfo_Annotation::kSourceFileFieldNumber; -const int GeneratedCodeInfo_Annotation::kBeginFieldNumber; -const int GeneratedCodeInfo_Annotation::kEndFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.GeneratedCodeInfo.Annotation) -} GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), path_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -15275,14 +10680,13 @@ GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(::PROTOBUF_NAMESPACE_ } GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeInfo_Annotation& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), _has_bits_(from._has_bits_), path_(from.path_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); source_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.has_source_file()) { - source_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.source_file(), - GetArenaNoVirtual()); + if (from._internal_has_source_file()) { + source_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_source_file(), + GetArena()); } ::memcpy(&begin_, &from.begin_, static_cast(reinterpret_cast(&end_) - @@ -15301,10 +10705,11 @@ void GeneratedCodeInfo_Annotation::SharedCtor() { GeneratedCodeInfo_Annotation::~GeneratedCodeInfo_Annotation() { // @@protoc_insertion_point(destructor:google.protobuf.GeneratedCodeInfo.Annotation) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void GeneratedCodeInfo_Annotation::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); source_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } @@ -15340,14 +10745,13 @@ void GeneratedCodeInfo_Annotation::Clear() { reinterpret_cast(&begin_)) + sizeof(end_)); } _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* GeneratedCodeInfo_Annotation::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - HasBitSetters::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + _Internal::HasBits has_bits{}; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -15356,33 +10760,37 @@ const char* GeneratedCodeInfo_Annotation::_InternalParse(const char* ptr, ::PROT // repeated int32 path = 1 [packed = true]; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_path(), ptr, ctx); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_path(), ptr, ctx); CHK_(ptr); } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8) { - add_path(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + _internal_add_path(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; // optional string source_file = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_source_file(), ptr, ctx, "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); + auto str = _internal_mutable_source_file(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); + #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; // optional int32 begin = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - HasBitSetters::set_has_begin(&has_bits); - begin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_begin(&has_bits); + begin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional int32 end = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - HasBitSetters::set_has_end(&has_bits); - end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + _Internal::set_has_end(&has_bits); + end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -15392,7 +10800,9 @@ const char* GeneratedCodeInfo_Annotation::_InternalParse(const char* ptr, ::PROT ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -15406,184 +10816,48 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool GeneratedCodeInfo_Annotation::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.GeneratedCodeInfo.Annotation) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated int32 path = 1 [packed = true]; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, this->mutable_path()))); - } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - 1, 10u, input, this->mutable_path()))); - } else { - goto handle_unusual; - } - break; - } - // optional string source_file = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_source_file())); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->source_file().data(), static_cast(this->source_file().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, - "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); - } else { - goto handle_unusual; - } - break; - } - - // optional int32 begin = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { - HasBitSetters::set_has_begin(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &begin_))); - } else { - goto handle_unusual; - } - break; - } - - // optional int32 end = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { - HasBitSetters::set_has_end(&_has_bits_); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &end_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.GeneratedCodeInfo.Annotation) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.GeneratedCodeInfo.Annotation) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void GeneratedCodeInfo_Annotation::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.GeneratedCodeInfo.Annotation) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated int32 path = 1 [packed = true]; - if (this->path_size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(1, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(_path_cached_byte_size_.load( - std::memory_order_relaxed)); - } - for (int i = 0, n = this->path_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32NoTag( - this->path(i), output); - } - - cached_has_bits = _has_bits_[0]; - // optional string source_file = 2; - if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->source_file().data(), static_cast(this->source_file().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 2, this->source_file(), output); - } - - // optional int32 begin = 3; - if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->begin(), output); - } - - // optional int32 end = 4; - if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(4, this->end(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.GeneratedCodeInfo.Annotation) -} - -::PROTOBUF_NAMESPACE_ID::uint8* GeneratedCodeInfo_Annotation::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* GeneratedCodeInfo_Annotation::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo.Annotation) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated int32 path = 1 [packed = true]; - if (this->path_size() > 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( - 1, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, - target); - target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( - _path_cached_byte_size_.load(std::memory_order_relaxed), - target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteInt32NoTagToArray(this->path_, target); + { + int byte_size = _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]; // optional string source_file = 2; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->source_file().data(), static_cast(this->source_file().length()), + this->_internal_source_file().data(), static_cast(this->_internal_source_file().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 2, this->source_file(), target); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_source_file(), target); } // optional int32 begin = 3; if (cached_has_bits & 0x00000002u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->begin(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_begin(), target); } // optional int32 end = 4; if (cached_has_bits & 0x00000004u) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->end(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_end(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.GeneratedCodeInfo.Annotation) return target; @@ -15593,11 +10867,6 @@ size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.GeneratedCodeInfo.Annotation) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -15623,24 +10892,28 @@ size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const { if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->source_file()); + this->_internal_source_file()); } // optional int32 begin = 3; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->begin()); + this->_internal_begin()); } // optional int32 end = 4; if (cached_has_bits & 0x00000004u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->end()); + this->_internal_end()); } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -15664,7 +10937,7 @@ void GeneratedCodeInfo_Annotation::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Mess 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); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -15672,7 +10945,7 @@ void GeneratedCodeInfo_Annotation::MergeFrom(const GeneratedCodeInfo_Annotation& cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x00000007u) { if (cached_has_bits & 0x00000001u) { - set_source_file(from.source_file()); + _internal_set_source_file(from._internal_source_file()); } if (cached_has_bits & 0x00000002u) { begin_ = from.begin_; @@ -15702,34 +10975,18 @@ bool GeneratedCodeInfo_Annotation::IsInitialized() const { return true; } -void GeneratedCodeInfo_Annotation::Swap(GeneratedCodeInfo_Annotation* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - GeneratedCodeInfo_Annotation* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void GeneratedCodeInfo_Annotation::UnsafeArenaSwap(GeneratedCodeInfo_Annotation* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void GeneratedCodeInfo_Annotation::InternalSwap(GeneratedCodeInfo_Annotation* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); path_.InternalSwap(&other->path_); - source_file_.Swap(&other->source_file_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(begin_, other->begin_); - swap(end_, other->end_); + source_file_.Swap(&other->source_file_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(GeneratedCodeInfo_Annotation, end_) + + sizeof(GeneratedCodeInfo_Annotation::end_) + - PROTOBUF_FIELD_OFFSET(GeneratedCodeInfo_Annotation, begin_)>( + reinterpret_cast(&begin_), + reinterpret_cast(&other->begin_)); } ::PROTOBUF_NAMESPACE_ID::Metadata GeneratedCodeInfo_Annotation::GetMetadata() const { @@ -15741,23 +10998,12 @@ void GeneratedCodeInfo_Annotation::InternalSwap(GeneratedCodeInfo_Annotation* ot void GeneratedCodeInfo::InitAsDefaultInstance() { } -class GeneratedCodeInfo::HasBitSetters { +class GeneratedCodeInfo::_Internal { public: - using HasBits = decltype(std::declval()._has_bits_); }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int GeneratedCodeInfo::kAnnotationFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -GeneratedCodeInfo::GeneratedCodeInfo() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.GeneratedCodeInfo) -} GeneratedCodeInfo::GeneratedCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), annotation_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -15765,10 +11011,8 @@ GeneratedCodeInfo::GeneratedCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena) } GeneratedCodeInfo::GeneratedCodeInfo(const GeneratedCodeInfo& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), - _has_bits_(from._has_bits_), annotation_(from.annotation_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo) } @@ -15779,10 +11023,11 @@ void GeneratedCodeInfo::SharedCtor() { GeneratedCodeInfo::~GeneratedCodeInfo() { // @@protoc_insertion_point(destructor:google.protobuf.GeneratedCodeInfo) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void GeneratedCodeInfo::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void GeneratedCodeInfo::ArenaDtor(void* object) { @@ -15807,14 +11052,12 @@ void GeneratedCodeInfo::Clear() { (void) cached_has_bits; annotation_.Clear(); - _has_bits_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* GeneratedCodeInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -15826,10 +11069,10 @@ const char* GeneratedCodeInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_annotation(), ptr); + ptr = ctx->ParseMessage(_internal_add_annotation(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); } else goto handle_unusual; continue; default: { @@ -15838,7 +11081,9 @@ const char* GeneratedCodeInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -15851,88 +11096,24 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool GeneratedCodeInfo::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.GeneratedCodeInfo) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_annotation())); - } else { - goto handle_unusual; - } - break; - } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.GeneratedCodeInfo) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.GeneratedCodeInfo) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void GeneratedCodeInfo::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.GeneratedCodeInfo) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; - for (unsigned int i = 0, - n = static_cast(this->annotation_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, - this->annotation(static_cast(i)), - output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.GeneratedCodeInfo) -} - -::PROTOBUF_NAMESPACE_ID::uint8* GeneratedCodeInfo::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* GeneratedCodeInfo::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; for (unsigned int i = 0, - n = static_cast(this->annotation_size()); i < n; i++) { + n = static_cast(this->_internal_annotation_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 1, this->annotation(static_cast(i)), target); + InternalWriteMessage(1, this->_internal_annotation(i), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.GeneratedCodeInfo) return target; @@ -15942,26 +11123,21 @@ size_t GeneratedCodeInfo::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.GeneratedCodeInfo) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; - { - unsigned int count = static_cast(this->annotation_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->annotation(static_cast(i))); - } + total_size += 1UL * this->_internal_annotation_size(); + for (const auto& msg : this->annotation_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -15985,7 +11161,7 @@ void GeneratedCodeInfo::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) void GeneratedCodeInfo::MergeFrom(const GeneratedCodeInfo& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.GeneratedCodeInfo) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -16010,30 +11186,10 @@ bool GeneratedCodeInfo::IsInitialized() const { return true; } -void GeneratedCodeInfo::Swap(GeneratedCodeInfo* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - GeneratedCodeInfo* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void GeneratedCodeInfo::UnsafeArenaSwap(GeneratedCodeInfo* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void GeneratedCodeInfo::InternalSwap(GeneratedCodeInfo* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - swap(_has_bits_[0], other->_has_bits_[0]); - CastToBase(&annotation_)->InternalSwap(CastToBase(&other->annotation_)); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + annotation_.InternalSwap(&other->annotation_); } ::PROTOBUF_NAMESPACE_ID::Metadata GeneratedCodeInfo::GetMetadata() const { diff --git a/third_party/protobuf/src/google/protobuf/descriptor.pb.h b/third_party/protobuf/src/google/protobuf/descriptor.pb.h index 43c20a85..0620eaf4 100644 --- a/third_party/protobuf/src/google/protobuf/descriptor.pb.h +++ b/third_party/protobuf/src/google/protobuf/descriptor.pb.h @@ -8,12 +8,12 @@ #include #include -#if PROTOBUF_VERSION < 3008000 +#if PROTOBUF_VERSION < 3012000 #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 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3012004 < 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. @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include // IWYU pragma: export @@ -330,10 +330,10 @@ inline bool MethodOptions_IdempotencyLevel_Parse( } // =================================================================== -class PROTOBUF_EXPORT FileDescriptorSet : +class PROTOBUF_EXPORT FileDescriptorSet PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FileDescriptorSet) */ { public: - FileDescriptorSet(); + inline FileDescriptorSet() : FileDescriptorSet(nullptr) {}; virtual ~FileDescriptorSet(); FileDescriptorSet(const FileDescriptorSet& from); @@ -347,7 +347,7 @@ class PROTOBUF_EXPORT FileDescriptorSet : return *this; } inline FileDescriptorSet& operator=(FileDescriptorSet&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -356,18 +356,12 @@ class PROTOBUF_EXPORT FileDescriptorSet : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -387,11 +381,22 @@ class PROTOBUF_EXPORT FileDescriptorSet : static constexpr int kIndexInFileMessages = 0; - void UnsafeArenaSwap(FileDescriptorSet* other); - void Swap(FileDescriptorSet* other); friend void swap(FileDescriptorSet& a, FileDescriptorSet& b) { a.Swap(&b); } + inline void Swap(FileDescriptorSet* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FileDescriptorSet* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -410,16 +415,9 @@ class PROTOBUF_EXPORT FileDescriptorSet : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -436,13 +434,6 @@ class PROTOBUF_EXPORT FileDescriptorSet : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -458,13 +449,22 @@ class PROTOBUF_EXPORT FileDescriptorSet : // accessors ------------------------------------------------------- + enum : int { + kFileFieldNumber = 1, + }; // repeated .google.protobuf.FileDescriptorProto file = 1; int file_size() const; + private: + int _internal_file_size() const; + public: void clear_file(); - static const int kFileFieldNumber = 1; PROTOBUF_NAMESPACE_ID::FileDescriptorProto* mutable_file(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >* mutable_file(); + private: + const PROTOBUF_NAMESPACE_ID::FileDescriptorProto& _internal_file(int index) const; + PROTOBUF_NAMESPACE_ID::FileDescriptorProto* _internal_add_file(); + public: const PROTOBUF_NAMESPACE_ID::FileDescriptorProto& file(int index) const; PROTOBUF_NAMESPACE_ID::FileDescriptorProto* add_file(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >& @@ -472,23 +472,21 @@ class PROTOBUF_EXPORT FileDescriptorSet : // @@protoc_insertion_point(class_scope:google.protobuf.FileDescriptorSet) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template 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::FileDescriptorProto > file_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT FileDescriptorProto : +class PROTOBUF_EXPORT FileDescriptorProto PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FileDescriptorProto) */ { public: - FileDescriptorProto(); + inline FileDescriptorProto() : FileDescriptorProto(nullptr) {}; virtual ~FileDescriptorProto(); FileDescriptorProto(const FileDescriptorProto& from); @@ -502,7 +500,7 @@ class PROTOBUF_EXPORT FileDescriptorProto : return *this; } inline FileDescriptorProto& operator=(FileDescriptorProto&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -511,18 +509,12 @@ class PROTOBUF_EXPORT FileDescriptorProto : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -542,11 +534,22 @@ class PROTOBUF_EXPORT FileDescriptorProto : static constexpr int kIndexInFileMessages = 1; - void UnsafeArenaSwap(FileDescriptorProto* other); - void Swap(FileDescriptorProto* other); friend void swap(FileDescriptorProto& a, FileDescriptorProto& b) { a.Swap(&b); } + inline void Swap(FileDescriptorProto* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FileDescriptorProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -565,16 +568,9 @@ class PROTOBUF_EXPORT FileDescriptorProto : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -591,13 +587,6 @@ class PROTOBUF_EXPORT FileDescriptorProto : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -613,10 +602,26 @@ class PROTOBUF_EXPORT FileDescriptorProto : // accessors ------------------------------------------------------- + enum : int { + kDependencyFieldNumber = 3, + kMessageTypeFieldNumber = 4, + kEnumTypeFieldNumber = 5, + kServiceFieldNumber = 6, + kExtensionFieldNumber = 7, + kPublicDependencyFieldNumber = 10, + kWeakDependencyFieldNumber = 11, + kNameFieldNumber = 1, + kPackageFieldNumber = 2, + kSyntaxFieldNumber = 12, + kOptionsFieldNumber = 8, + kSourceCodeInfoFieldNumber = 9, + }; // repeated string dependency = 3; int dependency_size() const; + private: + int _internal_dependency_size() const; + public: void clear_dependency(); - static const int kDependencyFieldNumber = 3; const std::string& dependency(int index) const; std::string* mutable_dependency(int index); void set_dependency(int index, const std::string& value); @@ -630,14 +635,24 @@ class PROTOBUF_EXPORT FileDescriptorProto : void add_dependency(const char* value, size_t size); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& dependency() const; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_dependency(); + private: + const std::string& _internal_dependency(int index) const; + std::string* _internal_add_dependency(); + public: // repeated .google.protobuf.DescriptorProto message_type = 4; int message_type_size() const; + private: + int _internal_message_type_size() const; + public: void clear_message_type(); - static const int kMessageTypeFieldNumber = 4; PROTOBUF_NAMESPACE_ID::DescriptorProto* mutable_message_type(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto >* mutable_message_type(); + private: + const PROTOBUF_NAMESPACE_ID::DescriptorProto& _internal_message_type(int index) const; + PROTOBUF_NAMESPACE_ID::DescriptorProto* _internal_add_message_type(); + public: const PROTOBUF_NAMESPACE_ID::DescriptorProto& message_type(int index) const; PROTOBUF_NAMESPACE_ID::DescriptorProto* add_message_type(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto >& @@ -645,11 +660,17 @@ class PROTOBUF_EXPORT FileDescriptorProto : // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; int enum_type_size() const; + private: + int _internal_enum_type_size() const; + public: void clear_enum_type(); - static const int kEnumTypeFieldNumber = 5; PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* mutable_enum_type(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >* mutable_enum_type(); + private: + const PROTOBUF_NAMESPACE_ID::EnumDescriptorProto& _internal_enum_type(int index) const; + PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* _internal_add_enum_type(); + public: const PROTOBUF_NAMESPACE_ID::EnumDescriptorProto& enum_type(int index) const; PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* add_enum_type(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >& @@ -657,11 +678,17 @@ class PROTOBUF_EXPORT FileDescriptorProto : // repeated .google.protobuf.ServiceDescriptorProto service = 6; int service_size() const; + private: + int _internal_service_size() const; + public: void clear_service(); - static const int kServiceFieldNumber = 6; PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* mutable_service(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto >* mutable_service(); + private: + const PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto& _internal_service(int index) const; + PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* _internal_add_service(); + public: const PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto& service(int index) const; PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* add_service(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto >& @@ -669,11 +696,17 @@ class PROTOBUF_EXPORT FileDescriptorProto : // repeated .google.protobuf.FieldDescriptorProto extension = 7; int extension_size() const; + private: + int _internal_extension_size() const; + public: void clear_extension(); - static const int kExtensionFieldNumber = 7; PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* mutable_extension(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >* mutable_extension(); + private: + const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& _internal_extension(int index) const; + PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* _internal_add_extension(); + public: const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& extension(int index) const; PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* add_extension(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >& @@ -681,8 +714,18 @@ class PROTOBUF_EXPORT FileDescriptorProto : // repeated int32 public_dependency = 10; int public_dependency_size() const; + private: + int _internal_public_dependency_size() const; + public: void clear_public_dependency(); - static const int kPublicDependencyFieldNumber = 10; + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_public_dependency(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& + _internal_public_dependency() const; + void _internal_add_public_dependency(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* + _internal_mutable_public_dependency(); + public: ::PROTOBUF_NAMESPACE_ID::int32 public_dependency(int index) const; void set_public_dependency(int index, ::PROTOBUF_NAMESPACE_ID::int32 value); void add_public_dependency(::PROTOBUF_NAMESPACE_ID::int32 value); @@ -693,8 +736,18 @@ class PROTOBUF_EXPORT FileDescriptorProto : // repeated int32 weak_dependency = 11; int weak_dependency_size() const; + private: + int _internal_weak_dependency_size() const; + public: void clear_weak_dependency(); - static const int kWeakDependencyFieldNumber = 11; + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_weak_dependency(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& + _internal_weak_dependency() const; + void _internal_add_weak_dependency(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* + _internal_mutable_weak_dependency(); + public: ::PROTOBUF_NAMESPACE_ID::int32 weak_dependency(int index) const; void set_weak_dependency(int index, ::PROTOBUF_NAMESPACE_ID::int32 value); void add_weak_dependency(::PROTOBUF_NAMESPACE_ID::int32 value); @@ -705,8 +758,10 @@ class PROTOBUF_EXPORT FileDescriptorProto : // optional string name = 1; bool has_name() const; + private: + bool _internal_has_name() const; + public: void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -724,11 +779,18 @@ class PROTOBUF_EXPORT FileDescriptorProto : " future release.") void unsafe_arena_set_allocated_name( std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // optional string package = 2; bool has_package() const; + private: + bool _internal_has_package() const; + public: void clear_package(); - static const int kPackageFieldNumber = 2; const std::string& package() const; void set_package(const std::string& value); void set_package(std::string&& value); @@ -746,11 +808,18 @@ class PROTOBUF_EXPORT FileDescriptorProto : " future release.") void unsafe_arena_set_allocated_package( std::string* package); + private: + const std::string& _internal_package() const; + void _internal_set_package(const std::string& value); + std::string* _internal_mutable_package(); + public: // optional string syntax = 12; bool has_syntax() const; + private: + bool _internal_has_syntax() const; + public: void clear_syntax(); - static const int kSyntaxFieldNumber = 12; const std::string& syntax() const; void set_syntax(const std::string& value); void set_syntax(std::string&& value); @@ -768,36 +837,52 @@ class PROTOBUF_EXPORT FileDescriptorProto : " future release.") void unsafe_arena_set_allocated_syntax( std::string* syntax); + private: + const std::string& _internal_syntax() const; + void _internal_set_syntax(const std::string& value); + std::string* _internal_mutable_syntax(); + public: // optional .google.protobuf.FileOptions options = 8; bool has_options() const; + private: + bool _internal_has_options() const; + public: void clear_options(); - static const int kOptionsFieldNumber = 8; const PROTOBUF_NAMESPACE_ID::FileOptions& options() const; PROTOBUF_NAMESPACE_ID::FileOptions* release_options(); PROTOBUF_NAMESPACE_ID::FileOptions* mutable_options(); void set_allocated_options(PROTOBUF_NAMESPACE_ID::FileOptions* options); + private: + const PROTOBUF_NAMESPACE_ID::FileOptions& _internal_options() const; + PROTOBUF_NAMESPACE_ID::FileOptions* _internal_mutable_options(); + public: void unsafe_arena_set_allocated_options( PROTOBUF_NAMESPACE_ID::FileOptions* options); PROTOBUF_NAMESPACE_ID::FileOptions* unsafe_arena_release_options(); // optional .google.protobuf.SourceCodeInfo source_code_info = 9; bool has_source_code_info() const; + private: + bool _internal_has_source_code_info() const; + public: void clear_source_code_info(); - static const int kSourceCodeInfoFieldNumber = 9; const PROTOBUF_NAMESPACE_ID::SourceCodeInfo& source_code_info() const; PROTOBUF_NAMESPACE_ID::SourceCodeInfo* release_source_code_info(); PROTOBUF_NAMESPACE_ID::SourceCodeInfo* mutable_source_code_info(); void set_allocated_source_code_info(PROTOBUF_NAMESPACE_ID::SourceCodeInfo* source_code_info); + private: + const PROTOBUF_NAMESPACE_ID::SourceCodeInfo& _internal_source_code_info() const; + PROTOBUF_NAMESPACE_ID::SourceCodeInfo* _internal_mutable_source_code_info(); + public: void unsafe_arena_set_allocated_source_code_info( PROTOBUF_NAMESPACE_ID::SourceCodeInfo* source_code_info); PROTOBUF_NAMESPACE_ID::SourceCodeInfo* unsafe_arena_release_source_code_info(); // @@protoc_insertion_point(class_scope:google.protobuf.FileDescriptorProto) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -819,10 +904,10 @@ class PROTOBUF_EXPORT FileDescriptorProto : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT DescriptorProto_ExtensionRange : +class PROTOBUF_EXPORT DescriptorProto_ExtensionRange PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DescriptorProto.ExtensionRange) */ { public: - DescriptorProto_ExtensionRange(); + inline DescriptorProto_ExtensionRange() : DescriptorProto_ExtensionRange(nullptr) {}; virtual ~DescriptorProto_ExtensionRange(); DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from); @@ -836,7 +921,7 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange : return *this; } inline DescriptorProto_ExtensionRange& operator=(DescriptorProto_ExtensionRange&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -845,18 +930,12 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -876,11 +955,22 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange : static constexpr int kIndexInFileMessages = 2; - void UnsafeArenaSwap(DescriptorProto_ExtensionRange* other); - void Swap(DescriptorProto_ExtensionRange* other); friend void swap(DescriptorProto_ExtensionRange& a, DescriptorProto_ExtensionRange& b) { a.Swap(&b); } + inline void Swap(DescriptorProto_ExtensionRange* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DescriptorProto_ExtensionRange* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -899,16 +989,9 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -925,13 +1008,6 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -947,37 +1023,59 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange : // accessors ------------------------------------------------------- + enum : int { + kOptionsFieldNumber = 3, + kStartFieldNumber = 1, + kEndFieldNumber = 2, + }; // optional .google.protobuf.ExtensionRangeOptions options = 3; bool has_options() const; + private: + bool _internal_has_options() const; + public: void clear_options(); - static const int kOptionsFieldNumber = 3; const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& options() const; PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* release_options(); PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* mutable_options(); void set_allocated_options(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options); + private: + const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& _internal_options() const; + PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* _internal_mutable_options(); + public: void unsafe_arena_set_allocated_options( PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options); PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* unsafe_arena_release_options(); // optional int32 start = 1; bool has_start() const; + private: + bool _internal_has_start() const; + public: void clear_start(); - static const int kStartFieldNumber = 1; ::PROTOBUF_NAMESPACE_ID::int32 start() const; void set_start(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_start() const; + void _internal_set_start(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // optional int32 end = 2; bool has_end() const; + private: + bool _internal_has_end() const; + public: void clear_end(); - static const int kEndFieldNumber = 2; ::PROTOBUF_NAMESPACE_ID::int32 end() const; void set_end(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_end() const; + void _internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto.ExtensionRange) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -990,10 +1088,10 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT DescriptorProto_ReservedRange : +class PROTOBUF_EXPORT DescriptorProto_ReservedRange PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DescriptorProto.ReservedRange) */ { public: - DescriptorProto_ReservedRange(); + inline DescriptorProto_ReservedRange() : DescriptorProto_ReservedRange(nullptr) {}; virtual ~DescriptorProto_ReservedRange(); DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange& from); @@ -1007,7 +1105,7 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange : return *this; } inline DescriptorProto_ReservedRange& operator=(DescriptorProto_ReservedRange&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -1016,18 +1114,12 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -1047,11 +1139,22 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange : static constexpr int kIndexInFileMessages = 3; - void UnsafeArenaSwap(DescriptorProto_ReservedRange* other); - void Swap(DescriptorProto_ReservedRange* other); friend void swap(DescriptorProto_ReservedRange& a, DescriptorProto_ReservedRange& b) { a.Swap(&b); } + inline void Swap(DescriptorProto_ReservedRange* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DescriptorProto_ReservedRange* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1070,16 +1173,9 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -1096,13 +1192,6 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -1118,25 +1207,40 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange : // accessors ------------------------------------------------------- + enum : int { + kStartFieldNumber = 1, + kEndFieldNumber = 2, + }; // optional int32 start = 1; bool has_start() const; + private: + bool _internal_has_start() const; + public: void clear_start(); - static const int kStartFieldNumber = 1; ::PROTOBUF_NAMESPACE_ID::int32 start() const; void set_start(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_start() const; + void _internal_set_start(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // optional int32 end = 2; bool has_end() const; + private: + bool _internal_has_end() const; + public: void clear_end(); - static const int kEndFieldNumber = 2; ::PROTOBUF_NAMESPACE_ID::int32 end() const; void set_end(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_end() const; + void _internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto.ReservedRange) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -1148,10 +1252,10 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT DescriptorProto : +class PROTOBUF_EXPORT DescriptorProto PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DescriptorProto) */ { public: - DescriptorProto(); + inline DescriptorProto() : DescriptorProto(nullptr) {}; virtual ~DescriptorProto(); DescriptorProto(const DescriptorProto& from); @@ -1165,7 +1269,7 @@ class PROTOBUF_EXPORT DescriptorProto : return *this; } inline DescriptorProto& operator=(DescriptorProto&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -1174,18 +1278,12 @@ class PROTOBUF_EXPORT DescriptorProto : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -1205,11 +1303,22 @@ class PROTOBUF_EXPORT DescriptorProto : static constexpr int kIndexInFileMessages = 4; - void UnsafeArenaSwap(DescriptorProto* other); - void Swap(DescriptorProto* other); friend void swap(DescriptorProto& a, DescriptorProto& b) { a.Swap(&b); } + inline void Swap(DescriptorProto* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DescriptorProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1228,16 +1337,9 @@ class PROTOBUF_EXPORT DescriptorProto : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -1254,13 +1356,6 @@ class PROTOBUF_EXPORT DescriptorProto : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -1279,13 +1374,31 @@ class PROTOBUF_EXPORT DescriptorProto : // accessors ------------------------------------------------------- + enum : int { + kFieldFieldNumber = 2, + kNestedTypeFieldNumber = 3, + kEnumTypeFieldNumber = 4, + kExtensionRangeFieldNumber = 5, + kExtensionFieldNumber = 6, + kOneofDeclFieldNumber = 8, + kReservedRangeFieldNumber = 9, + kReservedNameFieldNumber = 10, + kNameFieldNumber = 1, + kOptionsFieldNumber = 7, + }; // repeated .google.protobuf.FieldDescriptorProto field = 2; int field_size() const; + private: + int _internal_field_size() const; + public: void clear_field(); - static const int kFieldFieldNumber = 2; PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* mutable_field(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >* mutable_field(); + private: + const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& _internal_field(int index) const; + PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* _internal_add_field(); + public: const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& field(int index) const; PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* add_field(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >& @@ -1293,11 +1406,17 @@ class PROTOBUF_EXPORT DescriptorProto : // repeated .google.protobuf.DescriptorProto nested_type = 3; int nested_type_size() const; + private: + int _internal_nested_type_size() const; + public: void clear_nested_type(); - static const int kNestedTypeFieldNumber = 3; PROTOBUF_NAMESPACE_ID::DescriptorProto* mutable_nested_type(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto >* mutable_nested_type(); + private: + const PROTOBUF_NAMESPACE_ID::DescriptorProto& _internal_nested_type(int index) const; + PROTOBUF_NAMESPACE_ID::DescriptorProto* _internal_add_nested_type(); + public: const PROTOBUF_NAMESPACE_ID::DescriptorProto& nested_type(int index) const; PROTOBUF_NAMESPACE_ID::DescriptorProto* add_nested_type(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto >& @@ -1305,11 +1424,17 @@ class PROTOBUF_EXPORT DescriptorProto : // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; int enum_type_size() const; + private: + int _internal_enum_type_size() const; + public: void clear_enum_type(); - static const int kEnumTypeFieldNumber = 4; PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* mutable_enum_type(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >* mutable_enum_type(); + private: + const PROTOBUF_NAMESPACE_ID::EnumDescriptorProto& _internal_enum_type(int index) const; + PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* _internal_add_enum_type(); + public: const PROTOBUF_NAMESPACE_ID::EnumDescriptorProto& enum_type(int index) const; PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* add_enum_type(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >& @@ -1317,11 +1442,17 @@ class PROTOBUF_EXPORT DescriptorProto : // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; int extension_range_size() const; + private: + int _internal_extension_range_size() const; + public: void clear_extension_range(); - static const int kExtensionRangeFieldNumber = 5; PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* mutable_extension_range(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange >* mutable_extension_range(); + private: + const PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange& _internal_extension_range(int index) const; + PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* _internal_add_extension_range(); + public: const PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange& extension_range(int index) const; PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* add_extension_range(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange >& @@ -1329,11 +1460,17 @@ class PROTOBUF_EXPORT DescriptorProto : // repeated .google.protobuf.FieldDescriptorProto extension = 6; int extension_size() const; + private: + int _internal_extension_size() const; + public: void clear_extension(); - static const int kExtensionFieldNumber = 6; PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* mutable_extension(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >* mutable_extension(); + private: + const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& _internal_extension(int index) const; + PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* _internal_add_extension(); + public: const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& extension(int index) const; PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* add_extension(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >& @@ -1341,11 +1478,17 @@ class PROTOBUF_EXPORT DescriptorProto : // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; int oneof_decl_size() const; + private: + int _internal_oneof_decl_size() const; + public: void clear_oneof_decl(); - static const int kOneofDeclFieldNumber = 8; PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* mutable_oneof_decl(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::OneofDescriptorProto >* mutable_oneof_decl(); + private: + const PROTOBUF_NAMESPACE_ID::OneofDescriptorProto& _internal_oneof_decl(int index) const; + PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* _internal_add_oneof_decl(); + public: const PROTOBUF_NAMESPACE_ID::OneofDescriptorProto& oneof_decl(int index) const; PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* add_oneof_decl(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::OneofDescriptorProto >& @@ -1353,11 +1496,17 @@ class PROTOBUF_EXPORT DescriptorProto : // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; int reserved_range_size() const; + private: + int _internal_reserved_range_size() const; + public: void clear_reserved_range(); - static const int kReservedRangeFieldNumber = 9; PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* mutable_reserved_range(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange >* mutable_reserved_range(); + private: + const PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange& _internal_reserved_range(int index) const; + PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* _internal_add_reserved_range(); + public: const PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange& reserved_range(int index) const; PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* add_reserved_range(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange >& @@ -1365,8 +1514,10 @@ class PROTOBUF_EXPORT DescriptorProto : // repeated string reserved_name = 10; int reserved_name_size() const; + private: + int _internal_reserved_name_size() const; + public: void clear_reserved_name(); - static const int kReservedNameFieldNumber = 10; const std::string& reserved_name(int index) const; std::string* mutable_reserved_name(int index); void set_reserved_name(int index, const std::string& value); @@ -1380,11 +1531,17 @@ class PROTOBUF_EXPORT DescriptorProto : void add_reserved_name(const char* value, size_t size); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& reserved_name() const; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_reserved_name(); + private: + const std::string& _internal_reserved_name(int index) const; + std::string* _internal_add_reserved_name(); + public: // optional string name = 1; bool has_name() const; + private: + bool _internal_has_name() const; + public: void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -1402,24 +1559,34 @@ class PROTOBUF_EXPORT DescriptorProto : " future release.") void unsafe_arena_set_allocated_name( std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // optional .google.protobuf.MessageOptions options = 7; bool has_options() const; + private: + bool _internal_has_options() const; + public: void clear_options(); - static const int kOptionsFieldNumber = 7; const PROTOBUF_NAMESPACE_ID::MessageOptions& options() const; PROTOBUF_NAMESPACE_ID::MessageOptions* release_options(); PROTOBUF_NAMESPACE_ID::MessageOptions* mutable_options(); void set_allocated_options(PROTOBUF_NAMESPACE_ID::MessageOptions* options); + private: + const PROTOBUF_NAMESPACE_ID::MessageOptions& _internal_options() const; + PROTOBUF_NAMESPACE_ID::MessageOptions* _internal_mutable_options(); + public: void unsafe_arena_set_allocated_options( PROTOBUF_NAMESPACE_ID::MessageOptions* options); PROTOBUF_NAMESPACE_ID::MessageOptions* unsafe_arena_release_options(); // @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -1439,10 +1606,10 @@ class PROTOBUF_EXPORT DescriptorProto : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT ExtensionRangeOptions : +class PROTOBUF_EXPORT ExtensionRangeOptions PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ExtensionRangeOptions) */ { public: - ExtensionRangeOptions(); + inline ExtensionRangeOptions() : ExtensionRangeOptions(nullptr) {}; virtual ~ExtensionRangeOptions(); ExtensionRangeOptions(const ExtensionRangeOptions& from); @@ -1456,7 +1623,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions : return *this; } inline ExtensionRangeOptions& operator=(ExtensionRangeOptions&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -1465,18 +1632,12 @@ class PROTOBUF_EXPORT ExtensionRangeOptions : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -1496,11 +1657,22 @@ class PROTOBUF_EXPORT ExtensionRangeOptions : static constexpr int kIndexInFileMessages = 5; - void UnsafeArenaSwap(ExtensionRangeOptions* other); - void Swap(ExtensionRangeOptions* other); friend void swap(ExtensionRangeOptions& a, ExtensionRangeOptions& b) { a.Swap(&b); } + inline void Swap(ExtensionRangeOptions* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ExtensionRangeOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1519,16 +1691,9 @@ class PROTOBUF_EXPORT ExtensionRangeOptions : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -1545,13 +1710,6 @@ class PROTOBUF_EXPORT ExtensionRangeOptions : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -1567,13 +1725,22 @@ class PROTOBUF_EXPORT ExtensionRangeOptions : // accessors ------------------------------------------------------- + enum : int { + kUninterpretedOptionFieldNumber = 999, + }; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; int uninterpreted_option_size() const; + private: + int _internal_uninterpreted_option_size() const; + public: void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); + private: + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& _internal_uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* _internal_add_uninterpreted_option(); + public: const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& @@ -1582,25 +1749,23 @@ class PROTOBUF_EXPORT ExtensionRangeOptions : GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(ExtensionRangeOptions) // @@protoc_insertion_point(class_scope:google.protobuf.ExtensionRangeOptions) private: - class HasBitSetters; + class _Internal; ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template 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_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT FieldDescriptorProto : +class PROTOBUF_EXPORT FieldDescriptorProto PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldDescriptorProto) */ { public: - FieldDescriptorProto(); + inline FieldDescriptorProto() : FieldDescriptorProto(nullptr) {}; virtual ~FieldDescriptorProto(); FieldDescriptorProto(const FieldDescriptorProto& from); @@ -1614,7 +1779,7 @@ class PROTOBUF_EXPORT FieldDescriptorProto : return *this; } inline FieldDescriptorProto& operator=(FieldDescriptorProto&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -1623,18 +1788,12 @@ class PROTOBUF_EXPORT FieldDescriptorProto : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -1654,11 +1813,22 @@ class PROTOBUF_EXPORT FieldDescriptorProto : static constexpr int kIndexInFileMessages = 6; - void UnsafeArenaSwap(FieldDescriptorProto* other); - void Swap(FieldDescriptorProto* other); friend void swap(FieldDescriptorProto& a, FieldDescriptorProto& b) { a.Swap(&b); } + inline void Swap(FieldDescriptorProto* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FieldDescriptorProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1677,16 +1847,9 @@ class PROTOBUF_EXPORT FieldDescriptorProto : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -1703,13 +1866,6 @@ class PROTOBUF_EXPORT FieldDescriptorProto : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -1819,10 +1975,25 @@ class PROTOBUF_EXPORT FieldDescriptorProto : // accessors ------------------------------------------------------- + enum : int { + kNameFieldNumber = 1, + kExtendeeFieldNumber = 2, + kTypeNameFieldNumber = 6, + kDefaultValueFieldNumber = 7, + kJsonNameFieldNumber = 10, + kOptionsFieldNumber = 8, + kNumberFieldNumber = 3, + kOneofIndexFieldNumber = 9, + kProto3OptionalFieldNumber = 17, + kLabelFieldNumber = 4, + kTypeFieldNumber = 5, + }; // optional string name = 1; bool has_name() const; + private: + bool _internal_has_name() const; + public: void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -1840,11 +2011,18 @@ class PROTOBUF_EXPORT FieldDescriptorProto : " future release.") void unsafe_arena_set_allocated_name( std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // optional string extendee = 2; bool has_extendee() const; + private: + bool _internal_has_extendee() const; + public: void clear_extendee(); - static const int kExtendeeFieldNumber = 2; const std::string& extendee() const; void set_extendee(const std::string& value); void set_extendee(std::string&& value); @@ -1862,11 +2040,18 @@ class PROTOBUF_EXPORT FieldDescriptorProto : " future release.") void unsafe_arena_set_allocated_extendee( std::string* extendee); + private: + const std::string& _internal_extendee() const; + void _internal_set_extendee(const std::string& value); + std::string* _internal_mutable_extendee(); + public: // optional string type_name = 6; bool has_type_name() const; + private: + bool _internal_has_type_name() const; + public: void clear_type_name(); - static const int kTypeNameFieldNumber = 6; const std::string& type_name() const; void set_type_name(const std::string& value); void set_type_name(std::string&& value); @@ -1884,11 +2069,18 @@ class PROTOBUF_EXPORT FieldDescriptorProto : " future release.") void unsafe_arena_set_allocated_type_name( std::string* type_name); + private: + const std::string& _internal_type_name() const; + void _internal_set_type_name(const std::string& value); + std::string* _internal_mutable_type_name(); + public: // optional string default_value = 7; bool has_default_value() const; + private: + bool _internal_has_default_value() const; + public: void clear_default_value(); - static const int kDefaultValueFieldNumber = 7; const std::string& default_value() const; void set_default_value(const std::string& value); void set_default_value(std::string&& value); @@ -1906,11 +2098,18 @@ class PROTOBUF_EXPORT FieldDescriptorProto : " future release.") void unsafe_arena_set_allocated_default_value( std::string* default_value); + private: + const std::string& _internal_default_value() const; + void _internal_set_default_value(const std::string& value); + std::string* _internal_mutable_default_value(); + public: // optional string json_name = 10; bool has_json_name() const; + private: + bool _internal_has_json_name() const; + public: void clear_json_name(); - static const int kJsonNameFieldNumber = 10; const std::string& json_name() const; void set_json_name(const std::string& value); void set_json_name(std::string&& value); @@ -1928,52 +2127,99 @@ class PROTOBUF_EXPORT FieldDescriptorProto : " future release.") void unsafe_arena_set_allocated_json_name( std::string* json_name); + private: + const std::string& _internal_json_name() const; + void _internal_set_json_name(const std::string& value); + std::string* _internal_mutable_json_name(); + public: // optional .google.protobuf.FieldOptions options = 8; bool has_options() const; + private: + bool _internal_has_options() const; + public: void clear_options(); - static const int kOptionsFieldNumber = 8; const PROTOBUF_NAMESPACE_ID::FieldOptions& options() const; PROTOBUF_NAMESPACE_ID::FieldOptions* release_options(); PROTOBUF_NAMESPACE_ID::FieldOptions* mutable_options(); void set_allocated_options(PROTOBUF_NAMESPACE_ID::FieldOptions* options); + private: + const PROTOBUF_NAMESPACE_ID::FieldOptions& _internal_options() const; + PROTOBUF_NAMESPACE_ID::FieldOptions* _internal_mutable_options(); + public: void unsafe_arena_set_allocated_options( PROTOBUF_NAMESPACE_ID::FieldOptions* options); PROTOBUF_NAMESPACE_ID::FieldOptions* unsafe_arena_release_options(); // optional int32 number = 3; bool has_number() const; + private: + bool _internal_has_number() const; + public: void clear_number(); - static const int kNumberFieldNumber = 3; ::PROTOBUF_NAMESPACE_ID::int32 number() const; void set_number(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_number() const; + void _internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // optional int32 oneof_index = 9; bool has_oneof_index() const; + private: + bool _internal_has_oneof_index() const; + public: void clear_oneof_index(); - static const int kOneofIndexFieldNumber = 9; ::PROTOBUF_NAMESPACE_ID::int32 oneof_index() const; void set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_oneof_index() const; + void _internal_set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // optional bool proto3_optional = 17; + bool has_proto3_optional() const; + private: + bool _internal_has_proto3_optional() const; + public: + void clear_proto3_optional(); + bool proto3_optional() const; + void set_proto3_optional(bool value); + private: + bool _internal_proto3_optional() const; + void _internal_set_proto3_optional(bool value); + public: // optional .google.protobuf.FieldDescriptorProto.Label label = 4; bool has_label() const; + private: + bool _internal_has_label() const; + public: void clear_label(); - static const int kLabelFieldNumber = 4; PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label label() const; void set_label(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label value); + private: + PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label _internal_label() const; + void _internal_set_label(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label value); + public: // optional .google.protobuf.FieldDescriptorProto.Type type = 5; bool has_type() const; + private: + bool _internal_has_type() const; + public: void clear_type(); - static const int kTypeFieldNumber = 5; PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type type() const; void set_type(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type value); + private: + PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type _internal_type() const; + void _internal_set_type(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.FieldDescriptorProto) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -1987,16 +2233,17 @@ class PROTOBUF_EXPORT FieldDescriptorProto : PROTOBUF_NAMESPACE_ID::FieldOptions* options_; ::PROTOBUF_NAMESPACE_ID::int32 number_; ::PROTOBUF_NAMESPACE_ID::int32 oneof_index_; + bool proto3_optional_; int label_; int type_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT OneofDescriptorProto : +class PROTOBUF_EXPORT OneofDescriptorProto PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.OneofDescriptorProto) */ { public: - OneofDescriptorProto(); + inline OneofDescriptorProto() : OneofDescriptorProto(nullptr) {}; virtual ~OneofDescriptorProto(); OneofDescriptorProto(const OneofDescriptorProto& from); @@ -2010,7 +2257,7 @@ class PROTOBUF_EXPORT OneofDescriptorProto : return *this; } inline OneofDescriptorProto& operator=(OneofDescriptorProto&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -2019,18 +2266,12 @@ class PROTOBUF_EXPORT OneofDescriptorProto : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -2050,11 +2291,22 @@ class PROTOBUF_EXPORT OneofDescriptorProto : static constexpr int kIndexInFileMessages = 7; - void UnsafeArenaSwap(OneofDescriptorProto* other); - void Swap(OneofDescriptorProto* other); friend void swap(OneofDescriptorProto& a, OneofDescriptorProto& b) { a.Swap(&b); } + inline void Swap(OneofDescriptorProto* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(OneofDescriptorProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -2073,16 +2325,9 @@ class PROTOBUF_EXPORT OneofDescriptorProto : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -2099,13 +2344,6 @@ class PROTOBUF_EXPORT OneofDescriptorProto : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -2121,10 +2359,16 @@ class PROTOBUF_EXPORT OneofDescriptorProto : // accessors ------------------------------------------------------- + enum : int { + kNameFieldNumber = 1, + kOptionsFieldNumber = 2, + }; // optional string name = 1; bool has_name() const; + private: + bool _internal_has_name() const; + public: void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -2142,24 +2386,34 @@ class PROTOBUF_EXPORT OneofDescriptorProto : " future release.") void unsafe_arena_set_allocated_name( std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // optional .google.protobuf.OneofOptions options = 2; bool has_options() const; + private: + bool _internal_has_options() const; + public: void clear_options(); - static const int kOptionsFieldNumber = 2; const PROTOBUF_NAMESPACE_ID::OneofOptions& options() const; PROTOBUF_NAMESPACE_ID::OneofOptions* release_options(); PROTOBUF_NAMESPACE_ID::OneofOptions* mutable_options(); void set_allocated_options(PROTOBUF_NAMESPACE_ID::OneofOptions* options); + private: + const PROTOBUF_NAMESPACE_ID::OneofOptions& _internal_options() const; + PROTOBUF_NAMESPACE_ID::OneofOptions* _internal_mutable_options(); + public: void unsafe_arena_set_allocated_options( PROTOBUF_NAMESPACE_ID::OneofOptions* options); PROTOBUF_NAMESPACE_ID::OneofOptions* unsafe_arena_release_options(); // @@protoc_insertion_point(class_scope:google.protobuf.OneofDescriptorProto) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -2171,10 +2425,10 @@ class PROTOBUF_EXPORT OneofDescriptorProto : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange : +class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumDescriptorProto.EnumReservedRange) */ { public: - EnumDescriptorProto_EnumReservedRange(); + inline EnumDescriptorProto_EnumReservedRange() : EnumDescriptorProto_EnumReservedRange(nullptr) {}; virtual ~EnumDescriptorProto_EnumReservedRange(); EnumDescriptorProto_EnumReservedRange(const EnumDescriptorProto_EnumReservedRange& from); @@ -2188,7 +2442,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange : return *this; } inline EnumDescriptorProto_EnumReservedRange& operator=(EnumDescriptorProto_EnumReservedRange&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -2197,18 +2451,12 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -2228,11 +2476,22 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange : static constexpr int kIndexInFileMessages = 8; - void UnsafeArenaSwap(EnumDescriptorProto_EnumReservedRange* other); - void Swap(EnumDescriptorProto_EnumReservedRange* other); friend void swap(EnumDescriptorProto_EnumReservedRange& a, EnumDescriptorProto_EnumReservedRange& b) { a.Swap(&b); } + inline void Swap(EnumDescriptorProto_EnumReservedRange* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(EnumDescriptorProto_EnumReservedRange* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -2251,16 +2510,9 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -2277,13 +2529,6 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -2299,25 +2544,40 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange : // accessors ------------------------------------------------------- + enum : int { + kStartFieldNumber = 1, + kEndFieldNumber = 2, + }; // optional int32 start = 1; bool has_start() const; + private: + bool _internal_has_start() const; + public: void clear_start(); - static const int kStartFieldNumber = 1; ::PROTOBUF_NAMESPACE_ID::int32 start() const; void set_start(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_start() const; + void _internal_set_start(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // optional int32 end = 2; bool has_end() const; + private: + bool _internal_has_end() const; + public: void clear_end(); - static const int kEndFieldNumber = 2; ::PROTOBUF_NAMESPACE_ID::int32 end() const; void set_end(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_end() const; + void _internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.EnumDescriptorProto.EnumReservedRange) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -2329,10 +2589,10 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT EnumDescriptorProto : +class PROTOBUF_EXPORT EnumDescriptorProto PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumDescriptorProto) */ { public: - EnumDescriptorProto(); + inline EnumDescriptorProto() : EnumDescriptorProto(nullptr) {}; virtual ~EnumDescriptorProto(); EnumDescriptorProto(const EnumDescriptorProto& from); @@ -2346,7 +2606,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto : return *this; } inline EnumDescriptorProto& operator=(EnumDescriptorProto&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -2355,18 +2615,12 @@ class PROTOBUF_EXPORT EnumDescriptorProto : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -2386,11 +2640,22 @@ class PROTOBUF_EXPORT EnumDescriptorProto : static constexpr int kIndexInFileMessages = 9; - void UnsafeArenaSwap(EnumDescriptorProto* other); - void Swap(EnumDescriptorProto* other); friend void swap(EnumDescriptorProto& a, EnumDescriptorProto& b) { a.Swap(&b); } + inline void Swap(EnumDescriptorProto* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(EnumDescriptorProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -2409,16 +2674,9 @@ class PROTOBUF_EXPORT EnumDescriptorProto : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -2435,13 +2693,6 @@ class PROTOBUF_EXPORT EnumDescriptorProto : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -2459,13 +2710,26 @@ class PROTOBUF_EXPORT EnumDescriptorProto : // accessors ------------------------------------------------------- + enum : int { + kValueFieldNumber = 2, + kReservedRangeFieldNumber = 4, + kReservedNameFieldNumber = 5, + kNameFieldNumber = 1, + kOptionsFieldNumber = 3, + }; // repeated .google.protobuf.EnumValueDescriptorProto value = 2; int value_size() const; + private: + int _internal_value_size() const; + public: void clear_value(); - static const int kValueFieldNumber = 2; PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* mutable_value(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto >* mutable_value(); + private: + const PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto& _internal_value(int index) const; + PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* _internal_add_value(); + public: const PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto& value(int index) const; PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* add_value(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto >& @@ -2473,11 +2737,17 @@ class PROTOBUF_EXPORT EnumDescriptorProto : // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; int reserved_range_size() const; + private: + int _internal_reserved_range_size() const; + public: void clear_reserved_range(); - static const int kReservedRangeFieldNumber = 4; PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* mutable_reserved_range(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange >* mutable_reserved_range(); + private: + const PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange& _internal_reserved_range(int index) const; + PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* _internal_add_reserved_range(); + public: const PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange& reserved_range(int index) const; PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* add_reserved_range(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange >& @@ -2485,8 +2755,10 @@ class PROTOBUF_EXPORT EnumDescriptorProto : // repeated string reserved_name = 5; int reserved_name_size() const; + private: + int _internal_reserved_name_size() const; + public: void clear_reserved_name(); - static const int kReservedNameFieldNumber = 5; const std::string& reserved_name(int index) const; std::string* mutable_reserved_name(int index); void set_reserved_name(int index, const std::string& value); @@ -2500,11 +2772,17 @@ class PROTOBUF_EXPORT EnumDescriptorProto : void add_reserved_name(const char* value, size_t size); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& reserved_name() const; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_reserved_name(); + private: + const std::string& _internal_reserved_name(int index) const; + std::string* _internal_add_reserved_name(); + public: // optional string name = 1; bool has_name() const; + private: + bool _internal_has_name() const; + public: void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -2522,24 +2800,34 @@ class PROTOBUF_EXPORT EnumDescriptorProto : " future release.") void unsafe_arena_set_allocated_name( std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // optional .google.protobuf.EnumOptions options = 3; bool has_options() const; + private: + bool _internal_has_options() const; + public: void clear_options(); - static const int kOptionsFieldNumber = 3; const PROTOBUF_NAMESPACE_ID::EnumOptions& options() const; PROTOBUF_NAMESPACE_ID::EnumOptions* release_options(); PROTOBUF_NAMESPACE_ID::EnumOptions* mutable_options(); void set_allocated_options(PROTOBUF_NAMESPACE_ID::EnumOptions* options); + private: + const PROTOBUF_NAMESPACE_ID::EnumOptions& _internal_options() const; + PROTOBUF_NAMESPACE_ID::EnumOptions* _internal_mutable_options(); + public: void unsafe_arena_set_allocated_options( PROTOBUF_NAMESPACE_ID::EnumOptions* options); PROTOBUF_NAMESPACE_ID::EnumOptions* unsafe_arena_release_options(); // @@protoc_insertion_point(class_scope:google.protobuf.EnumDescriptorProto) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -2554,10 +2842,10 @@ class PROTOBUF_EXPORT EnumDescriptorProto : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT EnumValueDescriptorProto : +class PROTOBUF_EXPORT EnumValueDescriptorProto PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumValueDescriptorProto) */ { public: - EnumValueDescriptorProto(); + inline EnumValueDescriptorProto() : EnumValueDescriptorProto(nullptr) {}; virtual ~EnumValueDescriptorProto(); EnumValueDescriptorProto(const EnumValueDescriptorProto& from); @@ -2571,7 +2859,7 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto : return *this; } inline EnumValueDescriptorProto& operator=(EnumValueDescriptorProto&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -2580,18 +2868,12 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -2611,11 +2893,22 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto : static constexpr int kIndexInFileMessages = 10; - void UnsafeArenaSwap(EnumValueDescriptorProto* other); - void Swap(EnumValueDescriptorProto* other); friend void swap(EnumValueDescriptorProto& a, EnumValueDescriptorProto& b) { a.Swap(&b); } + inline void Swap(EnumValueDescriptorProto* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(EnumValueDescriptorProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -2634,16 +2927,9 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -2660,13 +2946,6 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -2682,10 +2961,17 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto : // accessors ------------------------------------------------------- + enum : int { + kNameFieldNumber = 1, + kOptionsFieldNumber = 3, + kNumberFieldNumber = 2, + }; // optional string name = 1; bool has_name() const; + private: + bool _internal_has_name() const; + public: void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -2703,31 +2989,47 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto : " future release.") void unsafe_arena_set_allocated_name( std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // optional .google.protobuf.EnumValueOptions options = 3; bool has_options() const; + private: + bool _internal_has_options() const; + public: void clear_options(); - static const int kOptionsFieldNumber = 3; const PROTOBUF_NAMESPACE_ID::EnumValueOptions& options() const; PROTOBUF_NAMESPACE_ID::EnumValueOptions* release_options(); PROTOBUF_NAMESPACE_ID::EnumValueOptions* mutable_options(); void set_allocated_options(PROTOBUF_NAMESPACE_ID::EnumValueOptions* options); + private: + const PROTOBUF_NAMESPACE_ID::EnumValueOptions& _internal_options() const; + PROTOBUF_NAMESPACE_ID::EnumValueOptions* _internal_mutable_options(); + public: void unsafe_arena_set_allocated_options( PROTOBUF_NAMESPACE_ID::EnumValueOptions* options); PROTOBUF_NAMESPACE_ID::EnumValueOptions* unsafe_arena_release_options(); // optional int32 number = 2; bool has_number() const; + private: + bool _internal_has_number() const; + public: void clear_number(); - static const int kNumberFieldNumber = 2; ::PROTOBUF_NAMESPACE_ID::int32 number() const; void set_number(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_number() const; + void _internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.EnumValueDescriptorProto) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -2740,10 +3042,10 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT ServiceDescriptorProto : +class PROTOBUF_EXPORT ServiceDescriptorProto PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ServiceDescriptorProto) */ { public: - ServiceDescriptorProto(); + inline ServiceDescriptorProto() : ServiceDescriptorProto(nullptr) {}; virtual ~ServiceDescriptorProto(); ServiceDescriptorProto(const ServiceDescriptorProto& from); @@ -2757,7 +3059,7 @@ class PROTOBUF_EXPORT ServiceDescriptorProto : return *this; } inline ServiceDescriptorProto& operator=(ServiceDescriptorProto&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -2766,18 +3068,12 @@ class PROTOBUF_EXPORT ServiceDescriptorProto : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -2797,11 +3093,22 @@ class PROTOBUF_EXPORT ServiceDescriptorProto : static constexpr int kIndexInFileMessages = 11; - void UnsafeArenaSwap(ServiceDescriptorProto* other); - void Swap(ServiceDescriptorProto* other); friend void swap(ServiceDescriptorProto& a, ServiceDescriptorProto& b) { a.Swap(&b); } + inline void Swap(ServiceDescriptorProto* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ServiceDescriptorProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -2820,16 +3127,9 @@ class PROTOBUF_EXPORT ServiceDescriptorProto : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -2846,13 +3146,6 @@ class PROTOBUF_EXPORT ServiceDescriptorProto : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -2868,13 +3161,24 @@ class PROTOBUF_EXPORT ServiceDescriptorProto : // accessors ------------------------------------------------------- + enum : int { + kMethodFieldNumber = 2, + kNameFieldNumber = 1, + kOptionsFieldNumber = 3, + }; // repeated .google.protobuf.MethodDescriptorProto method = 2; int method_size() const; + private: + int _internal_method_size() const; + public: void clear_method(); - static const int kMethodFieldNumber = 2; PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* mutable_method(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::MethodDescriptorProto >* mutable_method(); + private: + const PROTOBUF_NAMESPACE_ID::MethodDescriptorProto& _internal_method(int index) const; + PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* _internal_add_method(); + public: const PROTOBUF_NAMESPACE_ID::MethodDescriptorProto& method(int index) const; PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* add_method(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::MethodDescriptorProto >& @@ -2882,8 +3186,10 @@ class PROTOBUF_EXPORT ServiceDescriptorProto : // optional string name = 1; bool has_name() const; + private: + bool _internal_has_name() const; + public: void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -2901,24 +3207,34 @@ class PROTOBUF_EXPORT ServiceDescriptorProto : " future release.") void unsafe_arena_set_allocated_name( std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // optional .google.protobuf.ServiceOptions options = 3; bool has_options() const; + private: + bool _internal_has_options() const; + public: void clear_options(); - static const int kOptionsFieldNumber = 3; const PROTOBUF_NAMESPACE_ID::ServiceOptions& options() const; PROTOBUF_NAMESPACE_ID::ServiceOptions* release_options(); PROTOBUF_NAMESPACE_ID::ServiceOptions* mutable_options(); void set_allocated_options(PROTOBUF_NAMESPACE_ID::ServiceOptions* options); + private: + const PROTOBUF_NAMESPACE_ID::ServiceOptions& _internal_options() const; + PROTOBUF_NAMESPACE_ID::ServiceOptions* _internal_mutable_options(); + public: void unsafe_arena_set_allocated_options( PROTOBUF_NAMESPACE_ID::ServiceOptions* options); PROTOBUF_NAMESPACE_ID::ServiceOptions* unsafe_arena_release_options(); // @@protoc_insertion_point(class_scope:google.protobuf.ServiceDescriptorProto) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -2931,10 +3247,10 @@ class PROTOBUF_EXPORT ServiceDescriptorProto : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT MethodDescriptorProto : +class PROTOBUF_EXPORT MethodDescriptorProto PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.MethodDescriptorProto) */ { public: - MethodDescriptorProto(); + inline MethodDescriptorProto() : MethodDescriptorProto(nullptr) {}; virtual ~MethodDescriptorProto(); MethodDescriptorProto(const MethodDescriptorProto& from); @@ -2948,7 +3264,7 @@ class PROTOBUF_EXPORT MethodDescriptorProto : return *this; } inline MethodDescriptorProto& operator=(MethodDescriptorProto&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -2957,18 +3273,12 @@ class PROTOBUF_EXPORT MethodDescriptorProto : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -2988,11 +3298,22 @@ class PROTOBUF_EXPORT MethodDescriptorProto : static constexpr int kIndexInFileMessages = 12; - void UnsafeArenaSwap(MethodDescriptorProto* other); - void Swap(MethodDescriptorProto* other); friend void swap(MethodDescriptorProto& a, MethodDescriptorProto& b) { a.Swap(&b); } + inline void Swap(MethodDescriptorProto* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MethodDescriptorProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -3011,16 +3332,9 @@ class PROTOBUF_EXPORT MethodDescriptorProto : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -3037,13 +3351,6 @@ class PROTOBUF_EXPORT MethodDescriptorProto : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -3059,10 +3366,20 @@ class PROTOBUF_EXPORT MethodDescriptorProto : // accessors ------------------------------------------------------- + enum : int { + kNameFieldNumber = 1, + kInputTypeFieldNumber = 2, + kOutputTypeFieldNumber = 3, + kOptionsFieldNumber = 4, + kClientStreamingFieldNumber = 5, + kServerStreamingFieldNumber = 6, + }; // optional string name = 1; bool has_name() const; + private: + bool _internal_has_name() const; + public: void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -3080,11 +3397,18 @@ class PROTOBUF_EXPORT MethodDescriptorProto : " future release.") void unsafe_arena_set_allocated_name( std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // optional string input_type = 2; bool has_input_type() const; + private: + bool _internal_has_input_type() const; + public: void clear_input_type(); - static const int kInputTypeFieldNumber = 2; const std::string& input_type() const; void set_input_type(const std::string& value); void set_input_type(std::string&& value); @@ -3102,11 +3426,18 @@ class PROTOBUF_EXPORT MethodDescriptorProto : " future release.") void unsafe_arena_set_allocated_input_type( std::string* input_type); + private: + const std::string& _internal_input_type() const; + void _internal_set_input_type(const std::string& value); + std::string* _internal_mutable_input_type(); + public: // optional string output_type = 3; bool has_output_type() const; + private: + bool _internal_has_output_type() const; + public: void clear_output_type(); - static const int kOutputTypeFieldNumber = 3; const std::string& output_type() const; void set_output_type(const std::string& value); void set_output_type(std::string&& value); @@ -3124,38 +3455,60 @@ class PROTOBUF_EXPORT MethodDescriptorProto : " future release.") void unsafe_arena_set_allocated_output_type( std::string* output_type); + private: + const std::string& _internal_output_type() const; + void _internal_set_output_type(const std::string& value); + std::string* _internal_mutable_output_type(); + public: // optional .google.protobuf.MethodOptions options = 4; bool has_options() const; + private: + bool _internal_has_options() const; + public: void clear_options(); - static const int kOptionsFieldNumber = 4; const PROTOBUF_NAMESPACE_ID::MethodOptions& options() const; PROTOBUF_NAMESPACE_ID::MethodOptions* release_options(); PROTOBUF_NAMESPACE_ID::MethodOptions* mutable_options(); void set_allocated_options(PROTOBUF_NAMESPACE_ID::MethodOptions* options); + private: + const PROTOBUF_NAMESPACE_ID::MethodOptions& _internal_options() const; + PROTOBUF_NAMESPACE_ID::MethodOptions* _internal_mutable_options(); + public: void unsafe_arena_set_allocated_options( PROTOBUF_NAMESPACE_ID::MethodOptions* options); PROTOBUF_NAMESPACE_ID::MethodOptions* unsafe_arena_release_options(); // optional bool client_streaming = 5 [default = false]; bool has_client_streaming() const; + private: + bool _internal_has_client_streaming() const; + public: void clear_client_streaming(); - static const int kClientStreamingFieldNumber = 5; bool client_streaming() const; void set_client_streaming(bool value); + private: + bool _internal_client_streaming() const; + void _internal_set_client_streaming(bool value); + public: // optional bool server_streaming = 6 [default = false]; bool has_server_streaming() const; + private: + bool _internal_has_server_streaming() const; + public: void clear_server_streaming(); - static const int kServerStreamingFieldNumber = 6; bool server_streaming() const; void set_server_streaming(bool value); + private: + bool _internal_server_streaming() const; + void _internal_set_server_streaming(bool value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.MethodDescriptorProto) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -3171,10 +3524,10 @@ class PROTOBUF_EXPORT MethodDescriptorProto : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT FileOptions : +class PROTOBUF_EXPORT FileOptions PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FileOptions) */ { public: - FileOptions(); + inline FileOptions() : FileOptions(nullptr) {}; virtual ~FileOptions(); FileOptions(const FileOptions& from); @@ -3188,7 +3541,7 @@ class PROTOBUF_EXPORT FileOptions : return *this; } inline FileOptions& operator=(FileOptions&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -3197,18 +3550,12 @@ class PROTOBUF_EXPORT FileOptions : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -3228,11 +3575,22 @@ class PROTOBUF_EXPORT FileOptions : static constexpr int kIndexInFileMessages = 13; - void UnsafeArenaSwap(FileOptions* other); - void Swap(FileOptions* other); friend void swap(FileOptions& a, FileOptions& b) { a.Swap(&b); } + inline void Swap(FileOptions* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FileOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -3251,16 +3609,9 @@ class PROTOBUF_EXPORT FileOptions : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -3277,13 +3628,6 @@ class PROTOBUF_EXPORT FileOptions : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -3331,13 +3675,42 @@ class PROTOBUF_EXPORT FileOptions : // accessors ------------------------------------------------------- + enum : int { + kUninterpretedOptionFieldNumber = 999, + kJavaPackageFieldNumber = 1, + kJavaOuterClassnameFieldNumber = 8, + kGoPackageFieldNumber = 11, + kObjcClassPrefixFieldNumber = 36, + kCsharpNamespaceFieldNumber = 37, + kSwiftPrefixFieldNumber = 39, + kPhpClassPrefixFieldNumber = 40, + kPhpNamespaceFieldNumber = 41, + kPhpMetadataNamespaceFieldNumber = 44, + kRubyPackageFieldNumber = 45, + kJavaMultipleFilesFieldNumber = 10, + kJavaGenerateEqualsAndHashFieldNumber = 20, + kJavaStringCheckUtf8FieldNumber = 27, + kCcGenericServicesFieldNumber = 16, + kJavaGenericServicesFieldNumber = 17, + kPyGenericServicesFieldNumber = 18, + kPhpGenericServicesFieldNumber = 42, + kDeprecatedFieldNumber = 23, + kOptimizeForFieldNumber = 9, + kCcEnableArenasFieldNumber = 31, + }; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; int uninterpreted_option_size() const; + private: + int _internal_uninterpreted_option_size() const; + public: void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); + private: + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& _internal_uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* _internal_add_uninterpreted_option(); + public: const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& @@ -3345,8 +3718,10 @@ class PROTOBUF_EXPORT FileOptions : // optional string java_package = 1; bool has_java_package() const; + private: + bool _internal_has_java_package() const; + public: void clear_java_package(); - static const int kJavaPackageFieldNumber = 1; const std::string& java_package() const; void set_java_package(const std::string& value); void set_java_package(std::string&& value); @@ -3364,11 +3739,18 @@ class PROTOBUF_EXPORT FileOptions : " future release.") void unsafe_arena_set_allocated_java_package( std::string* java_package); + private: + const std::string& _internal_java_package() const; + void _internal_set_java_package(const std::string& value); + std::string* _internal_mutable_java_package(); + public: // optional string java_outer_classname = 8; bool has_java_outer_classname() const; + private: + bool _internal_has_java_outer_classname() const; + public: void clear_java_outer_classname(); - static const int kJavaOuterClassnameFieldNumber = 8; const std::string& java_outer_classname() const; void set_java_outer_classname(const std::string& value); void set_java_outer_classname(std::string&& value); @@ -3386,11 +3768,18 @@ class PROTOBUF_EXPORT FileOptions : " future release.") void unsafe_arena_set_allocated_java_outer_classname( std::string* java_outer_classname); + private: + const std::string& _internal_java_outer_classname() const; + void _internal_set_java_outer_classname(const std::string& value); + std::string* _internal_mutable_java_outer_classname(); + public: // optional string go_package = 11; bool has_go_package() const; + private: + bool _internal_has_go_package() const; + public: void clear_go_package(); - static const int kGoPackageFieldNumber = 11; const std::string& go_package() const; void set_go_package(const std::string& value); void set_go_package(std::string&& value); @@ -3408,11 +3797,18 @@ class PROTOBUF_EXPORT FileOptions : " future release.") void unsafe_arena_set_allocated_go_package( std::string* go_package); + private: + const std::string& _internal_go_package() const; + void _internal_set_go_package(const std::string& value); + std::string* _internal_mutable_go_package(); + public: // optional string objc_class_prefix = 36; bool has_objc_class_prefix() const; + private: + bool _internal_has_objc_class_prefix() const; + public: void clear_objc_class_prefix(); - static const int kObjcClassPrefixFieldNumber = 36; const std::string& objc_class_prefix() const; void set_objc_class_prefix(const std::string& value); void set_objc_class_prefix(std::string&& value); @@ -3430,11 +3826,18 @@ class PROTOBUF_EXPORT FileOptions : " future release.") void unsafe_arena_set_allocated_objc_class_prefix( std::string* objc_class_prefix); + private: + const std::string& _internal_objc_class_prefix() const; + void _internal_set_objc_class_prefix(const std::string& value); + std::string* _internal_mutable_objc_class_prefix(); + public: // optional string csharp_namespace = 37; bool has_csharp_namespace() const; + private: + bool _internal_has_csharp_namespace() const; + public: void clear_csharp_namespace(); - static const int kCsharpNamespaceFieldNumber = 37; const std::string& csharp_namespace() const; void set_csharp_namespace(const std::string& value); void set_csharp_namespace(std::string&& value); @@ -3452,11 +3855,18 @@ class PROTOBUF_EXPORT FileOptions : " future release.") void unsafe_arena_set_allocated_csharp_namespace( std::string* csharp_namespace); + private: + const std::string& _internal_csharp_namespace() const; + void _internal_set_csharp_namespace(const std::string& value); + std::string* _internal_mutable_csharp_namespace(); + public: // optional string swift_prefix = 39; bool has_swift_prefix() const; + private: + bool _internal_has_swift_prefix() const; + public: void clear_swift_prefix(); - static const int kSwiftPrefixFieldNumber = 39; const std::string& swift_prefix() const; void set_swift_prefix(const std::string& value); void set_swift_prefix(std::string&& value); @@ -3474,11 +3884,18 @@ class PROTOBUF_EXPORT FileOptions : " future release.") void unsafe_arena_set_allocated_swift_prefix( std::string* swift_prefix); + private: + const std::string& _internal_swift_prefix() const; + void _internal_set_swift_prefix(const std::string& value); + std::string* _internal_mutable_swift_prefix(); + public: // optional string php_class_prefix = 40; bool has_php_class_prefix() const; + private: + bool _internal_has_php_class_prefix() const; + public: void clear_php_class_prefix(); - static const int kPhpClassPrefixFieldNumber = 40; const std::string& php_class_prefix() const; void set_php_class_prefix(const std::string& value); void set_php_class_prefix(std::string&& value); @@ -3496,11 +3913,18 @@ class PROTOBUF_EXPORT FileOptions : " future release.") void unsafe_arena_set_allocated_php_class_prefix( std::string* php_class_prefix); + private: + const std::string& _internal_php_class_prefix() const; + void _internal_set_php_class_prefix(const std::string& value); + std::string* _internal_mutable_php_class_prefix(); + public: // optional string php_namespace = 41; bool has_php_namespace() const; + private: + bool _internal_has_php_namespace() const; + public: void clear_php_namespace(); - static const int kPhpNamespaceFieldNumber = 41; const std::string& php_namespace() const; void set_php_namespace(const std::string& value); void set_php_namespace(std::string&& value); @@ -3518,11 +3942,18 @@ class PROTOBUF_EXPORT FileOptions : " future release.") void unsafe_arena_set_allocated_php_namespace( std::string* php_namespace); + private: + const std::string& _internal_php_namespace() const; + void _internal_set_php_namespace(const std::string& value); + std::string* _internal_mutable_php_namespace(); + public: // optional string php_metadata_namespace = 44; bool has_php_metadata_namespace() const; + private: + bool _internal_has_php_metadata_namespace() const; + public: void clear_php_metadata_namespace(); - static const int kPhpMetadataNamespaceFieldNumber = 44; const std::string& php_metadata_namespace() const; void set_php_metadata_namespace(const std::string& value); void set_php_metadata_namespace(std::string&& value); @@ -3540,11 +3971,18 @@ class PROTOBUF_EXPORT FileOptions : " future release.") void unsafe_arena_set_allocated_php_metadata_namespace( std::string* php_metadata_namespace); + private: + const std::string& _internal_php_metadata_namespace() const; + void _internal_set_php_metadata_namespace(const std::string& value); + std::string* _internal_mutable_php_metadata_namespace(); + public: // optional string ruby_package = 45; bool has_ruby_package() const; + private: + bool _internal_has_ruby_package() const; + public: void clear_ruby_package(); - static const int kRubyPackageFieldNumber = 45; const std::string& ruby_package() const; void set_ruby_package(const std::string& value); void set_ruby_package(std::string&& value); @@ -3562,85 +4000,149 @@ class PROTOBUF_EXPORT FileOptions : " future release.") void unsafe_arena_set_allocated_ruby_package( std::string* ruby_package); + private: + const std::string& _internal_ruby_package() const; + void _internal_set_ruby_package(const std::string& value); + std::string* _internal_mutable_ruby_package(); + public: // optional bool java_multiple_files = 10 [default = false]; bool has_java_multiple_files() const; + private: + bool _internal_has_java_multiple_files() const; + public: void clear_java_multiple_files(); - static const int kJavaMultipleFilesFieldNumber = 10; bool java_multiple_files() const; void set_java_multiple_files(bool value); + private: + bool _internal_java_multiple_files() const; + void _internal_set_java_multiple_files(bool value); + public: // optional bool java_generate_equals_and_hash = 20 [deprecated = true]; PROTOBUF_DEPRECATED bool has_java_generate_equals_and_hash() const; + private: + bool _internal_has_java_generate_equals_and_hash() const; + public: PROTOBUF_DEPRECATED void clear_java_generate_equals_and_hash(); - PROTOBUF_DEPRECATED static const int kJavaGenerateEqualsAndHashFieldNumber = 20; PROTOBUF_DEPRECATED bool java_generate_equals_and_hash() const; PROTOBUF_DEPRECATED void set_java_generate_equals_and_hash(bool value); + private: + bool _internal_java_generate_equals_and_hash() const; + void _internal_set_java_generate_equals_and_hash(bool value); + public: // optional bool java_string_check_utf8 = 27 [default = false]; bool has_java_string_check_utf8() const; + private: + bool _internal_has_java_string_check_utf8() const; + public: void clear_java_string_check_utf8(); - static const int kJavaStringCheckUtf8FieldNumber = 27; bool java_string_check_utf8() const; void set_java_string_check_utf8(bool value); + private: + bool _internal_java_string_check_utf8() const; + void _internal_set_java_string_check_utf8(bool value); + public: // optional bool cc_generic_services = 16 [default = false]; bool has_cc_generic_services() const; + private: + bool _internal_has_cc_generic_services() const; + public: void clear_cc_generic_services(); - static const int kCcGenericServicesFieldNumber = 16; bool cc_generic_services() const; void set_cc_generic_services(bool value); + private: + bool _internal_cc_generic_services() const; + void _internal_set_cc_generic_services(bool value); + public: // optional bool java_generic_services = 17 [default = false]; bool has_java_generic_services() const; + private: + bool _internal_has_java_generic_services() const; + public: void clear_java_generic_services(); - static const int kJavaGenericServicesFieldNumber = 17; bool java_generic_services() const; void set_java_generic_services(bool value); + private: + bool _internal_java_generic_services() const; + void _internal_set_java_generic_services(bool value); + public: // optional bool py_generic_services = 18 [default = false]; bool has_py_generic_services() const; + private: + bool _internal_has_py_generic_services() const; + public: void clear_py_generic_services(); - static const int kPyGenericServicesFieldNumber = 18; bool py_generic_services() const; void set_py_generic_services(bool value); + private: + bool _internal_py_generic_services() const; + void _internal_set_py_generic_services(bool value); + public: // optional bool php_generic_services = 42 [default = false]; bool has_php_generic_services() const; + private: + bool _internal_has_php_generic_services() const; + public: void clear_php_generic_services(); - static const int kPhpGenericServicesFieldNumber = 42; bool php_generic_services() const; void set_php_generic_services(bool value); + private: + bool _internal_php_generic_services() const; + void _internal_set_php_generic_services(bool value); + public: // optional bool deprecated = 23 [default = false]; bool has_deprecated() const; + private: + bool _internal_has_deprecated() const; + public: void clear_deprecated(); - static const int kDeprecatedFieldNumber = 23; bool deprecated() const; void set_deprecated(bool value); - - // optional bool cc_enable_arenas = 31 [default = false]; - bool has_cc_enable_arenas() const; - void clear_cc_enable_arenas(); - static const int kCcEnableArenasFieldNumber = 31; - bool cc_enable_arenas() const; - void set_cc_enable_arenas(bool value); + private: + bool _internal_deprecated() const; + void _internal_set_deprecated(bool value); + public: // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; bool has_optimize_for() const; + private: + bool _internal_has_optimize_for() const; + public: void clear_optimize_for(); - static const int kOptimizeForFieldNumber = 9; PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode optimize_for() const; void set_optimize_for(PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode value); + private: + PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode _internal_optimize_for() const; + void _internal_set_optimize_for(PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode value); + public: + + // optional bool cc_enable_arenas = 31 [default = true]; + bool has_cc_enable_arenas() const; + private: + bool _internal_has_cc_enable_arenas() const; + public: + void clear_cc_enable_arenas(); + bool cc_enable_arenas() const; + void set_cc_enable_arenas(bool value); + private: + bool _internal_cc_enable_arenas() const; + void _internal_set_cc_enable_arenas(bool value); + public: GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(FileOptions) // @@protoc_insertion_point(class_scope:google.protobuf.FileOptions) private: - class HasBitSetters; + class _Internal; ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -3665,16 +4167,16 @@ class PROTOBUF_EXPORT FileOptions : bool py_generic_services_; bool php_generic_services_; bool deprecated_; - bool cc_enable_arenas_; int optimize_for_; + bool cc_enable_arenas_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT MessageOptions : +class PROTOBUF_EXPORT MessageOptions PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.MessageOptions) */ { public: - MessageOptions(); + inline MessageOptions() : MessageOptions(nullptr) {}; virtual ~MessageOptions(); MessageOptions(const MessageOptions& from); @@ -3688,7 +4190,7 @@ class PROTOBUF_EXPORT MessageOptions : return *this; } inline MessageOptions& operator=(MessageOptions&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -3697,18 +4199,12 @@ class PROTOBUF_EXPORT MessageOptions : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -3728,11 +4224,22 @@ class PROTOBUF_EXPORT MessageOptions : static constexpr int kIndexInFileMessages = 14; - void UnsafeArenaSwap(MessageOptions* other); - void Swap(MessageOptions* other); friend void swap(MessageOptions& a, MessageOptions& b) { a.Swap(&b); } + inline void Swap(MessageOptions* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MessageOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -3751,16 +4258,9 @@ class PROTOBUF_EXPORT MessageOptions : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -3777,13 +4277,6 @@ class PROTOBUF_EXPORT MessageOptions : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -3799,13 +4292,26 @@ class PROTOBUF_EXPORT MessageOptions : // accessors ------------------------------------------------------- + enum : int { + kUninterpretedOptionFieldNumber = 999, + kMessageSetWireFormatFieldNumber = 1, + kNoStandardDescriptorAccessorFieldNumber = 2, + kDeprecatedFieldNumber = 3, + kMapEntryFieldNumber = 7, + }; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; int uninterpreted_option_size() const; + private: + int _internal_uninterpreted_option_size() const; + public: void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); + private: + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& _internal_uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* _internal_add_uninterpreted_option(); + public: const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& @@ -3813,40 +4319,63 @@ class PROTOBUF_EXPORT MessageOptions : // optional bool message_set_wire_format = 1 [default = false]; bool has_message_set_wire_format() const; + private: + bool _internal_has_message_set_wire_format() const; + public: void clear_message_set_wire_format(); - static const int kMessageSetWireFormatFieldNumber = 1; bool message_set_wire_format() const; void set_message_set_wire_format(bool value); + private: + bool _internal_message_set_wire_format() const; + void _internal_set_message_set_wire_format(bool value); + public: // optional bool no_standard_descriptor_accessor = 2 [default = false]; bool has_no_standard_descriptor_accessor() const; + private: + bool _internal_has_no_standard_descriptor_accessor() const; + public: void clear_no_standard_descriptor_accessor(); - static const int kNoStandardDescriptorAccessorFieldNumber = 2; bool no_standard_descriptor_accessor() const; void set_no_standard_descriptor_accessor(bool value); + private: + bool _internal_no_standard_descriptor_accessor() const; + void _internal_set_no_standard_descriptor_accessor(bool value); + public: // optional bool deprecated = 3 [default = false]; bool has_deprecated() const; + private: + bool _internal_has_deprecated() const; + public: void clear_deprecated(); - static const int kDeprecatedFieldNumber = 3; bool deprecated() const; void set_deprecated(bool value); + private: + bool _internal_deprecated() const; + void _internal_set_deprecated(bool value); + public: // optional bool map_entry = 7; bool has_map_entry() const; + private: + bool _internal_has_map_entry() const; + public: void clear_map_entry(); - static const int kMapEntryFieldNumber = 7; bool map_entry() const; void set_map_entry(bool value); + private: + bool _internal_map_entry() const; + void _internal_set_map_entry(bool value); + public: GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(MessageOptions) // @@protoc_insertion_point(class_scope:google.protobuf.MessageOptions) private: - class HasBitSetters; + class _Internal; ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -3861,10 +4390,10 @@ class PROTOBUF_EXPORT MessageOptions : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT FieldOptions : +class PROTOBUF_EXPORT FieldOptions PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldOptions) */ { public: - FieldOptions(); + inline FieldOptions() : FieldOptions(nullptr) {}; virtual ~FieldOptions(); FieldOptions(const FieldOptions& from); @@ -3878,7 +4407,7 @@ class PROTOBUF_EXPORT FieldOptions : return *this; } inline FieldOptions& operator=(FieldOptions&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -3887,18 +4416,12 @@ class PROTOBUF_EXPORT FieldOptions : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -3918,11 +4441,22 @@ class PROTOBUF_EXPORT FieldOptions : static constexpr int kIndexInFileMessages = 15; - void UnsafeArenaSwap(FieldOptions* other); - void Swap(FieldOptions* other); friend void swap(FieldOptions& a, FieldOptions& b) { a.Swap(&b); } + inline void Swap(FieldOptions* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FieldOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -3941,16 +4475,9 @@ class PROTOBUF_EXPORT FieldOptions : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -3967,13 +4494,6 @@ class PROTOBUF_EXPORT FieldOptions : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -4053,13 +4573,28 @@ class PROTOBUF_EXPORT FieldOptions : // accessors ------------------------------------------------------- + enum : int { + kUninterpretedOptionFieldNumber = 999, + kCtypeFieldNumber = 1, + kPackedFieldNumber = 2, + kLazyFieldNumber = 5, + kDeprecatedFieldNumber = 3, + kWeakFieldNumber = 10, + kJstypeFieldNumber = 6, + }; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; int uninterpreted_option_size() const; + private: + int _internal_uninterpreted_option_size() const; + public: void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); + private: + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& _internal_uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* _internal_add_uninterpreted_option(); + public: const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& @@ -4067,54 +4602,89 @@ class PROTOBUF_EXPORT FieldOptions : // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; bool has_ctype() const; + private: + bool _internal_has_ctype() const; + public: void clear_ctype(); - static const int kCtypeFieldNumber = 1; PROTOBUF_NAMESPACE_ID::FieldOptions_CType ctype() const; void set_ctype(PROTOBUF_NAMESPACE_ID::FieldOptions_CType value); + private: + PROTOBUF_NAMESPACE_ID::FieldOptions_CType _internal_ctype() const; + void _internal_set_ctype(PROTOBUF_NAMESPACE_ID::FieldOptions_CType value); + public: // optional bool packed = 2; bool has_packed() const; + private: + bool _internal_has_packed() const; + public: void clear_packed(); - static const int kPackedFieldNumber = 2; bool packed() const; void set_packed(bool value); + private: + bool _internal_packed() const; + void _internal_set_packed(bool value); + public: // optional bool lazy = 5 [default = false]; bool has_lazy() const; + private: + bool _internal_has_lazy() const; + public: void clear_lazy(); - static const int kLazyFieldNumber = 5; bool lazy() const; void set_lazy(bool value); + private: + bool _internal_lazy() const; + void _internal_set_lazy(bool value); + public: // optional bool deprecated = 3 [default = false]; bool has_deprecated() const; + private: + bool _internal_has_deprecated() const; + public: void clear_deprecated(); - static const int kDeprecatedFieldNumber = 3; bool deprecated() const; void set_deprecated(bool value); + private: + bool _internal_deprecated() const; + void _internal_set_deprecated(bool value); + public: // optional bool weak = 10 [default = false]; bool has_weak() const; + private: + bool _internal_has_weak() const; + public: void clear_weak(); - static const int kWeakFieldNumber = 10; bool weak() const; void set_weak(bool value); + private: + bool _internal_weak() const; + void _internal_set_weak(bool value); + public: // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; bool has_jstype() const; + private: + bool _internal_has_jstype() const; + public: void clear_jstype(); - static const int kJstypeFieldNumber = 6; PROTOBUF_NAMESPACE_ID::FieldOptions_JSType jstype() const; void set_jstype(PROTOBUF_NAMESPACE_ID::FieldOptions_JSType value); + private: + PROTOBUF_NAMESPACE_ID::FieldOptions_JSType _internal_jstype() const; + void _internal_set_jstype(PROTOBUF_NAMESPACE_ID::FieldOptions_JSType value); + public: GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(FieldOptions) // @@protoc_insertion_point(class_scope:google.protobuf.FieldOptions) private: - class HasBitSetters; + class _Internal; ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -4131,10 +4701,10 @@ class PROTOBUF_EXPORT FieldOptions : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT OneofOptions : +class PROTOBUF_EXPORT OneofOptions PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.OneofOptions) */ { public: - OneofOptions(); + inline OneofOptions() : OneofOptions(nullptr) {}; virtual ~OneofOptions(); OneofOptions(const OneofOptions& from); @@ -4148,7 +4718,7 @@ class PROTOBUF_EXPORT OneofOptions : return *this; } inline OneofOptions& operator=(OneofOptions&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -4157,18 +4727,12 @@ class PROTOBUF_EXPORT OneofOptions : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -4188,11 +4752,22 @@ class PROTOBUF_EXPORT OneofOptions : static constexpr int kIndexInFileMessages = 16; - void UnsafeArenaSwap(OneofOptions* other); - void Swap(OneofOptions* other); friend void swap(OneofOptions& a, OneofOptions& b) { a.Swap(&b); } + inline void Swap(OneofOptions* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(OneofOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -4211,16 +4786,9 @@ class PROTOBUF_EXPORT OneofOptions : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -4237,13 +4805,6 @@ class PROTOBUF_EXPORT OneofOptions : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -4259,13 +4820,22 @@ class PROTOBUF_EXPORT OneofOptions : // accessors ------------------------------------------------------- + enum : int { + kUninterpretedOptionFieldNumber = 999, + }; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; int uninterpreted_option_size() const; + private: + int _internal_uninterpreted_option_size() const; + public: void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); + private: + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& _internal_uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* _internal_add_uninterpreted_option(); + public: const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& @@ -4274,25 +4844,23 @@ class PROTOBUF_EXPORT OneofOptions : GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(OneofOptions) // @@protoc_insertion_point(class_scope:google.protobuf.OneofOptions) private: - class HasBitSetters; + class _Internal; ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template 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_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT EnumOptions : +class PROTOBUF_EXPORT EnumOptions PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumOptions) */ { public: - EnumOptions(); + inline EnumOptions() : EnumOptions(nullptr) {}; virtual ~EnumOptions(); EnumOptions(const EnumOptions& from); @@ -4306,7 +4874,7 @@ class PROTOBUF_EXPORT EnumOptions : return *this; } inline EnumOptions& operator=(EnumOptions&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -4315,18 +4883,12 @@ class PROTOBUF_EXPORT EnumOptions : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -4346,11 +4908,22 @@ class PROTOBUF_EXPORT EnumOptions : static constexpr int kIndexInFileMessages = 17; - void UnsafeArenaSwap(EnumOptions* other); - void Swap(EnumOptions* other); friend void swap(EnumOptions& a, EnumOptions& b) { a.Swap(&b); } + inline void Swap(EnumOptions* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(EnumOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -4369,16 +4942,9 @@ class PROTOBUF_EXPORT EnumOptions : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -4395,13 +4961,6 @@ class PROTOBUF_EXPORT EnumOptions : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -4417,13 +4976,24 @@ class PROTOBUF_EXPORT EnumOptions : // accessors ------------------------------------------------------- + enum : int { + kUninterpretedOptionFieldNumber = 999, + kAllowAliasFieldNumber = 2, + kDeprecatedFieldNumber = 3, + }; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; int uninterpreted_option_size() const; + private: + int _internal_uninterpreted_option_size() const; + public: void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); + private: + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& _internal_uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* _internal_add_uninterpreted_option(); + public: const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& @@ -4431,26 +5001,37 @@ class PROTOBUF_EXPORT EnumOptions : // optional bool allow_alias = 2; bool has_allow_alias() const; + private: + bool _internal_has_allow_alias() const; + public: void clear_allow_alias(); - static const int kAllowAliasFieldNumber = 2; bool allow_alias() const; void set_allow_alias(bool value); + private: + bool _internal_allow_alias() const; + void _internal_set_allow_alias(bool value); + public: // optional bool deprecated = 3 [default = false]; bool has_deprecated() const; + private: + bool _internal_has_deprecated() const; + public: void clear_deprecated(); - static const int kDeprecatedFieldNumber = 3; bool deprecated() const; void set_deprecated(bool value); + private: + bool _internal_deprecated() const; + void _internal_set_deprecated(bool value); + public: GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(EnumOptions) // @@protoc_insertion_point(class_scope:google.protobuf.EnumOptions) private: - class HasBitSetters; + class _Internal; ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -4463,10 +5044,10 @@ class PROTOBUF_EXPORT EnumOptions : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT EnumValueOptions : +class PROTOBUF_EXPORT EnumValueOptions PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumValueOptions) */ { public: - EnumValueOptions(); + inline EnumValueOptions() : EnumValueOptions(nullptr) {}; virtual ~EnumValueOptions(); EnumValueOptions(const EnumValueOptions& from); @@ -4480,7 +5061,7 @@ class PROTOBUF_EXPORT EnumValueOptions : return *this; } inline EnumValueOptions& operator=(EnumValueOptions&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -4489,18 +5070,12 @@ class PROTOBUF_EXPORT EnumValueOptions : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -4520,11 +5095,22 @@ class PROTOBUF_EXPORT EnumValueOptions : static constexpr int kIndexInFileMessages = 18; - void UnsafeArenaSwap(EnumValueOptions* other); - void Swap(EnumValueOptions* other); friend void swap(EnumValueOptions& a, EnumValueOptions& b) { a.Swap(&b); } + inline void Swap(EnumValueOptions* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(EnumValueOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -4543,16 +5129,9 @@ class PROTOBUF_EXPORT EnumValueOptions : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -4569,13 +5148,6 @@ class PROTOBUF_EXPORT EnumValueOptions : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -4591,13 +5163,23 @@ class PROTOBUF_EXPORT EnumValueOptions : // accessors ------------------------------------------------------- + enum : int { + kUninterpretedOptionFieldNumber = 999, + kDeprecatedFieldNumber = 1, + }; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; int uninterpreted_option_size() const; + private: + int _internal_uninterpreted_option_size() const; + public: void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); + private: + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& _internal_uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* _internal_add_uninterpreted_option(); + public: const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& @@ -4605,19 +5187,24 @@ class PROTOBUF_EXPORT EnumValueOptions : // optional bool deprecated = 1 [default = false]; bool has_deprecated() const; + private: + bool _internal_has_deprecated() const; + public: void clear_deprecated(); - static const int kDeprecatedFieldNumber = 1; bool deprecated() const; void set_deprecated(bool value); + private: + bool _internal_deprecated() const; + void _internal_set_deprecated(bool value); + public: GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(EnumValueOptions) // @@protoc_insertion_point(class_scope:google.protobuf.EnumValueOptions) private: - class HasBitSetters; + class _Internal; ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -4629,10 +5216,10 @@ class PROTOBUF_EXPORT EnumValueOptions : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT ServiceOptions : +class PROTOBUF_EXPORT ServiceOptions PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ServiceOptions) */ { public: - ServiceOptions(); + inline ServiceOptions() : ServiceOptions(nullptr) {}; virtual ~ServiceOptions(); ServiceOptions(const ServiceOptions& from); @@ -4646,7 +5233,7 @@ class PROTOBUF_EXPORT ServiceOptions : return *this; } inline ServiceOptions& operator=(ServiceOptions&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -4655,18 +5242,12 @@ class PROTOBUF_EXPORT ServiceOptions : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -4686,11 +5267,22 @@ class PROTOBUF_EXPORT ServiceOptions : static constexpr int kIndexInFileMessages = 19; - void UnsafeArenaSwap(ServiceOptions* other); - void Swap(ServiceOptions* other); friend void swap(ServiceOptions& a, ServiceOptions& b) { a.Swap(&b); } + inline void Swap(ServiceOptions* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ServiceOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -4709,16 +5301,9 @@ class PROTOBUF_EXPORT ServiceOptions : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -4735,13 +5320,6 @@ class PROTOBUF_EXPORT ServiceOptions : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -4757,13 +5335,23 @@ class PROTOBUF_EXPORT ServiceOptions : // accessors ------------------------------------------------------- + enum : int { + kUninterpretedOptionFieldNumber = 999, + kDeprecatedFieldNumber = 33, + }; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; int uninterpreted_option_size() const; + private: + int _internal_uninterpreted_option_size() const; + public: void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); + private: + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& _internal_uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* _internal_add_uninterpreted_option(); + public: const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& @@ -4771,19 +5359,24 @@ class PROTOBUF_EXPORT ServiceOptions : // optional bool deprecated = 33 [default = false]; bool has_deprecated() const; + private: + bool _internal_has_deprecated() const; + public: void clear_deprecated(); - static const int kDeprecatedFieldNumber = 33; bool deprecated() const; void set_deprecated(bool value); + private: + bool _internal_deprecated() const; + void _internal_set_deprecated(bool value); + public: GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(ServiceOptions) // @@protoc_insertion_point(class_scope:google.protobuf.ServiceOptions) private: - class HasBitSetters; + class _Internal; ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -4795,10 +5388,10 @@ class PROTOBUF_EXPORT ServiceOptions : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT MethodOptions : +class PROTOBUF_EXPORT MethodOptions PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.MethodOptions) */ { public: - MethodOptions(); + inline MethodOptions() : MethodOptions(nullptr) {}; virtual ~MethodOptions(); MethodOptions(const MethodOptions& from); @@ -4812,7 +5405,7 @@ class PROTOBUF_EXPORT MethodOptions : return *this; } inline MethodOptions& operator=(MethodOptions&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -4821,18 +5414,12 @@ class PROTOBUF_EXPORT MethodOptions : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -4852,11 +5439,22 @@ class PROTOBUF_EXPORT MethodOptions : static constexpr int kIndexInFileMessages = 20; - void UnsafeArenaSwap(MethodOptions* other); - void Swap(MethodOptions* other); friend void swap(MethodOptions& a, MethodOptions& b) { a.Swap(&b); } + inline void Swap(MethodOptions* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MethodOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -4875,16 +5473,9 @@ class PROTOBUF_EXPORT MethodOptions : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -4901,13 +5492,6 @@ class PROTOBUF_EXPORT MethodOptions : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -4955,13 +5539,24 @@ class PROTOBUF_EXPORT MethodOptions : // accessors ------------------------------------------------------- + enum : int { + kUninterpretedOptionFieldNumber = 999, + kDeprecatedFieldNumber = 33, + kIdempotencyLevelFieldNumber = 34, + }; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; int uninterpreted_option_size() const; + private: + int _internal_uninterpreted_option_size() const; + public: void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); + private: + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& _internal_uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* _internal_add_uninterpreted_option(); + public: const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& @@ -4969,26 +5564,37 @@ class PROTOBUF_EXPORT MethodOptions : // optional bool deprecated = 33 [default = false]; bool has_deprecated() const; + private: + bool _internal_has_deprecated() const; + public: void clear_deprecated(); - static const int kDeprecatedFieldNumber = 33; bool deprecated() const; void set_deprecated(bool value); + private: + bool _internal_deprecated() const; + void _internal_set_deprecated(bool value); + public: // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; bool has_idempotency_level() const; + private: + bool _internal_has_idempotency_level() const; + public: void clear_idempotency_level(); - static const int kIdempotencyLevelFieldNumber = 34; PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel idempotency_level() const; void set_idempotency_level(PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel value); + private: + PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel _internal_idempotency_level() const; + void _internal_set_idempotency_level(PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel value); + public: GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(MethodOptions) // @@protoc_insertion_point(class_scope:google.protobuf.MethodOptions) private: - class HasBitSetters; + class _Internal; ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -5001,10 +5607,10 @@ class PROTOBUF_EXPORT MethodOptions : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT UninterpretedOption_NamePart : +class PROTOBUF_EXPORT UninterpretedOption_NamePart PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UninterpretedOption.NamePart) */ { public: - UninterpretedOption_NamePart(); + inline UninterpretedOption_NamePart() : UninterpretedOption_NamePart(nullptr) {}; virtual ~UninterpretedOption_NamePart(); UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from); @@ -5018,7 +5624,7 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart : return *this; } inline UninterpretedOption_NamePart& operator=(UninterpretedOption_NamePart&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -5027,18 +5633,12 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -5058,11 +5658,22 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart : static constexpr int kIndexInFileMessages = 21; - void UnsafeArenaSwap(UninterpretedOption_NamePart* other); - void Swap(UninterpretedOption_NamePart* other); friend void swap(UninterpretedOption_NamePart& a, UninterpretedOption_NamePart& b) { a.Swap(&b); } + inline void Swap(UninterpretedOption_NamePart* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UninterpretedOption_NamePart* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -5081,16 +5692,9 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -5107,13 +5711,6 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -5129,10 +5726,16 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart : // accessors ------------------------------------------------------- + enum : int { + kNamePartFieldNumber = 1, + kIsExtensionFieldNumber = 2, + }; // required string name_part = 1; bool has_name_part() const; + private: + bool _internal_has_name_part() const; + public: void clear_name_part(); - static const int kNamePartFieldNumber = 1; const std::string& name_part() const; void set_name_part(const std::string& value); void set_name_part(std::string&& value); @@ -5150,22 +5753,32 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart : " future release.") void unsafe_arena_set_allocated_name_part( std::string* name_part); + private: + const std::string& _internal_name_part() const; + void _internal_set_name_part(const std::string& value); + std::string* _internal_mutable_name_part(); + public: // required bool is_extension = 2; bool has_is_extension() const; + private: + bool _internal_has_is_extension() const; + public: void clear_is_extension(); - static const int kIsExtensionFieldNumber = 2; bool is_extension() const; void set_is_extension(bool value); + private: + bool _internal_is_extension() const; + void _internal_set_is_extension(bool value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.UninterpretedOption.NamePart) private: - class HasBitSetters; + class _Internal; // helper for ByteSizeLong() size_t RequiredFieldsByteSizeFallback() const; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -5177,10 +5790,10 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT UninterpretedOption : +class PROTOBUF_EXPORT UninterpretedOption PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UninterpretedOption) */ { public: - UninterpretedOption(); + inline UninterpretedOption() : UninterpretedOption(nullptr) {}; virtual ~UninterpretedOption(); UninterpretedOption(const UninterpretedOption& from); @@ -5194,7 +5807,7 @@ class PROTOBUF_EXPORT UninterpretedOption : return *this; } inline UninterpretedOption& operator=(UninterpretedOption&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -5203,18 +5816,12 @@ class PROTOBUF_EXPORT UninterpretedOption : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -5234,11 +5841,22 @@ class PROTOBUF_EXPORT UninterpretedOption : static constexpr int kIndexInFileMessages = 22; - void UnsafeArenaSwap(UninterpretedOption* other); - void Swap(UninterpretedOption* other); friend void swap(UninterpretedOption& a, UninterpretedOption& b) { a.Swap(&b); } + inline void Swap(UninterpretedOption* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UninterpretedOption* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -5257,16 +5875,9 @@ class PROTOBUF_EXPORT UninterpretedOption : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -5283,13 +5894,6 @@ class PROTOBUF_EXPORT UninterpretedOption : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -5307,13 +5911,28 @@ class PROTOBUF_EXPORT UninterpretedOption : // accessors ------------------------------------------------------- + enum : int { + kNameFieldNumber = 2, + kIdentifierValueFieldNumber = 3, + kStringValueFieldNumber = 7, + kAggregateValueFieldNumber = 8, + kPositiveIntValueFieldNumber = 4, + kNegativeIntValueFieldNumber = 5, + kDoubleValueFieldNumber = 6, + }; // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; int name_size() const; + private: + int _internal_name_size() const; + public: void clear_name(); - static const int kNameFieldNumber = 2; PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* mutable_name(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart >* mutable_name(); + private: + const PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart& _internal_name(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* _internal_add_name(); + public: const PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart& name(int index) const; PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* add_name(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart >& @@ -5321,8 +5940,10 @@ class PROTOBUF_EXPORT UninterpretedOption : // optional string identifier_value = 3; bool has_identifier_value() const; + private: + bool _internal_has_identifier_value() const; + public: void clear_identifier_value(); - static const int kIdentifierValueFieldNumber = 3; const std::string& identifier_value() const; void set_identifier_value(const std::string& value); void set_identifier_value(std::string&& value); @@ -5340,11 +5961,18 @@ class PROTOBUF_EXPORT UninterpretedOption : " future release.") void unsafe_arena_set_allocated_identifier_value( std::string* identifier_value); + private: + const std::string& _internal_identifier_value() const; + void _internal_set_identifier_value(const std::string& value); + std::string* _internal_mutable_identifier_value(); + public: // optional bytes string_value = 7; bool has_string_value() const; + private: + bool _internal_has_string_value() const; + public: void clear_string_value(); - static const int kStringValueFieldNumber = 7; const std::string& string_value() const; void set_string_value(const std::string& value); void set_string_value(std::string&& value); @@ -5362,11 +5990,18 @@ class PROTOBUF_EXPORT UninterpretedOption : " future release.") void unsafe_arena_set_allocated_string_value( std::string* string_value); + private: + const std::string& _internal_string_value() const; + void _internal_set_string_value(const std::string& value); + std::string* _internal_mutable_string_value(); + public: // optional string aggregate_value = 8; bool has_aggregate_value() const; + private: + bool _internal_has_aggregate_value() const; + public: void clear_aggregate_value(); - static const int kAggregateValueFieldNumber = 8; const std::string& aggregate_value() const; void set_aggregate_value(const std::string& value); void set_aggregate_value(std::string&& value); @@ -5384,33 +6019,55 @@ class PROTOBUF_EXPORT UninterpretedOption : " future release.") void unsafe_arena_set_allocated_aggregate_value( std::string* aggregate_value); + private: + const std::string& _internal_aggregate_value() const; + void _internal_set_aggregate_value(const std::string& value); + std::string* _internal_mutable_aggregate_value(); + public: // optional uint64 positive_int_value = 4; bool has_positive_int_value() const; + private: + bool _internal_has_positive_int_value() const; + public: void clear_positive_int_value(); - static const int kPositiveIntValueFieldNumber = 4; ::PROTOBUF_NAMESPACE_ID::uint64 positive_int_value() const; void set_positive_int_value(::PROTOBUF_NAMESPACE_ID::uint64 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint64 _internal_positive_int_value() const; + void _internal_set_positive_int_value(::PROTOBUF_NAMESPACE_ID::uint64 value); + public: // optional int64 negative_int_value = 5; bool has_negative_int_value() const; + private: + bool _internal_has_negative_int_value() const; + public: void clear_negative_int_value(); - static const int kNegativeIntValueFieldNumber = 5; ::PROTOBUF_NAMESPACE_ID::int64 negative_int_value() const; void set_negative_int_value(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_negative_int_value() const; + void _internal_set_negative_int_value(::PROTOBUF_NAMESPACE_ID::int64 value); + public: // optional double double_value = 6; bool has_double_value() const; + private: + bool _internal_has_double_value() const; + public: void clear_double_value(); - static const int kDoubleValueFieldNumber = 6; double double_value() const; void set_double_value(double value); + private: + double _internal_double_value() const; + void _internal_set_double_value(double value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.UninterpretedOption) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -5427,10 +6084,10 @@ class PROTOBUF_EXPORT UninterpretedOption : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT SourceCodeInfo_Location : +class PROTOBUF_EXPORT SourceCodeInfo_Location PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceCodeInfo.Location) */ { public: - SourceCodeInfo_Location(); + inline SourceCodeInfo_Location() : SourceCodeInfo_Location(nullptr) {}; virtual ~SourceCodeInfo_Location(); SourceCodeInfo_Location(const SourceCodeInfo_Location& from); @@ -5444,7 +6101,7 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location : return *this; } inline SourceCodeInfo_Location& operator=(SourceCodeInfo_Location&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -5453,18 +6110,12 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -5484,11 +6135,22 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location : static constexpr int kIndexInFileMessages = 23; - void UnsafeArenaSwap(SourceCodeInfo_Location* other); - void Swap(SourceCodeInfo_Location* other); friend void swap(SourceCodeInfo_Location& a, SourceCodeInfo_Location& b) { a.Swap(&b); } + inline void Swap(SourceCodeInfo_Location* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SourceCodeInfo_Location* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -5507,16 +6169,9 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -5533,13 +6188,6 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -5555,10 +6203,27 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location : // accessors ------------------------------------------------------- + enum : int { + kPathFieldNumber = 1, + kSpanFieldNumber = 2, + kLeadingDetachedCommentsFieldNumber = 6, + kLeadingCommentsFieldNumber = 3, + kTrailingCommentsFieldNumber = 4, + }; // repeated int32 path = 1 [packed = true]; int path_size() const; + private: + int _internal_path_size() const; + public: void clear_path(); - static const int kPathFieldNumber = 1; + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_path(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& + _internal_path() const; + void _internal_add_path(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* + _internal_mutable_path(); + public: ::PROTOBUF_NAMESPACE_ID::int32 path(int index) const; void set_path(int index, ::PROTOBUF_NAMESPACE_ID::int32 value); void add_path(::PROTOBUF_NAMESPACE_ID::int32 value); @@ -5569,8 +6234,18 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location : // repeated int32 span = 2 [packed = true]; int span_size() const; + private: + int _internal_span_size() const; + public: void clear_span(); - static const int kSpanFieldNumber = 2; + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_span(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& + _internal_span() const; + void _internal_add_span(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* + _internal_mutable_span(); + public: ::PROTOBUF_NAMESPACE_ID::int32 span(int index) const; void set_span(int index, ::PROTOBUF_NAMESPACE_ID::int32 value); void add_span(::PROTOBUF_NAMESPACE_ID::int32 value); @@ -5581,8 +6256,10 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location : // repeated string leading_detached_comments = 6; int leading_detached_comments_size() const; + private: + int _internal_leading_detached_comments_size() const; + public: void clear_leading_detached_comments(); - static const int kLeadingDetachedCommentsFieldNumber = 6; const std::string& leading_detached_comments(int index) const; std::string* mutable_leading_detached_comments(int index); void set_leading_detached_comments(int index, const std::string& value); @@ -5596,11 +6273,17 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location : void add_leading_detached_comments(const char* value, size_t size); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& leading_detached_comments() const; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_leading_detached_comments(); + private: + const std::string& _internal_leading_detached_comments(int index) const; + std::string* _internal_add_leading_detached_comments(); + public: // optional string leading_comments = 3; bool has_leading_comments() const; + private: + bool _internal_has_leading_comments() const; + public: void clear_leading_comments(); - static const int kLeadingCommentsFieldNumber = 3; const std::string& leading_comments() const; void set_leading_comments(const std::string& value); void set_leading_comments(std::string&& value); @@ -5618,11 +6301,18 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location : " future release.") void unsafe_arena_set_allocated_leading_comments( std::string* leading_comments); + private: + const std::string& _internal_leading_comments() const; + void _internal_set_leading_comments(const std::string& value); + std::string* _internal_mutable_leading_comments(); + public: // optional string trailing_comments = 4; bool has_trailing_comments() const; + private: + bool _internal_has_trailing_comments() const; + public: void clear_trailing_comments(); - static const int kTrailingCommentsFieldNumber = 4; const std::string& trailing_comments() const; void set_trailing_comments(const std::string& value); void set_trailing_comments(std::string&& value); @@ -5640,12 +6330,16 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location : " future release.") void unsafe_arena_set_allocated_trailing_comments( std::string* trailing_comments); + private: + const std::string& _internal_trailing_comments() const; + void _internal_set_trailing_comments(const std::string& value); + std::string* _internal_mutable_trailing_comments(); + public: // @@protoc_insertion_point(class_scope:google.protobuf.SourceCodeInfo.Location) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -5662,10 +6356,10 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT SourceCodeInfo : +class PROTOBUF_EXPORT SourceCodeInfo PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceCodeInfo) */ { public: - SourceCodeInfo(); + inline SourceCodeInfo() : SourceCodeInfo(nullptr) {}; virtual ~SourceCodeInfo(); SourceCodeInfo(const SourceCodeInfo& from); @@ -5679,7 +6373,7 @@ class PROTOBUF_EXPORT SourceCodeInfo : return *this; } inline SourceCodeInfo& operator=(SourceCodeInfo&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -5688,18 +6382,12 @@ class PROTOBUF_EXPORT SourceCodeInfo : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -5719,11 +6407,22 @@ class PROTOBUF_EXPORT SourceCodeInfo : static constexpr int kIndexInFileMessages = 24; - void UnsafeArenaSwap(SourceCodeInfo* other); - void Swap(SourceCodeInfo* other); friend void swap(SourceCodeInfo& a, SourceCodeInfo& b) { a.Swap(&b); } + inline void Swap(SourceCodeInfo* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SourceCodeInfo* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -5742,16 +6441,9 @@ class PROTOBUF_EXPORT SourceCodeInfo : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -5768,13 +6460,6 @@ class PROTOBUF_EXPORT SourceCodeInfo : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -5792,13 +6477,22 @@ class PROTOBUF_EXPORT SourceCodeInfo : // accessors ------------------------------------------------------- + enum : int { + kLocationFieldNumber = 1, + }; // repeated .google.protobuf.SourceCodeInfo.Location location = 1; int location_size() const; + private: + int _internal_location_size() const; + public: void clear_location(); - static const int kLocationFieldNumber = 1; PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* mutable_location(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location >* mutable_location(); + private: + const PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location& _internal_location(int index) const; + PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* _internal_add_location(); + public: const PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location& location(int index) const; PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* add_location(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location >& @@ -5806,23 +6500,21 @@ class PROTOBUF_EXPORT SourceCodeInfo : // @@protoc_insertion_point(class_scope:google.protobuf.SourceCodeInfo) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template 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::SourceCodeInfo_Location > location_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation : +class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.GeneratedCodeInfo.Annotation) */ { public: - GeneratedCodeInfo_Annotation(); + inline GeneratedCodeInfo_Annotation() : GeneratedCodeInfo_Annotation(nullptr) {}; virtual ~GeneratedCodeInfo_Annotation(); GeneratedCodeInfo_Annotation(const GeneratedCodeInfo_Annotation& from); @@ -5836,7 +6528,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation : return *this; } inline GeneratedCodeInfo_Annotation& operator=(GeneratedCodeInfo_Annotation&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -5845,18 +6537,12 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -5876,11 +6562,22 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation : static constexpr int kIndexInFileMessages = 25; - void UnsafeArenaSwap(GeneratedCodeInfo_Annotation* other); - void Swap(GeneratedCodeInfo_Annotation* other); friend void swap(GeneratedCodeInfo_Annotation& a, GeneratedCodeInfo_Annotation& b) { a.Swap(&b); } + inline void Swap(GeneratedCodeInfo_Annotation* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GeneratedCodeInfo_Annotation* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -5899,16 +6596,9 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -5925,13 +6615,6 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -5947,10 +6630,26 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation : // accessors ------------------------------------------------------- + enum : int { + kPathFieldNumber = 1, + kSourceFileFieldNumber = 2, + kBeginFieldNumber = 3, + kEndFieldNumber = 4, + }; // repeated int32 path = 1 [packed = true]; int path_size() const; + private: + int _internal_path_size() const; + public: void clear_path(); - static const int kPathFieldNumber = 1; + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_path(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& + _internal_path() const; + void _internal_add_path(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* + _internal_mutable_path(); + public: ::PROTOBUF_NAMESPACE_ID::int32 path(int index) const; void set_path(int index, ::PROTOBUF_NAMESPACE_ID::int32 value); void add_path(::PROTOBUF_NAMESPACE_ID::int32 value); @@ -5961,8 +6660,10 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation : // optional string source_file = 2; bool has_source_file() const; + private: + bool _internal_has_source_file() const; + public: void clear_source_file(); - static const int kSourceFileFieldNumber = 2; const std::string& source_file() const; void set_source_file(const std::string& value); void set_source_file(std::string&& value); @@ -5980,26 +6681,42 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation : " future release.") void unsafe_arena_set_allocated_source_file( std::string* source_file); + private: + const std::string& _internal_source_file() const; + void _internal_set_source_file(const std::string& value); + std::string* _internal_mutable_source_file(); + public: // optional int32 begin = 3; bool has_begin() const; + private: + bool _internal_has_begin() const; + public: void clear_begin(); - static const int kBeginFieldNumber = 3; ::PROTOBUF_NAMESPACE_ID::int32 begin() const; void set_begin(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_begin() const; + void _internal_set_begin(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // optional int32 end = 4; bool has_end() const; + private: + bool _internal_has_end() const; + public: void clear_end(); - static const int kEndFieldNumber = 4; ::PROTOBUF_NAMESPACE_ID::int32 end() const; void set_end(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_end() const; + void _internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.GeneratedCodeInfo.Annotation) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -6014,10 +6731,10 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT GeneratedCodeInfo : +class PROTOBUF_EXPORT GeneratedCodeInfo PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.GeneratedCodeInfo) */ { public: - GeneratedCodeInfo(); + inline GeneratedCodeInfo() : GeneratedCodeInfo(nullptr) {}; virtual ~GeneratedCodeInfo(); GeneratedCodeInfo(const GeneratedCodeInfo& from); @@ -6031,7 +6748,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo : return *this; } inline GeneratedCodeInfo& operator=(GeneratedCodeInfo&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -6040,18 +6757,12 @@ class PROTOBUF_EXPORT GeneratedCodeInfo : } inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields(); + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); } inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -6071,11 +6782,22 @@ class PROTOBUF_EXPORT GeneratedCodeInfo : static constexpr int kIndexInFileMessages = 26; - void UnsafeArenaSwap(GeneratedCodeInfo* other); - void Swap(GeneratedCodeInfo* other); friend void swap(GeneratedCodeInfo& a, GeneratedCodeInfo& b) { a.Swap(&b); } + inline void Swap(GeneratedCodeInfo* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GeneratedCodeInfo* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -6094,16 +6816,9 @@ class PROTOBUF_EXPORT GeneratedCodeInfo : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -6120,13 +6835,6 @@ class PROTOBUF_EXPORT GeneratedCodeInfo : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -6144,13 +6852,22 @@ class PROTOBUF_EXPORT GeneratedCodeInfo : // accessors ------------------------------------------------------- + enum : int { + kAnnotationFieldNumber = 1, + }; // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; int annotation_size() const; + private: + int _internal_annotation_size() const; + public: void clear_annotation(); - static const int kAnnotationFieldNumber = 1; PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* mutable_annotation(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation >* mutable_annotation(); + private: + const PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation& _internal_annotation(int index) const; + PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* _internal_add_annotation(); + public: const PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation& annotation(int index) const; PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* add_annotation(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation >& @@ -6158,15 +6875,13 @@ class PROTOBUF_EXPORT GeneratedCodeInfo : // @@protoc_insertion_point(class_scope:google.protobuf.GeneratedCodeInfo) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template 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::GeneratedCodeInfo_Annotation > annotation_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // =================================================================== @@ -6181,9 +6896,12 @@ class PROTOBUF_EXPORT GeneratedCodeInfo : // FileDescriptorSet // repeated .google.protobuf.FileDescriptorProto file = 1; -inline int FileDescriptorSet::file_size() const { +inline int FileDescriptorSet::_internal_file_size() const { return file_.size(); } +inline int FileDescriptorSet::file_size() const { + return _internal_file_size(); +} inline void FileDescriptorSet::clear_file() { file_.Clear(); } @@ -6196,13 +6914,19 @@ FileDescriptorSet::mutable_file() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorSet.file) return &file_; } +inline const PROTOBUF_NAMESPACE_ID::FileDescriptorProto& FileDescriptorSet::_internal_file(int index) const { + return file_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::FileDescriptorProto& FileDescriptorSet::file(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorSet.file) - return file_.Get(index); + return _internal_file(index); +} +inline PROTOBUF_NAMESPACE_ID::FileDescriptorProto* FileDescriptorSet::_internal_add_file() { + return file_.Add(); } inline PROTOBUF_NAMESPACE_ID::FileDescriptorProto* FileDescriptorSet::add_file() { // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorSet.file) - return file_.Add(); + return _internal_add_file(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >& FileDescriptorSet::file() const { @@ -6215,54 +6939,67 @@ FileDescriptorSet::file() const { // FileDescriptorProto // optional string name = 1; +inline bool FileDescriptorProto::_internal_has_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool FileDescriptorProto::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_name(); } inline void FileDescriptorProto::clear_name() { - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& FileDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.name) - return name_.Get(); + return _internal_name(); } inline void FileDescriptorProto::set_name(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.name) } +inline std::string* FileDescriptorProto::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.name) + return _internal_mutable_name(); +} +inline const std::string& FileDescriptorProto::_internal_name() const { + return name_.Get(); +} +inline void FileDescriptorProto::_internal_set_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FileDescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileDescriptorProto.name) } inline void FileDescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.name) } inline void FileDescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.name) } -inline std::string* FileDescriptorProto::mutable_name() { +inline std::string* FileDescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.name) - return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FileDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.name) - if (!has_name()) { + if (!_internal_has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FileDescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -6271,78 +7008,91 @@ inline void FileDescriptorProto::set_allocated_name(std::string* name) { _has_bits_[0] &= ~0x00000001u; } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.name) } inline std::string* FileDescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileDescriptorProto.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000001u; return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FileDescriptorProto::unsafe_arena_set_allocated_name( std::string* name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - name, GetArenaNoVirtual()); + name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileDescriptorProto.name) } // optional string package = 2; +inline bool FileDescriptorProto::_internal_has_package() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} inline bool FileDescriptorProto::has_package() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_package(); } inline void FileDescriptorProto::clear_package() { - package_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + package_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000002u; } inline const std::string& FileDescriptorProto::package() const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.package) - return package_.Get(); + return _internal_package(); } inline void FileDescriptorProto::set_package(const std::string& value) { - _has_bits_[0] |= 0x00000002u; - package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_package(value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.package) } +inline std::string* FileDescriptorProto::mutable_package() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.package) + return _internal_mutable_package(); +} +inline const std::string& FileDescriptorProto::_internal_package() const { + return package_.Get(); +} +inline void FileDescriptorProto::_internal_set_package(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FileDescriptorProto::set_package(std::string&& value) { _has_bits_[0] |= 0x00000002u; package_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileDescriptorProto.package) } inline void FileDescriptorProto::set_package(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000002u; package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.package) } inline void FileDescriptorProto::set_package(const char* value, size_t size) { _has_bits_[0] |= 0x00000002u; package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.package) } -inline std::string* FileDescriptorProto::mutable_package() { +inline std::string* FileDescriptorProto::_internal_mutable_package() { _has_bits_[0] |= 0x00000002u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.package) - return package_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return package_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FileDescriptorProto::release_package() { // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.package) - if (!has_package()) { + if (!_internal_has_package()) { return nullptr; } _has_bits_[0] &= ~0x00000002u; - return package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FileDescriptorProto::set_allocated_package(std::string* package) { if (package != nullptr) { @@ -6351,39 +7101,49 @@ inline void FileDescriptorProto::set_allocated_package(std::string* package) { _has_bits_[0] &= ~0x00000002u; } package_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), package, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.package) } inline std::string* FileDescriptorProto::unsafe_arena_release_package() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileDescriptorProto.package) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000002u; return package_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FileDescriptorProto::unsafe_arena_set_allocated_package( std::string* package) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (package != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } package_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - package, GetArenaNoVirtual()); + package, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileDescriptorProto.package) } // repeated string dependency = 3; -inline int FileDescriptorProto::dependency_size() const { +inline int FileDescriptorProto::_internal_dependency_size() const { return dependency_.size(); } +inline int FileDescriptorProto::dependency_size() const { + return _internal_dependency_size(); +} inline void FileDescriptorProto::clear_dependency() { dependency_.Clear(); } +inline std::string* FileDescriptorProto::add_dependency() { + // @@protoc_insertion_point(field_add_mutable:google.protobuf.FileDescriptorProto.dependency) + return _internal_add_dependency(); +} +inline const std::string& FileDescriptorProto::_internal_dependency(int index) const { + return dependency_.Get(index); +} inline const std::string& FileDescriptorProto::dependency(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.dependency) - return dependency_.Get(index); + return _internal_dependency(index); } inline std::string* FileDescriptorProto::mutable_dependency(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.dependency) @@ -6407,8 +7167,7 @@ inline void FileDescriptorProto::set_dependency(int index, const char* value, si reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.dependency) } -inline std::string* FileDescriptorProto::add_dependency() { - // @@protoc_insertion_point(field_add_mutable:google.protobuf.FileDescriptorProto.dependency) +inline std::string* FileDescriptorProto::_internal_add_dependency() { return dependency_.Add(); } inline void FileDescriptorProto::add_dependency(const std::string& value) { @@ -6440,69 +7199,106 @@ FileDescriptorProto::mutable_dependency() { } // repeated int32 public_dependency = 10; -inline int FileDescriptorProto::public_dependency_size() const { +inline int FileDescriptorProto::_internal_public_dependency_size() const { return public_dependency_.size(); } +inline int FileDescriptorProto::public_dependency_size() const { + return _internal_public_dependency_size(); +} inline void FileDescriptorProto::clear_public_dependency() { public_dependency_.Clear(); } +inline ::PROTOBUF_NAMESPACE_ID::int32 FileDescriptorProto::_internal_public_dependency(int index) const { + return public_dependency_.Get(index); +} inline ::PROTOBUF_NAMESPACE_ID::int32 FileDescriptorProto::public_dependency(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.public_dependency) - return public_dependency_.Get(index); + return _internal_public_dependency(index); } inline void FileDescriptorProto::set_public_dependency(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) { public_dependency_.Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.public_dependency) } -inline void FileDescriptorProto::add_public_dependency(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void FileDescriptorProto::_internal_add_public_dependency(::PROTOBUF_NAMESPACE_ID::int32 value) { public_dependency_.Add(value); +} +inline void FileDescriptorProto::add_public_dependency(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_add_public_dependency(value); // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.public_dependency) } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& +FileDescriptorProto::_internal_public_dependency() const { + return public_dependency_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& FileDescriptorProto::public_dependency() const { // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.public_dependency) - return public_dependency_; + return _internal_public_dependency(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* +FileDescriptorProto::_internal_mutable_public_dependency() { + return &public_dependency_; } inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* FileDescriptorProto::mutable_public_dependency() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.public_dependency) - return &public_dependency_; + return _internal_mutable_public_dependency(); } // repeated int32 weak_dependency = 11; -inline int FileDescriptorProto::weak_dependency_size() const { +inline int FileDescriptorProto::_internal_weak_dependency_size() const { return weak_dependency_.size(); } +inline int FileDescriptorProto::weak_dependency_size() const { + return _internal_weak_dependency_size(); +} inline void FileDescriptorProto::clear_weak_dependency() { weak_dependency_.Clear(); } +inline ::PROTOBUF_NAMESPACE_ID::int32 FileDescriptorProto::_internal_weak_dependency(int index) const { + return weak_dependency_.Get(index); +} inline ::PROTOBUF_NAMESPACE_ID::int32 FileDescriptorProto::weak_dependency(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.weak_dependency) - return weak_dependency_.Get(index); + return _internal_weak_dependency(index); } inline void FileDescriptorProto::set_weak_dependency(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) { weak_dependency_.Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.weak_dependency) } -inline void FileDescriptorProto::add_weak_dependency(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void FileDescriptorProto::_internal_add_weak_dependency(::PROTOBUF_NAMESPACE_ID::int32 value) { weak_dependency_.Add(value); +} +inline void FileDescriptorProto::add_weak_dependency(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_add_weak_dependency(value); // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.weak_dependency) } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& +FileDescriptorProto::_internal_weak_dependency() const { + return weak_dependency_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& FileDescriptorProto::weak_dependency() const { // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.weak_dependency) - return weak_dependency_; + return _internal_weak_dependency(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* +FileDescriptorProto::_internal_mutable_weak_dependency() { + return &weak_dependency_; } inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* FileDescriptorProto::mutable_weak_dependency() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.weak_dependency) - return &weak_dependency_; + return _internal_mutable_weak_dependency(); } // repeated .google.protobuf.DescriptorProto message_type = 4; -inline int FileDescriptorProto::message_type_size() const { +inline int FileDescriptorProto::_internal_message_type_size() const { return message_type_.size(); } +inline int FileDescriptorProto::message_type_size() const { + return _internal_message_type_size(); +} inline void FileDescriptorProto::clear_message_type() { message_type_.Clear(); } @@ -6515,13 +7311,19 @@ FileDescriptorProto::mutable_message_type() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.message_type) return &message_type_; } +inline const PROTOBUF_NAMESPACE_ID::DescriptorProto& FileDescriptorProto::_internal_message_type(int index) const { + return 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 message_type_.Get(index); + return _internal_message_type(index); +} +inline PROTOBUF_NAMESPACE_ID::DescriptorProto* FileDescriptorProto::_internal_add_message_type() { + return message_type_.Add(); } inline PROTOBUF_NAMESPACE_ID::DescriptorProto* FileDescriptorProto::add_message_type() { // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.message_type) - return message_type_.Add(); + return _internal_add_message_type(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto >& FileDescriptorProto::message_type() const { @@ -6530,9 +7332,12 @@ FileDescriptorProto::message_type() const { } // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; -inline int FileDescriptorProto::enum_type_size() const { +inline int FileDescriptorProto::_internal_enum_type_size() const { return enum_type_.size(); } +inline int FileDescriptorProto::enum_type_size() const { + return _internal_enum_type_size(); +} inline void FileDescriptorProto::clear_enum_type() { enum_type_.Clear(); } @@ -6545,13 +7350,19 @@ FileDescriptorProto::mutable_enum_type() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.enum_type) return &enum_type_; } +inline const PROTOBUF_NAMESPACE_ID::EnumDescriptorProto& FileDescriptorProto::_internal_enum_type(int index) const { + return 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 enum_type_.Get(index); + return _internal_enum_type(index); +} +inline PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* FileDescriptorProto::_internal_add_enum_type() { + return enum_type_.Add(); } inline PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* FileDescriptorProto::add_enum_type() { // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.enum_type) - return enum_type_.Add(); + return _internal_add_enum_type(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >& FileDescriptorProto::enum_type() const { @@ -6560,9 +7371,12 @@ FileDescriptorProto::enum_type() const { } // repeated .google.protobuf.ServiceDescriptorProto service = 6; -inline int FileDescriptorProto::service_size() const { +inline int FileDescriptorProto::_internal_service_size() const { return service_.size(); } +inline int FileDescriptorProto::service_size() const { + return _internal_service_size(); +} inline void FileDescriptorProto::clear_service() { service_.Clear(); } @@ -6575,13 +7389,19 @@ FileDescriptorProto::mutable_service() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.service) return &service_; } +inline const PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto& FileDescriptorProto::_internal_service(int index) const { + return service_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto& FileDescriptorProto::service(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.service) - return service_.Get(index); + return _internal_service(index); +} +inline PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* FileDescriptorProto::_internal_add_service() { + return service_.Add(); } inline PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* FileDescriptorProto::add_service() { // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.service) - return service_.Add(); + return _internal_add_service(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto >& FileDescriptorProto::service() const { @@ -6590,9 +7410,12 @@ FileDescriptorProto::service() const { } // repeated .google.protobuf.FieldDescriptorProto extension = 7; -inline int FileDescriptorProto::extension_size() const { +inline int FileDescriptorProto::_internal_extension_size() const { return extension_.size(); } +inline int FileDescriptorProto::extension_size() const { + return _internal_extension_size(); +} inline void FileDescriptorProto::clear_extension() { extension_.Clear(); } @@ -6605,13 +7428,19 @@ FileDescriptorProto::mutable_extension() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.extension) return &extension_; } +inline const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& FileDescriptorProto::_internal_extension(int index) const { + return extension_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& FileDescriptorProto::extension(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.extension) - return extension_.Get(index); + return _internal_extension(index); +} +inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* FileDescriptorProto::_internal_add_extension() { + return extension_.Add(); } inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* FileDescriptorProto::add_extension() { // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.extension) - return extension_.Add(); + return _internal_add_extension(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >& FileDescriptorProto::extension() const { @@ -6620,47 +7449,68 @@ FileDescriptorProto::extension() const { } // 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); + return value; +} inline bool FileDescriptorProto::has_options() const { - return (_has_bits_[0] & 0x00000008u) != 0; + return _internal_has_options(); } inline void FileDescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000008u; } -inline const PROTOBUF_NAMESPACE_ID::FileOptions& FileDescriptorProto::options() const { +inline const PROTOBUF_NAMESPACE_ID::FileOptions& FileDescriptorProto::_internal_options() const { const PROTOBUF_NAMESPACE_ID::FileOptions* p = options_; - // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.options) return p != nullptr ? *p : *reinterpret_cast( &PROTOBUF_NAMESPACE_ID::_FileOptions_default_instance_); } +inline const PROTOBUF_NAMESPACE_ID::FileOptions& FileDescriptorProto::options() const { + // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.options) + return _internal_options(); +} +inline void FileDescriptorProto::unsafe_arena_set_allocated_options( + PROTOBUF_NAMESPACE_ID::FileOptions* options) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_); + } + options_ = options; + if (options) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileDescriptorProto.options) +} inline PROTOBUF_NAMESPACE_ID::FileOptions* FileDescriptorProto::release_options() { - // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.options) - _has_bits_[0] &= ~0x00000008u; - PROTOBUF_NAMESPACE_ID::FileOptions* temp = options_; - if (GetArenaNoVirtual() != nullptr) { + auto temp = unsafe_arena_release_options(); + if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - options_ = nullptr; return temp; } inline PROTOBUF_NAMESPACE_ID::FileOptions* FileDescriptorProto::unsafe_arena_release_options() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileDescriptorProto.options) + // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.options) _has_bits_[0] &= ~0x00000008u; PROTOBUF_NAMESPACE_ID::FileOptions* temp = options_; options_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::FileOptions* FileDescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::FileOptions* FileDescriptorProto::_internal_mutable_options() { _has_bits_[0] |= 0x00000008u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArena()); options_ = p; } - // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.options) return options_; } +inline PROTOBUF_NAMESPACE_ID::FileOptions* FileDescriptorProto::mutable_options() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.options) + return _internal_mutable_options(); +} inline void FileDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::FileOptions* options) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete options_; } @@ -6680,47 +7530,68 @@ inline void FileDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::Fi } // 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); + return value; +} inline bool FileDescriptorProto::has_source_code_info() const { - return (_has_bits_[0] & 0x00000010u) != 0; + 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; } -inline const PROTOBUF_NAMESPACE_ID::SourceCodeInfo& FileDescriptorProto::source_code_info() const { +inline const PROTOBUF_NAMESPACE_ID::SourceCodeInfo& FileDescriptorProto::_internal_source_code_info() const { const PROTOBUF_NAMESPACE_ID::SourceCodeInfo* p = source_code_info_; - // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.source_code_info) return p != nullptr ? *p : *reinterpret_cast( &PROTOBUF_NAMESPACE_ID::_SourceCodeInfo_default_instance_); } +inline const PROTOBUF_NAMESPACE_ID::SourceCodeInfo& FileDescriptorProto::source_code_info() const { + // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.source_code_info) + return _internal_source_code_info(); +} +inline void FileDescriptorProto::unsafe_arena_set_allocated_source_code_info( + PROTOBUF_NAMESPACE_ID::SourceCodeInfo* source_code_info) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_code_info_); + } + source_code_info_ = source_code_info; + if (source_code_info) { + _has_bits_[0] |= 0x00000010u; + } else { + _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() { - // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.source_code_info) - _has_bits_[0] &= ~0x00000010u; - PROTOBUF_NAMESPACE_ID::SourceCodeInfo* temp = source_code_info_; - if (GetArenaNoVirtual() != nullptr) { + auto temp = unsafe_arena_release_source_code_info(); + if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - source_code_info_ = nullptr; return temp; } inline PROTOBUF_NAMESPACE_ID::SourceCodeInfo* FileDescriptorProto::unsafe_arena_release_source_code_info() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileDescriptorProto.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; return temp; } -inline PROTOBUF_NAMESPACE_ID::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() { +inline PROTOBUF_NAMESPACE_ID::SourceCodeInfo* FileDescriptorProto::_internal_mutable_source_code_info() { _has_bits_[0] |= 0x00000010u; if (source_code_info_ == nullptr) { - auto* p = CreateMaybeMessage(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArena()); source_code_info_ = p; } - // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.source_code_info) return source_code_info_; } +inline PROTOBUF_NAMESPACE_ID::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.source_code_info) + return _internal_mutable_source_code_info(); +} inline void FileDescriptorProto::set_allocated_source_code_info(PROTOBUF_NAMESPACE_ID::SourceCodeInfo* source_code_info) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete source_code_info_; } @@ -6740,54 +7611,67 @@ inline void FileDescriptorProto::set_allocated_source_code_info(PROTOBUF_NAMESPA } // optional string syntax = 12; +inline bool FileDescriptorProto::_internal_has_syntax() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} inline bool FileDescriptorProto::has_syntax() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return _internal_has_syntax(); } inline void FileDescriptorProto::clear_syntax() { - syntax_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + syntax_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000004u; } inline const std::string& FileDescriptorProto::syntax() const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.syntax) - return syntax_.Get(); + return _internal_syntax(); } inline void FileDescriptorProto::set_syntax(const std::string& value) { - _has_bits_[0] |= 0x00000004u; - syntax_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_syntax(value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.syntax) } +inline std::string* FileDescriptorProto::mutable_syntax() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.syntax) + return _internal_mutable_syntax(); +} +inline const std::string& FileDescriptorProto::_internal_syntax() const { + return syntax_.Get(); +} +inline void FileDescriptorProto::_internal_set_syntax(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + syntax_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FileDescriptorProto::set_syntax(std::string&& value) { _has_bits_[0] |= 0x00000004u; syntax_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileDescriptorProto.syntax) } inline void FileDescriptorProto::set_syntax(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000004u; syntax_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.syntax) } inline void FileDescriptorProto::set_syntax(const char* value, size_t size) { _has_bits_[0] |= 0x00000004u; syntax_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.syntax) } -inline std::string* FileDescriptorProto::mutable_syntax() { +inline std::string* FileDescriptorProto::_internal_mutable_syntax() { _has_bits_[0] |= 0x00000004u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.syntax) - return syntax_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return syntax_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FileDescriptorProto::release_syntax() { // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.syntax) - if (!has_syntax()) { + if (!_internal_has_syntax()) { return nullptr; } _has_bits_[0] &= ~0x00000004u; - return syntax_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return syntax_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FileDescriptorProto::set_allocated_syntax(std::string* syntax) { if (syntax != nullptr) { @@ -6796,26 +7680,26 @@ inline void FileDescriptorProto::set_allocated_syntax(std::string* syntax) { _has_bits_[0] &= ~0x00000004u; } syntax_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), syntax, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.syntax) } inline std::string* FileDescriptorProto::unsafe_arena_release_syntax() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileDescriptorProto.syntax) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000004u; return syntax_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FileDescriptorProto::unsafe_arena_set_allocated_syntax( std::string* syntax) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (syntax != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } syntax_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - syntax, GetArenaNoVirtual()); + syntax, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileDescriptorProto.syntax) } @@ -6824,83 +7708,124 @@ inline void FileDescriptorProto::unsafe_arena_set_allocated_syntax( // DescriptorProto_ExtensionRange // optional int32 start = 1; +inline bool DescriptorProto_ExtensionRange::_internal_has_start() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} inline bool DescriptorProto_ExtensionRange::has_start() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_start(); } inline void DescriptorProto_ExtensionRange::clear_start() { start_ = 0; _has_bits_[0] &= ~0x00000002u; } -inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ExtensionRange::start() const { - // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.start) +inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ExtensionRange::_internal_start() const { return start_; } -inline void DescriptorProto_ExtensionRange::set_start(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ExtensionRange::start() const { + // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.start) + return _internal_start(); +} +inline void DescriptorProto_ExtensionRange::_internal_set_start(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000002u; start_ = value; +} +inline void DescriptorProto_ExtensionRange::set_start(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_start(value); // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.start) } // optional int32 end = 2; +inline bool DescriptorProto_ExtensionRange::_internal_has_end() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} inline bool DescriptorProto_ExtensionRange::has_end() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return _internal_has_end(); } inline void DescriptorProto_ExtensionRange::clear_end() { end_ = 0; _has_bits_[0] &= ~0x00000004u; } -inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ExtensionRange::end() const { - // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.end) +inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ExtensionRange::_internal_end() const { return end_; } -inline void DescriptorProto_ExtensionRange::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ExtensionRange::end() const { + // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.end) + return _internal_end(); +} +inline void DescriptorProto_ExtensionRange::_internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000004u; end_ = value; +} +inline void DescriptorProto_ExtensionRange::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_end(value); // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.end) } // 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); + return value; +} inline bool DescriptorProto_ExtensionRange::has_options() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_options(); } inline void DescriptorProto_ExtensionRange::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000001u; } -inline const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& DescriptorProto_ExtensionRange::options() const { +inline const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& DescriptorProto_ExtensionRange::_internal_options() const { const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* p = options_; - // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.options) return p != nullptr ? *p : *reinterpret_cast( &PROTOBUF_NAMESPACE_ID::_ExtensionRangeOptions_default_instance_); } +inline const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& DescriptorProto_ExtensionRange::options() const { + // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.options) + return _internal_options(); +} +inline void DescriptorProto_ExtensionRange::unsafe_arena_set_allocated_options( + PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_); + } + options_ = options; + if (options) { + _has_bits_[0] |= 0x00000001u; + } else { + _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() { - // @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.ExtensionRange.options) - _has_bits_[0] &= ~0x00000001u; - PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* temp = options_; - if (GetArenaNoVirtual() != nullptr) { + auto temp = unsafe_arena_release_options(); + if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - options_ = nullptr; return temp; } inline PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_ExtensionRange::unsafe_arena_release_options() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.DescriptorProto.ExtensionRange.options) + // @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.ExtensionRange.options) _has_bits_[0] &= ~0x00000001u; PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* temp = options_; options_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_ExtensionRange::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_ExtensionRange::_internal_mutable_options() { _has_bits_[0] |= 0x00000001u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArena()); options_ = p; } - // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.ExtensionRange.options) return options_; } +inline PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_ExtensionRange::mutable_options() { + // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.ExtensionRange.options) + return _internal_mutable_options(); +} inline void DescriptorProto_ExtensionRange::set_allocated_options(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete options_; } @@ -6924,38 +7849,58 @@ inline void DescriptorProto_ExtensionRange::set_allocated_options(PROTOBUF_NAMES // DescriptorProto_ReservedRange // optional int32 start = 1; +inline bool DescriptorProto_ReservedRange::_internal_has_start() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool DescriptorProto_ReservedRange::has_start() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_start(); } inline void DescriptorProto_ReservedRange::clear_start() { start_ = 0; _has_bits_[0] &= ~0x00000001u; } -inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ReservedRange::start() const { - // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.start) +inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ReservedRange::_internal_start() const { return start_; } -inline void DescriptorProto_ReservedRange::set_start(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ReservedRange::start() const { + // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.start) + return _internal_start(); +} +inline void DescriptorProto_ReservedRange::_internal_set_start(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000001u; start_ = value; +} +inline void DescriptorProto_ReservedRange::set_start(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_start(value); // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.start) } // optional int32 end = 2; +inline bool DescriptorProto_ReservedRange::_internal_has_end() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} inline bool DescriptorProto_ReservedRange::has_end() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_end(); } inline void DescriptorProto_ReservedRange::clear_end() { end_ = 0; _has_bits_[0] &= ~0x00000002u; } -inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ReservedRange::end() const { - // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.end) +inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ReservedRange::_internal_end() const { return end_; } -inline void DescriptorProto_ReservedRange::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ReservedRange::end() const { + // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.end) + return _internal_end(); +} +inline void DescriptorProto_ReservedRange::_internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000002u; end_ = value; +} +inline void DescriptorProto_ReservedRange::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_end(value); // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.end) } @@ -6964,54 +7909,67 @@ inline void DescriptorProto_ReservedRange::set_end(::PROTOBUF_NAMESPACE_ID::int3 // DescriptorProto // optional string name = 1; +inline bool DescriptorProto::_internal_has_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool DescriptorProto::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_name(); } inline void DescriptorProto::clear_name() { - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& DescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.name) - return name_.Get(); + return _internal_name(); } inline void DescriptorProto::set_name(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.name) } +inline std::string* DescriptorProto::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.name) + return _internal_mutable_name(); +} +inline const std::string& DescriptorProto::_internal_name() const { + return name_.Get(); +} +inline void DescriptorProto::_internal_set_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void DescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.DescriptorProto.name) } inline void DescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.name) } inline void DescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.name) } -inline std::string* DescriptorProto::mutable_name() { +inline std::string* DescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.name) - return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* DescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.name) - if (!has_name()) { + if (!_internal_has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void DescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -7020,33 +7978,36 @@ inline void DescriptorProto::set_allocated_name(std::string* name) { _has_bits_[0] &= ~0x00000001u; } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.name) } inline std::string* DescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.DescriptorProto.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000001u; return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void DescriptorProto::unsafe_arena_set_allocated_name( std::string* name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - name, GetArenaNoVirtual()); + name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.DescriptorProto.name) } // repeated .google.protobuf.FieldDescriptorProto field = 2; -inline int DescriptorProto::field_size() const { +inline int DescriptorProto::_internal_field_size() const { return field_.size(); } +inline int DescriptorProto::field_size() const { + return _internal_field_size(); +} inline void DescriptorProto::clear_field() { field_.Clear(); } @@ -7059,13 +8020,19 @@ DescriptorProto::mutable_field() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.field) return &field_; } +inline const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& DescriptorProto::_internal_field(int index) const { + return field_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& DescriptorProto::field(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.field) - return field_.Get(index); + return _internal_field(index); +} +inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::_internal_add_field() { + return field_.Add(); } inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::add_field() { // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.field) - return field_.Add(); + return _internal_add_field(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >& DescriptorProto::field() const { @@ -7074,9 +8041,12 @@ DescriptorProto::field() const { } // repeated .google.protobuf.FieldDescriptorProto extension = 6; -inline int DescriptorProto::extension_size() const { +inline int DescriptorProto::_internal_extension_size() const { return extension_.size(); } +inline int DescriptorProto::extension_size() const { + return _internal_extension_size(); +} inline void DescriptorProto::clear_extension() { extension_.Clear(); } @@ -7089,13 +8059,19 @@ DescriptorProto::mutable_extension() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension) return &extension_; } +inline const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& DescriptorProto::_internal_extension(int index) const { + return extension_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& DescriptorProto::extension(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension) - return extension_.Get(index); + return _internal_extension(index); +} +inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::_internal_add_extension() { + return extension_.Add(); } inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::add_extension() { // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension) - return extension_.Add(); + return _internal_add_extension(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >& DescriptorProto::extension() const { @@ -7104,9 +8080,12 @@ DescriptorProto::extension() const { } // repeated .google.protobuf.DescriptorProto nested_type = 3; -inline int DescriptorProto::nested_type_size() const { +inline int DescriptorProto::_internal_nested_type_size() const { return nested_type_.size(); } +inline int DescriptorProto::nested_type_size() const { + return _internal_nested_type_size(); +} inline void DescriptorProto::clear_nested_type() { nested_type_.Clear(); } @@ -7119,13 +8098,19 @@ DescriptorProto::mutable_nested_type() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.nested_type) return &nested_type_; } +inline const PROTOBUF_NAMESPACE_ID::DescriptorProto& DescriptorProto::_internal_nested_type(int index) const { + return 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 nested_type_.Get(index); + return _internal_nested_type(index); +} +inline PROTOBUF_NAMESPACE_ID::DescriptorProto* DescriptorProto::_internal_add_nested_type() { + return nested_type_.Add(); } inline PROTOBUF_NAMESPACE_ID::DescriptorProto* DescriptorProto::add_nested_type() { // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.nested_type) - return nested_type_.Add(); + return _internal_add_nested_type(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto >& DescriptorProto::nested_type() const { @@ -7134,9 +8119,12 @@ DescriptorProto::nested_type() const { } // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; -inline int DescriptorProto::enum_type_size() const { +inline int DescriptorProto::_internal_enum_type_size() const { return enum_type_.size(); } +inline int DescriptorProto::enum_type_size() const { + return _internal_enum_type_size(); +} inline void DescriptorProto::clear_enum_type() { enum_type_.Clear(); } @@ -7149,13 +8137,19 @@ DescriptorProto::mutable_enum_type() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.enum_type) return &enum_type_; } +inline const PROTOBUF_NAMESPACE_ID::EnumDescriptorProto& DescriptorProto::_internal_enum_type(int index) const { + return 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 enum_type_.Get(index); + return _internal_enum_type(index); +} +inline PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* DescriptorProto::_internal_add_enum_type() { + return enum_type_.Add(); } inline PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* DescriptorProto::add_enum_type() { // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.enum_type) - return enum_type_.Add(); + return _internal_add_enum_type(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >& DescriptorProto::enum_type() const { @@ -7164,9 +8158,12 @@ DescriptorProto::enum_type() const { } // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; -inline int DescriptorProto::extension_range_size() const { +inline int DescriptorProto::_internal_extension_range_size() const { return extension_range_.size(); } +inline int DescriptorProto::extension_range_size() const { + return _internal_extension_range_size(); +} inline void DescriptorProto::clear_extension_range() { extension_range_.Clear(); } @@ -7179,13 +8176,19 @@ DescriptorProto::mutable_extension_range() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension_range) return &extension_range_; } +inline const PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange& DescriptorProto::_internal_extension_range(int index) const { + return 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 extension_range_.Get(index); + return _internal_extension_range(index); +} +inline PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* DescriptorProto::_internal_add_extension_range() { + return extension_range_.Add(); } inline PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* DescriptorProto::add_extension_range() { // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension_range) - return extension_range_.Add(); + return _internal_add_extension_range(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange >& DescriptorProto::extension_range() const { @@ -7194,9 +8197,12 @@ DescriptorProto::extension_range() const { } // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; -inline int DescriptorProto::oneof_decl_size() const { +inline int DescriptorProto::_internal_oneof_decl_size() const { return oneof_decl_.size(); } +inline int DescriptorProto::oneof_decl_size() const { + return _internal_oneof_decl_size(); +} inline void DescriptorProto::clear_oneof_decl() { oneof_decl_.Clear(); } @@ -7209,13 +8215,19 @@ DescriptorProto::mutable_oneof_decl() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.oneof_decl) return &oneof_decl_; } +inline const PROTOBUF_NAMESPACE_ID::OneofDescriptorProto& DescriptorProto::_internal_oneof_decl(int index) const { + return 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 oneof_decl_.Get(index); + return _internal_oneof_decl(index); +} +inline PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* DescriptorProto::_internal_add_oneof_decl() { + return oneof_decl_.Add(); } inline PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* DescriptorProto::add_oneof_decl() { // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.oneof_decl) - return oneof_decl_.Add(); + return _internal_add_oneof_decl(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::OneofDescriptorProto >& DescriptorProto::oneof_decl() const { @@ -7224,47 +8236,68 @@ DescriptorProto::oneof_decl() const { } // 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); + return value; +} inline bool DescriptorProto::has_options() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_options(); } inline void DescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000002u; } -inline const PROTOBUF_NAMESPACE_ID::MessageOptions& DescriptorProto::options() const { +inline const PROTOBUF_NAMESPACE_ID::MessageOptions& DescriptorProto::_internal_options() const { const PROTOBUF_NAMESPACE_ID::MessageOptions* p = options_; - // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.options) return p != nullptr ? *p : *reinterpret_cast( &PROTOBUF_NAMESPACE_ID::_MessageOptions_default_instance_); } +inline const PROTOBUF_NAMESPACE_ID::MessageOptions& DescriptorProto::options() const { + // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.options) + return _internal_options(); +} +inline void DescriptorProto::unsafe_arena_set_allocated_options( + PROTOBUF_NAMESPACE_ID::MessageOptions* options) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_); + } + options_ = options; + if (options) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.DescriptorProto.options) +} inline PROTOBUF_NAMESPACE_ID::MessageOptions* DescriptorProto::release_options() { - // @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.options) - _has_bits_[0] &= ~0x00000002u; - PROTOBUF_NAMESPACE_ID::MessageOptions* temp = options_; - if (GetArenaNoVirtual() != nullptr) { + auto temp = unsafe_arena_release_options(); + if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - options_ = nullptr; return temp; } inline PROTOBUF_NAMESPACE_ID::MessageOptions* DescriptorProto::unsafe_arena_release_options() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.DescriptorProto.options) + // @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.options) _has_bits_[0] &= ~0x00000002u; PROTOBUF_NAMESPACE_ID::MessageOptions* temp = options_; options_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::MessageOptions* DescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::MessageOptions* DescriptorProto::_internal_mutable_options() { _has_bits_[0] |= 0x00000002u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArena()); options_ = p; } - // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.options) return options_; } +inline PROTOBUF_NAMESPACE_ID::MessageOptions* DescriptorProto::mutable_options() { + // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.options) + return _internal_mutable_options(); +} inline void DescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::MessageOptions* options) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete options_; } @@ -7284,9 +8317,12 @@ inline void DescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::Messag } // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; -inline int DescriptorProto::reserved_range_size() const { +inline int DescriptorProto::_internal_reserved_range_size() const { return reserved_range_.size(); } +inline int DescriptorProto::reserved_range_size() const { + return _internal_reserved_range_size(); +} inline void DescriptorProto::clear_reserved_range() { reserved_range_.Clear(); } @@ -7299,13 +8335,19 @@ DescriptorProto::mutable_reserved_range() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_range) return &reserved_range_; } +inline const PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange& DescriptorProto::_internal_reserved_range(int index) const { + return 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 reserved_range_.Get(index); + return _internal_reserved_range(index); +} +inline PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* DescriptorProto::_internal_add_reserved_range() { + return reserved_range_.Add(); } inline PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* DescriptorProto::add_reserved_range() { // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_range) - return reserved_range_.Add(); + return _internal_add_reserved_range(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange >& DescriptorProto::reserved_range() const { @@ -7314,15 +8356,25 @@ DescriptorProto::reserved_range() const { } // repeated string reserved_name = 10; -inline int DescriptorProto::reserved_name_size() const { +inline int DescriptorProto::_internal_reserved_name_size() const { return reserved_name_.size(); } +inline int DescriptorProto::reserved_name_size() const { + return _internal_reserved_name_size(); +} inline void DescriptorProto::clear_reserved_name() { reserved_name_.Clear(); } +inline std::string* DescriptorProto::add_reserved_name() { + // @@protoc_insertion_point(field_add_mutable:google.protobuf.DescriptorProto.reserved_name) + return _internal_add_reserved_name(); +} +inline const std::string& DescriptorProto::_internal_reserved_name(int index) const { + return reserved_name_.Get(index); +} inline const std::string& DescriptorProto::reserved_name(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_name) - return reserved_name_.Get(index); + return _internal_reserved_name(index); } inline std::string* DescriptorProto::mutable_reserved_name(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_name) @@ -7346,8 +8398,7 @@ inline void DescriptorProto::set_reserved_name(int index, const char* value, siz reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.reserved_name) } -inline std::string* DescriptorProto::add_reserved_name() { - // @@protoc_insertion_point(field_add_mutable:google.protobuf.DescriptorProto.reserved_name) +inline std::string* DescriptorProto::_internal_add_reserved_name() { return reserved_name_.Add(); } inline void DescriptorProto::add_reserved_name(const std::string& value) { @@ -7383,9 +8434,12 @@ DescriptorProto::mutable_reserved_name() { // ExtensionRangeOptions // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int ExtensionRangeOptions::uninterpreted_option_size() const { +inline int ExtensionRangeOptions::_internal_uninterpreted_option_size() const { return uninterpreted_option_.size(); } +inline int ExtensionRangeOptions::uninterpreted_option_size() const { + return _internal_uninterpreted_option_size(); +} inline void ExtensionRangeOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } @@ -7398,13 +8452,19 @@ ExtensionRangeOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.ExtensionRangeOptions.uninterpreted_option) return &uninterpreted_option_; } +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& ExtensionRangeOptions::_internal_uninterpreted_option(int index) const { + return 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 uninterpreted_option_.Get(index); + return _internal_uninterpreted_option(index); +} +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* ExtensionRangeOptions::_internal_add_uninterpreted_option() { + return uninterpreted_option_.Add(); } inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* ExtensionRangeOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.ExtensionRangeOptions.uninterpreted_option) - return uninterpreted_option_.Add(); + return _internal_add_uninterpreted_option(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& ExtensionRangeOptions::uninterpreted_option() const { @@ -7417,54 +8477,67 @@ ExtensionRangeOptions::uninterpreted_option() const { // FieldDescriptorProto // optional string name = 1; +inline bool FieldDescriptorProto::_internal_has_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool FieldDescriptorProto::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_name(); } inline void FieldDescriptorProto::clear_name() { - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& FieldDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.name) - return name_.Get(); + return _internal_name(); } inline void FieldDescriptorProto::set_name(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.name) } +inline std::string* FieldDescriptorProto::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.name) + return _internal_mutable_name(); +} +inline const std::string& FieldDescriptorProto::_internal_name() const { + return name_.Get(); +} +inline void FieldDescriptorProto::_internal_set_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FieldDescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.name) } inline void FieldDescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.name) } inline void FieldDescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.name) } -inline std::string* FieldDescriptorProto::mutable_name() { +inline std::string* FieldDescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.name) - return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FieldDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.name) - if (!has_name()) { + if (!_internal_has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FieldDescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -7473,134 +8546,177 @@ inline void FieldDescriptorProto::set_allocated_name(std::string* name) { _has_bits_[0] &= ~0x00000001u; } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.name) } inline std::string* FieldDescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FieldDescriptorProto.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000001u; return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FieldDescriptorProto::unsafe_arena_set_allocated_name( std::string* name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - name, GetArenaNoVirtual()); + name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FieldDescriptorProto.name) } // optional int32 number = 3; +inline bool FieldDescriptorProto::_internal_has_number() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} inline bool FieldDescriptorProto::has_number() const { - return (_has_bits_[0] & 0x00000040u) != 0; + return _internal_has_number(); } inline void FieldDescriptorProto::clear_number() { number_ = 0; _has_bits_[0] &= ~0x00000040u; } -inline ::PROTOBUF_NAMESPACE_ID::int32 FieldDescriptorProto::number() const { - // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.number) +inline ::PROTOBUF_NAMESPACE_ID::int32 FieldDescriptorProto::_internal_number() const { return number_; } -inline void FieldDescriptorProto::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 FieldDescriptorProto::number() const { + // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.number) + return _internal_number(); +} +inline void FieldDescriptorProto::_internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000040u; number_ = value; +} +inline void FieldDescriptorProto::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_number(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.number) } // optional .google.protobuf.FieldDescriptorProto.Label label = 4; +inline bool FieldDescriptorProto::_internal_has_label() const { + bool value = (_has_bits_[0] & 0x00000200u) != 0; + return value; +} inline bool FieldDescriptorProto::has_label() const { - return (_has_bits_[0] & 0x00000100u) != 0; + return _internal_has_label(); } inline void FieldDescriptorProto::clear_label() { label_ = 1; - _has_bits_[0] &= ~0x00000100u; + _has_bits_[0] &= ~0x00000200u; +} +inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label FieldDescriptorProto::_internal_label() const { + return static_cast< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label >(label_); } inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label FieldDescriptorProto::label() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.label) - return static_cast< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label >(label_); + return _internal_label(); +} +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; } inline void FieldDescriptorProto::set_label(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label value) { - assert(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label_IsValid(value)); - _has_bits_[0] |= 0x00000100u; - label_ = value; + _internal_set_label(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.label) } // optional .google.protobuf.FieldDescriptorProto.Type type = 5; +inline bool FieldDescriptorProto::_internal_has_type() const { + bool value = (_has_bits_[0] & 0x00000400u) != 0; + return value; +} inline bool FieldDescriptorProto::has_type() const { - return (_has_bits_[0] & 0x00000200u) != 0; + return _internal_has_type(); } inline void FieldDescriptorProto::clear_type() { type_ = 1; - _has_bits_[0] &= ~0x00000200u; + _has_bits_[0] &= ~0x00000400u; +} +inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type FieldDescriptorProto::_internal_type() const { + return static_cast< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type >(type_); } inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type FieldDescriptorProto::type() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type) - return static_cast< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type >(type_); + return _internal_type(); +} +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; } inline void FieldDescriptorProto::set_type(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type value) { - assert(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type_IsValid(value)); - _has_bits_[0] |= 0x00000200u; - type_ = value; + _internal_set_type(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type) } // optional string type_name = 6; +inline bool FieldDescriptorProto::_internal_has_type_name() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} inline bool FieldDescriptorProto::has_type_name() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return _internal_has_type_name(); } inline void FieldDescriptorProto::clear_type_name() { - type_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + type_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000004u; } inline const std::string& FieldDescriptorProto::type_name() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type_name) - return type_name_.Get(); + return _internal_type_name(); } inline void FieldDescriptorProto::set_type_name(const std::string& value) { - _has_bits_[0] |= 0x00000004u; - type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_type_name(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type_name) } +inline std::string* FieldDescriptorProto::mutable_type_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.type_name) + return _internal_mutable_type_name(); +} +inline const std::string& FieldDescriptorProto::_internal_type_name() const { + return type_name_.Get(); +} +inline void FieldDescriptorProto::_internal_set_type_name(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FieldDescriptorProto::set_type_name(std::string&& value) { _has_bits_[0] |= 0x00000004u; type_name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.type_name) } inline void FieldDescriptorProto::set_type_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000004u; type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.type_name) } inline void FieldDescriptorProto::set_type_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000004u; type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.type_name) } -inline std::string* FieldDescriptorProto::mutable_type_name() { +inline std::string* FieldDescriptorProto::_internal_mutable_type_name() { _has_bits_[0] |= 0x00000004u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.type_name) - return type_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return type_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FieldDescriptorProto::release_type_name() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.type_name) - if (!has_type_name()) { + if (!_internal_has_type_name()) { return nullptr; } _has_bits_[0] &= ~0x00000004u; - return type_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return type_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FieldDescriptorProto::set_allocated_type_name(std::string* type_name) { if (type_name != nullptr) { @@ -7609,78 +8725,91 @@ inline void FieldDescriptorProto::set_allocated_type_name(std::string* type_name _has_bits_[0] &= ~0x00000004u; } type_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.type_name) } inline std::string* FieldDescriptorProto::unsafe_arena_release_type_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FieldDescriptorProto.type_name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000004u; return type_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FieldDescriptorProto::unsafe_arena_set_allocated_type_name( std::string* type_name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (type_name != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } type_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - type_name, GetArenaNoVirtual()); + type_name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FieldDescriptorProto.type_name) } // optional string extendee = 2; +inline bool FieldDescriptorProto::_internal_has_extendee() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} inline bool FieldDescriptorProto::has_extendee() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_extendee(); } inline void FieldDescriptorProto::clear_extendee() { - extendee_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + extendee_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000002u; } inline const std::string& FieldDescriptorProto::extendee() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.extendee) - return extendee_.Get(); + return _internal_extendee(); } inline void FieldDescriptorProto::set_extendee(const std::string& value) { - _has_bits_[0] |= 0x00000002u; - extendee_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_extendee(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.extendee) } +inline std::string* FieldDescriptorProto::mutable_extendee() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.extendee) + return _internal_mutable_extendee(); +} +inline const std::string& FieldDescriptorProto::_internal_extendee() const { + return extendee_.Get(); +} +inline void FieldDescriptorProto::_internal_set_extendee(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + extendee_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FieldDescriptorProto::set_extendee(std::string&& value) { _has_bits_[0] |= 0x00000002u; extendee_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.extendee) } inline void FieldDescriptorProto::set_extendee(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000002u; extendee_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.extendee) } inline void FieldDescriptorProto::set_extendee(const char* value, size_t size) { _has_bits_[0] |= 0x00000002u; extendee_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.extendee) } -inline std::string* FieldDescriptorProto::mutable_extendee() { +inline std::string* FieldDescriptorProto::_internal_mutable_extendee() { _has_bits_[0] |= 0x00000002u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.extendee) - return extendee_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return extendee_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FieldDescriptorProto::release_extendee() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.extendee) - if (!has_extendee()) { + if (!_internal_has_extendee()) { return nullptr; } _has_bits_[0] &= ~0x00000002u; - return extendee_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return extendee_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FieldDescriptorProto::set_allocated_extendee(std::string* extendee) { if (extendee != nullptr) { @@ -7689,78 +8818,91 @@ inline void FieldDescriptorProto::set_allocated_extendee(std::string* extendee) _has_bits_[0] &= ~0x00000002u; } extendee_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), extendee, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.extendee) } inline std::string* FieldDescriptorProto::unsafe_arena_release_extendee() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FieldDescriptorProto.extendee) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000002u; return extendee_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FieldDescriptorProto::unsafe_arena_set_allocated_extendee( std::string* extendee) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (extendee != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } extendee_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - extendee, GetArenaNoVirtual()); + extendee, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FieldDescriptorProto.extendee) } // optional string default_value = 7; +inline bool FieldDescriptorProto::_internal_has_default_value() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} inline bool FieldDescriptorProto::has_default_value() const { - return (_has_bits_[0] & 0x00000008u) != 0; + return _internal_has_default_value(); } inline void FieldDescriptorProto::clear_default_value() { - default_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + default_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000008u; } inline const std::string& FieldDescriptorProto::default_value() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.default_value) - return default_value_.Get(); + return _internal_default_value(); } inline void FieldDescriptorProto::set_default_value(const std::string& value) { - _has_bits_[0] |= 0x00000008u; - default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_default_value(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.default_value) } +inline std::string* FieldDescriptorProto::mutable_default_value() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.default_value) + return _internal_mutable_default_value(); +} +inline const std::string& FieldDescriptorProto::_internal_default_value() const { + return default_value_.Get(); +} +inline void FieldDescriptorProto::_internal_set_default_value(const std::string& value) { + _has_bits_[0] |= 0x00000008u; + default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FieldDescriptorProto::set_default_value(std::string&& value) { _has_bits_[0] |= 0x00000008u; default_value_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.default_value) } inline void FieldDescriptorProto::set_default_value(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000008u; default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.default_value) } inline void FieldDescriptorProto::set_default_value(const char* value, size_t size) { _has_bits_[0] |= 0x00000008u; default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.default_value) } -inline std::string* FieldDescriptorProto::mutable_default_value() { +inline std::string* FieldDescriptorProto::_internal_mutable_default_value() { _has_bits_[0] |= 0x00000008u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.default_value) - return default_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return default_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FieldDescriptorProto::release_default_value() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.default_value) - if (!has_default_value()) { + if (!_internal_has_default_value()) { return nullptr; } _has_bits_[0] &= ~0x00000008u; - return default_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return default_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FieldDescriptorProto::set_allocated_default_value(std::string* default_value) { if (default_value != nullptr) { @@ -7769,96 +8911,119 @@ inline void FieldDescriptorProto::set_allocated_default_value(std::string* defau _has_bits_[0] &= ~0x00000008u; } default_value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), default_value, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.default_value) } inline std::string* FieldDescriptorProto::unsafe_arena_release_default_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FieldDescriptorProto.default_value) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000008u; return default_value_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FieldDescriptorProto::unsafe_arena_set_allocated_default_value( std::string* default_value) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (default_value != nullptr) { _has_bits_[0] |= 0x00000008u; } else { _has_bits_[0] &= ~0x00000008u; } default_value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - default_value, GetArenaNoVirtual()); + default_value, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FieldDescriptorProto.default_value) } // optional int32 oneof_index = 9; +inline bool FieldDescriptorProto::_internal_has_oneof_index() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} inline bool FieldDescriptorProto::has_oneof_index() const { - return (_has_bits_[0] & 0x00000080u) != 0; + return _internal_has_oneof_index(); } inline void FieldDescriptorProto::clear_oneof_index() { oneof_index_ = 0; _has_bits_[0] &= ~0x00000080u; } -inline ::PROTOBUF_NAMESPACE_ID::int32 FieldDescriptorProto::oneof_index() const { - // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.oneof_index) +inline ::PROTOBUF_NAMESPACE_ID::int32 FieldDescriptorProto::_internal_oneof_index() const { return oneof_index_; } -inline void FieldDescriptorProto::set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 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(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000080u; oneof_index_ = value; +} +inline void FieldDescriptorProto::set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_oneof_index(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.oneof_index) } // optional string json_name = 10; +inline bool FieldDescriptorProto::_internal_has_json_name() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} inline bool FieldDescriptorProto::has_json_name() const { - return (_has_bits_[0] & 0x00000010u) != 0; + return _internal_has_json_name(); } inline void FieldDescriptorProto::clear_json_name() { - json_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + json_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000010u; } inline const std::string& FieldDescriptorProto::json_name() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.json_name) - return json_name_.Get(); + return _internal_json_name(); } inline void FieldDescriptorProto::set_json_name(const std::string& value) { - _has_bits_[0] |= 0x00000010u; - json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_json_name(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.json_name) } +inline std::string* FieldDescriptorProto::mutable_json_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.json_name) + return _internal_mutable_json_name(); +} +inline const std::string& FieldDescriptorProto::_internal_json_name() const { + return json_name_.Get(); +} +inline void FieldDescriptorProto::_internal_set_json_name(const std::string& value) { + _has_bits_[0] |= 0x00000010u; + json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FieldDescriptorProto::set_json_name(std::string&& value) { _has_bits_[0] |= 0x00000010u; json_name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.json_name) } inline void FieldDescriptorProto::set_json_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000010u; json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.json_name) } inline void FieldDescriptorProto::set_json_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000010u; json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.json_name) } -inline std::string* FieldDescriptorProto::mutable_json_name() { +inline std::string* FieldDescriptorProto::_internal_mutable_json_name() { _has_bits_[0] |= 0x00000010u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.json_name) - return json_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return json_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FieldDescriptorProto::release_json_name() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.json_name) - if (!has_json_name()) { + if (!_internal_has_json_name()) { return nullptr; } _has_bits_[0] &= ~0x00000010u; - return json_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return json_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FieldDescriptorProto::set_allocated_json_name(std::string* json_name) { if (json_name != nullptr) { @@ -7867,71 +9032,92 @@ inline void FieldDescriptorProto::set_allocated_json_name(std::string* json_name _has_bits_[0] &= ~0x00000010u; } json_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), json_name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.json_name) } inline std::string* FieldDescriptorProto::unsafe_arena_release_json_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FieldDescriptorProto.json_name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000010u; return json_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FieldDescriptorProto::unsafe_arena_set_allocated_json_name( std::string* json_name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (json_name != nullptr) { _has_bits_[0] |= 0x00000010u; } else { _has_bits_[0] &= ~0x00000010u; } json_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - json_name, GetArenaNoVirtual()); + json_name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FieldDescriptorProto.json_name) } // 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); + return value; +} inline bool FieldDescriptorProto::has_options() const { - return (_has_bits_[0] & 0x00000020u) != 0; + return _internal_has_options(); } inline void FieldDescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000020u; } -inline const PROTOBUF_NAMESPACE_ID::FieldOptions& FieldDescriptorProto::options() const { +inline const PROTOBUF_NAMESPACE_ID::FieldOptions& FieldDescriptorProto::_internal_options() const { const PROTOBUF_NAMESPACE_ID::FieldOptions* p = options_; - // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.options) return p != nullptr ? *p : *reinterpret_cast( &PROTOBUF_NAMESPACE_ID::_FieldOptions_default_instance_); } +inline const PROTOBUF_NAMESPACE_ID::FieldOptions& FieldDescriptorProto::options() const { + // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.options) + return _internal_options(); +} +inline void FieldDescriptorProto::unsafe_arena_set_allocated_options( + PROTOBUF_NAMESPACE_ID::FieldOptions* options) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_); + } + options_ = options; + if (options) { + _has_bits_[0] |= 0x00000020u; + } else { + _has_bits_[0] &= ~0x00000020u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FieldDescriptorProto.options) +} inline PROTOBUF_NAMESPACE_ID::FieldOptions* FieldDescriptorProto::release_options() { - // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.options) - _has_bits_[0] &= ~0x00000020u; - PROTOBUF_NAMESPACE_ID::FieldOptions* temp = options_; - if (GetArenaNoVirtual() != nullptr) { + auto temp = unsafe_arena_release_options(); + if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - options_ = nullptr; return temp; } inline PROTOBUF_NAMESPACE_ID::FieldOptions* FieldDescriptorProto::unsafe_arena_release_options() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FieldDescriptorProto.options) + // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.options) _has_bits_[0] &= ~0x00000020u; PROTOBUF_NAMESPACE_ID::FieldOptions* temp = options_; options_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::FieldOptions* FieldDescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::FieldOptions* FieldDescriptorProto::_internal_mutable_options() { _has_bits_[0] |= 0x00000020u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArena()); options_ = p; } - // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.options) return options_; } +inline PROTOBUF_NAMESPACE_ID::FieldOptions* FieldDescriptorProto::mutable_options() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.options) + return _internal_mutable_options(); +} inline void FieldDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::FieldOptions* options) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete options_; } @@ -7950,59 +9136,100 @@ inline void FieldDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::F // @@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; + 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; +} +inline bool FieldDescriptorProto::_internal_proto3_optional() const { + return 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; +} +inline void FieldDescriptorProto::set_proto3_optional(bool value) { + _internal_set_proto3_optional(value); + // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.proto3_optional) +} + // ------------------------------------------------------------------- // OneofDescriptorProto // optional string name = 1; +inline bool OneofDescriptorProto::_internal_has_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool OneofDescriptorProto::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_name(); } inline void OneofDescriptorProto::clear_name() { - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& OneofDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.name) - return name_.Get(); + return _internal_name(); } inline void OneofDescriptorProto::set_name(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.OneofDescriptorProto.name) } +inline std::string* OneofDescriptorProto::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.OneofDescriptorProto.name) + return _internal_mutable_name(); +} +inline const std::string& OneofDescriptorProto::_internal_name() const { + return name_.Get(); +} +inline void OneofDescriptorProto::_internal_set_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void OneofDescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.OneofDescriptorProto.name) } inline void OneofDescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.OneofDescriptorProto.name) } inline void OneofDescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.OneofDescriptorProto.name) } -inline std::string* OneofDescriptorProto::mutable_name() { +inline std::string* OneofDescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.OneofDescriptorProto.name) - return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* OneofDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.OneofDescriptorProto.name) - if (!has_name()) { + if (!_internal_has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void OneofDescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -8011,71 +9238,92 @@ inline void OneofDescriptorProto::set_allocated_name(std::string* name) { _has_bits_[0] &= ~0x00000001u; } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.OneofDescriptorProto.name) } inline std::string* OneofDescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.OneofDescriptorProto.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000001u; return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void OneofDescriptorProto::unsafe_arena_set_allocated_name( std::string* name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - name, GetArenaNoVirtual()); + name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.OneofDescriptorProto.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); + return value; +} inline bool OneofDescriptorProto::has_options() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_options(); } inline void OneofDescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000002u; } -inline const PROTOBUF_NAMESPACE_ID::OneofOptions& OneofDescriptorProto::options() const { +inline const PROTOBUF_NAMESPACE_ID::OneofOptions& OneofDescriptorProto::_internal_options() const { const PROTOBUF_NAMESPACE_ID::OneofOptions* p = options_; - // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.options) return p != nullptr ? *p : *reinterpret_cast( &PROTOBUF_NAMESPACE_ID::_OneofOptions_default_instance_); } +inline const PROTOBUF_NAMESPACE_ID::OneofOptions& OneofDescriptorProto::options() const { + // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.options) + return _internal_options(); +} +inline void OneofDescriptorProto::unsafe_arena_set_allocated_options( + PROTOBUF_NAMESPACE_ID::OneofOptions* options) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_); + } + options_ = options; + if (options) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.OneofDescriptorProto.options) +} inline PROTOBUF_NAMESPACE_ID::OneofOptions* OneofDescriptorProto::release_options() { - // @@protoc_insertion_point(field_release:google.protobuf.OneofDescriptorProto.options) - _has_bits_[0] &= ~0x00000002u; - PROTOBUF_NAMESPACE_ID::OneofOptions* temp = options_; - if (GetArenaNoVirtual() != nullptr) { + auto temp = unsafe_arena_release_options(); + if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - options_ = nullptr; return temp; } inline PROTOBUF_NAMESPACE_ID::OneofOptions* OneofDescriptorProto::unsafe_arena_release_options() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.OneofDescriptorProto.options) + // @@protoc_insertion_point(field_release:google.protobuf.OneofDescriptorProto.options) _has_bits_[0] &= ~0x00000002u; PROTOBUF_NAMESPACE_ID::OneofOptions* temp = options_; options_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::OneofOptions* OneofDescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::OneofOptions* OneofDescriptorProto::_internal_mutable_options() { _has_bits_[0] |= 0x00000002u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArena()); options_ = p; } - // @@protoc_insertion_point(field_mutable:google.protobuf.OneofDescriptorProto.options) return options_; } +inline PROTOBUF_NAMESPACE_ID::OneofOptions* OneofDescriptorProto::mutable_options() { + // @@protoc_insertion_point(field_mutable:google.protobuf.OneofDescriptorProto.options) + return _internal_mutable_options(); +} inline void OneofDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::OneofOptions* options) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete options_; } @@ -8099,38 +9347,58 @@ inline void OneofDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::O // EnumDescriptorProto_EnumReservedRange // optional int32 start = 1; +inline bool EnumDescriptorProto_EnumReservedRange::_internal_has_start() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool EnumDescriptorProto_EnumReservedRange::has_start() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_start(); } inline void EnumDescriptorProto_EnumReservedRange::clear_start() { start_ = 0; _has_bits_[0] &= ~0x00000001u; } -inline ::PROTOBUF_NAMESPACE_ID::int32 EnumDescriptorProto_EnumReservedRange::start() const { - // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.EnumReservedRange.start) +inline ::PROTOBUF_NAMESPACE_ID::int32 EnumDescriptorProto_EnumReservedRange::_internal_start() const { return start_; } -inline void EnumDescriptorProto_EnumReservedRange::set_start(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 EnumDescriptorProto_EnumReservedRange::start() const { + // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.EnumReservedRange.start) + return _internal_start(); +} +inline void EnumDescriptorProto_EnumReservedRange::_internal_set_start(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000001u; start_ = value; +} +inline void EnumDescriptorProto_EnumReservedRange::set_start(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_start(value); // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.EnumReservedRange.start) } // optional int32 end = 2; +inline bool EnumDescriptorProto_EnumReservedRange::_internal_has_end() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} inline bool EnumDescriptorProto_EnumReservedRange::has_end() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_end(); } inline void EnumDescriptorProto_EnumReservedRange::clear_end() { end_ = 0; _has_bits_[0] &= ~0x00000002u; } -inline ::PROTOBUF_NAMESPACE_ID::int32 EnumDescriptorProto_EnumReservedRange::end() const { - // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.EnumReservedRange.end) +inline ::PROTOBUF_NAMESPACE_ID::int32 EnumDescriptorProto_EnumReservedRange::_internal_end() const { return end_; } -inline void EnumDescriptorProto_EnumReservedRange::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 EnumDescriptorProto_EnumReservedRange::end() const { + // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.EnumReservedRange.end) + return _internal_end(); +} +inline void EnumDescriptorProto_EnumReservedRange::_internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000002u; end_ = value; +} +inline void EnumDescriptorProto_EnumReservedRange::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_end(value); // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.EnumReservedRange.end) } @@ -8139,54 +9407,67 @@ inline void EnumDescriptorProto_EnumReservedRange::set_end(::PROTOBUF_NAMESPACE_ // EnumDescriptorProto // optional string name = 1; +inline bool EnumDescriptorProto::_internal_has_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool EnumDescriptorProto::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_name(); } inline void EnumDescriptorProto::clear_name() { - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& EnumDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.name) - return name_.Get(); + return _internal_name(); } inline void EnumDescriptorProto::set_name(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.name) } +inline std::string* EnumDescriptorProto::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.name) + return _internal_mutable_name(); +} +inline const std::string& EnumDescriptorProto::_internal_name() const { + return name_.Get(); +} +inline void EnumDescriptorProto::_internal_set_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void EnumDescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.EnumDescriptorProto.name) } inline void EnumDescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.EnumDescriptorProto.name) } inline void EnumDescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumDescriptorProto.name) } -inline std::string* EnumDescriptorProto::mutable_name() { +inline std::string* EnumDescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.name) - return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* EnumDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.EnumDescriptorProto.name) - if (!has_name()) { + if (!_internal_has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void EnumDescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -8195,33 +9476,36 @@ inline void EnumDescriptorProto::set_allocated_name(std::string* name) { _has_bits_[0] &= ~0x00000001u; } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.name) } inline std::string* EnumDescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumDescriptorProto.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000001u; return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void EnumDescriptorProto::unsafe_arena_set_allocated_name( std::string* name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - name, GetArenaNoVirtual()); + name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.EnumDescriptorProto.name) } // repeated .google.protobuf.EnumValueDescriptorProto value = 2; -inline int EnumDescriptorProto::value_size() const { +inline int EnumDescriptorProto::_internal_value_size() const { return value_.size(); } +inline int EnumDescriptorProto::value_size() const { + return _internal_value_size(); +} inline void EnumDescriptorProto::clear_value() { value_.Clear(); } @@ -8234,13 +9518,19 @@ EnumDescriptorProto::mutable_value() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.value) return &value_; } +inline const PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto& EnumDescriptorProto::_internal_value(int index) const { + return value_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto& EnumDescriptorProto::value(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.value) - return value_.Get(index); + return _internal_value(index); +} +inline PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* EnumDescriptorProto::_internal_add_value() { + return value_.Add(); } inline PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* EnumDescriptorProto::add_value() { // @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.value) - return value_.Add(); + return _internal_add_value(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto >& EnumDescriptorProto::value() const { @@ -8249,47 +9539,68 @@ EnumDescriptorProto::value() const { } // 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); + return value; +} inline bool EnumDescriptorProto::has_options() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_options(); } inline void EnumDescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000002u; } -inline const PROTOBUF_NAMESPACE_ID::EnumOptions& EnumDescriptorProto::options() const { +inline const PROTOBUF_NAMESPACE_ID::EnumOptions& EnumDescriptorProto::_internal_options() const { const PROTOBUF_NAMESPACE_ID::EnumOptions* p = options_; - // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.options) return p != nullptr ? *p : *reinterpret_cast( &PROTOBUF_NAMESPACE_ID::_EnumOptions_default_instance_); } +inline const PROTOBUF_NAMESPACE_ID::EnumOptions& EnumDescriptorProto::options() const { + // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.options) + return _internal_options(); +} +inline void EnumDescriptorProto::unsafe_arena_set_allocated_options( + PROTOBUF_NAMESPACE_ID::EnumOptions* options) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_); + } + options_ = options; + if (options) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.EnumDescriptorProto.options) +} inline PROTOBUF_NAMESPACE_ID::EnumOptions* EnumDescriptorProto::release_options() { - // @@protoc_insertion_point(field_release:google.protobuf.EnumDescriptorProto.options) - _has_bits_[0] &= ~0x00000002u; - PROTOBUF_NAMESPACE_ID::EnumOptions* temp = options_; - if (GetArenaNoVirtual() != nullptr) { + auto temp = unsafe_arena_release_options(); + if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - options_ = nullptr; return temp; } inline PROTOBUF_NAMESPACE_ID::EnumOptions* EnumDescriptorProto::unsafe_arena_release_options() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumDescriptorProto.options) + // @@protoc_insertion_point(field_release:google.protobuf.EnumDescriptorProto.options) _has_bits_[0] &= ~0x00000002u; PROTOBUF_NAMESPACE_ID::EnumOptions* temp = options_; options_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::EnumOptions* EnumDescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::EnumOptions* EnumDescriptorProto::_internal_mutable_options() { _has_bits_[0] |= 0x00000002u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArena()); options_ = p; } - // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.options) return options_; } +inline PROTOBUF_NAMESPACE_ID::EnumOptions* EnumDescriptorProto::mutable_options() { + // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.options) + return _internal_mutable_options(); +} inline void EnumDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::EnumOptions* options) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete options_; } @@ -8309,9 +9620,12 @@ inline void EnumDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::En } // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; -inline int EnumDescriptorProto::reserved_range_size() const { +inline int EnumDescriptorProto::_internal_reserved_range_size() const { return reserved_range_.size(); } +inline int EnumDescriptorProto::reserved_range_size() const { + return _internal_reserved_range_size(); +} inline void EnumDescriptorProto::clear_reserved_range() { reserved_range_.Clear(); } @@ -8324,13 +9638,19 @@ EnumDescriptorProto::mutable_reserved_range() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.reserved_range) return &reserved_range_; } +inline const PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange& EnumDescriptorProto::_internal_reserved_range(int index) const { + return 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 reserved_range_.Get(index); + return _internal_reserved_range(index); +} +inline PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* EnumDescriptorProto::_internal_add_reserved_range() { + return reserved_range_.Add(); } inline PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* EnumDescriptorProto::add_reserved_range() { // @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.reserved_range) - return reserved_range_.Add(); + return _internal_add_reserved_range(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange >& EnumDescriptorProto::reserved_range() const { @@ -8339,15 +9659,25 @@ EnumDescriptorProto::reserved_range() const { } // repeated string reserved_name = 5; -inline int EnumDescriptorProto::reserved_name_size() const { +inline int EnumDescriptorProto::_internal_reserved_name_size() const { return reserved_name_.size(); } +inline int EnumDescriptorProto::reserved_name_size() const { + return _internal_reserved_name_size(); +} inline void EnumDescriptorProto::clear_reserved_name() { reserved_name_.Clear(); } +inline std::string* EnumDescriptorProto::add_reserved_name() { + // @@protoc_insertion_point(field_add_mutable:google.protobuf.EnumDescriptorProto.reserved_name) + return _internal_add_reserved_name(); +} +inline const std::string& EnumDescriptorProto::_internal_reserved_name(int index) const { + return reserved_name_.Get(index); +} inline const std::string& EnumDescriptorProto::reserved_name(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.reserved_name) - return reserved_name_.Get(index); + return _internal_reserved_name(index); } inline std::string* EnumDescriptorProto::mutable_reserved_name(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.reserved_name) @@ -8371,8 +9701,7 @@ inline void EnumDescriptorProto::set_reserved_name(int index, const char* value, reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumDescriptorProto.reserved_name) } -inline std::string* EnumDescriptorProto::add_reserved_name() { - // @@protoc_insertion_point(field_add_mutable:google.protobuf.EnumDescriptorProto.reserved_name) +inline std::string* EnumDescriptorProto::_internal_add_reserved_name() { return reserved_name_.Add(); } inline void EnumDescriptorProto::add_reserved_name(const std::string& value) { @@ -8408,54 +9737,67 @@ EnumDescriptorProto::mutable_reserved_name() { // EnumValueDescriptorProto // optional string name = 1; +inline bool EnumValueDescriptorProto::_internal_has_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool EnumValueDescriptorProto::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_name(); } inline void EnumValueDescriptorProto::clear_name() { - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& EnumValueDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.name) - return name_.Get(); + return _internal_name(); } inline void EnumValueDescriptorProto::set_name(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.name) } +inline std::string* EnumValueDescriptorProto::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.name) + return _internal_mutable_name(); +} +inline const std::string& EnumValueDescriptorProto::_internal_name() const { + return name_.Get(); +} +inline void EnumValueDescriptorProto::_internal_set_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void EnumValueDescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.EnumValueDescriptorProto.name) } inline void EnumValueDescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.EnumValueDescriptorProto.name) } inline void EnumValueDescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValueDescriptorProto.name) } -inline std::string* EnumValueDescriptorProto::mutable_name() { +inline std::string* EnumValueDescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.name) - return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* EnumValueDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.EnumValueDescriptorProto.name) - if (!has_name()) { + if (!_internal_has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void EnumValueDescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -8464,89 +9806,120 @@ inline void EnumValueDescriptorProto::set_allocated_name(std::string* name) { _has_bits_[0] &= ~0x00000001u; } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.name) } inline std::string* EnumValueDescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumValueDescriptorProto.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000001u; return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void EnumValueDescriptorProto::unsafe_arena_set_allocated_name( std::string* name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - name, GetArenaNoVirtual()); + name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.EnumValueDescriptorProto.name) } // optional int32 number = 2; +inline bool EnumValueDescriptorProto::_internal_has_number() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} inline bool EnumValueDescriptorProto::has_number() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return _internal_has_number(); } inline void EnumValueDescriptorProto::clear_number() { number_ = 0; _has_bits_[0] &= ~0x00000004u; } -inline ::PROTOBUF_NAMESPACE_ID::int32 EnumValueDescriptorProto::number() const { - // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.number) +inline ::PROTOBUF_NAMESPACE_ID::int32 EnumValueDescriptorProto::_internal_number() const { return number_; } -inline void EnumValueDescriptorProto::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 EnumValueDescriptorProto::number() const { + // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.number) + return _internal_number(); +} +inline void EnumValueDescriptorProto::_internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000004u; number_ = value; +} +inline void EnumValueDescriptorProto::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_number(value); // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.number) } // 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); + return value; +} inline bool EnumValueDescriptorProto::has_options() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_options(); } inline void EnumValueDescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000002u; } -inline const PROTOBUF_NAMESPACE_ID::EnumValueOptions& EnumValueDescriptorProto::options() const { +inline const PROTOBUF_NAMESPACE_ID::EnumValueOptions& EnumValueDescriptorProto::_internal_options() const { const PROTOBUF_NAMESPACE_ID::EnumValueOptions* p = options_; - // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.options) return p != nullptr ? *p : *reinterpret_cast( &PROTOBUF_NAMESPACE_ID::_EnumValueOptions_default_instance_); } +inline const PROTOBUF_NAMESPACE_ID::EnumValueOptions& EnumValueDescriptorProto::options() const { + // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.options) + return _internal_options(); +} +inline void EnumValueDescriptorProto::unsafe_arena_set_allocated_options( + PROTOBUF_NAMESPACE_ID::EnumValueOptions* options) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_); + } + options_ = options; + if (options) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.EnumValueDescriptorProto.options) +} inline PROTOBUF_NAMESPACE_ID::EnumValueOptions* EnumValueDescriptorProto::release_options() { - // @@protoc_insertion_point(field_release:google.protobuf.EnumValueDescriptorProto.options) - _has_bits_[0] &= ~0x00000002u; - PROTOBUF_NAMESPACE_ID::EnumValueOptions* temp = options_; - if (GetArenaNoVirtual() != nullptr) { + auto temp = unsafe_arena_release_options(); + if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - options_ = nullptr; return temp; } inline PROTOBUF_NAMESPACE_ID::EnumValueOptions* EnumValueDescriptorProto::unsafe_arena_release_options() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumValueDescriptorProto.options) + // @@protoc_insertion_point(field_release:google.protobuf.EnumValueDescriptorProto.options) _has_bits_[0] &= ~0x00000002u; PROTOBUF_NAMESPACE_ID::EnumValueOptions* temp = options_; options_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::EnumValueOptions* EnumValueDescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::EnumValueOptions* EnumValueDescriptorProto::_internal_mutable_options() { _has_bits_[0] |= 0x00000002u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArena()); options_ = p; } - // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.options) return options_; } +inline PROTOBUF_NAMESPACE_ID::EnumValueOptions* EnumValueDescriptorProto::mutable_options() { + // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.options) + return _internal_mutable_options(); +} inline void EnumValueDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::EnumValueOptions* options) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete options_; } @@ -8570,54 +9943,67 @@ inline void EnumValueDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_I // ServiceDescriptorProto // optional string name = 1; +inline bool ServiceDescriptorProto::_internal_has_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool ServiceDescriptorProto::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_name(); } inline void ServiceDescriptorProto::clear_name() { - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& ServiceDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.name) - return name_.Get(); + return _internal_name(); } inline void ServiceDescriptorProto::set_name(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.ServiceDescriptorProto.name) } +inline std::string* ServiceDescriptorProto::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.name) + return _internal_mutable_name(); +} +inline const std::string& ServiceDescriptorProto::_internal_name() const { + return name_.Get(); +} +inline void ServiceDescriptorProto::_internal_set_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void ServiceDescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.ServiceDescriptorProto.name) } inline void ServiceDescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.ServiceDescriptorProto.name) } inline void ServiceDescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.ServiceDescriptorProto.name) } -inline std::string* ServiceDescriptorProto::mutable_name() { +inline std::string* ServiceDescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.name) - return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* ServiceDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.ServiceDescriptorProto.name) - if (!has_name()) { + if (!_internal_has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void ServiceDescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -8626,33 +10012,36 @@ inline void ServiceDescriptorProto::set_allocated_name(std::string* name) { _has_bits_[0] &= ~0x00000001u; } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.name) } inline std::string* ServiceDescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.ServiceDescriptorProto.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000001u; return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void ServiceDescriptorProto::unsafe_arena_set_allocated_name( std::string* name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - name, GetArenaNoVirtual()); + name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.ServiceDescriptorProto.name) } // repeated .google.protobuf.MethodDescriptorProto method = 2; -inline int ServiceDescriptorProto::method_size() const { +inline int ServiceDescriptorProto::_internal_method_size() const { return method_.size(); } +inline int ServiceDescriptorProto::method_size() const { + return _internal_method_size(); +} inline void ServiceDescriptorProto::clear_method() { method_.Clear(); } @@ -8665,13 +10054,19 @@ ServiceDescriptorProto::mutable_method() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceDescriptorProto.method) return &method_; } +inline const PROTOBUF_NAMESPACE_ID::MethodDescriptorProto& ServiceDescriptorProto::_internal_method(int index) const { + return method_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::MethodDescriptorProto& ServiceDescriptorProto::method(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.method) - return method_.Get(index); + return _internal_method(index); +} +inline PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* ServiceDescriptorProto::_internal_add_method() { + return method_.Add(); } inline PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* ServiceDescriptorProto::add_method() { // @@protoc_insertion_point(field_add:google.protobuf.ServiceDescriptorProto.method) - return method_.Add(); + return _internal_add_method(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::MethodDescriptorProto >& ServiceDescriptorProto::method() const { @@ -8680,47 +10075,68 @@ ServiceDescriptorProto::method() const { } // 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); + return value; +} inline bool ServiceDescriptorProto::has_options() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_options(); } inline void ServiceDescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000002u; } -inline const PROTOBUF_NAMESPACE_ID::ServiceOptions& ServiceDescriptorProto::options() const { +inline const PROTOBUF_NAMESPACE_ID::ServiceOptions& ServiceDescriptorProto::_internal_options() const { const PROTOBUF_NAMESPACE_ID::ServiceOptions* p = options_; - // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.options) return p != nullptr ? *p : *reinterpret_cast( &PROTOBUF_NAMESPACE_ID::_ServiceOptions_default_instance_); } +inline const PROTOBUF_NAMESPACE_ID::ServiceOptions& ServiceDescriptorProto::options() const { + // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.options) + return _internal_options(); +} +inline void ServiceDescriptorProto::unsafe_arena_set_allocated_options( + PROTOBUF_NAMESPACE_ID::ServiceOptions* options) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_); + } + options_ = options; + if (options) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.ServiceDescriptorProto.options) +} inline PROTOBUF_NAMESPACE_ID::ServiceOptions* ServiceDescriptorProto::release_options() { - // @@protoc_insertion_point(field_release:google.protobuf.ServiceDescriptorProto.options) - _has_bits_[0] &= ~0x00000002u; - PROTOBUF_NAMESPACE_ID::ServiceOptions* temp = options_; - if (GetArenaNoVirtual() != nullptr) { + auto temp = unsafe_arena_release_options(); + if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - options_ = nullptr; return temp; } inline PROTOBUF_NAMESPACE_ID::ServiceOptions* ServiceDescriptorProto::unsafe_arena_release_options() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.ServiceDescriptorProto.options) + // @@protoc_insertion_point(field_release:google.protobuf.ServiceDescriptorProto.options) _has_bits_[0] &= ~0x00000002u; PROTOBUF_NAMESPACE_ID::ServiceOptions* temp = options_; options_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::ServiceOptions* ServiceDescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::ServiceOptions* ServiceDescriptorProto::_internal_mutable_options() { _has_bits_[0] |= 0x00000002u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArena()); options_ = p; } - // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.options) return options_; } +inline PROTOBUF_NAMESPACE_ID::ServiceOptions* ServiceDescriptorProto::mutable_options() { + // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.options) + return _internal_mutable_options(); +} inline void ServiceDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::ServiceOptions* options) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete options_; } @@ -8744,54 +10160,67 @@ inline void ServiceDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID: // MethodDescriptorProto // optional string name = 1; +inline bool MethodDescriptorProto::_internal_has_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool MethodDescriptorProto::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_name(); } inline void MethodDescriptorProto::clear_name() { - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& MethodDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.name) - return name_.Get(); + return _internal_name(); } inline void MethodDescriptorProto::set_name(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.name) } +inline std::string* MethodDescriptorProto::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.name) + return _internal_mutable_name(); +} +inline const std::string& MethodDescriptorProto::_internal_name() const { + return name_.Get(); +} +inline void MethodDescriptorProto::_internal_set_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void MethodDescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.MethodDescriptorProto.name) } inline void MethodDescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.name) } inline void MethodDescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.name) } -inline std::string* MethodDescriptorProto::mutable_name() { +inline std::string* MethodDescriptorProto::_internal_mutable_name() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.name) - return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* MethodDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.name) - if (!has_name()) { + if (!_internal_has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void MethodDescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -8800,78 +10229,91 @@ inline void MethodDescriptorProto::set_allocated_name(std::string* name) { _has_bits_[0] &= ~0x00000001u; } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.name) } inline std::string* MethodDescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.MethodDescriptorProto.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000001u; return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void MethodDescriptorProto::unsafe_arena_set_allocated_name( std::string* name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - name, GetArenaNoVirtual()); + name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.MethodDescriptorProto.name) } // optional string input_type = 2; +inline bool MethodDescriptorProto::_internal_has_input_type() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} inline bool MethodDescriptorProto::has_input_type() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_input_type(); } inline void MethodDescriptorProto::clear_input_type() { - input_type_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + input_type_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000002u; } inline const std::string& MethodDescriptorProto::input_type() const { // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.input_type) - return input_type_.Get(); + return _internal_input_type(); } inline void MethodDescriptorProto::set_input_type(const std::string& value) { - _has_bits_[0] |= 0x00000002u; - input_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_input_type(value); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.input_type) } +inline std::string* MethodDescriptorProto::mutable_input_type() { + // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.input_type) + return _internal_mutable_input_type(); +} +inline const std::string& MethodDescriptorProto::_internal_input_type() const { + return input_type_.Get(); +} +inline void MethodDescriptorProto::_internal_set_input_type(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + input_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void MethodDescriptorProto::set_input_type(std::string&& value) { _has_bits_[0] |= 0x00000002u; input_type_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.MethodDescriptorProto.input_type) } inline void MethodDescriptorProto::set_input_type(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000002u; input_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.input_type) } inline void MethodDescriptorProto::set_input_type(const char* value, size_t size) { _has_bits_[0] |= 0x00000002u; input_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.input_type) } -inline std::string* MethodDescriptorProto::mutable_input_type() { +inline std::string* MethodDescriptorProto::_internal_mutable_input_type() { _has_bits_[0] |= 0x00000002u; - // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.input_type) - return input_type_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return input_type_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* MethodDescriptorProto::release_input_type() { // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.input_type) - if (!has_input_type()) { + if (!_internal_has_input_type()) { return nullptr; } _has_bits_[0] &= ~0x00000002u; - return input_type_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return input_type_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void MethodDescriptorProto::set_allocated_input_type(std::string* input_type) { if (input_type != nullptr) { @@ -8880,78 +10322,91 @@ inline void MethodDescriptorProto::set_allocated_input_type(std::string* input_t _has_bits_[0] &= ~0x00000002u; } input_type_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), input_type, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.input_type) } inline std::string* MethodDescriptorProto::unsafe_arena_release_input_type() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.MethodDescriptorProto.input_type) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000002u; return input_type_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void MethodDescriptorProto::unsafe_arena_set_allocated_input_type( std::string* input_type) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (input_type != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } input_type_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - input_type, GetArenaNoVirtual()); + input_type, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.MethodDescriptorProto.input_type) } // optional string output_type = 3; +inline bool MethodDescriptorProto::_internal_has_output_type() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} inline bool MethodDescriptorProto::has_output_type() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return _internal_has_output_type(); } inline void MethodDescriptorProto::clear_output_type() { - output_type_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + output_type_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000004u; } inline const std::string& MethodDescriptorProto::output_type() const { // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.output_type) - return output_type_.Get(); + return _internal_output_type(); } inline void MethodDescriptorProto::set_output_type(const std::string& value) { - _has_bits_[0] |= 0x00000004u; - output_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_output_type(value); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.output_type) } +inline std::string* MethodDescriptorProto::mutable_output_type() { + // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.output_type) + return _internal_mutable_output_type(); +} +inline const std::string& MethodDescriptorProto::_internal_output_type() const { + return output_type_.Get(); +} +inline void MethodDescriptorProto::_internal_set_output_type(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + output_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void MethodDescriptorProto::set_output_type(std::string&& value) { _has_bits_[0] |= 0x00000004u; output_type_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.MethodDescriptorProto.output_type) } inline void MethodDescriptorProto::set_output_type(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000004u; output_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.output_type) } inline void MethodDescriptorProto::set_output_type(const char* value, size_t size) { _has_bits_[0] |= 0x00000004u; output_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.output_type) } -inline std::string* MethodDescriptorProto::mutable_output_type() { +inline std::string* MethodDescriptorProto::_internal_mutable_output_type() { _has_bits_[0] |= 0x00000004u; - // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.output_type) - return output_type_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return output_type_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* MethodDescriptorProto::release_output_type() { // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.output_type) - if (!has_output_type()) { + if (!_internal_has_output_type()) { return nullptr; } _has_bits_[0] &= ~0x00000004u; - return output_type_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return output_type_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void MethodDescriptorProto::set_allocated_output_type(std::string* output_type) { if (output_type != nullptr) { @@ -8960,71 +10415,92 @@ inline void MethodDescriptorProto::set_allocated_output_type(std::string* output _has_bits_[0] &= ~0x00000004u; } output_type_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), output_type, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.output_type) } inline std::string* MethodDescriptorProto::unsafe_arena_release_output_type() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.MethodDescriptorProto.output_type) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000004u; return output_type_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void MethodDescriptorProto::unsafe_arena_set_allocated_output_type( std::string* output_type) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (output_type != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } output_type_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - output_type, GetArenaNoVirtual()); + output_type, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.MethodDescriptorProto.output_type) } // 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); + return value; +} inline bool MethodDescriptorProto::has_options() const { - return (_has_bits_[0] & 0x00000008u) != 0; + return _internal_has_options(); } inline void MethodDescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000008u; } -inline const PROTOBUF_NAMESPACE_ID::MethodOptions& MethodDescriptorProto::options() const { +inline const PROTOBUF_NAMESPACE_ID::MethodOptions& MethodDescriptorProto::_internal_options() const { const PROTOBUF_NAMESPACE_ID::MethodOptions* p = options_; - // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.options) return p != nullptr ? *p : *reinterpret_cast( &PROTOBUF_NAMESPACE_ID::_MethodOptions_default_instance_); } +inline const PROTOBUF_NAMESPACE_ID::MethodOptions& MethodDescriptorProto::options() const { + // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.options) + return _internal_options(); +} +inline void MethodDescriptorProto::unsafe_arena_set_allocated_options( + PROTOBUF_NAMESPACE_ID::MethodOptions* options) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(options_); + } + options_ = options; + if (options) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.MethodDescriptorProto.options) +} inline PROTOBUF_NAMESPACE_ID::MethodOptions* MethodDescriptorProto::release_options() { - // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.options) - _has_bits_[0] &= ~0x00000008u; - PROTOBUF_NAMESPACE_ID::MethodOptions* temp = options_; - if (GetArenaNoVirtual() != nullptr) { + auto temp = unsafe_arena_release_options(); + if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - options_ = nullptr; return temp; } inline PROTOBUF_NAMESPACE_ID::MethodOptions* MethodDescriptorProto::unsafe_arena_release_options() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.MethodDescriptorProto.options) + // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.options) _has_bits_[0] &= ~0x00000008u; PROTOBUF_NAMESPACE_ID::MethodOptions* temp = options_; options_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::MethodOptions* MethodDescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::MethodOptions* MethodDescriptorProto::_internal_mutable_options() { _has_bits_[0] |= 0x00000008u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArena()); options_ = p; } - // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.options) return options_; } +inline PROTOBUF_NAMESPACE_ID::MethodOptions* MethodDescriptorProto::mutable_options() { + // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.options) + return _internal_mutable_options(); +} inline void MethodDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::MethodOptions* options) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete options_; } @@ -9044,38 +10520,58 @@ inline void MethodDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID:: } // optional bool client_streaming = 5 [default = false]; +inline bool MethodDescriptorProto::_internal_has_client_streaming() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} inline bool MethodDescriptorProto::has_client_streaming() const { - return (_has_bits_[0] & 0x00000010u) != 0; + return _internal_has_client_streaming(); } inline void MethodDescriptorProto::clear_client_streaming() { client_streaming_ = false; _has_bits_[0] &= ~0x00000010u; } -inline bool MethodDescriptorProto::client_streaming() const { - // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.client_streaming) +inline bool MethodDescriptorProto::_internal_client_streaming() const { return client_streaming_; } -inline void MethodDescriptorProto::set_client_streaming(bool value) { +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; +} +inline void MethodDescriptorProto::set_client_streaming(bool value) { + _internal_set_client_streaming(value); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.client_streaming) } // optional bool server_streaming = 6 [default = false]; +inline bool MethodDescriptorProto::_internal_has_server_streaming() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} inline bool MethodDescriptorProto::has_server_streaming() const { - return (_has_bits_[0] & 0x00000020u) != 0; + return _internal_has_server_streaming(); } inline void MethodDescriptorProto::clear_server_streaming() { server_streaming_ = false; _has_bits_[0] &= ~0x00000020u; } -inline bool MethodDescriptorProto::server_streaming() const { - // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.server_streaming) +inline bool MethodDescriptorProto::_internal_server_streaming() const { return server_streaming_; } -inline void MethodDescriptorProto::set_server_streaming(bool value) { +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; +} +inline void MethodDescriptorProto::set_server_streaming(bool value) { + _internal_set_server_streaming(value); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.server_streaming) } @@ -9084,54 +10580,67 @@ inline void MethodDescriptorProto::set_server_streaming(bool value) { // FileOptions // optional string java_package = 1; +inline bool FileOptions::_internal_has_java_package() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool FileOptions::has_java_package() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_java_package(); } inline void FileOptions::clear_java_package() { - java_package_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + java_package_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& FileOptions::java_package() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_package) - return java_package_.Get(); + return _internal_java_package(); } inline void FileOptions::set_java_package(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - java_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_java_package(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_package) } +inline std::string* FileOptions::mutable_java_package() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_package) + return _internal_mutable_java_package(); +} +inline const std::string& FileOptions::_internal_java_package() const { + return java_package_.Get(); +} +inline void FileOptions::_internal_set_java_package(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + java_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FileOptions::set_java_package(std::string&& value) { _has_bits_[0] |= 0x00000001u; java_package_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.java_package) } inline void FileOptions::set_java_package(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; java_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_package) } inline void FileOptions::set_java_package(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; java_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_package) } -inline std::string* FileOptions::mutable_java_package() { +inline std::string* FileOptions::_internal_mutable_java_package() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_package) - return java_package_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return java_package_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FileOptions::release_java_package() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.java_package) - if (!has_java_package()) { + if (!_internal_has_java_package()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return java_package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return java_package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FileOptions::set_allocated_java_package(std::string* java_package) { if (java_package != nullptr) { @@ -9140,78 +10649,91 @@ inline void FileOptions::set_allocated_java_package(std::string* java_package) { _has_bits_[0] &= ~0x00000001u; } java_package_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), java_package, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_package) } inline std::string* FileOptions::unsafe_arena_release_java_package() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.java_package) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000001u; return java_package_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FileOptions::unsafe_arena_set_allocated_java_package( std::string* java_package) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (java_package != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } java_package_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - java_package, GetArenaNoVirtual()); + java_package, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.java_package) } // optional string java_outer_classname = 8; +inline bool FileOptions::_internal_has_java_outer_classname() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} inline bool FileOptions::has_java_outer_classname() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_java_outer_classname(); } inline void FileOptions::clear_java_outer_classname() { - java_outer_classname_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + java_outer_classname_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000002u; } inline const std::string& FileOptions::java_outer_classname() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_outer_classname) - return java_outer_classname_.Get(); + return _internal_java_outer_classname(); } inline void FileOptions::set_java_outer_classname(const std::string& value) { - _has_bits_[0] |= 0x00000002u; - java_outer_classname_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_java_outer_classname(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_outer_classname) } +inline std::string* FileOptions::mutable_java_outer_classname() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_outer_classname) + return _internal_mutable_java_outer_classname(); +} +inline const std::string& FileOptions::_internal_java_outer_classname() const { + return java_outer_classname_.Get(); +} +inline void FileOptions::_internal_set_java_outer_classname(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + java_outer_classname_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FileOptions::set_java_outer_classname(std::string&& value) { _has_bits_[0] |= 0x00000002u; java_outer_classname_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.java_outer_classname) } inline void FileOptions::set_java_outer_classname(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000002u; java_outer_classname_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_outer_classname) } inline void FileOptions::set_java_outer_classname(const char* value, size_t size) { _has_bits_[0] |= 0x00000002u; java_outer_classname_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_outer_classname) } -inline std::string* FileOptions::mutable_java_outer_classname() { +inline std::string* FileOptions::_internal_mutable_java_outer_classname() { _has_bits_[0] |= 0x00000002u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_outer_classname) - return java_outer_classname_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return java_outer_classname_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FileOptions::release_java_outer_classname() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.java_outer_classname) - if (!has_java_outer_classname()) { + if (!_internal_has_java_outer_classname()) { return nullptr; } _has_bits_[0] &= ~0x00000002u; - return java_outer_classname_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return java_outer_classname_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FileOptions::set_allocated_java_outer_classname(std::string* java_outer_classname) { if (java_outer_classname != nullptr) { @@ -9220,151 +10742,204 @@ inline void FileOptions::set_allocated_java_outer_classname(std::string* java_ou _has_bits_[0] &= ~0x00000002u; } java_outer_classname_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), java_outer_classname, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_outer_classname) } inline std::string* FileOptions::unsafe_arena_release_java_outer_classname() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.java_outer_classname) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000002u; return java_outer_classname_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FileOptions::unsafe_arena_set_allocated_java_outer_classname( std::string* java_outer_classname) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (java_outer_classname != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } java_outer_classname_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - java_outer_classname, GetArenaNoVirtual()); + java_outer_classname, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.java_outer_classname) } // optional bool java_multiple_files = 10 [default = false]; +inline bool FileOptions::_internal_has_java_multiple_files() const { + bool value = (_has_bits_[0] & 0x00000400u) != 0; + return value; +} inline bool FileOptions::has_java_multiple_files() const { - return (_has_bits_[0] & 0x00000400u) != 0; + return _internal_has_java_multiple_files(); } inline void FileOptions::clear_java_multiple_files() { java_multiple_files_ = false; _has_bits_[0] &= ~0x00000400u; } -inline bool FileOptions::java_multiple_files() const { - // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_multiple_files) +inline bool FileOptions::_internal_java_multiple_files() const { return java_multiple_files_; } -inline void FileOptions::set_java_multiple_files(bool value) { +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; +} +inline void FileOptions::set_java_multiple_files(bool value) { + _internal_set_java_multiple_files(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_multiple_files) } // 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; + return value; +} inline bool FileOptions::has_java_generate_equals_and_hash() const { - return (_has_bits_[0] & 0x00000800u) != 0; + 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; } -inline bool FileOptions::java_generate_equals_and_hash() const { - // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generate_equals_and_hash) +inline bool FileOptions::_internal_java_generate_equals_and_hash() const { return java_generate_equals_and_hash_; } -inline void FileOptions::set_java_generate_equals_and_hash(bool value) { +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; +} +inline void FileOptions::set_java_generate_equals_and_hash(bool value) { + _internal_set_java_generate_equals_and_hash(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_generate_equals_and_hash) } // 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; + return value; +} inline bool FileOptions::has_java_string_check_utf8() const { - return (_has_bits_[0] & 0x00001000u) != 0; + return _internal_has_java_string_check_utf8(); } inline void FileOptions::clear_java_string_check_utf8() { java_string_check_utf8_ = false; _has_bits_[0] &= ~0x00001000u; } -inline bool FileOptions::java_string_check_utf8() const { - // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_string_check_utf8) +inline bool FileOptions::_internal_java_string_check_utf8() const { return java_string_check_utf8_; } -inline void FileOptions::set_java_string_check_utf8(bool value) { +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; +} +inline void FileOptions::set_java_string_check_utf8(bool value) { + _internal_set_java_string_check_utf8(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_string_check_utf8) } // 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; + return value; +} inline bool FileOptions::has_optimize_for() const { - return (_has_bits_[0] & 0x00080000u) != 0; + return _internal_has_optimize_for(); } inline void FileOptions::clear_optimize_for() { optimize_for_ = 1; - _has_bits_[0] &= ~0x00080000u; + _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_); } inline PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode FileOptions::optimize_for() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.optimize_for) - return static_cast< PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode >(optimize_for_); + return _internal_optimize_for(); +} +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; } inline void FileOptions::set_optimize_for(PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode value) { - assert(PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode_IsValid(value)); - _has_bits_[0] |= 0x00080000u; - optimize_for_ = value; + _internal_set_optimize_for(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.optimize_for) } // optional string go_package = 11; +inline bool FileOptions::_internal_has_go_package() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} inline bool FileOptions::has_go_package() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return _internal_has_go_package(); } inline void FileOptions::clear_go_package() { - go_package_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + go_package_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000004u; } inline const std::string& FileOptions::go_package() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.go_package) - return go_package_.Get(); + return _internal_go_package(); } inline void FileOptions::set_go_package(const std::string& value) { - _has_bits_[0] |= 0x00000004u; - go_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_go_package(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.go_package) } +inline std::string* FileOptions::mutable_go_package() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.go_package) + return _internal_mutable_go_package(); +} +inline const std::string& FileOptions::_internal_go_package() const { + return go_package_.Get(); +} +inline void FileOptions::_internal_set_go_package(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + go_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FileOptions::set_go_package(std::string&& value) { _has_bits_[0] |= 0x00000004u; go_package_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.go_package) } inline void FileOptions::set_go_package(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000004u; go_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.go_package) } inline void FileOptions::set_go_package(const char* value, size_t size) { _has_bits_[0] |= 0x00000004u; go_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.go_package) } -inline std::string* FileOptions::mutable_go_package() { +inline std::string* FileOptions::_internal_mutable_go_package() { _has_bits_[0] |= 0x00000004u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.go_package) - return go_package_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return go_package_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FileOptions::release_go_package() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.go_package) - if (!has_go_package()) { + if (!_internal_has_go_package()) { return nullptr; } _has_bits_[0] &= ~0x00000004u; - return go_package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return go_package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FileOptions::set_allocated_go_package(std::string* go_package) { if (go_package != nullptr) { @@ -9373,186 +10948,259 @@ inline void FileOptions::set_allocated_go_package(std::string* go_package) { _has_bits_[0] &= ~0x00000004u; } go_package_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), go_package, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.go_package) } inline std::string* FileOptions::unsafe_arena_release_go_package() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.go_package) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000004u; return go_package_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FileOptions::unsafe_arena_set_allocated_go_package( std::string* go_package) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (go_package != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } go_package_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - go_package, GetArenaNoVirtual()); + go_package, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.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; + return value; +} inline bool FileOptions::has_cc_generic_services() const { - return (_has_bits_[0] & 0x00002000u) != 0; + return _internal_has_cc_generic_services(); } inline void FileOptions::clear_cc_generic_services() { cc_generic_services_ = false; _has_bits_[0] &= ~0x00002000u; } -inline bool FileOptions::cc_generic_services() const { - // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_generic_services) +inline bool FileOptions::_internal_cc_generic_services() const { return cc_generic_services_; } -inline void FileOptions::set_cc_generic_services(bool value) { +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; +} +inline void FileOptions::set_cc_generic_services(bool value) { + _internal_set_cc_generic_services(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.cc_generic_services) } // optional bool java_generic_services = 17 [default = false]; +inline bool FileOptions::_internal_has_java_generic_services() const { + bool value = (_has_bits_[0] & 0x00004000u) != 0; + return value; +} inline bool FileOptions::has_java_generic_services() const { - return (_has_bits_[0] & 0x00004000u) != 0; + return _internal_has_java_generic_services(); } inline void FileOptions::clear_java_generic_services() { java_generic_services_ = false; _has_bits_[0] &= ~0x00004000u; } -inline bool FileOptions::java_generic_services() const { - // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generic_services) +inline bool FileOptions::_internal_java_generic_services() const { return java_generic_services_; } -inline void FileOptions::set_java_generic_services(bool value) { +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; +} +inline void FileOptions::set_java_generic_services(bool value) { + _internal_set_java_generic_services(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_generic_services) } // optional bool py_generic_services = 18 [default = false]; +inline bool FileOptions::_internal_has_py_generic_services() const { + bool value = (_has_bits_[0] & 0x00008000u) != 0; + return value; +} inline bool FileOptions::has_py_generic_services() const { - return (_has_bits_[0] & 0x00008000u) != 0; + return _internal_has_py_generic_services(); } inline void FileOptions::clear_py_generic_services() { py_generic_services_ = false; _has_bits_[0] &= ~0x00008000u; } -inline bool FileOptions::py_generic_services() const { - // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.py_generic_services) +inline bool FileOptions::_internal_py_generic_services() const { return py_generic_services_; } -inline void FileOptions::set_py_generic_services(bool value) { +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; +} +inline void FileOptions::set_py_generic_services(bool value) { + _internal_set_py_generic_services(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.py_generic_services) } // optional bool php_generic_services = 42 [default = false]; +inline bool FileOptions::_internal_has_php_generic_services() const { + bool value = (_has_bits_[0] & 0x00010000u) != 0; + return value; +} inline bool FileOptions::has_php_generic_services() const { - return (_has_bits_[0] & 0x00010000u) != 0; + return _internal_has_php_generic_services(); } inline void FileOptions::clear_php_generic_services() { php_generic_services_ = false; _has_bits_[0] &= ~0x00010000u; } -inline bool FileOptions::php_generic_services() const { - // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_generic_services) +inline bool FileOptions::_internal_php_generic_services() const { return php_generic_services_; } -inline void FileOptions::set_php_generic_services(bool value) { +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; +} +inline void FileOptions::set_php_generic_services(bool value) { + _internal_set_php_generic_services(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_generic_services) } // optional bool deprecated = 23 [default = false]; +inline bool FileOptions::_internal_has_deprecated() const { + bool value = (_has_bits_[0] & 0x00020000u) != 0; + return value; +} inline bool FileOptions::has_deprecated() const { - return (_has_bits_[0] & 0x00020000u) != 0; + return _internal_has_deprecated(); } inline void FileOptions::clear_deprecated() { deprecated_ = false; _has_bits_[0] &= ~0x00020000u; } -inline bool FileOptions::deprecated() const { - // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.deprecated) +inline bool FileOptions::_internal_deprecated() const { return deprecated_; } -inline void FileOptions::set_deprecated(bool value) { +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; +} +inline void FileOptions::set_deprecated(bool value) { + _internal_set_deprecated(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.deprecated) } -// optional bool cc_enable_arenas = 31 [default = false]; +// optional bool cc_enable_arenas = 31 [default = true]; +inline bool FileOptions::_internal_has_cc_enable_arenas() const { + bool value = (_has_bits_[0] & 0x00080000u) != 0; + return value; +} inline bool FileOptions::has_cc_enable_arenas() const { - return (_has_bits_[0] & 0x00040000u) != 0; + return _internal_has_cc_enable_arenas(); } inline void FileOptions::clear_cc_enable_arenas() { - cc_enable_arenas_ = false; - _has_bits_[0] &= ~0x00040000u; + cc_enable_arenas_ = true; + _has_bits_[0] &= ~0x00080000u; +} +inline bool FileOptions::_internal_cc_enable_arenas() const { + return cc_enable_arenas_; } inline bool FileOptions::cc_enable_arenas() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_enable_arenas) - return 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; } inline void FileOptions::set_cc_enable_arenas(bool value) { - _has_bits_[0] |= 0x00040000u; - cc_enable_arenas_ = value; + _internal_set_cc_enable_arenas(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.cc_enable_arenas) } // optional string objc_class_prefix = 36; +inline bool FileOptions::_internal_has_objc_class_prefix() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} inline bool FileOptions::has_objc_class_prefix() const { - return (_has_bits_[0] & 0x00000008u) != 0; + return _internal_has_objc_class_prefix(); } inline void FileOptions::clear_objc_class_prefix() { - objc_class_prefix_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + objc_class_prefix_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000008u; } inline const std::string& FileOptions::objc_class_prefix() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.objc_class_prefix) - return objc_class_prefix_.Get(); + return _internal_objc_class_prefix(); } inline void FileOptions::set_objc_class_prefix(const std::string& value) { - _has_bits_[0] |= 0x00000008u; - objc_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_objc_class_prefix(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.objc_class_prefix) } +inline std::string* FileOptions::mutable_objc_class_prefix() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.objc_class_prefix) + return _internal_mutable_objc_class_prefix(); +} +inline const std::string& FileOptions::_internal_objc_class_prefix() const { + return objc_class_prefix_.Get(); +} +inline void FileOptions::_internal_set_objc_class_prefix(const std::string& value) { + _has_bits_[0] |= 0x00000008u; + objc_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FileOptions::set_objc_class_prefix(std::string&& value) { _has_bits_[0] |= 0x00000008u; objc_class_prefix_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.objc_class_prefix) } inline void FileOptions::set_objc_class_prefix(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000008u; objc_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.objc_class_prefix) } inline void FileOptions::set_objc_class_prefix(const char* value, size_t size) { _has_bits_[0] |= 0x00000008u; objc_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.objc_class_prefix) } -inline std::string* FileOptions::mutable_objc_class_prefix() { +inline std::string* FileOptions::_internal_mutable_objc_class_prefix() { _has_bits_[0] |= 0x00000008u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.objc_class_prefix) - return objc_class_prefix_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return objc_class_prefix_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FileOptions::release_objc_class_prefix() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.objc_class_prefix) - if (!has_objc_class_prefix()) { + if (!_internal_has_objc_class_prefix()) { return nullptr; } _has_bits_[0] &= ~0x00000008u; - return objc_class_prefix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return objc_class_prefix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FileOptions::set_allocated_objc_class_prefix(std::string* objc_class_prefix) { if (objc_class_prefix != nullptr) { @@ -9561,78 +11209,91 @@ inline void FileOptions::set_allocated_objc_class_prefix(std::string* objc_class _has_bits_[0] &= ~0x00000008u; } objc_class_prefix_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), objc_class_prefix, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.objc_class_prefix) } inline std::string* FileOptions::unsafe_arena_release_objc_class_prefix() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.objc_class_prefix) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000008u; return objc_class_prefix_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FileOptions::unsafe_arena_set_allocated_objc_class_prefix( std::string* objc_class_prefix) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (objc_class_prefix != nullptr) { _has_bits_[0] |= 0x00000008u; } else { _has_bits_[0] &= ~0x00000008u; } objc_class_prefix_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - objc_class_prefix, GetArenaNoVirtual()); + objc_class_prefix, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.objc_class_prefix) } // optional string csharp_namespace = 37; +inline bool FileOptions::_internal_has_csharp_namespace() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} inline bool FileOptions::has_csharp_namespace() const { - return (_has_bits_[0] & 0x00000010u) != 0; + return _internal_has_csharp_namespace(); } inline void FileOptions::clear_csharp_namespace() { - csharp_namespace_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + csharp_namespace_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000010u; } inline const std::string& FileOptions::csharp_namespace() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.csharp_namespace) - return csharp_namespace_.Get(); + return _internal_csharp_namespace(); } inline void FileOptions::set_csharp_namespace(const std::string& value) { - _has_bits_[0] |= 0x00000010u; - csharp_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_csharp_namespace(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.csharp_namespace) } +inline std::string* FileOptions::mutable_csharp_namespace() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.csharp_namespace) + return _internal_mutable_csharp_namespace(); +} +inline const std::string& FileOptions::_internal_csharp_namespace() const { + return csharp_namespace_.Get(); +} +inline void FileOptions::_internal_set_csharp_namespace(const std::string& value) { + _has_bits_[0] |= 0x00000010u; + csharp_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FileOptions::set_csharp_namespace(std::string&& value) { _has_bits_[0] |= 0x00000010u; csharp_namespace_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.csharp_namespace) } inline void FileOptions::set_csharp_namespace(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000010u; csharp_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.csharp_namespace) } inline void FileOptions::set_csharp_namespace(const char* value, size_t size) { _has_bits_[0] |= 0x00000010u; csharp_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.csharp_namespace) } -inline std::string* FileOptions::mutable_csharp_namespace() { +inline std::string* FileOptions::_internal_mutable_csharp_namespace() { _has_bits_[0] |= 0x00000010u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.csharp_namespace) - return csharp_namespace_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return csharp_namespace_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FileOptions::release_csharp_namespace() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.csharp_namespace) - if (!has_csharp_namespace()) { + if (!_internal_has_csharp_namespace()) { return nullptr; } _has_bits_[0] &= ~0x00000010u; - return csharp_namespace_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return csharp_namespace_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FileOptions::set_allocated_csharp_namespace(std::string* csharp_namespace) { if (csharp_namespace != nullptr) { @@ -9641,78 +11302,91 @@ inline void FileOptions::set_allocated_csharp_namespace(std::string* csharp_name _has_bits_[0] &= ~0x00000010u; } csharp_namespace_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), csharp_namespace, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.csharp_namespace) } inline std::string* FileOptions::unsafe_arena_release_csharp_namespace() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.csharp_namespace) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000010u; return csharp_namespace_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FileOptions::unsafe_arena_set_allocated_csharp_namespace( std::string* csharp_namespace) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (csharp_namespace != nullptr) { _has_bits_[0] |= 0x00000010u; } else { _has_bits_[0] &= ~0x00000010u; } csharp_namespace_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - csharp_namespace, GetArenaNoVirtual()); + csharp_namespace, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.csharp_namespace) } // optional string swift_prefix = 39; +inline bool FileOptions::_internal_has_swift_prefix() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} inline bool FileOptions::has_swift_prefix() const { - return (_has_bits_[0] & 0x00000020u) != 0; + return _internal_has_swift_prefix(); } inline void FileOptions::clear_swift_prefix() { - swift_prefix_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + swift_prefix_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000020u; } inline const std::string& FileOptions::swift_prefix() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.swift_prefix) - return swift_prefix_.Get(); + return _internal_swift_prefix(); } inline void FileOptions::set_swift_prefix(const std::string& value) { - _has_bits_[0] |= 0x00000020u; - swift_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_swift_prefix(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.swift_prefix) } +inline std::string* FileOptions::mutable_swift_prefix() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.swift_prefix) + return _internal_mutable_swift_prefix(); +} +inline const std::string& FileOptions::_internal_swift_prefix() const { + return swift_prefix_.Get(); +} +inline void FileOptions::_internal_set_swift_prefix(const std::string& value) { + _has_bits_[0] |= 0x00000020u; + swift_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FileOptions::set_swift_prefix(std::string&& value) { _has_bits_[0] |= 0x00000020u; swift_prefix_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.swift_prefix) } inline void FileOptions::set_swift_prefix(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000020u; swift_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.swift_prefix) } inline void FileOptions::set_swift_prefix(const char* value, size_t size) { _has_bits_[0] |= 0x00000020u; swift_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.swift_prefix) } -inline std::string* FileOptions::mutable_swift_prefix() { +inline std::string* FileOptions::_internal_mutable_swift_prefix() { _has_bits_[0] |= 0x00000020u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.swift_prefix) - return swift_prefix_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return swift_prefix_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FileOptions::release_swift_prefix() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.swift_prefix) - if (!has_swift_prefix()) { + if (!_internal_has_swift_prefix()) { return nullptr; } _has_bits_[0] &= ~0x00000020u; - return swift_prefix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return swift_prefix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FileOptions::set_allocated_swift_prefix(std::string* swift_prefix) { if (swift_prefix != nullptr) { @@ -9721,78 +11395,91 @@ inline void FileOptions::set_allocated_swift_prefix(std::string* swift_prefix) { _has_bits_[0] &= ~0x00000020u; } swift_prefix_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), swift_prefix, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.swift_prefix) } inline std::string* FileOptions::unsafe_arena_release_swift_prefix() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.swift_prefix) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000020u; return swift_prefix_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FileOptions::unsafe_arena_set_allocated_swift_prefix( std::string* swift_prefix) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (swift_prefix != nullptr) { _has_bits_[0] |= 0x00000020u; } else { _has_bits_[0] &= ~0x00000020u; } swift_prefix_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - swift_prefix, GetArenaNoVirtual()); + swift_prefix, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.swift_prefix) } // optional string php_class_prefix = 40; +inline bool FileOptions::_internal_has_php_class_prefix() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} inline bool FileOptions::has_php_class_prefix() const { - return (_has_bits_[0] & 0x00000040u) != 0; + return _internal_has_php_class_prefix(); } inline void FileOptions::clear_php_class_prefix() { - php_class_prefix_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + php_class_prefix_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000040u; } inline const std::string& FileOptions::php_class_prefix() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_class_prefix) - return php_class_prefix_.Get(); + return _internal_php_class_prefix(); } inline void FileOptions::set_php_class_prefix(const std::string& value) { - _has_bits_[0] |= 0x00000040u; - php_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_php_class_prefix(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_class_prefix) } +inline std::string* FileOptions::mutable_php_class_prefix() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.php_class_prefix) + return _internal_mutable_php_class_prefix(); +} +inline const std::string& FileOptions::_internal_php_class_prefix() const { + return php_class_prefix_.Get(); +} +inline void FileOptions::_internal_set_php_class_prefix(const std::string& value) { + _has_bits_[0] |= 0x00000040u; + php_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FileOptions::set_php_class_prefix(std::string&& value) { _has_bits_[0] |= 0x00000040u; php_class_prefix_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.php_class_prefix) } inline void FileOptions::set_php_class_prefix(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000040u; php_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.php_class_prefix) } inline void FileOptions::set_php_class_prefix(const char* value, size_t size) { _has_bits_[0] |= 0x00000040u; php_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.php_class_prefix) } -inline std::string* FileOptions::mutable_php_class_prefix() { +inline std::string* FileOptions::_internal_mutable_php_class_prefix() { _has_bits_[0] |= 0x00000040u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.php_class_prefix) - return php_class_prefix_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return php_class_prefix_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FileOptions::release_php_class_prefix() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.php_class_prefix) - if (!has_php_class_prefix()) { + if (!_internal_has_php_class_prefix()) { return nullptr; } _has_bits_[0] &= ~0x00000040u; - return php_class_prefix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return php_class_prefix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FileOptions::set_allocated_php_class_prefix(std::string* php_class_prefix) { if (php_class_prefix != nullptr) { @@ -9801,78 +11488,91 @@ inline void FileOptions::set_allocated_php_class_prefix(std::string* php_class_p _has_bits_[0] &= ~0x00000040u; } php_class_prefix_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), php_class_prefix, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_class_prefix) } inline std::string* FileOptions::unsafe_arena_release_php_class_prefix() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.php_class_prefix) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000040u; return php_class_prefix_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FileOptions::unsafe_arena_set_allocated_php_class_prefix( std::string* php_class_prefix) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (php_class_prefix != nullptr) { _has_bits_[0] |= 0x00000040u; } else { _has_bits_[0] &= ~0x00000040u; } php_class_prefix_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - php_class_prefix, GetArenaNoVirtual()); + php_class_prefix, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.php_class_prefix) } // optional string php_namespace = 41; +inline bool FileOptions::_internal_has_php_namespace() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} inline bool FileOptions::has_php_namespace() const { - return (_has_bits_[0] & 0x00000080u) != 0; + return _internal_has_php_namespace(); } inline void FileOptions::clear_php_namespace() { - php_namespace_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + php_namespace_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000080u; } inline const std::string& FileOptions::php_namespace() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_namespace) - return php_namespace_.Get(); + return _internal_php_namespace(); } inline void FileOptions::set_php_namespace(const std::string& value) { - _has_bits_[0] |= 0x00000080u; - php_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_php_namespace(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_namespace) } +inline std::string* FileOptions::mutable_php_namespace() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.php_namespace) + return _internal_mutable_php_namespace(); +} +inline const std::string& FileOptions::_internal_php_namespace() const { + return php_namespace_.Get(); +} +inline void FileOptions::_internal_set_php_namespace(const std::string& value) { + _has_bits_[0] |= 0x00000080u; + php_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FileOptions::set_php_namespace(std::string&& value) { _has_bits_[0] |= 0x00000080u; php_namespace_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.php_namespace) } inline void FileOptions::set_php_namespace(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000080u; php_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.php_namespace) } inline void FileOptions::set_php_namespace(const char* value, size_t size) { _has_bits_[0] |= 0x00000080u; php_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.php_namespace) } -inline std::string* FileOptions::mutable_php_namespace() { +inline std::string* FileOptions::_internal_mutable_php_namespace() { _has_bits_[0] |= 0x00000080u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.php_namespace) - return php_namespace_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return php_namespace_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FileOptions::release_php_namespace() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.php_namespace) - if (!has_php_namespace()) { + if (!_internal_has_php_namespace()) { return nullptr; } _has_bits_[0] &= ~0x00000080u; - return php_namespace_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return php_namespace_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FileOptions::set_allocated_php_namespace(std::string* php_namespace) { if (php_namespace != nullptr) { @@ -9881,78 +11581,91 @@ inline void FileOptions::set_allocated_php_namespace(std::string* php_namespace) _has_bits_[0] &= ~0x00000080u; } php_namespace_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), php_namespace, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_namespace) } inline std::string* FileOptions::unsafe_arena_release_php_namespace() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.php_namespace) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000080u; return php_namespace_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FileOptions::unsafe_arena_set_allocated_php_namespace( std::string* php_namespace) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (php_namespace != nullptr) { _has_bits_[0] |= 0x00000080u; } else { _has_bits_[0] &= ~0x00000080u; } php_namespace_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - php_namespace, GetArenaNoVirtual()); + php_namespace, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.php_namespace) } // optional string php_metadata_namespace = 44; +inline bool FileOptions::_internal_has_php_metadata_namespace() const { + bool value = (_has_bits_[0] & 0x00000100u) != 0; + return value; +} inline bool FileOptions::has_php_metadata_namespace() const { - return (_has_bits_[0] & 0x00000100u) != 0; + return _internal_has_php_metadata_namespace(); } inline void FileOptions::clear_php_metadata_namespace() { - php_metadata_namespace_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + php_metadata_namespace_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000100u; } inline const std::string& FileOptions::php_metadata_namespace() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_metadata_namespace) - return php_metadata_namespace_.Get(); + return _internal_php_metadata_namespace(); } inline void FileOptions::set_php_metadata_namespace(const std::string& value) { - _has_bits_[0] |= 0x00000100u; - php_metadata_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_php_metadata_namespace(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_metadata_namespace) } +inline std::string* FileOptions::mutable_php_metadata_namespace() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.php_metadata_namespace) + return _internal_mutable_php_metadata_namespace(); +} +inline const std::string& FileOptions::_internal_php_metadata_namespace() const { + return php_metadata_namespace_.Get(); +} +inline void FileOptions::_internal_set_php_metadata_namespace(const std::string& value) { + _has_bits_[0] |= 0x00000100u; + php_metadata_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FileOptions::set_php_metadata_namespace(std::string&& value) { _has_bits_[0] |= 0x00000100u; php_metadata_namespace_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.php_metadata_namespace) } inline void FileOptions::set_php_metadata_namespace(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000100u; php_metadata_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.php_metadata_namespace) } inline void FileOptions::set_php_metadata_namespace(const char* value, size_t size) { _has_bits_[0] |= 0x00000100u; php_metadata_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.php_metadata_namespace) } -inline std::string* FileOptions::mutable_php_metadata_namespace() { +inline std::string* FileOptions::_internal_mutable_php_metadata_namespace() { _has_bits_[0] |= 0x00000100u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.php_metadata_namespace) - return php_metadata_namespace_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return php_metadata_namespace_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FileOptions::release_php_metadata_namespace() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.php_metadata_namespace) - if (!has_php_metadata_namespace()) { + if (!_internal_has_php_metadata_namespace()) { return nullptr; } _has_bits_[0] &= ~0x00000100u; - return php_metadata_namespace_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return php_metadata_namespace_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FileOptions::set_allocated_php_metadata_namespace(std::string* php_metadata_namespace) { if (php_metadata_namespace != nullptr) { @@ -9961,78 +11674,91 @@ inline void FileOptions::set_allocated_php_metadata_namespace(std::string* php_m _has_bits_[0] &= ~0x00000100u; } php_metadata_namespace_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), php_metadata_namespace, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_metadata_namespace) } inline std::string* FileOptions::unsafe_arena_release_php_metadata_namespace() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.php_metadata_namespace) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000100u; return php_metadata_namespace_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FileOptions::unsafe_arena_set_allocated_php_metadata_namespace( std::string* php_metadata_namespace) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (php_metadata_namespace != nullptr) { _has_bits_[0] |= 0x00000100u; } else { _has_bits_[0] &= ~0x00000100u; } php_metadata_namespace_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - php_metadata_namespace, GetArenaNoVirtual()); + php_metadata_namespace, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.php_metadata_namespace) } // optional string ruby_package = 45; +inline bool FileOptions::_internal_has_ruby_package() const { + bool value = (_has_bits_[0] & 0x00000200u) != 0; + return value; +} inline bool FileOptions::has_ruby_package() const { - return (_has_bits_[0] & 0x00000200u) != 0; + return _internal_has_ruby_package(); } inline void FileOptions::clear_ruby_package() { - ruby_package_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + ruby_package_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000200u; } inline const std::string& FileOptions::ruby_package() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.ruby_package) - return ruby_package_.Get(); + return _internal_ruby_package(); } inline void FileOptions::set_ruby_package(const std::string& value) { - _has_bits_[0] |= 0x00000200u; - ruby_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_ruby_package(value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.ruby_package) } +inline std::string* FileOptions::mutable_ruby_package() { + // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.ruby_package) + return _internal_mutable_ruby_package(); +} +inline const std::string& FileOptions::_internal_ruby_package() const { + return ruby_package_.Get(); +} +inline void FileOptions::_internal_set_ruby_package(const std::string& value) { + _has_bits_[0] |= 0x00000200u; + ruby_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void FileOptions::set_ruby_package(std::string&& value) { _has_bits_[0] |= 0x00000200u; ruby_package_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.ruby_package) } inline void FileOptions::set_ruby_package(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000200u; ruby_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.ruby_package) } inline void FileOptions::set_ruby_package(const char* value, size_t size) { _has_bits_[0] |= 0x00000200u; ruby_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.ruby_package) } -inline std::string* FileOptions::mutable_ruby_package() { +inline std::string* FileOptions::_internal_mutable_ruby_package() { _has_bits_[0] |= 0x00000200u; - // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.ruby_package) - return ruby_package_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return ruby_package_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* FileOptions::release_ruby_package() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.ruby_package) - if (!has_ruby_package()) { + if (!_internal_has_ruby_package()) { return nullptr; } _has_bits_[0] &= ~0x00000200u; - return ruby_package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return ruby_package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void FileOptions::set_allocated_ruby_package(std::string* ruby_package) { if (ruby_package != nullptr) { @@ -10041,33 +11767,36 @@ inline void FileOptions::set_allocated_ruby_package(std::string* ruby_package) { _has_bits_[0] &= ~0x00000200u; } ruby_package_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ruby_package, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.ruby_package) } inline std::string* FileOptions::unsafe_arena_release_ruby_package() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.ruby_package) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000200u; return ruby_package_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void FileOptions::unsafe_arena_set_allocated_ruby_package( std::string* ruby_package) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (ruby_package != nullptr) { _has_bits_[0] |= 0x00000200u; } else { _has_bits_[0] &= ~0x00000200u; } ruby_package_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ruby_package, GetArenaNoVirtual()); + ruby_package, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.ruby_package) } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int FileOptions::uninterpreted_option_size() const { +inline int FileOptions::_internal_uninterpreted_option_size() const { return uninterpreted_option_.size(); } +inline int FileOptions::uninterpreted_option_size() const { + return _internal_uninterpreted_option_size(); +} inline void FileOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } @@ -10080,13 +11809,19 @@ FileOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileOptions.uninterpreted_option) return &uninterpreted_option_; } +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& FileOptions::_internal_uninterpreted_option(int index) const { + return 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 uninterpreted_option_.Get(index); + return _internal_uninterpreted_option(index); +} +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* FileOptions::_internal_add_uninterpreted_option() { + return uninterpreted_option_.Add(); } inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* FileOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.FileOptions.uninterpreted_option) - return uninterpreted_option_.Add(); + return _internal_add_uninterpreted_option(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& FileOptions::uninterpreted_option() const { @@ -10099,81 +11834,124 @@ FileOptions::uninterpreted_option() const { // MessageOptions // 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; + return value; +} inline bool MessageOptions::has_message_set_wire_format() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_message_set_wire_format(); } inline void MessageOptions::clear_message_set_wire_format() { message_set_wire_format_ = false; _has_bits_[0] &= ~0x00000001u; } -inline bool MessageOptions::message_set_wire_format() const { - // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.message_set_wire_format) +inline bool MessageOptions::_internal_message_set_wire_format() const { return message_set_wire_format_; } -inline void MessageOptions::set_message_set_wire_format(bool value) { +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; +} +inline void MessageOptions::set_message_set_wire_format(bool value) { + _internal_set_message_set_wire_format(value); // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.message_set_wire_format) } // 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; + return value; +} inline bool MessageOptions::has_no_standard_descriptor_accessor() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_no_standard_descriptor_accessor(); } inline void MessageOptions::clear_no_standard_descriptor_accessor() { no_standard_descriptor_accessor_ = false; _has_bits_[0] &= ~0x00000002u; } -inline bool MessageOptions::no_standard_descriptor_accessor() const { - // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.no_standard_descriptor_accessor) +inline bool MessageOptions::_internal_no_standard_descriptor_accessor() const { return no_standard_descriptor_accessor_; } -inline void MessageOptions::set_no_standard_descriptor_accessor(bool value) { +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; +} +inline void MessageOptions::set_no_standard_descriptor_accessor(bool value) { + _internal_set_no_standard_descriptor_accessor(value); // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.no_standard_descriptor_accessor) } // optional bool deprecated = 3 [default = false]; +inline bool MessageOptions::_internal_has_deprecated() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} inline bool MessageOptions::has_deprecated() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return _internal_has_deprecated(); } inline void MessageOptions::clear_deprecated() { deprecated_ = false; _has_bits_[0] &= ~0x00000004u; } -inline bool MessageOptions::deprecated() const { - // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.deprecated) +inline bool MessageOptions::_internal_deprecated() const { return deprecated_; } -inline void MessageOptions::set_deprecated(bool value) { +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; +} +inline void MessageOptions::set_deprecated(bool value) { + _internal_set_deprecated(value); // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.deprecated) } // optional bool map_entry = 7; +inline bool MessageOptions::_internal_has_map_entry() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} inline bool MessageOptions::has_map_entry() const { - return (_has_bits_[0] & 0x00000008u) != 0; + return _internal_has_map_entry(); } inline void MessageOptions::clear_map_entry() { map_entry_ = false; _has_bits_[0] &= ~0x00000008u; } -inline bool MessageOptions::map_entry() const { - // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.map_entry) +inline bool MessageOptions::_internal_map_entry() const { return map_entry_; } -inline void MessageOptions::set_map_entry(bool value) { +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; +} +inline void MessageOptions::set_map_entry(bool value) { + _internal_set_map_entry(value); // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.map_entry) } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int MessageOptions::uninterpreted_option_size() const { +inline int MessageOptions::_internal_uninterpreted_option_size() const { return uninterpreted_option_.size(); } +inline int MessageOptions::uninterpreted_option_size() const { + return _internal_uninterpreted_option_size(); +} inline void MessageOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } @@ -10186,13 +11964,19 @@ MessageOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.MessageOptions.uninterpreted_option) return &uninterpreted_option_; } +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& MessageOptions::_internal_uninterpreted_option(int index) const { + return 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 uninterpreted_option_.Get(index); + return _internal_uninterpreted_option(index); +} +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* MessageOptions::_internal_add_uninterpreted_option() { + return uninterpreted_option_.Add(); } inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* MessageOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.MessageOptions.uninterpreted_option) - return uninterpreted_option_.Add(); + return _internal_add_uninterpreted_option(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& MessageOptions::uninterpreted_option() const { @@ -10205,119 +11989,182 @@ MessageOptions::uninterpreted_option() const { // FieldOptions // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; +inline bool FieldOptions::_internal_has_ctype() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool FieldOptions::has_ctype() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_ctype(); } inline void FieldOptions::clear_ctype() { ctype_ = 0; _has_bits_[0] &= ~0x00000001u; } -inline PROTOBUF_NAMESPACE_ID::FieldOptions_CType FieldOptions::ctype() const { - // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.ctype) +inline PROTOBUF_NAMESPACE_ID::FieldOptions_CType FieldOptions::_internal_ctype() const { return static_cast< PROTOBUF_NAMESPACE_ID::FieldOptions_CType >(ctype_); } -inline void FieldOptions::set_ctype(PROTOBUF_NAMESPACE_ID::FieldOptions_CType value) { +inline PROTOBUF_NAMESPACE_ID::FieldOptions_CType FieldOptions::ctype() const { + // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.ctype) + return _internal_ctype(); +} +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; +} +inline void FieldOptions::set_ctype(PROTOBUF_NAMESPACE_ID::FieldOptions_CType value) { + _internal_set_ctype(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.ctype) } // optional bool packed = 2; +inline bool FieldOptions::_internal_has_packed() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} inline bool FieldOptions::has_packed() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_packed(); } inline void FieldOptions::clear_packed() { packed_ = false; _has_bits_[0] &= ~0x00000002u; } -inline bool FieldOptions::packed() const { - // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.packed) +inline bool FieldOptions::_internal_packed() const { return packed_; } -inline void FieldOptions::set_packed(bool value) { +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] |= 0x00000002u; packed_ = value; +} +inline void FieldOptions::set_packed(bool value) { + _internal_set_packed(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.packed) } // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; +inline bool FieldOptions::_internal_has_jstype() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} inline bool FieldOptions::has_jstype() const { - return (_has_bits_[0] & 0x00000020u) != 0; + return _internal_has_jstype(); } inline void FieldOptions::clear_jstype() { jstype_ = 0; _has_bits_[0] &= ~0x00000020u; } -inline PROTOBUF_NAMESPACE_ID::FieldOptions_JSType FieldOptions::jstype() const { - // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.jstype) +inline PROTOBUF_NAMESPACE_ID::FieldOptions_JSType FieldOptions::_internal_jstype() const { return static_cast< PROTOBUF_NAMESPACE_ID::FieldOptions_JSType >(jstype_); } -inline void FieldOptions::set_jstype(PROTOBUF_NAMESPACE_ID::FieldOptions_JSType value) { +inline PROTOBUF_NAMESPACE_ID::FieldOptions_JSType FieldOptions::jstype() const { + // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.jstype) + return _internal_jstype(); +} +inline void FieldOptions::_internal_set_jstype(PROTOBUF_NAMESPACE_ID::FieldOptions_JSType value) { assert(PROTOBUF_NAMESPACE_ID::FieldOptions_JSType_IsValid(value)); _has_bits_[0] |= 0x00000020u; jstype_ = value; +} +inline void FieldOptions::set_jstype(PROTOBUF_NAMESPACE_ID::FieldOptions_JSType value) { + _internal_set_jstype(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.jstype) } // optional bool lazy = 5 [default = false]; +inline bool FieldOptions::_internal_has_lazy() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} inline bool FieldOptions::has_lazy() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return _internal_has_lazy(); } inline void FieldOptions::clear_lazy() { lazy_ = false; _has_bits_[0] &= ~0x00000004u; } -inline bool FieldOptions::lazy() const { - // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.lazy) +inline bool FieldOptions::_internal_lazy() const { return lazy_; } -inline void FieldOptions::set_lazy(bool value) { +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] |= 0x00000004u; lazy_ = value; +} +inline void FieldOptions::set_lazy(bool value) { + _internal_set_lazy(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.lazy) } // optional bool deprecated = 3 [default = false]; +inline bool FieldOptions::_internal_has_deprecated() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} inline bool FieldOptions::has_deprecated() const { - return (_has_bits_[0] & 0x00000008u) != 0; + return _internal_has_deprecated(); } inline void FieldOptions::clear_deprecated() { deprecated_ = false; _has_bits_[0] &= ~0x00000008u; } -inline bool FieldOptions::deprecated() const { - // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.deprecated) +inline bool FieldOptions::_internal_deprecated() const { return deprecated_; } -inline void FieldOptions::set_deprecated(bool value) { +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] |= 0x00000008u; deprecated_ = value; +} +inline void FieldOptions::set_deprecated(bool value) { + _internal_set_deprecated(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.deprecated) } // optional bool weak = 10 [default = false]; +inline bool FieldOptions::_internal_has_weak() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} inline bool FieldOptions::has_weak() const { - return (_has_bits_[0] & 0x00000010u) != 0; + return _internal_has_weak(); } inline void FieldOptions::clear_weak() { weak_ = false; _has_bits_[0] &= ~0x00000010u; } -inline bool FieldOptions::weak() const { - // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.weak) +inline bool FieldOptions::_internal_weak() const { return weak_; } -inline void FieldOptions::set_weak(bool value) { +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] |= 0x00000010u; weak_ = value; +} +inline void FieldOptions::set_weak(bool value) { + _internal_set_weak(value); // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.weak) } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int FieldOptions::uninterpreted_option_size() const { +inline int FieldOptions::_internal_uninterpreted_option_size() const { return uninterpreted_option_.size(); } +inline int FieldOptions::uninterpreted_option_size() const { + return _internal_uninterpreted_option_size(); +} inline void FieldOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } @@ -10330,13 +12177,19 @@ FieldOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldOptions.uninterpreted_option) return &uninterpreted_option_; } +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& FieldOptions::_internal_uninterpreted_option(int index) const { + return 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 uninterpreted_option_.Get(index); + return _internal_uninterpreted_option(index); +} +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* FieldOptions::_internal_add_uninterpreted_option() { + return uninterpreted_option_.Add(); } inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* FieldOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.FieldOptions.uninterpreted_option) - return uninterpreted_option_.Add(); + return _internal_add_uninterpreted_option(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& FieldOptions::uninterpreted_option() const { @@ -10349,9 +12202,12 @@ FieldOptions::uninterpreted_option() const { // OneofOptions // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int OneofOptions::uninterpreted_option_size() const { +inline int OneofOptions::_internal_uninterpreted_option_size() const { return uninterpreted_option_.size(); } +inline int OneofOptions::uninterpreted_option_size() const { + return _internal_uninterpreted_option_size(); +} inline void OneofOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } @@ -10364,13 +12220,19 @@ OneofOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.OneofOptions.uninterpreted_option) return &uninterpreted_option_; } +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& OneofOptions::_internal_uninterpreted_option(int index) const { + return 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 uninterpreted_option_.Get(index); + return _internal_uninterpreted_option(index); +} +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* OneofOptions::_internal_add_uninterpreted_option() { + return uninterpreted_option_.Add(); } inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* OneofOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.OneofOptions.uninterpreted_option) - return uninterpreted_option_.Add(); + return _internal_add_uninterpreted_option(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& OneofOptions::uninterpreted_option() const { @@ -10383,45 +12245,68 @@ OneofOptions::uninterpreted_option() const { // EnumOptions // optional bool allow_alias = 2; +inline bool EnumOptions::_internal_has_allow_alias() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool EnumOptions::has_allow_alias() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_allow_alias(); } inline void EnumOptions::clear_allow_alias() { allow_alias_ = false; _has_bits_[0] &= ~0x00000001u; } -inline bool EnumOptions::allow_alias() const { - // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.allow_alias) +inline bool EnumOptions::_internal_allow_alias() const { return allow_alias_; } -inline void EnumOptions::set_allow_alias(bool value) { +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; +} +inline void EnumOptions::set_allow_alias(bool value) { + _internal_set_allow_alias(value); // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.allow_alias) } // optional bool deprecated = 3 [default = false]; +inline bool EnumOptions::_internal_has_deprecated() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} inline bool EnumOptions::has_deprecated() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_deprecated(); } inline void EnumOptions::clear_deprecated() { deprecated_ = false; _has_bits_[0] &= ~0x00000002u; } -inline bool EnumOptions::deprecated() const { - // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.deprecated) +inline bool EnumOptions::_internal_deprecated() const { return deprecated_; } -inline void EnumOptions::set_deprecated(bool value) { +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; +} +inline void EnumOptions::set_deprecated(bool value) { + _internal_set_deprecated(value); // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.deprecated) } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int EnumOptions::uninterpreted_option_size() const { +inline int EnumOptions::_internal_uninterpreted_option_size() const { return uninterpreted_option_.size(); } +inline int EnumOptions::uninterpreted_option_size() const { + return _internal_uninterpreted_option_size(); +} inline void EnumOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } @@ -10434,13 +12319,19 @@ EnumOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumOptions.uninterpreted_option) return &uninterpreted_option_; } +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& EnumOptions::_internal_uninterpreted_option(int index) const { + return 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 uninterpreted_option_.Get(index); + return _internal_uninterpreted_option(index); +} +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumOptions::_internal_add_uninterpreted_option() { + return uninterpreted_option_.Add(); } inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.EnumOptions.uninterpreted_option) - return uninterpreted_option_.Add(); + return _internal_add_uninterpreted_option(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& EnumOptions::uninterpreted_option() const { @@ -10453,27 +12344,40 @@ EnumOptions::uninterpreted_option() const { // EnumValueOptions // optional bool deprecated = 1 [default = false]; +inline bool EnumValueOptions::_internal_has_deprecated() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool EnumValueOptions::has_deprecated() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_deprecated(); } inline void EnumValueOptions::clear_deprecated() { deprecated_ = false; _has_bits_[0] &= ~0x00000001u; } -inline bool EnumValueOptions::deprecated() const { - // @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.deprecated) +inline bool EnumValueOptions::_internal_deprecated() const { return deprecated_; } -inline void EnumValueOptions::set_deprecated(bool value) { +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; +} +inline void EnumValueOptions::set_deprecated(bool value) { + _internal_set_deprecated(value); // @@protoc_insertion_point(field_set:google.protobuf.EnumValueOptions.deprecated) } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int EnumValueOptions::uninterpreted_option_size() const { +inline int EnumValueOptions::_internal_uninterpreted_option_size() const { return uninterpreted_option_.size(); } +inline int EnumValueOptions::uninterpreted_option_size() const { + return _internal_uninterpreted_option_size(); +} inline void EnumValueOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } @@ -10486,13 +12390,19 @@ EnumValueOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValueOptions.uninterpreted_option) return &uninterpreted_option_; } +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& EnumValueOptions::_internal_uninterpreted_option(int index) const { + return 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 uninterpreted_option_.Get(index); + return _internal_uninterpreted_option(index); +} +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumValueOptions::_internal_add_uninterpreted_option() { + return uninterpreted_option_.Add(); } inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumValueOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.EnumValueOptions.uninterpreted_option) - return uninterpreted_option_.Add(); + return _internal_add_uninterpreted_option(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& EnumValueOptions::uninterpreted_option() const { @@ -10505,27 +12415,40 @@ EnumValueOptions::uninterpreted_option() const { // ServiceOptions // optional bool deprecated = 33 [default = false]; +inline bool ServiceOptions::_internal_has_deprecated() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool ServiceOptions::has_deprecated() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_deprecated(); } inline void ServiceOptions::clear_deprecated() { deprecated_ = false; _has_bits_[0] &= ~0x00000001u; } -inline bool ServiceOptions::deprecated() const { - // @@protoc_insertion_point(field_get:google.protobuf.ServiceOptions.deprecated) +inline bool ServiceOptions::_internal_deprecated() const { return deprecated_; } -inline void ServiceOptions::set_deprecated(bool value) { +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; +} +inline void ServiceOptions::set_deprecated(bool value) { + _internal_set_deprecated(value); // @@protoc_insertion_point(field_set:google.protobuf.ServiceOptions.deprecated) } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int ServiceOptions::uninterpreted_option_size() const { +inline int ServiceOptions::_internal_uninterpreted_option_size() const { return uninterpreted_option_.size(); } +inline int ServiceOptions::uninterpreted_option_size() const { + return _internal_uninterpreted_option_size(); +} inline void ServiceOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } @@ -10538,13 +12461,19 @@ ServiceOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceOptions.uninterpreted_option) return &uninterpreted_option_; } +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& ServiceOptions::_internal_uninterpreted_option(int index) const { + return 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 uninterpreted_option_.Get(index); + return _internal_uninterpreted_option(index); +} +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* ServiceOptions::_internal_add_uninterpreted_option() { + return uninterpreted_option_.Add(); } inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* ServiceOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.ServiceOptions.uninterpreted_option) - return uninterpreted_option_.Add(); + return _internal_add_uninterpreted_option(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& ServiceOptions::uninterpreted_option() const { @@ -10557,46 +12486,69 @@ ServiceOptions::uninterpreted_option() const { // MethodOptions // optional bool deprecated = 33 [default = false]; +inline bool MethodOptions::_internal_has_deprecated() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool MethodOptions::has_deprecated() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_deprecated(); } inline void MethodOptions::clear_deprecated() { deprecated_ = false; _has_bits_[0] &= ~0x00000001u; } -inline bool MethodOptions::deprecated() const { - // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.deprecated) +inline bool MethodOptions::_internal_deprecated() const { return deprecated_; } -inline void MethodOptions::set_deprecated(bool value) { +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; +} +inline void MethodOptions::set_deprecated(bool value) { + _internal_set_deprecated(value); // @@protoc_insertion_point(field_set:google.protobuf.MethodOptions.deprecated) } // 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; + return value; +} inline bool MethodOptions::has_idempotency_level() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_idempotency_level(); } inline void MethodOptions::clear_idempotency_level() { idempotency_level_ = 0; _has_bits_[0] &= ~0x00000002u; } -inline PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel MethodOptions::idempotency_level() const { - // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.idempotency_level) +inline PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel MethodOptions::_internal_idempotency_level() const { return static_cast< PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel >(idempotency_level_); } -inline void MethodOptions::set_idempotency_level(PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel value) { +inline PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel MethodOptions::idempotency_level() const { + // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.idempotency_level) + return _internal_idempotency_level(); +} +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; +} +inline void MethodOptions::set_idempotency_level(PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel value) { + _internal_set_idempotency_level(value); // @@protoc_insertion_point(field_set:google.protobuf.MethodOptions.idempotency_level) } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int MethodOptions::uninterpreted_option_size() const { +inline int MethodOptions::_internal_uninterpreted_option_size() const { return uninterpreted_option_.size(); } +inline int MethodOptions::uninterpreted_option_size() const { + return _internal_uninterpreted_option_size(); +} inline void MethodOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } @@ -10609,13 +12561,19 @@ MethodOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.MethodOptions.uninterpreted_option) return &uninterpreted_option_; } +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& MethodOptions::_internal_uninterpreted_option(int index) const { + return 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 uninterpreted_option_.Get(index); + return _internal_uninterpreted_option(index); +} +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* MethodOptions::_internal_add_uninterpreted_option() { + return uninterpreted_option_.Add(); } inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* MethodOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.MethodOptions.uninterpreted_option) - return uninterpreted_option_.Add(); + return _internal_add_uninterpreted_option(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& MethodOptions::uninterpreted_option() const { @@ -10628,54 +12586,67 @@ MethodOptions::uninterpreted_option() const { // UninterpretedOption_NamePart // required string name_part = 1; +inline bool UninterpretedOption_NamePart::_internal_has_name_part() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool UninterpretedOption_NamePart::has_name_part() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_name_part(); } inline void UninterpretedOption_NamePart::clear_name_part() { - name_part_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_part_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& UninterpretedOption_NamePart::name_part() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.name_part) - return name_part_.Get(); + return _internal_name_part(); } inline void UninterpretedOption_NamePart::set_name_part(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - name_part_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_name_part(value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.name_part) } +inline std::string* UninterpretedOption_NamePart::mutable_name_part() { + // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.NamePart.name_part) + return _internal_mutable_name_part(); +} +inline const std::string& UninterpretedOption_NamePart::_internal_name_part() const { + return name_part_.Get(); +} +inline void UninterpretedOption_NamePart::_internal_set_name_part(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + name_part_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void UninterpretedOption_NamePart::set_name_part(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_part_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.NamePart.name_part) } inline void UninterpretedOption_NamePart::set_name_part(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; name_part_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.NamePart.name_part) } inline void UninterpretedOption_NamePart::set_name_part(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; name_part_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.NamePart.name_part) } -inline std::string* UninterpretedOption_NamePart::mutable_name_part() { +inline std::string* UninterpretedOption_NamePart::_internal_mutable_name_part() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.NamePart.name_part) - return name_part_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_part_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* UninterpretedOption_NamePart::release_name_part() { // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.NamePart.name_part) - if (!has_name_part()) { + if (!_internal_has_name_part()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_part_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_part_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void UninterpretedOption_NamePart::set_allocated_name_part(std::string* name_part) { if (name_part != nullptr) { @@ -10684,44 +12655,54 @@ inline void UninterpretedOption_NamePart::set_allocated_name_part(std::string* n _has_bits_[0] &= ~0x00000001u; } name_part_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name_part, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.NamePart.name_part) } inline std::string* UninterpretedOption_NamePart::unsafe_arena_release_name_part() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.UninterpretedOption.NamePart.name_part) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000001u; return name_part_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void UninterpretedOption_NamePart::unsafe_arena_set_allocated_name_part( std::string* name_part) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (name_part != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } name_part_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - name_part, GetArenaNoVirtual()); + name_part, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.UninterpretedOption.NamePart.name_part) } // required bool is_extension = 2; +inline bool UninterpretedOption_NamePart::_internal_has_is_extension() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} inline bool UninterpretedOption_NamePart::has_is_extension() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_is_extension(); } inline void UninterpretedOption_NamePart::clear_is_extension() { is_extension_ = false; _has_bits_[0] &= ~0x00000002u; } -inline bool UninterpretedOption_NamePart::is_extension() const { - // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.is_extension) +inline bool UninterpretedOption_NamePart::_internal_is_extension() const { return is_extension_; } -inline void UninterpretedOption_NamePart::set_is_extension(bool value) { +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; +} +inline void UninterpretedOption_NamePart::set_is_extension(bool value) { + _internal_set_is_extension(value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.is_extension) } @@ -10730,9 +12711,12 @@ inline void UninterpretedOption_NamePart::set_is_extension(bool value) { // UninterpretedOption // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; -inline int UninterpretedOption::name_size() const { +inline int UninterpretedOption::_internal_name_size() const { return name_.size(); } +inline int UninterpretedOption::name_size() const { + return _internal_name_size(); +} inline void UninterpretedOption::clear_name() { name_.Clear(); } @@ -10745,13 +12729,19 @@ UninterpretedOption::mutable_name() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.UninterpretedOption.name) return &name_; } +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart& UninterpretedOption::_internal_name(int index) const { + return 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 name_.Get(index); + return _internal_name(index); +} +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* UninterpretedOption::_internal_add_name() { + return name_.Add(); } inline PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* UninterpretedOption::add_name() { // @@protoc_insertion_point(field_add:google.protobuf.UninterpretedOption.name) - return name_.Add(); + return _internal_add_name(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart >& UninterpretedOption::name() const { @@ -10760,54 +12750,67 @@ UninterpretedOption::name() const { } // optional string identifier_value = 3; +inline bool UninterpretedOption::_internal_has_identifier_value() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool UninterpretedOption::has_identifier_value() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_identifier_value(); } inline void UninterpretedOption::clear_identifier_value() { - identifier_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + identifier_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& UninterpretedOption::identifier_value() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.identifier_value) - return identifier_value_.Get(); + return _internal_identifier_value(); } inline void UninterpretedOption::set_identifier_value(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - identifier_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_identifier_value(value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.identifier_value) } +inline std::string* UninterpretedOption::mutable_identifier_value() { + // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.identifier_value) + return _internal_mutable_identifier_value(); +} +inline const std::string& UninterpretedOption::_internal_identifier_value() const { + return identifier_value_.Get(); +} +inline void UninterpretedOption::_internal_set_identifier_value(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + identifier_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void UninterpretedOption::set_identifier_value(std::string&& value) { _has_bits_[0] |= 0x00000001u; identifier_value_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.identifier_value) } inline void UninterpretedOption::set_identifier_value(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; identifier_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.identifier_value) } inline void UninterpretedOption::set_identifier_value(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; identifier_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.identifier_value) } -inline std::string* UninterpretedOption::mutable_identifier_value() { +inline std::string* UninterpretedOption::_internal_mutable_identifier_value() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.identifier_value) - return identifier_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return identifier_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* UninterpretedOption::release_identifier_value() { // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.identifier_value) - if (!has_identifier_value()) { + if (!_internal_has_identifier_value()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return identifier_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return identifier_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void UninterpretedOption::set_allocated_identifier_value(std::string* identifier_value) { if (identifier_value != nullptr) { @@ -10816,132 +12819,175 @@ inline void UninterpretedOption::set_allocated_identifier_value(std::string* ide _has_bits_[0] &= ~0x00000001u; } identifier_value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), identifier_value, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.identifier_value) } inline std::string* UninterpretedOption::unsafe_arena_release_identifier_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.UninterpretedOption.identifier_value) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000001u; return identifier_value_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void UninterpretedOption::unsafe_arena_set_allocated_identifier_value( std::string* identifier_value) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (identifier_value != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } identifier_value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - identifier_value, GetArenaNoVirtual()); + identifier_value, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.UninterpretedOption.identifier_value) } // optional uint64 positive_int_value = 4; +inline bool UninterpretedOption::_internal_has_positive_int_value() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} inline bool UninterpretedOption::has_positive_int_value() const { - return (_has_bits_[0] & 0x00000008u) != 0; + return _internal_has_positive_int_value(); } inline void UninterpretedOption::clear_positive_int_value() { positive_int_value_ = PROTOBUF_ULONGLONG(0); _has_bits_[0] &= ~0x00000008u; } -inline ::PROTOBUF_NAMESPACE_ID::uint64 UninterpretedOption::positive_int_value() const { - // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.positive_int_value) +inline ::PROTOBUF_NAMESPACE_ID::uint64 UninterpretedOption::_internal_positive_int_value() const { return positive_int_value_; } -inline void UninterpretedOption::set_positive_int_value(::PROTOBUF_NAMESPACE_ID::uint64 value) { +inline ::PROTOBUF_NAMESPACE_ID::uint64 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(::PROTOBUF_NAMESPACE_ID::uint64 value) { _has_bits_[0] |= 0x00000008u; positive_int_value_ = value; +} +inline void UninterpretedOption::set_positive_int_value(::PROTOBUF_NAMESPACE_ID::uint64 value) { + _internal_set_positive_int_value(value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.positive_int_value) } // optional int64 negative_int_value = 5; +inline bool UninterpretedOption::_internal_has_negative_int_value() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} inline bool UninterpretedOption::has_negative_int_value() const { - return (_has_bits_[0] & 0x00000010u) != 0; + return _internal_has_negative_int_value(); } inline void UninterpretedOption::clear_negative_int_value() { negative_int_value_ = PROTOBUF_LONGLONG(0); _has_bits_[0] &= ~0x00000010u; } -inline ::PROTOBUF_NAMESPACE_ID::int64 UninterpretedOption::negative_int_value() const { - // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.negative_int_value) +inline ::PROTOBUF_NAMESPACE_ID::int64 UninterpretedOption::_internal_negative_int_value() const { return negative_int_value_; } -inline void UninterpretedOption::set_negative_int_value(::PROTOBUF_NAMESPACE_ID::int64 value) { +inline ::PROTOBUF_NAMESPACE_ID::int64 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(::PROTOBUF_NAMESPACE_ID::int64 value) { _has_bits_[0] |= 0x00000010u; negative_int_value_ = value; +} +inline void UninterpretedOption::set_negative_int_value(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_negative_int_value(value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.negative_int_value) } // optional double double_value = 6; +inline bool UninterpretedOption::_internal_has_double_value() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} inline bool UninterpretedOption::has_double_value() const { - return (_has_bits_[0] & 0x00000020u) != 0; + return _internal_has_double_value(); } inline void UninterpretedOption::clear_double_value() { double_value_ = 0; _has_bits_[0] &= ~0x00000020u; } -inline double UninterpretedOption::double_value() const { - // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.double_value) +inline double UninterpretedOption::_internal_double_value() const { return double_value_; } -inline void UninterpretedOption::set_double_value(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; +} +inline void UninterpretedOption::set_double_value(double value) { + _internal_set_double_value(value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.double_value) } // optional bytes string_value = 7; +inline bool UninterpretedOption::_internal_has_string_value() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} inline bool UninterpretedOption::has_string_value() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_string_value(); } inline void UninterpretedOption::clear_string_value() { - string_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + string_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000002u; } inline const std::string& UninterpretedOption::string_value() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.string_value) - return string_value_.Get(); + return _internal_string_value(); } inline void UninterpretedOption::set_string_value(const std::string& value) { - _has_bits_[0] |= 0x00000002u; - string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_string_value(value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.string_value) } +inline std::string* UninterpretedOption::mutable_string_value() { + // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.string_value) + return _internal_mutable_string_value(); +} +inline const std::string& UninterpretedOption::_internal_string_value() const { + return string_value_.Get(); +} +inline void UninterpretedOption::_internal_set_string_value(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void UninterpretedOption::set_string_value(std::string&& value) { _has_bits_[0] |= 0x00000002u; string_value_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.string_value) } inline void UninterpretedOption::set_string_value(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000002u; string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.string_value) } inline void UninterpretedOption::set_string_value(const void* value, size_t size) { _has_bits_[0] |= 0x00000002u; string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.string_value) } -inline std::string* UninterpretedOption::mutable_string_value() { +inline std::string* UninterpretedOption::_internal_mutable_string_value() { _has_bits_[0] |= 0x00000002u; - // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.string_value) - return string_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return string_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* UninterpretedOption::release_string_value() { // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.string_value) - if (!has_string_value()) { + if (!_internal_has_string_value()) { return nullptr; } _has_bits_[0] &= ~0x00000002u; - return string_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return string_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void UninterpretedOption::set_allocated_string_value(std::string* string_value) { if (string_value != nullptr) { @@ -10950,78 +12996,91 @@ inline void UninterpretedOption::set_allocated_string_value(std::string* string_ _has_bits_[0] &= ~0x00000002u; } string_value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), string_value, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.string_value) } inline std::string* UninterpretedOption::unsafe_arena_release_string_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.UninterpretedOption.string_value) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000002u; return string_value_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void UninterpretedOption::unsafe_arena_set_allocated_string_value( std::string* string_value) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (string_value != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } string_value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - string_value, GetArenaNoVirtual()); + string_value, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.UninterpretedOption.string_value) } // optional string aggregate_value = 8; +inline bool UninterpretedOption::_internal_has_aggregate_value() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} inline bool UninterpretedOption::has_aggregate_value() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return _internal_has_aggregate_value(); } inline void UninterpretedOption::clear_aggregate_value() { - aggregate_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + aggregate_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000004u; } inline const std::string& UninterpretedOption::aggregate_value() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.aggregate_value) - return aggregate_value_.Get(); + return _internal_aggregate_value(); } inline void UninterpretedOption::set_aggregate_value(const std::string& value) { - _has_bits_[0] |= 0x00000004u; - aggregate_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_aggregate_value(value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.aggregate_value) } +inline std::string* UninterpretedOption::mutable_aggregate_value() { + // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.aggregate_value) + return _internal_mutable_aggregate_value(); +} +inline const std::string& UninterpretedOption::_internal_aggregate_value() const { + return aggregate_value_.Get(); +} +inline void UninterpretedOption::_internal_set_aggregate_value(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + aggregate_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void UninterpretedOption::set_aggregate_value(std::string&& value) { _has_bits_[0] |= 0x00000004u; aggregate_value_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.aggregate_value) } inline void UninterpretedOption::set_aggregate_value(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000004u; aggregate_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.aggregate_value) } inline void UninterpretedOption::set_aggregate_value(const char* value, size_t size) { _has_bits_[0] |= 0x00000004u; aggregate_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.aggregate_value) } -inline std::string* UninterpretedOption::mutable_aggregate_value() { +inline std::string* UninterpretedOption::_internal_mutable_aggregate_value() { _has_bits_[0] |= 0x00000004u; - // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.aggregate_value) - return aggregate_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return aggregate_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* UninterpretedOption::release_aggregate_value() { // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.aggregate_value) - if (!has_aggregate_value()) { + if (!_internal_has_aggregate_value()) { return nullptr; } _has_bits_[0] &= ~0x00000004u; - return aggregate_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return aggregate_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void UninterpretedOption::set_allocated_aggregate_value(std::string* aggregate_value) { if (aggregate_value != nullptr) { @@ -11030,26 +13089,26 @@ inline void UninterpretedOption::set_allocated_aggregate_value(std::string* aggr _has_bits_[0] &= ~0x00000004u; } aggregate_value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), aggregate_value, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.aggregate_value) } inline std::string* UninterpretedOption::unsafe_arena_release_aggregate_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.UninterpretedOption.aggregate_value) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000004u; return aggregate_value_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void UninterpretedOption::unsafe_arena_set_allocated_aggregate_value( std::string* aggregate_value) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (aggregate_value != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } aggregate_value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - aggregate_value, GetArenaNoVirtual()); + aggregate_value, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.UninterpretedOption.aggregate_value) } @@ -11058,114 +13117,161 @@ inline void UninterpretedOption::unsafe_arena_set_allocated_aggregate_value( // SourceCodeInfo_Location // repeated int32 path = 1 [packed = true]; -inline int SourceCodeInfo_Location::path_size() const { +inline int SourceCodeInfo_Location::_internal_path_size() const { return path_.size(); } +inline int SourceCodeInfo_Location::path_size() const { + return _internal_path_size(); +} inline void SourceCodeInfo_Location::clear_path() { path_.Clear(); } +inline ::PROTOBUF_NAMESPACE_ID::int32 SourceCodeInfo_Location::_internal_path(int index) const { + return path_.Get(index); +} inline ::PROTOBUF_NAMESPACE_ID::int32 SourceCodeInfo_Location::path(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.path) - return path_.Get(index); + return _internal_path(index); } inline void SourceCodeInfo_Location::set_path(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) { path_.Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.path) } -inline void SourceCodeInfo_Location::add_path(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void SourceCodeInfo_Location::_internal_add_path(::PROTOBUF_NAMESPACE_ID::int32 value) { path_.Add(value); +} +inline void SourceCodeInfo_Location::add_path(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_add_path(value); // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.path) } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& +SourceCodeInfo_Location::_internal_path() const { + return path_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& SourceCodeInfo_Location::path() const { // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.path) - return path_; + return _internal_path(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* +SourceCodeInfo_Location::_internal_mutable_path() { + return &path_; } inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* SourceCodeInfo_Location::mutable_path() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.path) - return &path_; + return _internal_mutable_path(); } // repeated int32 span = 2 [packed = true]; -inline int SourceCodeInfo_Location::span_size() const { +inline int SourceCodeInfo_Location::_internal_span_size() const { return span_.size(); } +inline int SourceCodeInfo_Location::span_size() const { + return _internal_span_size(); +} inline void SourceCodeInfo_Location::clear_span() { span_.Clear(); } +inline ::PROTOBUF_NAMESPACE_ID::int32 SourceCodeInfo_Location::_internal_span(int index) const { + return span_.Get(index); +} inline ::PROTOBUF_NAMESPACE_ID::int32 SourceCodeInfo_Location::span(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.span) - return span_.Get(index); + return _internal_span(index); } inline void SourceCodeInfo_Location::set_span(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) { span_.Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.span) } -inline void SourceCodeInfo_Location::add_span(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void SourceCodeInfo_Location::_internal_add_span(::PROTOBUF_NAMESPACE_ID::int32 value) { span_.Add(value); +} +inline void SourceCodeInfo_Location::add_span(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_add_span(value); // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.span) } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& +SourceCodeInfo_Location::_internal_span() const { + return span_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& SourceCodeInfo_Location::span() const { // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.span) - return span_; + return _internal_span(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* +SourceCodeInfo_Location::_internal_mutable_span() { + return &span_; } inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* SourceCodeInfo_Location::mutable_span() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.span) - return &span_; + return _internal_mutable_span(); } // optional string leading_comments = 3; +inline bool SourceCodeInfo_Location::_internal_has_leading_comments() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool SourceCodeInfo_Location::has_leading_comments() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_leading_comments(); } inline void SourceCodeInfo_Location::clear_leading_comments() { - leading_comments_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + leading_comments_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& SourceCodeInfo_Location::leading_comments() const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_comments) - return leading_comments_.Get(); + return _internal_leading_comments(); } inline void SourceCodeInfo_Location::set_leading_comments(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - leading_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_leading_comments(value); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_comments) } +inline std::string* SourceCodeInfo_Location::mutable_leading_comments() { + // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_comments) + return _internal_mutable_leading_comments(); +} +inline const std::string& SourceCodeInfo_Location::_internal_leading_comments() const { + return leading_comments_.Get(); +} +inline void SourceCodeInfo_Location::_internal_set_leading_comments(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + leading_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void SourceCodeInfo_Location::set_leading_comments(std::string&& value) { _has_bits_[0] |= 0x00000001u; leading_comments_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.SourceCodeInfo.Location.leading_comments) } inline void SourceCodeInfo_Location::set_leading_comments(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; leading_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_comments) } inline void SourceCodeInfo_Location::set_leading_comments(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; leading_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_comments) } -inline std::string* SourceCodeInfo_Location::mutable_leading_comments() { +inline std::string* SourceCodeInfo_Location::_internal_mutable_leading_comments() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_comments) - return leading_comments_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return leading_comments_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* SourceCodeInfo_Location::release_leading_comments() { // @@protoc_insertion_point(field_release:google.protobuf.SourceCodeInfo.Location.leading_comments) - if (!has_leading_comments()) { + if (!_internal_has_leading_comments()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return leading_comments_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return leading_comments_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void SourceCodeInfo_Location::set_allocated_leading_comments(std::string* leading_comments) { if (leading_comments != nullptr) { @@ -11174,78 +13280,91 @@ inline void SourceCodeInfo_Location::set_allocated_leading_comments(std::string* _has_bits_[0] &= ~0x00000001u; } leading_comments_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), leading_comments, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.leading_comments) } inline std::string* SourceCodeInfo_Location::unsafe_arena_release_leading_comments() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.SourceCodeInfo.Location.leading_comments) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000001u; return leading_comments_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void SourceCodeInfo_Location::unsafe_arena_set_allocated_leading_comments( std::string* leading_comments) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (leading_comments != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } leading_comments_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - leading_comments, GetArenaNoVirtual()); + leading_comments, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.SourceCodeInfo.Location.leading_comments) } // optional string trailing_comments = 4; +inline bool SourceCodeInfo_Location::_internal_has_trailing_comments() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} inline bool SourceCodeInfo_Location::has_trailing_comments() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_trailing_comments(); } inline void SourceCodeInfo_Location::clear_trailing_comments() { - trailing_comments_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + trailing_comments_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000002u; } inline const std::string& SourceCodeInfo_Location::trailing_comments() const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.trailing_comments) - return trailing_comments_.Get(); + return _internal_trailing_comments(); } inline void SourceCodeInfo_Location::set_trailing_comments(const std::string& value) { - _has_bits_[0] |= 0x00000002u; - trailing_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_trailing_comments(value); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.trailing_comments) } +inline std::string* SourceCodeInfo_Location::mutable_trailing_comments() { + // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.trailing_comments) + return _internal_mutable_trailing_comments(); +} +inline const std::string& SourceCodeInfo_Location::_internal_trailing_comments() const { + return trailing_comments_.Get(); +} +inline void SourceCodeInfo_Location::_internal_set_trailing_comments(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + trailing_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void SourceCodeInfo_Location::set_trailing_comments(std::string&& value) { _has_bits_[0] |= 0x00000002u; trailing_comments_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.SourceCodeInfo.Location.trailing_comments) } inline void SourceCodeInfo_Location::set_trailing_comments(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000002u; trailing_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.trailing_comments) } inline void SourceCodeInfo_Location::set_trailing_comments(const char* value, size_t size) { _has_bits_[0] |= 0x00000002u; trailing_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.trailing_comments) } -inline std::string* SourceCodeInfo_Location::mutable_trailing_comments() { +inline std::string* SourceCodeInfo_Location::_internal_mutable_trailing_comments() { _has_bits_[0] |= 0x00000002u; - // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.trailing_comments) - return trailing_comments_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return trailing_comments_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* SourceCodeInfo_Location::release_trailing_comments() { // @@protoc_insertion_point(field_release:google.protobuf.SourceCodeInfo.Location.trailing_comments) - if (!has_trailing_comments()) { + if (!_internal_has_trailing_comments()) { return nullptr; } _has_bits_[0] &= ~0x00000002u; - return trailing_comments_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return trailing_comments_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void SourceCodeInfo_Location::set_allocated_trailing_comments(std::string* trailing_comments) { if (trailing_comments != nullptr) { @@ -11254,39 +13373,49 @@ inline void SourceCodeInfo_Location::set_allocated_trailing_comments(std::string _has_bits_[0] &= ~0x00000002u; } trailing_comments_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), trailing_comments, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.trailing_comments) } inline std::string* SourceCodeInfo_Location::unsafe_arena_release_trailing_comments() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.SourceCodeInfo.Location.trailing_comments) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000002u; return trailing_comments_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void SourceCodeInfo_Location::unsafe_arena_set_allocated_trailing_comments( std::string* trailing_comments) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (trailing_comments != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } trailing_comments_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - trailing_comments, GetArenaNoVirtual()); + trailing_comments, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.SourceCodeInfo.Location.trailing_comments) } // repeated string leading_detached_comments = 6; -inline int SourceCodeInfo_Location::leading_detached_comments_size() const { +inline int SourceCodeInfo_Location::_internal_leading_detached_comments_size() const { return 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(); } +inline std::string* SourceCodeInfo_Location::add_leading_detached_comments() { + // @@protoc_insertion_point(field_add_mutable:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) + return _internal_add_leading_detached_comments(); +} +inline const std::string& SourceCodeInfo_Location::_internal_leading_detached_comments(int index) const { + return leading_detached_comments_.Get(index); +} inline const std::string& SourceCodeInfo_Location::leading_detached_comments(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) - return leading_detached_comments_.Get(index); + return _internal_leading_detached_comments(index); } inline std::string* SourceCodeInfo_Location::mutable_leading_detached_comments(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) @@ -11310,8 +13439,7 @@ inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, co reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } -inline std::string* SourceCodeInfo_Location::add_leading_detached_comments() { - // @@protoc_insertion_point(field_add_mutable:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) +inline std::string* SourceCodeInfo_Location::_internal_add_leading_detached_comments() { return leading_detached_comments_.Add(); } inline void SourceCodeInfo_Location::add_leading_detached_comments(const std::string& value) { @@ -11347,9 +13475,12 @@ SourceCodeInfo_Location::mutable_leading_detached_comments() { // SourceCodeInfo // repeated .google.protobuf.SourceCodeInfo.Location location = 1; -inline int SourceCodeInfo::location_size() const { +inline int SourceCodeInfo::_internal_location_size() const { return location_.size(); } +inline int SourceCodeInfo::location_size() const { + return _internal_location_size(); +} inline void SourceCodeInfo::clear_location() { location_.Clear(); } @@ -11362,13 +13493,19 @@ SourceCodeInfo::mutable_location() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.location) return &location_; } +inline const PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location& SourceCodeInfo::_internal_location(int index) const { + return 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 location_.Get(index); + return _internal_location(index); +} +inline PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* SourceCodeInfo::_internal_add_location() { + return location_.Add(); } inline PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* SourceCodeInfo::add_location() { // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.location) - return location_.Add(); + return _internal_add_location(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location >& SourceCodeInfo::location() const { @@ -11381,84 +13518,114 @@ SourceCodeInfo::location() const { // GeneratedCodeInfo_Annotation // repeated int32 path = 1 [packed = true]; -inline int GeneratedCodeInfo_Annotation::path_size() const { +inline int GeneratedCodeInfo_Annotation::_internal_path_size() const { return path_.size(); } +inline int GeneratedCodeInfo_Annotation::path_size() const { + return _internal_path_size(); +} inline void GeneratedCodeInfo_Annotation::clear_path() { path_.Clear(); } +inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::_internal_path(int index) const { + return path_.Get(index); +} inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::path(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.path) - return path_.Get(index); + return _internal_path(index); } inline void GeneratedCodeInfo_Annotation::set_path(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) { path_.Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.path) } -inline void GeneratedCodeInfo_Annotation::add_path(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void GeneratedCodeInfo_Annotation::_internal_add_path(::PROTOBUF_NAMESPACE_ID::int32 value) { path_.Add(value); +} +inline void GeneratedCodeInfo_Annotation::add_path(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_add_path(value); // @@protoc_insertion_point(field_add:google.protobuf.GeneratedCodeInfo.Annotation.path) } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& +GeneratedCodeInfo_Annotation::_internal_path() const { + return path_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& GeneratedCodeInfo_Annotation::path() const { // @@protoc_insertion_point(field_list:google.protobuf.GeneratedCodeInfo.Annotation.path) - return path_; + return _internal_path(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* +GeneratedCodeInfo_Annotation::_internal_mutable_path() { + return &path_; } inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* GeneratedCodeInfo_Annotation::mutable_path() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.GeneratedCodeInfo.Annotation.path) - return &path_; + return _internal_mutable_path(); } // optional string source_file = 2; +inline bool GeneratedCodeInfo_Annotation::_internal_has_source_file() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} inline bool GeneratedCodeInfo_Annotation::has_source_file() const { - return (_has_bits_[0] & 0x00000001u) != 0; + return _internal_has_source_file(); } inline void GeneratedCodeInfo_Annotation::clear_source_file() { - source_file_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + source_file_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _has_bits_[0] &= ~0x00000001u; } inline const std::string& GeneratedCodeInfo_Annotation::source_file() const { // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.source_file) - return source_file_.Get(); + return _internal_source_file(); } inline void GeneratedCodeInfo_Annotation::set_source_file(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - source_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_source_file(value); // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.source_file) } +inline std::string* GeneratedCodeInfo_Annotation::mutable_source_file() { + // @@protoc_insertion_point(field_mutable:google.protobuf.GeneratedCodeInfo.Annotation.source_file) + return _internal_mutable_source_file(); +} +inline const std::string& GeneratedCodeInfo_Annotation::_internal_source_file() const { + return source_file_.Get(); +} +inline void GeneratedCodeInfo_Annotation::_internal_set_source_file(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + source_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void GeneratedCodeInfo_Annotation::set_source_file(std::string&& value) { _has_bits_[0] |= 0x00000001u; source_file_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.GeneratedCodeInfo.Annotation.source_file) } inline void GeneratedCodeInfo_Annotation::set_source_file(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; source_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.GeneratedCodeInfo.Annotation.source_file) } inline void GeneratedCodeInfo_Annotation::set_source_file(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; source_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.GeneratedCodeInfo.Annotation.source_file) } -inline std::string* GeneratedCodeInfo_Annotation::mutable_source_file() { +inline std::string* GeneratedCodeInfo_Annotation::_internal_mutable_source_file() { _has_bits_[0] |= 0x00000001u; - // @@protoc_insertion_point(field_mutable:google.protobuf.GeneratedCodeInfo.Annotation.source_file) - return source_file_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return source_file_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* GeneratedCodeInfo_Annotation::release_source_file() { // @@protoc_insertion_point(field_release:google.protobuf.GeneratedCodeInfo.Annotation.source_file) - if (!has_source_file()) { + if (!_internal_has_source_file()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return source_file_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return source_file_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void GeneratedCodeInfo_Annotation::set_allocated_source_file(std::string* source_file) { if (source_file != nullptr) { @@ -11467,62 +13634,82 @@ inline void GeneratedCodeInfo_Annotation::set_allocated_source_file(std::string* _has_bits_[0] &= ~0x00000001u; } source_file_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), source_file, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.GeneratedCodeInfo.Annotation.source_file) } inline std::string* GeneratedCodeInfo_Annotation::unsafe_arena_release_source_file() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.GeneratedCodeInfo.Annotation.source_file) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); _has_bits_[0] &= ~0x00000001u; return source_file_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void GeneratedCodeInfo_Annotation::unsafe_arena_set_allocated_source_file( std::string* source_file) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (source_file != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } source_file_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - source_file, GetArenaNoVirtual()); + source_file, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.GeneratedCodeInfo.Annotation.source_file) } // optional int32 begin = 3; +inline bool GeneratedCodeInfo_Annotation::_internal_has_begin() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} inline bool GeneratedCodeInfo_Annotation::has_begin() const { - return (_has_bits_[0] & 0x00000002u) != 0; + return _internal_has_begin(); } inline void GeneratedCodeInfo_Annotation::clear_begin() { begin_ = 0; _has_bits_[0] &= ~0x00000002u; } -inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::begin() const { - // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.begin) +inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::_internal_begin() const { return begin_; } -inline void GeneratedCodeInfo_Annotation::set_begin(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::begin() const { + // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.begin) + return _internal_begin(); +} +inline void GeneratedCodeInfo_Annotation::_internal_set_begin(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000002u; begin_ = value; +} +inline void GeneratedCodeInfo_Annotation::set_begin(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_begin(value); // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.begin) } // optional int32 end = 4; +inline bool GeneratedCodeInfo_Annotation::_internal_has_end() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} inline bool GeneratedCodeInfo_Annotation::has_end() const { - return (_has_bits_[0] & 0x00000004u) != 0; + return _internal_has_end(); } inline void GeneratedCodeInfo_Annotation::clear_end() { end_ = 0; _has_bits_[0] &= ~0x00000004u; } -inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::end() const { - // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.end) +inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::_internal_end() const { return end_; } -inline void GeneratedCodeInfo_Annotation::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::end() const { + // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.end) + return _internal_end(); +} +inline void GeneratedCodeInfo_Annotation::_internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000004u; end_ = value; +} +inline void GeneratedCodeInfo_Annotation::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_end(value); // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.end) } @@ -11531,9 +13718,12 @@ inline void GeneratedCodeInfo_Annotation::set_end(::PROTOBUF_NAMESPACE_ID::int32 // GeneratedCodeInfo // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; -inline int GeneratedCodeInfo::annotation_size() const { +inline int GeneratedCodeInfo::_internal_annotation_size() const { return annotation_.size(); } +inline int GeneratedCodeInfo::annotation_size() const { + return _internal_annotation_size(); +} inline void GeneratedCodeInfo::clear_annotation() { annotation_.Clear(); } @@ -11546,13 +13736,19 @@ GeneratedCodeInfo::mutable_annotation() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.GeneratedCodeInfo.annotation) return &annotation_; } +inline const PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation& GeneratedCodeInfo::_internal_annotation(int index) const { + return 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 annotation_.Get(index); + return _internal_annotation(index); +} +inline PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::_internal_add_annotation() { + return annotation_.Add(); } inline PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::add_annotation() { // @@protoc_insertion_point(field_add:google.protobuf.GeneratedCodeInfo.annotation) - return annotation_.Add(); + return _internal_add_annotation(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation >& GeneratedCodeInfo::annotation() const { diff --git a/third_party/protobuf/src/google/protobuf/descriptor.proto b/third_party/protobuf/src/google/protobuf/descriptor.proto index d5d794f5..d29fdec5 100644 --- a/third_party/protobuf/src/google/protobuf/descriptor.proto +++ b/third_party/protobuf/src/google/protobuf/descriptor.proto @@ -101,8 +101,8 @@ message DescriptorProto { repeated EnumDescriptorProto enum_type = 4; message ExtensionRange { - optional int32 start = 1; - optional int32 end = 2; + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. optional ExtensionRangeOptions options = 3; } @@ -129,6 +129,7 @@ message ExtensionRangeOptions { // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; + // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; } @@ -212,6 +213,29 @@ message FieldDescriptorProto { optional string json_name = 10; optional FieldOptions options = 8; + + // If true, this is a proto3 "optional". When a proto3 field is optional, it + // tracks presence regardless of field type. + // + // When proto3_optional is true, this field must be belong to a oneof to + // signal to old proto3 clients that presence is tracked for this field. This + // oneof is known as a "synthetic" oneof, and this field must be its sole + // member (each proto3 optional field gets its own synthetic oneof). Synthetic + // oneofs exist in the descriptor only, and do not generate any API. Synthetic + // oneofs must be ordered after all "real" oneofs. + // + // For message fields, proto3_optional doesn't create any semantic change, + // since non-repeated message fields always track presence. However it still + // indicates the semantic detail of whether the user wrote "optional" or not. + // This can be useful for round-tripping the .proto file. For consistency we + // give message fields a synthetic oneof also, even though it is not required + // to track presence. This is especially important because the parser can't + // tell if a field is a message or an enum, so it must always create a + // synthetic oneof. + // + // Proto2 optional fields do not set this flag, because they already indicate + // optional with `LABEL_OPTIONAL`. + optional bool proto3_optional = 17; } // Describes a oneof. @@ -369,6 +393,7 @@ message FileOptions { + // Should generic services be generated in each language? "Generic" services // are not specific to any particular RPC system. They are generated by the // main code generators in each language (without additional plugins). @@ -392,7 +417,7 @@ message FileOptions { // Enables the use of arenas for the proto messages in this file. This applies // only to generated classes for C++. - optional bool cc_enable_arenas = 31 [default = false]; + optional bool cc_enable_arenas = 31 [default = true]; // Sets the objective c class prefix which is prepended to all objective c @@ -427,6 +452,7 @@ message FileOptions { // determining the ruby package. optional string ruby_package = 45; + // The parser stores options it doesn't recognize here. // See the documentation for the "Options" section above. repeated UninterpretedOption uninterpreted_option = 999; @@ -496,6 +522,7 @@ message MessageOptions { reserved 8; // javalite_serializable reserved 9; // javanano_as_lite + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; diff --git a/third_party/protobuf/src/google/protobuf/descriptor_database.cc b/third_party/protobuf/src/google/protobuf/descriptor_database.cc index 4f2a7669..30f8bdec 100644 --- a/third_party/protobuf/src/google/protobuf/descriptor_database.cc +++ b/third_party/protobuf/src/google/protobuf/descriptor_database.cc @@ -38,7 +38,6 @@ #include #include - #include #include @@ -111,6 +110,9 @@ bool DescriptorDatabase::FindAllMessageNames(std::vector* output) { // =================================================================== +SimpleDescriptorDatabase::SimpleDescriptorDatabase() {} +SimpleDescriptorDatabase::~SimpleDescriptorDatabase() {} + template bool SimpleDescriptorDatabase::DescriptorIndex::AddFile( const FileDescriptorProto& file, Value value) { @@ -127,14 +129,15 @@ bool SimpleDescriptorDatabase::DescriptorIndex::AddFile( for (int i = 0; i < file.message_type_size(); i++) { if (!AddSymbol(path + file.message_type(i).name(), value)) return false; - if (!AddNestedExtensions(file.message_type(i), value)) return false; + if (!AddNestedExtensions(file.name(), file.message_type(i), value)) + return false; } for (int i = 0; i < file.enum_type_size(); i++) { if (!AddSymbol(path + file.enum_type(i).name(), value)) return false; } for (int i = 0; i < file.extension_size(); i++) { if (!AddSymbol(path + file.extension(i).name(), value)) return false; - if (!AddExtension(file.extension(i), value)) return false; + if (!AddExtension(file.name(), file.extension(i), value)) return false; } for (int i = 0; i < file.service_size(); i++) { if (!AddSymbol(path + file.service(i).name(), value)) return false; @@ -203,19 +206,22 @@ bool SimpleDescriptorDatabase::DescriptorIndex::AddSymbol( template bool SimpleDescriptorDatabase::DescriptorIndex::AddNestedExtensions( - const DescriptorProto& message_type, Value value) { + const std::string& filename, const DescriptorProto& message_type, + Value value) { for (int i = 0; i < message_type.nested_type_size(); i++) { - if (!AddNestedExtensions(message_type.nested_type(i), value)) return false; + if (!AddNestedExtensions(filename, message_type.nested_type(i), value)) + return false; } for (int i = 0; i < message_type.extension_size(); i++) { - if (!AddExtension(message_type.extension(i), value)) return false; + if (!AddExtension(filename, message_type.extension(i), value)) return false; } return true; } template bool SimpleDescriptorDatabase::DescriptorIndex::AddExtension( - const FieldDescriptorProto& field, Value value) { + const std::string& filename, const FieldDescriptorProto& field, + Value value) { if (!field.extendee().empty() && field.extendee()[0] == '.') { // The extension is fully-qualified. We can use it as a lookup key in // the by_symbol_ table. @@ -226,7 +232,7 @@ bool SimpleDescriptorDatabase::DescriptorIndex::AddExtension( GOOGLE_LOG(ERROR) << "Extension conflicts with extension already in database: " "extend " << field.extendee() << " { " << field.name() << " = " - << field.number() << " }"; + << field.number() << " } from:" << filename; return false; } } else { @@ -324,11 +330,6 @@ bool SimpleDescriptorDatabase::DescriptorIndex::ValidateSymbolName( // ------------------------------------------------------------------- -SimpleDescriptorDatabase::SimpleDescriptorDatabase() {} -SimpleDescriptorDatabase::~SimpleDescriptorDatabase() { - STLDeleteElements(&files_to_delete_); -} - bool SimpleDescriptorDatabase::Add(const FileDescriptorProto& file) { FileDescriptorProto* new_file = new FileDescriptorProto; new_file->CopyFrom(file); @@ -336,7 +337,7 @@ bool SimpleDescriptorDatabase::Add(const FileDescriptorProto& file) { } bool SimpleDescriptorDatabase::AddAndOwn(const FileDescriptorProto* file) { - files_to_delete_.push_back(file); + files_to_delete_.emplace_back(file); return index_.AddFile(*file, file); } @@ -386,9 +387,10 @@ EncodedDescriptorDatabase::~EncodedDescriptorDatabase() { bool EncodedDescriptorDatabase::Add(const void* encoded_file_descriptor, int size) { - FileDescriptorProto file; - if (file.ParseFromArray(encoded_file_descriptor, size)) { - return index_.AddFile(file, std::make_pair(encoded_file_descriptor, size)); + google::protobuf::Arena arena; + auto* file = google::protobuf::Arena::CreateMessage(&arena); + if (file->ParseFromArray(encoded_file_descriptor, size)) { + return index_.AddFile(*file, std::make_pair(encoded_file_descriptor, size)); } else { GOOGLE_LOG(ERROR) << "Invalid file descriptor data passed to " "EncodedDescriptorDatabase::Add()."; @@ -454,6 +456,12 @@ bool EncodedDescriptorDatabase::FindAllExtensionNumbers( return index_.FindAllExtensionNumbers(extendee_type, output); } +bool EncodedDescriptorDatabase::FindAllFileNames( + std::vector* output) { + index_.FindAllFileNames(output); + return true; +} + bool EncodedDescriptorDatabase::MaybeParse( std::pair encoded_file, FileDescriptorProto* output) { if (encoded_file.first == NULL) return false; diff --git a/third_party/protobuf/src/google/protobuf/descriptor_database.h b/third_party/protobuf/src/google/protobuf/descriptor_database.h index b79cfadd..4009f339 100644 --- a/third_party/protobuf/src/google/protobuf/descriptor_database.h +++ b/third_party/protobuf/src/google/protobuf/descriptor_database.h @@ -47,7 +47,7 @@ #include #ifdef SWIG -#define PROTOBUF_EXPORT +#error "You cannot SWIG proto headers" #endif namespace google { @@ -116,7 +116,7 @@ class PROTOBUF_EXPORT DescriptorDatabase { // // This method has a default implementation that always returns // false. - virtual bool FindAllFileNames(std::vector* output) { + virtual bool FindAllFileNames(std::vector* /*output*/) { return false; } @@ -199,8 +199,10 @@ class PROTOBUF_EXPORT SimpleDescriptorDatabase : public DescriptorDatabase { // to the index. bool AddFile(const FileDescriptorProto& file, Value value); bool AddSymbol(const std::string& name, Value value); - bool AddNestedExtensions(const DescriptorProto& message_type, Value value); - bool AddExtension(const FieldDescriptorProto& field, Value value); + bool AddNestedExtensions(const std::string& filename, + const DescriptorProto& message_type, Value value); + bool AddExtension(const std::string& filename, + const FieldDescriptorProto& field, Value value); Value FindFile(const std::string& filename); Value FindSymbol(const std::string& name); @@ -282,7 +284,7 @@ class PROTOBUF_EXPORT SimpleDescriptorDatabase : public DescriptorDatabase { }; DescriptorIndex index_; - std::vector files_to_delete_; + std::vector> files_to_delete_; // If file is non-NULL, copy it into *output and return true, otherwise // return false. @@ -327,6 +329,7 @@ class PROTOBUF_EXPORT EncodedDescriptorDatabase : public DescriptorDatabase { FileDescriptorProto* output) override; bool FindAllExtensionNumbers(const std::string& extendee_type, std::vector* output) override; + bool FindAllFileNames(std::vector* output) override; private: SimpleDescriptorDatabase::DescriptorIndex > diff --git a/third_party/protobuf/src/google/protobuf/descriptor_unittest.cc b/third_party/protobuf/src/google/protobuf/descriptor_unittest.cc index f87947ff..844d99ce 100644 --- a/third_party/protobuf/src/google/protobuf/descriptor_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/descriptor_unittest.cc @@ -42,6 +42,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -51,15 +55,10 @@ #include #include #include -#include - -#include -#include -#include -#include #include #include #include +#include #include @@ -206,7 +205,7 @@ class MockErrorCollector : public DescriptorPool::ErrorCollector { void AddError(const std::string& filename, const std::string& element_name, const Message* descriptor, ErrorLocation location, const std::string& message) { - const char* location_name = NULL; + const char* location_name = nullptr; switch (location) { case NAME: location_name = "NAME"; @@ -244,14 +243,14 @@ class MockErrorCollector : public DescriptorPool::ErrorCollector { } strings::SubstituteAndAppend(&text_, "$0: $1: $2: $3\n", filename, - element_name, location_name, message); + element_name, location_name, message); } // implements ErrorCollector --------------------------------------- void AddWarning(const std::string& filename, const std::string& element_name, const Message* descriptor, ErrorLocation location, const std::string& message) { - const char* location_name = NULL; + const char* location_name = nullptr; switch (location) { case NAME: location_name = "NAME"; @@ -288,8 +287,9 @@ class MockErrorCollector : public DescriptorPool::ErrorCollector { break; } - strings::SubstituteAndAppend(&warning_text_, "$0: $1: $2: $3\n", filename, - element_name, location_name, message); + strings::SubstituteAndAppend(&warning_text_, "$0: $1: $2: $3\n", + filename, element_name, location_name, + message); } }; @@ -343,13 +343,13 @@ class FileDescriptorTest : public testing::Test { // Build the descriptors and get the pointers. foo_file_ = pool_.BuildFile(foo_file); - ASSERT_TRUE(foo_file_ != NULL); + ASSERT_TRUE(foo_file_ != nullptr); bar_file_ = pool_.BuildFile(bar_file); - ASSERT_TRUE(bar_file_ != NULL); + ASSERT_TRUE(bar_file_ != nullptr); baz_file_ = pool_.BuildFile(baz_file); - ASSERT_TRUE(baz_file_ != NULL); + ASSERT_TRUE(baz_file_ != nullptr); ASSERT_EQ(1, foo_file_->message_type_count()); foo_message_ = foo_file_->message_type(0); @@ -414,67 +414,67 @@ TEST_F(FileDescriptorTest, FindMessageTypeByName) { EXPECT_EQ(foo_message_, foo_file_->FindMessageTypeByName("FooMessage")); EXPECT_EQ(bar_message_, bar_file_->FindMessageTypeByName("BarMessage")); - EXPECT_TRUE(foo_file_->FindMessageTypeByName("BarMessage") == NULL); - EXPECT_TRUE(bar_file_->FindMessageTypeByName("FooMessage") == NULL); - EXPECT_TRUE(baz_file_->FindMessageTypeByName("FooMessage") == NULL); + EXPECT_TRUE(foo_file_->FindMessageTypeByName("BarMessage") == nullptr); + EXPECT_TRUE(bar_file_->FindMessageTypeByName("FooMessage") == nullptr); + EXPECT_TRUE(baz_file_->FindMessageTypeByName("FooMessage") == nullptr); - EXPECT_TRUE(foo_file_->FindMessageTypeByName("NoSuchMessage") == NULL); - EXPECT_TRUE(foo_file_->FindMessageTypeByName("FooEnum") == NULL); + EXPECT_TRUE(foo_file_->FindMessageTypeByName("NoSuchMessage") == nullptr); + EXPECT_TRUE(foo_file_->FindMessageTypeByName("FooEnum") == nullptr); } TEST_F(FileDescriptorTest, FindEnumTypeByName) { EXPECT_EQ(foo_enum_, foo_file_->FindEnumTypeByName("FooEnum")); EXPECT_EQ(bar_enum_, bar_file_->FindEnumTypeByName("BarEnum")); - EXPECT_TRUE(foo_file_->FindEnumTypeByName("BarEnum") == NULL); - EXPECT_TRUE(bar_file_->FindEnumTypeByName("FooEnum") == NULL); - EXPECT_TRUE(baz_file_->FindEnumTypeByName("FooEnum") == NULL); + EXPECT_TRUE(foo_file_->FindEnumTypeByName("BarEnum") == nullptr); + EXPECT_TRUE(bar_file_->FindEnumTypeByName("FooEnum") == nullptr); + EXPECT_TRUE(baz_file_->FindEnumTypeByName("FooEnum") == nullptr); - EXPECT_TRUE(foo_file_->FindEnumTypeByName("NoSuchEnum") == NULL); - EXPECT_TRUE(foo_file_->FindEnumTypeByName("FooMessage") == NULL); + EXPECT_TRUE(foo_file_->FindEnumTypeByName("NoSuchEnum") == nullptr); + EXPECT_TRUE(foo_file_->FindEnumTypeByName("FooMessage") == nullptr); } TEST_F(FileDescriptorTest, FindEnumValueByName) { EXPECT_EQ(foo_enum_value_, foo_file_->FindEnumValueByName("FOO_ENUM_VALUE")); EXPECT_EQ(bar_enum_value_, bar_file_->FindEnumValueByName("BAR_ENUM_VALUE")); - EXPECT_TRUE(foo_file_->FindEnumValueByName("BAR_ENUM_VALUE") == NULL); - EXPECT_TRUE(bar_file_->FindEnumValueByName("FOO_ENUM_VALUE") == NULL); - EXPECT_TRUE(baz_file_->FindEnumValueByName("FOO_ENUM_VALUE") == NULL); + EXPECT_TRUE(foo_file_->FindEnumValueByName("BAR_ENUM_VALUE") == nullptr); + EXPECT_TRUE(bar_file_->FindEnumValueByName("FOO_ENUM_VALUE") == nullptr); + EXPECT_TRUE(baz_file_->FindEnumValueByName("FOO_ENUM_VALUE") == nullptr); - EXPECT_TRUE(foo_file_->FindEnumValueByName("NO_SUCH_VALUE") == NULL); - EXPECT_TRUE(foo_file_->FindEnumValueByName("FooMessage") == NULL); + EXPECT_TRUE(foo_file_->FindEnumValueByName("NO_SUCH_VALUE") == nullptr); + EXPECT_TRUE(foo_file_->FindEnumValueByName("FooMessage") == nullptr); } TEST_F(FileDescriptorTest, FindServiceByName) { EXPECT_EQ(foo_service_, foo_file_->FindServiceByName("FooService")); EXPECT_EQ(bar_service_, bar_file_->FindServiceByName("BarService")); - EXPECT_TRUE(foo_file_->FindServiceByName("BarService") == NULL); - EXPECT_TRUE(bar_file_->FindServiceByName("FooService") == NULL); - EXPECT_TRUE(baz_file_->FindServiceByName("FooService") == NULL); + EXPECT_TRUE(foo_file_->FindServiceByName("BarService") == nullptr); + EXPECT_TRUE(bar_file_->FindServiceByName("FooService") == nullptr); + EXPECT_TRUE(baz_file_->FindServiceByName("FooService") == nullptr); - EXPECT_TRUE(foo_file_->FindServiceByName("NoSuchService") == NULL); - EXPECT_TRUE(foo_file_->FindServiceByName("FooMessage") == NULL); + EXPECT_TRUE(foo_file_->FindServiceByName("NoSuchService") == nullptr); + EXPECT_TRUE(foo_file_->FindServiceByName("FooMessage") == nullptr); } TEST_F(FileDescriptorTest, FindExtensionByName) { EXPECT_EQ(foo_extension_, foo_file_->FindExtensionByName("foo_extension")); EXPECT_EQ(bar_extension_, bar_file_->FindExtensionByName("bar_extension")); - EXPECT_TRUE(foo_file_->FindExtensionByName("bar_extension") == NULL); - EXPECT_TRUE(bar_file_->FindExtensionByName("foo_extension") == NULL); - EXPECT_TRUE(baz_file_->FindExtensionByName("foo_extension") == NULL); + EXPECT_TRUE(foo_file_->FindExtensionByName("bar_extension") == nullptr); + EXPECT_TRUE(bar_file_->FindExtensionByName("foo_extension") == nullptr); + EXPECT_TRUE(baz_file_->FindExtensionByName("foo_extension") == nullptr); - EXPECT_TRUE(foo_file_->FindExtensionByName("no_such_extension") == NULL); - EXPECT_TRUE(foo_file_->FindExtensionByName("FooMessage") == NULL); + EXPECT_TRUE(foo_file_->FindExtensionByName("no_such_extension") == nullptr); + EXPECT_TRUE(foo_file_->FindExtensionByName("FooMessage") == nullptr); } TEST_F(FileDescriptorTest, FindExtensionByNumber) { EXPECT_EQ(foo_extension_, pool_.FindExtensionByNumber(foo_message_, 1)); EXPECT_EQ(bar_extension_, pool_.FindExtensionByNumber(bar_message_, 1)); - EXPECT_TRUE(pool_.FindExtensionByNumber(foo_message_, 2) == NULL); + EXPECT_TRUE(pool_.FindExtensionByNumber(foo_message_, 2) == nullptr); } @@ -487,18 +487,18 @@ TEST_F(FileDescriptorTest, BuildAgain) { // But if we change the file then it won't work. file.set_package("some.other.package"); - EXPECT_TRUE(pool_.BuildFile(file) == NULL); + EXPECT_TRUE(pool_.BuildFile(file) == nullptr); } TEST_F(FileDescriptorTest, BuildAgainWithSyntax) { - // Test that if te call BuildFile again on the same input we get the same + // Test that if we call BuildFile again on the same input we get the same // FileDescriptor back even if syntax param is specified. FileDescriptorProto proto_syntax2; proto_syntax2.set_name("foo_syntax2"); proto_syntax2.set_syntax("proto2"); const FileDescriptor* proto2_descriptor = pool_.BuildFile(proto_syntax2); - EXPECT_TRUE(proto2_descriptor != NULL); + EXPECT_TRUE(proto2_descriptor != nullptr); EXPECT_EQ(proto2_descriptor, pool_.BuildFile(proto_syntax2)); FileDescriptorProto implicit_proto2; @@ -506,7 +506,7 @@ TEST_F(FileDescriptorTest, BuildAgainWithSyntax) { const FileDescriptor* implicit_proto2_descriptor = pool_.BuildFile(implicit_proto2); - EXPECT_TRUE(implicit_proto2_descriptor != NULL); + EXPECT_TRUE(implicit_proto2_descriptor != nullptr); // We get the same FileDescriptor back if syntax param is explicitly // specified. implicit_proto2.set_syntax("proto2"); @@ -517,7 +517,7 @@ TEST_F(FileDescriptorTest, BuildAgainWithSyntax) { proto_syntax3.set_syntax("proto3"); const FileDescriptor* proto3_descriptor = pool_.BuildFile(proto_syntax3); - EXPECT_TRUE(proto3_descriptor != NULL); + EXPECT_TRUE(proto3_descriptor != nullptr); EXPECT_EQ(proto3_descriptor, pool_.BuildFile(proto_syntax3)); } @@ -530,7 +530,7 @@ TEST_F(FileDescriptorTest, Syntax) { proto.set_syntax("proto2"); DescriptorPool pool; const FileDescriptor* file = pool.BuildFile(proto); - EXPECT_TRUE(file != NULL); + EXPECT_TRUE(file != nullptr); EXPECT_EQ(FileDescriptor::SYNTAX_PROTO2, file->syntax()); FileDescriptorProto other; file->CopyTo(&other); @@ -541,7 +541,7 @@ TEST_F(FileDescriptorTest, Syntax) { proto.set_syntax("proto3"); DescriptorPool pool; const FileDescriptor* file = pool.BuildFile(proto); - EXPECT_TRUE(file != NULL); + EXPECT_TRUE(file != nullptr); EXPECT_EQ(FileDescriptor::SYNTAX_PROTO3, file->syntax()); FileDescriptorProto other; file->CopyTo(&other); @@ -603,7 +603,7 @@ TEST_F(FileDescriptorTest, DebugStringRoundTrip) { ASSERT_EQ("", error_collector.last_error()); proto.set_name(name); const FileDescriptor* descriptor = pool.BuildFile(proto); - ASSERT_TRUE(descriptor != NULL) << proto.DebugString(); + ASSERT_TRUE(descriptor != nullptr) << proto.DebugString(); EXPECT_EQ(content, descriptor->DebugString()); } } @@ -726,16 +726,16 @@ class DescriptorTest : public testing::Test { // Build the descriptors and get the pointers. foo_file_ = pool_.BuildFile(foo_file); - ASSERT_TRUE(foo_file_ != NULL); + ASSERT_TRUE(foo_file_ != nullptr); bar_file_ = pool_.BuildFile(bar_file); - ASSERT_TRUE(bar_file_ != NULL); + ASSERT_TRUE(bar_file_ != nullptr); map_file_ = pool_.BuildFile(map_file); - ASSERT_TRUE(map_file_ != NULL); + ASSERT_TRUE(map_file_ != nullptr); json_file_ = pool_.BuildFile(json_file); - ASSERT_TRUE(json_file_ != NULL); + ASSERT_TRUE(json_file_ != nullptr); ASSERT_EQ(1, foo_file_->enum_type_count()); enum_ = foo_file_->enum_type(0); @@ -810,8 +810,8 @@ TEST_F(DescriptorTest, Name) { } TEST_F(DescriptorTest, ContainingType) { - EXPECT_TRUE(message_->containing_type() == NULL); - EXPECT_TRUE(message2_->containing_type() == NULL); + EXPECT_TRUE(message_->containing_type() == nullptr); + EXPECT_TRUE(message2_->containing_type() == nullptr); } TEST_F(DescriptorTest, FieldsByIndex) { @@ -832,14 +832,14 @@ TEST_F(DescriptorTest, FindFieldByName) { EXPECT_EQ(bar_, message_->FindFieldByName("bar")); EXPECT_EQ(baz_, message_->FindFieldByName("baz")); EXPECT_EQ(qux_, message_->FindFieldByName("qux")); - EXPECT_TRUE(message_->FindFieldByName("no_such_field") == NULL); - EXPECT_TRUE(message_->FindFieldByName("quux") == NULL); + EXPECT_TRUE(message_->FindFieldByName("no_such_field") == nullptr); + EXPECT_TRUE(message_->FindFieldByName("quux") == nullptr); EXPECT_EQ(foo2_, message2_->FindFieldByName("foo")); EXPECT_EQ(bar2_, message2_->FindFieldByName("bar")); EXPECT_EQ(quux2_, message2_->FindFieldByName("quux")); - EXPECT_TRUE(message2_->FindFieldByName("baz") == NULL); - EXPECT_TRUE(message2_->FindFieldByName("qux") == NULL); + EXPECT_TRUE(message2_->FindFieldByName("baz") == nullptr); + EXPECT_TRUE(message2_->FindFieldByName("qux") == nullptr); } TEST_F(DescriptorTest, FindFieldByNumber) { @@ -847,14 +847,14 @@ TEST_F(DescriptorTest, FindFieldByNumber) { EXPECT_EQ(bar_, message_->FindFieldByNumber(6)); EXPECT_EQ(baz_, message_->FindFieldByNumber(500000000)); EXPECT_EQ(qux_, message_->FindFieldByNumber(15)); - EXPECT_TRUE(message_->FindFieldByNumber(837592) == NULL); - EXPECT_TRUE(message_->FindFieldByNumber(2) == NULL); + EXPECT_TRUE(message_->FindFieldByNumber(837592) == nullptr); + EXPECT_TRUE(message_->FindFieldByNumber(2) == nullptr); EXPECT_EQ(foo2_, message2_->FindFieldByNumber(1)); EXPECT_EQ(bar2_, message2_->FindFieldByNumber(2)); EXPECT_EQ(quux2_, message2_->FindFieldByNumber(6)); - EXPECT_TRUE(message2_->FindFieldByNumber(15) == NULL); - EXPECT_TRUE(message2_->FindFieldByNumber(500000000) == NULL); + EXPECT_TRUE(message2_->FindFieldByNumber(15) == nullptr); + EXPECT_TRUE(message2_->FindFieldByNumber(500000000) == nullptr); } TEST_F(DescriptorTest, FieldName) { @@ -875,6 +875,34 @@ TEST_F(DescriptorTest, FieldFullName) { EXPECT_EQ("corge.grault.TestMessage2.quux", quux2_->full_name()); } +TEST_F(DescriptorTest, PrintableNameIsFullNameForNonExtensionFields) { + EXPECT_EQ("TestMessage.foo", foo_->PrintableNameForExtension()); + EXPECT_EQ("TestMessage.bar", bar_->PrintableNameForExtension()); + EXPECT_EQ("TestMessage.baz", baz_->PrintableNameForExtension()); + EXPECT_EQ("TestMessage.qux", qux_->PrintableNameForExtension()); + + EXPECT_EQ("corge.grault.TestMessage2.foo", + foo2_->PrintableNameForExtension()); + EXPECT_EQ("corge.grault.TestMessage2.bar", + bar2_->PrintableNameForExtension()); + EXPECT_EQ("corge.grault.TestMessage2.quux", + quux2_->PrintableNameForExtension()); +} + +TEST_F(DescriptorTest, PrintableNameIsFullNameForNonMessageSetExtension) { + EXPECT_EQ("protobuf_unittest.Aggregate.nested", + protobuf_unittest::Aggregate::descriptor() + ->FindExtensionByName("nested") + ->PrintableNameForExtension()); +} + +TEST_F(DescriptorTest, PrintableNameIsExtendingTypeForMessageSetExtension) { + EXPECT_EQ("protobuf_unittest.AggregateMessageSetElement", + protobuf_unittest::AggregateMessageSetElement::descriptor() + ->FindExtensionByName("message_set_extension") + ->PrintableNameForExtension()); +} + TEST_F(DescriptorTest, FieldJsonName) { EXPECT_EQ("fieldName1", message4_->field(0)->json_name()); EXPECT_EQ("fieldName2", message4_->field(1)->json_name()); @@ -971,6 +999,22 @@ TEST_F(DescriptorTest, IsMap) { EXPECT_TRUE(map_->message_type()->options().map_entry()); } +TEST_F(DescriptorTest, GetMap) { + const Descriptor* map_desc = map_->message_type(); + const FieldDescriptor* map_key = map_desc->map_key(); + ASSERT_TRUE(map_key != nullptr); + EXPECT_EQ(map_key->name(), "key"); + EXPECT_EQ(map_key->number(), 1); + + const FieldDescriptor* map_value = map_desc->map_value(); + ASSERT_TRUE(map_value != nullptr); + EXPECT_EQ(map_value->name(), "value"); + EXPECT_EQ(map_value->number(), 2); + + EXPECT_EQ(message_->map_key(), nullptr); + EXPECT_EQ(message_->map_value(), nullptr); +} + TEST_F(DescriptorTest, FieldHasDefault) { EXPECT_FALSE(foo_->has_default_value()); EXPECT_FALSE(bar_->has_default_value()); @@ -990,17 +1034,17 @@ TEST_F(DescriptorTest, FieldContainingType) { } TEST_F(DescriptorTest, FieldMessageType) { - EXPECT_TRUE(foo_->message_type() == NULL); - EXPECT_TRUE(bar_->message_type() == NULL); + EXPECT_TRUE(foo_->message_type() == nullptr); + EXPECT_TRUE(bar_->message_type() == nullptr); EXPECT_EQ(foreign_, baz_->message_type()); EXPECT_EQ(foreign_, qux_->message_type()); } TEST_F(DescriptorTest, FieldEnumType) { - EXPECT_TRUE(foo_->enum_type() == NULL); - EXPECT_TRUE(baz_->enum_type() == NULL); - EXPECT_TRUE(qux_->enum_type() == NULL); + EXPECT_TRUE(foo_->enum_type() == nullptr); + EXPECT_TRUE(baz_->enum_type() == nullptr); + EXPECT_TRUE(qux_->enum_type() == nullptr); EXPECT_EQ(enum_, bar_->enum_type()); } @@ -1050,7 +1094,7 @@ class OneofDescriptorTest : public testing::Test { // Build the descriptors and get the pointers. baz_file_ = pool_.BuildFile(baz_file); - ASSERT_TRUE(baz_file_ != NULL); + ASSERT_TRUE(baz_file_ != nullptr); ASSERT_EQ(1, baz_file_->message_type_count()); oneof_message_ = baz_file_->message_type(0); @@ -1078,8 +1122,6 @@ class OneofDescriptorTest : public testing::Test { const FieldDescriptor* b_; const FieldDescriptor* c_; const FieldDescriptor* d_; - const FieldDescriptor* e_; - const FieldDescriptor* f_; }; TEST_F(OneofDescriptorTest, Normal) { @@ -1089,7 +1131,7 @@ TEST_F(OneofDescriptorTest, Normal) { ASSERT_EQ(2, oneof_->field_count()); EXPECT_EQ(b_, oneof_->field(0)); EXPECT_EQ(c_, oneof_->field(1)); - EXPECT_TRUE(a_->containing_oneof() == NULL); + EXPECT_TRUE(a_->containing_oneof() == nullptr); EXPECT_EQ(oneof_, b_->containing_oneof()); EXPECT_EQ(oneof_, c_->containing_oneof()); } @@ -1097,7 +1139,7 @@ TEST_F(OneofDescriptorTest, Normal) { TEST_F(OneofDescriptorTest, FindByName) { EXPECT_EQ(oneof_, oneof_message_->FindOneofByName("foo")); EXPECT_EQ(oneof2_, oneof_message_->FindOneofByName("bar")); - EXPECT_TRUE(oneof_message_->FindOneofByName("no_such_oneof") == NULL); + EXPECT_TRUE(oneof_message_->FindOneofByName("no_such_oneof") == nullptr); } // =================================================================== @@ -1157,7 +1199,7 @@ class StylizedFieldNamesTest : public testing::Test { FieldDescriptorProto::TYPE_INT32); file_ = pool_.BuildFile(file); - ASSERT_TRUE(file_ != NULL); + ASSERT_TRUE(file_ != nullptr); ASSERT_EQ(2, file_->message_type_count()); message_ = file_->message_type(1); ASSERT_EQ("TestMessage", message_->name()); @@ -1215,10 +1257,10 @@ TEST_F(StylizedFieldNamesTest, FindByLowercaseName) { EXPECT_EQ(message_->field(0), message_->FindFieldByLowercaseName("foo_foo")); EXPECT_EQ(message_->field(1), message_->FindFieldByLowercaseName("foobar")); EXPECT_EQ(message_->field(2), message_->FindFieldByLowercaseName("foobaz")); - EXPECT_TRUE(message_->FindFieldByLowercaseName("FooBar") == NULL); - EXPECT_TRUE(message_->FindFieldByLowercaseName("fooBaz") == NULL); - EXPECT_TRUE(message_->FindFieldByLowercaseName("bar_foo") == NULL); - EXPECT_TRUE(message_->FindFieldByLowercaseName("nosuchfield") == NULL); + EXPECT_TRUE(message_->FindFieldByLowercaseName("FooBar") == nullptr); + EXPECT_TRUE(message_->FindFieldByLowercaseName("fooBaz") == nullptr); + EXPECT_TRUE(message_->FindFieldByLowercaseName("bar_foo") == nullptr); + EXPECT_TRUE(message_->FindFieldByLowercaseName("nosuchfield") == nullptr); EXPECT_EQ(message_->extension(0), message_->FindExtensionByLowercaseName("bar_foo")); @@ -1226,28 +1268,28 @@ TEST_F(StylizedFieldNamesTest, FindByLowercaseName) { message_->FindExtensionByLowercaseName("barbar")); EXPECT_EQ(message_->extension(2), message_->FindExtensionByLowercaseName("barbaz")); - EXPECT_TRUE(message_->FindExtensionByLowercaseName("BarBar") == NULL); - EXPECT_TRUE(message_->FindExtensionByLowercaseName("barBaz") == NULL); - EXPECT_TRUE(message_->FindExtensionByLowercaseName("foo_foo") == NULL); - EXPECT_TRUE(message_->FindExtensionByLowercaseName("nosuchfield") == NULL); + EXPECT_TRUE(message_->FindExtensionByLowercaseName("BarBar") == nullptr); + EXPECT_TRUE(message_->FindExtensionByLowercaseName("barBaz") == nullptr); + EXPECT_TRUE(message_->FindExtensionByLowercaseName("foo_foo") == nullptr); + EXPECT_TRUE(message_->FindExtensionByLowercaseName("nosuchfield") == nullptr); EXPECT_EQ(file_->extension(0), file_->FindExtensionByLowercaseName("baz_foo")); EXPECT_EQ(file_->extension(1), file_->FindExtensionByLowercaseName("bazbar")); EXPECT_EQ(file_->extension(2), file_->FindExtensionByLowercaseName("bazbaz")); - EXPECT_TRUE(file_->FindExtensionByLowercaseName("BazBar") == NULL); - EXPECT_TRUE(file_->FindExtensionByLowercaseName("bazBaz") == NULL); - EXPECT_TRUE(file_->FindExtensionByLowercaseName("nosuchfield") == NULL); + EXPECT_TRUE(file_->FindExtensionByLowercaseName("BazBar") == nullptr); + EXPECT_TRUE(file_->FindExtensionByLowercaseName("bazBaz") == nullptr); + EXPECT_TRUE(file_->FindExtensionByLowercaseName("nosuchfield") == nullptr); } TEST_F(StylizedFieldNamesTest, FindByCamelcaseName) { EXPECT_EQ(message_->field(0), message_->FindFieldByCamelcaseName("fooFoo")); EXPECT_EQ(message_->field(1), message_->FindFieldByCamelcaseName("fooBar")); EXPECT_EQ(message_->field(2), message_->FindFieldByCamelcaseName("fooBaz")); - EXPECT_TRUE(message_->FindFieldByCamelcaseName("foo_foo") == NULL); - EXPECT_TRUE(message_->FindFieldByCamelcaseName("FooBar") == NULL); - EXPECT_TRUE(message_->FindFieldByCamelcaseName("barFoo") == NULL); - EXPECT_TRUE(message_->FindFieldByCamelcaseName("nosuchfield") == NULL); + EXPECT_TRUE(message_->FindFieldByCamelcaseName("foo_foo") == nullptr); + EXPECT_TRUE(message_->FindFieldByCamelcaseName("FooBar") == nullptr); + EXPECT_TRUE(message_->FindFieldByCamelcaseName("barFoo") == nullptr); + EXPECT_TRUE(message_->FindFieldByCamelcaseName("nosuchfield") == nullptr); EXPECT_EQ(message_->extension(0), message_->FindExtensionByCamelcaseName("barFoo")); @@ -1255,17 +1297,17 @@ TEST_F(StylizedFieldNamesTest, FindByCamelcaseName) { message_->FindExtensionByCamelcaseName("barBar")); EXPECT_EQ(message_->extension(2), message_->FindExtensionByCamelcaseName("barBaz")); - EXPECT_TRUE(message_->FindExtensionByCamelcaseName("bar_foo") == NULL); - EXPECT_TRUE(message_->FindExtensionByCamelcaseName("BarBar") == NULL); - EXPECT_TRUE(message_->FindExtensionByCamelcaseName("fooFoo") == NULL); - EXPECT_TRUE(message_->FindExtensionByCamelcaseName("nosuchfield") == NULL); + EXPECT_TRUE(message_->FindExtensionByCamelcaseName("bar_foo") == nullptr); + EXPECT_TRUE(message_->FindExtensionByCamelcaseName("BarBar") == nullptr); + EXPECT_TRUE(message_->FindExtensionByCamelcaseName("fooFoo") == nullptr); + EXPECT_TRUE(message_->FindExtensionByCamelcaseName("nosuchfield") == nullptr); EXPECT_EQ(file_->extension(0), file_->FindExtensionByCamelcaseName("bazFoo")); EXPECT_EQ(file_->extension(1), file_->FindExtensionByCamelcaseName("bazBar")); EXPECT_EQ(file_->extension(2), file_->FindExtensionByCamelcaseName("bazBaz")); - EXPECT_TRUE(file_->FindExtensionByCamelcaseName("baz_foo") == NULL); - EXPECT_TRUE(file_->FindExtensionByCamelcaseName("BazBar") == NULL); - EXPECT_TRUE(file_->FindExtensionByCamelcaseName("nosuchfield") == NULL); + EXPECT_TRUE(file_->FindExtensionByCamelcaseName("baz_foo") == nullptr); + EXPECT_TRUE(file_->FindExtensionByCamelcaseName("BazBar") == nullptr); + EXPECT_TRUE(file_->FindExtensionByCamelcaseName("nosuchfield") == nullptr); } // =================================================================== @@ -1312,10 +1354,10 @@ class EnumDescriptorTest : public testing::Test { // Build the descriptors and get the pointers. foo_file_ = pool_.BuildFile(foo_file); - ASSERT_TRUE(foo_file_ != NULL); + ASSERT_TRUE(foo_file_ != nullptr); bar_file_ = pool_.BuildFile(bar_file); - ASSERT_TRUE(bar_file_ != NULL); + ASSERT_TRUE(bar_file_ != nullptr); ASSERT_EQ(1, foo_file_->enum_type_count()); enum_ = foo_file_->enum_type(0); @@ -1358,8 +1400,8 @@ TEST_F(EnumDescriptorTest, Name) { } TEST_F(EnumDescriptorTest, ContainingType) { - EXPECT_TRUE(enum_->containing_type() == NULL); - EXPECT_TRUE(enum2_->containing_type() == NULL); + EXPECT_TRUE(enum_->containing_type() == nullptr); + EXPECT_TRUE(enum2_->containing_type() == nullptr); } TEST_F(EnumDescriptorTest, ValuesByIndex) { @@ -1374,9 +1416,9 @@ TEST_F(EnumDescriptorTest, FindValueByName) { EXPECT_EQ(foo2_, enum2_->FindValueByName("FOO")); EXPECT_EQ(baz2_, enum2_->FindValueByName("BAZ")); - EXPECT_TRUE(enum_->FindValueByName("NO_SUCH_VALUE") == NULL); - EXPECT_TRUE(enum_->FindValueByName("BAZ") == NULL); - EXPECT_TRUE(enum2_->FindValueByName("BAR") == NULL); + EXPECT_TRUE(enum_->FindValueByName("NO_SUCH_VALUE") == nullptr); + EXPECT_TRUE(enum_->FindValueByName("BAZ") == nullptr); + EXPECT_TRUE(enum2_->FindValueByName("BAR") == nullptr); } TEST_F(EnumDescriptorTest, FindValueByNumber) { @@ -1385,9 +1427,9 @@ TEST_F(EnumDescriptorTest, FindValueByNumber) { EXPECT_EQ(foo2_, enum2_->FindValueByNumber(1)); EXPECT_EQ(baz2_, enum2_->FindValueByNumber(3)); - EXPECT_TRUE(enum_->FindValueByNumber(416) == NULL); - EXPECT_TRUE(enum_->FindValueByNumber(3) == NULL); - EXPECT_TRUE(enum2_->FindValueByNumber(2) == NULL); + EXPECT_TRUE(enum_->FindValueByNumber(416) == nullptr); + EXPECT_TRUE(enum_->FindValueByNumber(3) == nullptr); + EXPECT_TRUE(enum2_->FindValueByNumber(2) == nullptr); } TEST_F(EnumDescriptorTest, ValueName) { @@ -1471,10 +1513,10 @@ class ServiceDescriptorTest : public testing::Test { // Build the descriptors and get the pointers. foo_file_ = pool_.BuildFile(foo_file); - ASSERT_TRUE(foo_file_ != NULL); + ASSERT_TRUE(foo_file_ != nullptr); bar_file_ = pool_.BuildFile(bar_file); - ASSERT_TRUE(bar_file_ != NULL); + ASSERT_TRUE(bar_file_ != nullptr); ASSERT_EQ(6, foo_file_->message_type_count()); foo_request_ = foo_file_->message_type(0); @@ -1543,9 +1585,9 @@ TEST_F(ServiceDescriptorTest, FindMethodByName) { EXPECT_EQ(foo2_, service2_->FindMethodByName("Foo")); EXPECT_EQ(baz2_, service2_->FindMethodByName("Baz")); - EXPECT_TRUE(service_->FindMethodByName("NoSuchMethod") == NULL); - EXPECT_TRUE(service_->FindMethodByName("Baz") == NULL); - EXPECT_TRUE(service2_->FindMethodByName("Bar") == NULL); + EXPECT_TRUE(service_->FindMethodByName("NoSuchMethod") == nullptr); + EXPECT_TRUE(service_->FindMethodByName("Baz") == nullptr); + EXPECT_TRUE(service2_->FindMethodByName("Bar") == nullptr); } TEST_F(ServiceDescriptorTest, MethodName) { @@ -1637,10 +1679,10 @@ class NestedDescriptorTest : public testing::Test { // Build the descriptors and get the pointers. foo_file_ = pool_.BuildFile(foo_file); - ASSERT_TRUE(foo_file_ != NULL); + ASSERT_TRUE(foo_file_ != nullptr); bar_file_ = pool_.BuildFile(bar_file); - ASSERT_TRUE(bar_file_ != NULL); + ASSERT_TRUE(bar_file_ != nullptr); ASSERT_EQ(1, foo_file_->message_type_count()); message_ = foo_file_->message_type(0); @@ -1724,10 +1766,10 @@ TEST_F(NestedDescriptorTest, NestedMessagesByIndex) { } TEST_F(NestedDescriptorTest, FindFieldByNameDoesntFindNestedTypes) { - EXPECT_TRUE(message_->FindFieldByName("Foo") == NULL); - EXPECT_TRUE(message_->FindFieldByName("Qux") == NULL); - EXPECT_TRUE(message_->FindExtensionByName("Foo") == NULL); - EXPECT_TRUE(message_->FindExtensionByName("Qux") == NULL); + EXPECT_TRUE(message_->FindFieldByName("Foo") == nullptr); + EXPECT_TRUE(message_->FindFieldByName("Qux") == nullptr); + EXPECT_TRUE(message_->FindExtensionByName("Foo") == nullptr); + EXPECT_TRUE(message_->FindExtensionByName("Qux") == nullptr); } TEST_F(NestedDescriptorTest, FindNestedTypeByName) { @@ -1736,11 +1778,11 @@ TEST_F(NestedDescriptorTest, FindNestedTypeByName) { EXPECT_EQ(foo2_, message2_->FindNestedTypeByName("Foo")); EXPECT_EQ(baz2_, message2_->FindNestedTypeByName("Baz")); - EXPECT_TRUE(message_->FindNestedTypeByName("NoSuchType") == NULL); - EXPECT_TRUE(message_->FindNestedTypeByName("Baz") == NULL); - EXPECT_TRUE(message2_->FindNestedTypeByName("Bar") == NULL); + EXPECT_TRUE(message_->FindNestedTypeByName("NoSuchType") == nullptr); + EXPECT_TRUE(message_->FindNestedTypeByName("Baz") == nullptr); + EXPECT_TRUE(message2_->FindNestedTypeByName("Bar") == nullptr); - EXPECT_TRUE(message_->FindNestedTypeByName("Qux") == NULL); + EXPECT_TRUE(message_->FindNestedTypeByName("Qux") == nullptr); } TEST_F(NestedDescriptorTest, EnumName) { @@ -1774,11 +1816,11 @@ TEST_F(NestedDescriptorTest, FindEnumTypeByName) { EXPECT_EQ(qux2_, message2_->FindEnumTypeByName("Qux")); EXPECT_EQ(quux2_, message2_->FindEnumTypeByName("Quux")); - EXPECT_TRUE(message_->FindEnumTypeByName("NoSuchType") == NULL); - EXPECT_TRUE(message_->FindEnumTypeByName("Quux") == NULL); - EXPECT_TRUE(message2_->FindEnumTypeByName("Baz") == NULL); + EXPECT_TRUE(message_->FindEnumTypeByName("NoSuchType") == nullptr); + EXPECT_TRUE(message_->FindEnumTypeByName("Quux") == nullptr); + EXPECT_TRUE(message2_->FindEnumTypeByName("Baz") == nullptr); - EXPECT_TRUE(message_->FindEnumTypeByName("Foo") == NULL); + EXPECT_TRUE(message_->FindEnumTypeByName("Foo") == nullptr); } TEST_F(NestedDescriptorTest, FindEnumValueByName) { @@ -1787,11 +1829,11 @@ TEST_F(NestedDescriptorTest, FindEnumValueByName) { EXPECT_EQ(a2_, message2_->FindEnumValueByName("A")); EXPECT_EQ(c2_, message2_->FindEnumValueByName("C")); - EXPECT_TRUE(message_->FindEnumValueByName("NO_SUCH_VALUE") == NULL); - EXPECT_TRUE(message_->FindEnumValueByName("C") == NULL); - EXPECT_TRUE(message2_->FindEnumValueByName("B") == NULL); + EXPECT_TRUE(message_->FindEnumValueByName("NO_SUCH_VALUE") == nullptr); + EXPECT_TRUE(message_->FindEnumValueByName("C") == nullptr); + EXPECT_TRUE(message2_->FindEnumValueByName("B") == nullptr); - EXPECT_TRUE(message_->FindEnumValueByName("Foo") == NULL); + EXPECT_TRUE(message_->FindEnumValueByName("Foo") == nullptr); } // =================================================================== @@ -1847,7 +1889,7 @@ class ExtensionDescriptorTest : public testing::Test { // Build the descriptors and get the pointers. foo_file_ = pool_.BuildFile(foo_file); - ASSERT_TRUE(foo_file_ != NULL); + ASSERT_TRUE(foo_file_ != nullptr); ASSERT_EQ(1, foo_file_->enum_type_count()); baz_ = foo_file_->enum_type(0); @@ -1877,7 +1919,7 @@ TEST_F(ExtensionDescriptorTest, ExtensionRanges) { EXPECT_EQ(20, foo_->extension_range(0)->end); EXPECT_EQ(40, foo_->extension_range(1)->end); -}; +} TEST_F(ExtensionDescriptorTest, Extensions) { EXPECT_EQ(0, foo_->extension_count()); @@ -1918,11 +1960,11 @@ TEST_F(ExtensionDescriptorTest, Extensions) { EXPECT_EQ(foo_, bar_->extension(0)->containing_type()); EXPECT_EQ(foo_, bar_->extension(1)->containing_type()); - EXPECT_TRUE(foo_file_->extension(0)->extension_scope() == NULL); - EXPECT_TRUE(foo_file_->extension(1)->extension_scope() == NULL); + EXPECT_TRUE(foo_file_->extension(0)->extension_scope() == nullptr); + EXPECT_TRUE(foo_file_->extension(1)->extension_scope() == nullptr); EXPECT_EQ(bar_, bar_->extension(0)->extension_scope()); EXPECT_EQ(bar_, bar_->extension(1)->extension_scope()); -}; +} TEST_F(ExtensionDescriptorTest, IsExtensionNumber) { EXPECT_FALSE(foo_->IsExtensionNumber(9)); @@ -1943,9 +1985,38 @@ TEST_F(ExtensionDescriptorTest, FindExtensionByName) { EXPECT_EQ(bar_->extension(0), bar_->FindExtensionByName("foo_message")); EXPECT_EQ(bar_->extension(1), bar_->FindExtensionByName("foo_group")); - EXPECT_TRUE(bar_->FindExtensionByName("no_such_extension") == NULL); - EXPECT_TRUE(foo_->FindExtensionByName("foo_int32") == NULL); - EXPECT_TRUE(foo_->FindExtensionByName("foo_message") == NULL); + EXPECT_TRUE(bar_->FindExtensionByName("no_such_extension") == nullptr); + EXPECT_TRUE(foo_->FindExtensionByName("foo_int32") == nullptr); + EXPECT_TRUE(foo_->FindExtensionByName("foo_message") == nullptr); +} + +TEST_F(ExtensionDescriptorTest, FindExtensionByPrintableName) { + EXPECT_TRUE(pool_.FindExtensionByPrintableName(foo_, "no_such_extension") == + nullptr); + EXPECT_TRUE(pool_.FindExtensionByPrintableName(bar_, "no_such_extension") == + nullptr); + + ASSERT_FALSE(pool_.FindExtensionByPrintableName(foo_, "Bar.foo_message") == + nullptr); + ASSERT_FALSE(pool_.FindExtensionByPrintableName(foo_, "Bar.foo_group") == + nullptr); + EXPECT_TRUE(pool_.FindExtensionByPrintableName(bar_, "foo_message") == + nullptr); + EXPECT_TRUE(pool_.FindExtensionByPrintableName(bar_, "foo_group") == nullptr); + EXPECT_EQ(bar_->FindExtensionByName("foo_message"), + pool_.FindExtensionByPrintableName(foo_, "Bar.foo_message")); + EXPECT_EQ(bar_->FindExtensionByName("foo_group"), + pool_.FindExtensionByPrintableName(foo_, "Bar.foo_group")); + + ASSERT_FALSE(pool_.FindExtensionByPrintableName(foo_, "foo_int32") == + nullptr); + ASSERT_FALSE(pool_.FindExtensionByPrintableName(foo_, "foo_enum") == nullptr); + EXPECT_TRUE(pool_.FindExtensionByPrintableName(bar_, "foo_int32") == nullptr); + EXPECT_TRUE(pool_.FindExtensionByPrintableName(bar_, "foo_enum") == nullptr); + EXPECT_EQ(foo_file_->FindExtensionByName("foo_int32"), + pool_.FindExtensionByPrintableName(foo_, "foo_int32")); + EXPECT_EQ(foo_file_->FindExtensionByName("foo_enum"), + pool_.FindExtensionByPrintableName(foo_, "foo_enum")); } TEST_F(ExtensionDescriptorTest, FindAllExtensions) { @@ -1964,7 +2035,7 @@ TEST_F(ExtensionDescriptorTest, DuplicateFieldNumber) { FileDescriptorProto file_proto; // Add "google/protobuf/descriptor.proto". FileDescriptorProto::descriptor()->file()->CopyTo(&file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); // Add "foo.proto": // import "google/protobuf/descriptor.proto"; // extend google.protobuf.FieldOptions { @@ -1976,7 +2047,7 @@ TEST_F(ExtensionDescriptorTest, DuplicateFieldNumber) { AddExtension(&file_proto, "google.protobuf.FieldOptions", "option1", 1000, FieldDescriptorProto::LABEL_OPTIONAL, FieldDescriptorProto::TYPE_INT32); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); // Add "bar.proto": // import "google/protobuf/descriptor.proto"; // extend google.protobuf.FieldOptions { @@ -1990,7 +2061,7 @@ TEST_F(ExtensionDescriptorTest, DuplicateFieldNumber) { FieldDescriptorProto::TYPE_INT32); // Currently we only generate a warning for conflicting extension numbers. // TODO(xiaofeng): Change it to an error. - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); } // =================================================================== @@ -2019,7 +2090,7 @@ class ReservedDescriptorTest : public testing::Test { // Build the descriptors and get the pointers. foo_file_ = pool_.BuildFile(foo_file); - ASSERT_TRUE(foo_file_ != NULL); + ASSERT_TRUE(foo_file_ != nullptr); ASSERT_EQ(1, foo_file_->message_type_count()); foo_ = foo_file_->message_type(0); @@ -2041,7 +2112,7 @@ TEST_F(ReservedDescriptorTest, ReservedRanges) { EXPECT_EQ(15, foo_->reserved_range(2)->start); EXPECT_EQ(16, foo_->reserved_range(2)->end); -}; +} TEST_F(ReservedDescriptorTest, IsReservedNumber) { EXPECT_FALSE(foo_->IsReservedNumber(1)); @@ -2056,20 +2127,20 @@ TEST_F(ReservedDescriptorTest, IsReservedNumber) { EXPECT_FALSE(foo_->IsReservedNumber(14)); EXPECT_TRUE(foo_->IsReservedNumber(15)); EXPECT_FALSE(foo_->IsReservedNumber(16)); -}; +} TEST_F(ReservedDescriptorTest, ReservedNames) { ASSERT_EQ(2, foo_->reserved_name_count()); EXPECT_EQ("foo", foo_->reserved_name(0)); EXPECT_EQ("bar", foo_->reserved_name(1)); -}; +} TEST_F(ReservedDescriptorTest, IsReservedName) { EXPECT_TRUE(foo_->IsReservedName("foo")); EXPECT_TRUE(foo_->IsReservedName("bar")); EXPECT_FALSE(foo_->IsReservedName("baz")); -}; +} // =================================================================== @@ -2114,7 +2185,7 @@ class ReservedEnumDescriptorTest : public testing::Test { // Build the descriptors and get the pointers. foo_file_ = pool_.BuildFile(foo_file); - ASSERT_TRUE(foo_file_ != NULL); + ASSERT_TRUE(foo_file_ != nullptr); ASSERT_EQ(3, foo_file_->enum_type_count()); foo_ = foo_file_->enum_type(0); @@ -2228,40 +2299,40 @@ class MiscTest : public testing::Test { pool_.reset(new DescriptorPool()); const FileDescriptor* file = pool_->BuildFile(file_proto); - if (file != NULL && file->message_type_count() == 1 && + if (file != nullptr && file->message_type_count() == 1 && file->message_type(0)->field_count() == 1) { return file->message_type(0)->field(0); } else { - return NULL; + return nullptr; } } const char* GetTypeNameForFieldType(FieldDescriptor::Type type) { const FieldDescriptor* field = GetFieldDescriptorOfType(type); - return field != NULL ? field->type_name() : ""; + return field != nullptr ? field->type_name() : ""; } FieldDescriptor::CppType GetCppTypeForFieldType(FieldDescriptor::Type type) { const FieldDescriptor* field = GetFieldDescriptorOfType(type); - return field != NULL ? field->cpp_type() - : static_cast(0); + return field != nullptr ? field->cpp_type() + : static_cast(0); } const char* GetCppTypeNameForFieldType(FieldDescriptor::Type type) { const FieldDescriptor* field = GetFieldDescriptorOfType(type); - return field != NULL ? field->cpp_type_name() : ""; + return field != nullptr ? field->cpp_type_name() : ""; } const Descriptor* GetMessageDescriptorForFieldType( FieldDescriptor::Type type) { const FieldDescriptor* field = GetFieldDescriptorOfType(type); - return field != NULL ? field->message_type() : NULL; + return field != nullptr ? field->message_type() : nullptr; } const EnumDescriptor* GetEnumDescriptorForFieldType( FieldDescriptor::Type type) { const FieldDescriptor* field = GetFieldDescriptorOfType(type); - return field != NULL ? field->enum_type() : NULL; + return field != nullptr ? field->enum_type() : nullptr; } std::unique_ptr pool_; @@ -2385,53 +2456,53 @@ TEST_F(MiscTest, StaticCppTypeNames) { } TEST_F(MiscTest, MessageType) { - // Test that message_type() is NULL for non-aggregate fields + // Test that message_type() is nullptr for non-aggregate fields typedef FieldDescriptor FD; // avoid ugly line wrapping - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_DOUBLE)); - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_FLOAT)); - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_INT64)); - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_UINT64)); - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_INT32)); - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_FIXED64)); - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_FIXED32)); - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_BOOL)); - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_STRING)); - EXPECT_TRUE(NULL != GetMessageDescriptorForFieldType(FD::TYPE_GROUP)); - EXPECT_TRUE(NULL != GetMessageDescriptorForFieldType(FD::TYPE_MESSAGE)); - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_BYTES)); - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_UINT32)); - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_ENUM)); - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_SFIXED32)); - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_SFIXED64)); - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_SINT32)); - EXPECT_TRUE(NULL == GetMessageDescriptorForFieldType(FD::TYPE_SINT64)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_DOUBLE)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_FLOAT)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_INT64)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_UINT64)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_INT32)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_FIXED64)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_FIXED32)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_BOOL)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_STRING)); + EXPECT_TRUE(nullptr != GetMessageDescriptorForFieldType(FD::TYPE_GROUP)); + EXPECT_TRUE(nullptr != GetMessageDescriptorForFieldType(FD::TYPE_MESSAGE)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_BYTES)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_UINT32)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_ENUM)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_SFIXED32)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_SFIXED64)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_SINT32)); + EXPECT_TRUE(nullptr == GetMessageDescriptorForFieldType(FD::TYPE_SINT64)); } TEST_F(MiscTest, EnumType) { - // Test that enum_type() is NULL for non-enum fields + // Test that enum_type() is nullptr for non-enum fields typedef FieldDescriptor FD; // avoid ugly line wrapping - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_DOUBLE)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_FLOAT)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_INT64)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_UINT64)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_INT32)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_FIXED64)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_FIXED32)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_BOOL)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_STRING)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_GROUP)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_MESSAGE)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_BYTES)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_UINT32)); - EXPECT_TRUE(NULL != GetEnumDescriptorForFieldType(FD::TYPE_ENUM)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_SFIXED32)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_SFIXED64)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_SINT32)); - EXPECT_TRUE(NULL == GetEnumDescriptorForFieldType(FD::TYPE_SINT64)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_DOUBLE)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_FLOAT)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_INT64)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_UINT64)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_INT32)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_FIXED64)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_FIXED32)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_BOOL)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_STRING)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_GROUP)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_MESSAGE)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_BYTES)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_UINT32)); + EXPECT_TRUE(nullptr != GetEnumDescriptorForFieldType(FD::TYPE_ENUM)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_SFIXED32)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_SFIXED64)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_SINT32)); + EXPECT_TRUE(nullptr == GetEnumDescriptorForFieldType(FD::TYPE_SINT64)); } TEST_F(MiscTest, DefaultValues) { @@ -2478,7 +2549,7 @@ TEST_F(MiscTest, DefaultValues) { AddField(message_proto, "empty_string", 11, label, FD::TYPE_STRING) ->set_default_value(""); - // Add a second set of fields with implicit defalut values. + // Add a second set of fields with implicit default values. AddField(message_proto, "implicit_int32", 21, label, FD::TYPE_INT32); AddField(message_proto, "implicit_int64", 22, label, FD::TYPE_INT64); AddField(message_proto, "implicit_uint32", 23, label, FD::TYPE_UINT32); @@ -2494,7 +2565,7 @@ TEST_F(MiscTest, DefaultValues) { // Build it. DescriptorPool pool; const FileDescriptor* file = pool.BuildFile(file_proto); - ASSERT_TRUE(file != NULL); + ASSERT_TRUE(file != nullptr); ASSERT_EQ(1, file->enum_type_count()); const EnumDescriptor* enum_type = file->enum_type(0); @@ -2576,7 +2647,7 @@ TEST_F(MiscTest, FieldOptions) { // Build the descriptors and get the pointers. DescriptorPool pool; const FileDescriptor* file = pool.BuildFile(file_proto); - ASSERT_TRUE(file != NULL); + ASSERT_TRUE(file != nullptr); ASSERT_EQ(1, file->message_type_count()); const Descriptor* message = file->message_type(0); @@ -2598,9 +2669,11 @@ TEST_F(MiscTest, FieldOptions) { enum DescriptorPoolMode { NO_DATABASE, FALLBACK_DATABASE }; class AllowUnknownDependenciesTest - : public testing::TestWithParam { + : public testing::TestWithParam< + std::tuple> { protected: - DescriptorPoolMode mode() { return GetParam(); } + DescriptorPoolMode mode() { return std::get<0>(GetParam()); } + const char* syntax() { return std::get<1>(GetParam()); } virtual void SetUp() { FileDescriptorProto foo_proto, bar_proto; @@ -2639,20 +2712,23 @@ class AllowUnknownDependenciesTest " }" "}", &foo_proto)); + foo_proto.set_syntax(syntax()); + ASSERT_TRUE( TextFormat::ParseFromString("name: 'bar.proto'" "message_type { name: 'Bar' }", &bar_proto)); + bar_proto.set_syntax(syntax()); // Collect pointers to stuff. bar_file_ = BuildFile(bar_proto); - ASSERT_TRUE(bar_file_ != NULL); + ASSERT_TRUE(bar_file_ != nullptr); ASSERT_EQ(1, bar_file_->message_type_count()); bar_type_ = bar_file_->message_type(0); foo_file_ = BuildFile(foo_proto); - ASSERT_TRUE(foo_file_ != NULL); + ASSERT_TRUE(foo_file_ != nullptr); ASSERT_EQ(1, foo_file_->message_type_count()); foo_type_ = foo_file_->message_type(0); @@ -2674,7 +2750,7 @@ class AllowUnknownDependenciesTest } } GOOGLE_LOG(FATAL) << "Can't get here."; - return NULL; + return nullptr; } const FileDescriptor* bar_file_; @@ -2701,7 +2777,7 @@ TEST_P(AllowUnknownDependenciesTest, PlaceholderFile) { // Placeholder files should not be findable. EXPECT_EQ(bar_file_, pool_->FindFileByName(bar_file_->name())); - EXPECT_TRUE(pool_->FindFileByName(baz_file->name()) == NULL); + EXPECT_TRUE(pool_->FindFileByName(baz_file->name()) == nullptr); // Copy*To should not crash for placeholder files. FileDescriptorProto baz_file_proto; @@ -2730,8 +2806,8 @@ TEST_P(AllowUnknownDependenciesTest, PlaceholderTypes) { // Placeholder types should not be findable. EXPECT_EQ(bar_type_, pool_->FindMessageTypeByName(bar_type_->full_name())); - EXPECT_TRUE(pool_->FindMessageTypeByName(baz_type->full_name()) == NULL); - EXPECT_TRUE(pool_->FindEnumTypeByName(qux_type->full_name()) == NULL); + EXPECT_TRUE(pool_->FindMessageTypeByName(baz_type->full_name()) == nullptr); + EXPECT_TRUE(pool_->FindEnumTypeByName(qux_type->full_name()) == nullptr); } TEST_P(AllowUnknownDependenciesTest, CopyTo) { @@ -2779,7 +2855,7 @@ TEST_P(AllowUnknownDependenciesTest, UnknownExtendee) { &extension_proto)); const FileDescriptor* file = BuildFile(extension_proto); - ASSERT_TRUE(file != NULL); + ASSERT_TRUE(file != nullptr); ASSERT_EQ(1, file->extension_count()); const Descriptor* extendee = file->extension(0)->containing_type(); @@ -2832,7 +2908,7 @@ TEST_P(AllowUnknownDependenciesTest, CustomOption) { &option_proto)); const FileDescriptor* file = BuildFile(option_proto); - ASSERT_TRUE(file != NULL); + ASSERT_TRUE(file != nullptr); // Verify that no extension options were set, but they were left as // uninterpreted_options. @@ -2874,7 +2950,7 @@ TEST_P(AllowUnknownDependenciesTest, // test.proto below. switch (mode()) { case NO_DATABASE: { - ASSERT_TRUE(pool_->BuildFile(undeclared_dep_proto) == NULL); + ASSERT_TRUE(pool_->BuildFile(undeclared_dep_proto) == nullptr); break; } case FALLBACK_DATABASE: { @@ -2895,7 +2971,7 @@ TEST_P(AllowUnknownDependenciesTest, &test_proto)); const FileDescriptor* file = BuildFile(test_proto); - ASSERT_TRUE(file != NULL); + ASSERT_TRUE(file != nullptr); GOOGLE_LOG(INFO) << file->DebugString(); EXPECT_EQ(0, file->dependency_count()); @@ -2911,11 +2987,13 @@ TEST_P(AllowUnknownDependenciesTest, ASSERT_EQ("undeclared.Quux", quux_field->message_type()->full_name()); EXPECT_TRUE(quux_field->message_type()->is_placeholder()); // The place holder type should not be findable. - ASSERT_TRUE(pool_->FindMessageTypeByName("undeclared.Quux") == NULL); + ASSERT_TRUE(pool_->FindMessageTypeByName("undeclared.Quux") == nullptr); } INSTANTIATE_TEST_SUITE_P(DatabaseSource, AllowUnknownDependenciesTest, - testing::Values(NO_DATABASE, FALLBACK_DATABASE)); + testing::Combine(testing::Values(NO_DATABASE, + FALLBACK_DATABASE), + testing::Values("proto2", "proto3"))); // =================================================================== @@ -2954,7 +3032,7 @@ TEST(CustomOptions, OptionLocations) { } TEST(CustomOptions, OptionTypes) { - const MessageOptions* options = NULL; + const MessageOptions* options = nullptr; options = &protobuf_unittest::CustomOptionMinIntegerValues::descriptor()->options(); @@ -3070,11 +3148,11 @@ TEST(CustomOptions, OptionsFromOtherFile) { FileDescriptorProto file_proto; FileDescriptorProto::descriptor()->file()->CopyTo(&file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); protobuf_unittest::TestMessageWithCustomOptions::descriptor()->file()->CopyTo( &file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); ASSERT_TRUE(TextFormat::ParseFromString( "name: \"custom_options_import.proto\" " @@ -3110,7 +3188,7 @@ TEST(CustomOptions, OptionsFromOtherFile) { &file_proto)); const FileDescriptor* file = pool.BuildFile(file_proto); - ASSERT_TRUE(file != NULL); + ASSERT_TRUE(file != nullptr); EXPECT_EQ(1234, file->options().GetExtension(protobuf_unittest::file_opt1)); EXPECT_TRUE(file->options().has_java_package()); EXPECT_EQ("foo", file->options().java_package()); @@ -3128,11 +3206,11 @@ TEST(CustomOptions, MessageOptionThreeFieldsSet) { FileDescriptorProto file_proto; FileDescriptorProto::descriptor()->file()->CopyTo(&file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); protobuf_unittest::TestMessageWithCustomOptions::descriptor()->file()->CopyTo( &file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); // The following represents the definition: // @@ -3188,7 +3266,7 @@ TEST(CustomOptions, MessageOptionThreeFieldsSet) { &file_proto)); const FileDescriptor* file = pool.BuildFile(file_proto); - ASSERT_TRUE(file != NULL); + ASSERT_TRUE(file != nullptr); ASSERT_EQ(1, file->message_type_count()); const MessageOptions& options = file->message_type(0)->options(); @@ -3205,11 +3283,11 @@ TEST(CustomOptions, MessageOptionRepeatedLeafFieldSet) { FileDescriptorProto file_proto; FileDescriptorProto::descriptor()->file()->CopyTo(&file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); protobuf_unittest::TestMessageWithCustomOptions::descriptor()->file()->CopyTo( &file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); // The following represents the definition: // @@ -3265,7 +3343,7 @@ TEST(CustomOptions, MessageOptionRepeatedLeafFieldSet) { &file_proto)); const FileDescriptor* file = pool.BuildFile(file_proto); - ASSERT_TRUE(file != NULL); + ASSERT_TRUE(file != nullptr); ASSERT_EQ(1, file->message_type_count()); const MessageOptions& options = file->message_type(0)->options(); @@ -3285,11 +3363,11 @@ TEST(CustomOptions, MessageOptionRepeatedMsgFieldSet) { FileDescriptorProto file_proto; FileDescriptorProto::descriptor()->file()->CopyTo(&file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); protobuf_unittest::TestMessageWithCustomOptions::descriptor()->file()->CopyTo( &file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); // The following represents the definition: // @@ -3345,7 +3423,7 @@ TEST(CustomOptions, MessageOptionRepeatedMsgFieldSet) { &file_proto)); const FileDescriptor* file = pool.BuildFile(file_proto); - ASSERT_TRUE(file != NULL); + ASSERT_TRUE(file != nullptr); ASSERT_EQ(1, file->message_type_count()); const MessageOptions& options = file->message_type(0)->options(); @@ -3402,18 +3480,18 @@ TEST(CustomOptions, AggregateOptions) { method->options().GetExtension(protobuf_unittest::methodopt).s()); } -TEST(CustomOptions, UnusedImportWarning) { +TEST(CustomOptions, UnusedImportError) { DescriptorPool pool; FileDescriptorProto file_proto; FileDescriptorProto::descriptor()->file()->CopyTo(&file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); protobuf_unittest::TestMessageWithCustomOptions::descriptor()->file()->CopyTo( &file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); - pool.AddUnusedImportTrackFile("custom_options_import.proto"); + pool.AddUnusedImportTrackFile("custom_options_import.proto", true); ASSERT_TRUE(TextFormat::ParseFromString( "name: \"custom_options_import.proto\" " "package: \"protobuf_unittest\" " @@ -3421,8 +3499,12 @@ TEST(CustomOptions, UnusedImportWarning) { &file_proto)); MockErrorCollector error_collector; - EXPECT_TRUE(pool.BuildFileCollectingErrors(file_proto, &error_collector)); - EXPECT_EQ("", error_collector.warning_text_); + EXPECT_FALSE(pool.BuildFileCollectingErrors(file_proto, &error_collector)); + EXPECT_EQ( + "custom_options_import.proto: " + "google/protobuf/unittest_custom_options.proto: IMPORT: Import " + "google/protobuf/unittest_custom_options.proto is unused.\n", + error_collector.text_); } // Verifies that proto files can correctly be parsed, even if the @@ -3433,7 +3515,7 @@ TEST(CustomOptions, OptionsWithIncompatibleDescriptors) { FileDescriptorProto file_proto; MessageOptions::descriptor()->file()->CopyTo(&file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); // Create a new file descriptor proto containing a subset of the // messages defined in google/protobuf/unittest_custom_options.proto. @@ -3473,7 +3555,7 @@ TEST(CustomOptions, OptionsWithIncompatibleDescriptors) { test_message_type->mutable_options())); // Adding the file descriptor to the pool should fail. - EXPECT_TRUE(pool.BuildFile(file_proto) == NULL); + EXPECT_TRUE(pool.BuildFile(file_proto) == nullptr); } // Test that FileDescriptor::DebugString() formats custom options correctly. @@ -3482,7 +3564,7 @@ TEST(CustomOptions, DebugString) { FileDescriptorProto file_proto; MessageOptions::descriptor()->file()->CopyTo(&file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); // Add "foo.proto": // import "google/protobuf/descriptor.proto"; @@ -3534,7 +3616,7 @@ TEST(CustomOptions, DebugString) { "}", &file_proto)); const FileDescriptor* descriptor = pool.BuildFile(file_proto); - ASSERT_TRUE(descriptor != NULL); + ASSERT_TRUE(descriptor != nullptr); EXPECT_EQ(2, descriptor->extension_count()); @@ -3577,7 +3659,7 @@ class ValidationErrorTest : public testing::Test { MockErrorCollector error_collector; EXPECT_TRUE(pool_.BuildFileCollectingErrors(file_proto, &error_collector) == - NULL); + nullptr); EXPECT_EQ(expected_errors, error_collector.text_); } @@ -3598,7 +3680,7 @@ class ValidationErrorTest : public testing::Test { void BuildFileInTestPool(const FileDescriptor* file) { FileDescriptorProto file_proto; file->CopyTo(&file_proto); - ASSERT_TRUE(pool_.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool_.BuildFile(file_proto) != nullptr); } // Build descriptor.proto in our test pool. This allows us to extend it in @@ -4480,8 +4562,7 @@ TEST_F(ValidationErrorTest, RequiredExtension) { " }" "}", - "foo.proto: Foo.foo: TYPE: Message extensions cannot have required " - "fields.\n"); + "foo.proto: Foo.foo: TYPE: The extension Foo.foo cannot be required.\n"); } TEST_F(ValidationErrorTest, UndefinedFieldType) { @@ -5119,7 +5200,7 @@ TEST_F(ValidationErrorTest, RepeatedMessageOption) { } TEST_F(ValidationErrorTest, ResolveUndefinedOption) { - // The following should produce an eror that baz.bar is resolved but not + // The following should produce an error that baz.bar is resolved but not // defined. // foo.proto: // package baz @@ -5582,7 +5663,7 @@ TEST_F(ValidationErrorTest, NoLiteServices) { "foo.proto: Foo: NAME: Files with optimize_for = LITE_RUNTIME cannot " "define services unless you set both options cc_generic_services and " - "java_generic_sevices to false.\n"); + "java_generic_services to false.\n"); BuildFile( "name: \"bar.proto\" " @@ -5658,7 +5739,7 @@ TEST_F(ValidationErrorTest, ErrorsReportedToLogError) { { ScopedMemoryLog log; - EXPECT_TRUE(pool_.BuildFile(file_proto) == NULL); + EXPECT_TRUE(pool_.BuildFile(file_proto) == nullptr); errors = log.GetMessages(ERROR); } @@ -5737,7 +5818,7 @@ TEST_F(ValidationErrorTest, UnusedImportWarning) { " field { name:\"base\" number:1 label:LABEL_OPTIONAL " "type_name:\"Base\" }" "}", - "forward.proto: bar.proto: IMPORT: Import bar.proto but not used.\n"); + "forward.proto: bar.proto: IMPORT: Import bar.proto is unused.\n"); } namespace { @@ -6383,7 +6464,7 @@ TEST_F(ValidationErrorTest, ValidateProto3Extension) { FileDescriptorProto file_proto; // Add "google/protobuf/descriptor.proto". FileDescriptorProto::descriptor()->file()->CopyTo(&file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); // Add "foo.proto": // import "google/protobuf/descriptor.proto"; // extend google.protobuf.FieldOptions { @@ -6396,7 +6477,7 @@ TEST_F(ValidationErrorTest, ValidateProto3Extension) { AddExtension(&file_proto, "google.protobuf.FieldOptions", "option1", 1000, FieldDescriptorProto::LABEL_OPTIONAL, FieldDescriptorProto::TYPE_INT32); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); + ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); // Copy and change the package of the descriptor.proto BuildFile( @@ -6444,6 +6525,28 @@ TEST_F(ValidationErrorTest, ValidateProto3JsonName) { } +TEST_F(ValidationErrorTest, UnusedImportWithOtherError) { + BuildFile( + "name: 'bar.proto' " + "message_type {" + " name: 'Bar'" + "}"); + + pool_.AddUnusedImportTrackFile("foo.proto", true); + BuildFileWithErrors( + "name: 'foo.proto' " + "dependency: 'bar.proto' " + "message_type {" + " name: 'Foo'" + " extension { name:'foo' number:1 label:LABEL_OPTIONAL type:TYPE_INT32" + " extendee: 'Baz' }" + "}", + + // Should not also contain unused import error. + "foo.proto: Foo.foo: EXTENDEE: \"Baz\" is not defined.\n"); +} + + // =================================================================== // DescriptorDatabase @@ -6587,27 +6690,27 @@ TEST_F(DatabaseBackedPoolTest, FindFileByName) { DescriptorPool pool(&database_); const FileDescriptor* foo = pool.FindFileByName("foo.proto"); - ASSERT_TRUE(foo != NULL); + ASSERT_TRUE(foo != nullptr); EXPECT_EQ("foo.proto", foo->name()); ASSERT_EQ(1, foo->message_type_count()); EXPECT_EQ("Foo", foo->message_type(0)->name()); EXPECT_EQ(foo, pool.FindFileByName("foo.proto")); - EXPECT_TRUE(pool.FindFileByName("no_such_file.proto") == NULL); + EXPECT_TRUE(pool.FindFileByName("no_such_file.proto") == nullptr); } TEST_F(DatabaseBackedPoolTest, FindDependencyBeforeDependent) { DescriptorPool pool(&database_); const FileDescriptor* foo = pool.FindFileByName("foo.proto"); - ASSERT_TRUE(foo != NULL); + ASSERT_TRUE(foo != nullptr); EXPECT_EQ("foo.proto", foo->name()); ASSERT_EQ(1, foo->message_type_count()); EXPECT_EQ("Foo", foo->message_type(0)->name()); const FileDescriptor* bar = pool.FindFileByName("bar.proto"); - ASSERT_TRUE(bar != NULL); + ASSERT_TRUE(bar != nullptr); EXPECT_EQ("bar.proto", bar->name()); ASSERT_EQ(1, bar->message_type_count()); EXPECT_EQ("Bar", bar->message_type(0)->name()); @@ -6620,13 +6723,13 @@ TEST_F(DatabaseBackedPoolTest, FindDependentBeforeDependency) { DescriptorPool pool(&database_); const FileDescriptor* bar = pool.FindFileByName("bar.proto"); - ASSERT_TRUE(bar != NULL); + ASSERT_TRUE(bar != nullptr); EXPECT_EQ("bar.proto", bar->name()); ASSERT_EQ(1, bar->message_type_count()); ASSERT_EQ("Bar", bar->message_type(0)->name()); const FileDescriptor* foo = pool.FindFileByName("foo.proto"); - ASSERT_TRUE(foo != NULL); + ASSERT_TRUE(foo != nullptr); EXPECT_EQ("foo.proto", foo->name()); ASSERT_EQ(1, foo->message_type_count()); ASSERT_EQ("Foo", foo->message_type(0)->name()); @@ -6639,36 +6742,36 @@ TEST_F(DatabaseBackedPoolTest, FindFileContainingSymbol) { DescriptorPool pool(&database_); const FileDescriptor* file = pool.FindFileContainingSymbol("Foo"); - ASSERT_TRUE(file != NULL); + ASSERT_TRUE(file != nullptr); EXPECT_EQ("foo.proto", file->name()); EXPECT_EQ(file, pool.FindFileByName("foo.proto")); - EXPECT_TRUE(pool.FindFileContainingSymbol("NoSuchSymbol") == NULL); + EXPECT_TRUE(pool.FindFileContainingSymbol("NoSuchSymbol") == nullptr); } TEST_F(DatabaseBackedPoolTest, FindMessageTypeByName) { DescriptorPool pool(&database_); const Descriptor* type = pool.FindMessageTypeByName("Foo"); - ASSERT_TRUE(type != NULL); + ASSERT_TRUE(type != nullptr); EXPECT_EQ("Foo", type->name()); EXPECT_EQ(type->file(), pool.FindFileByName("foo.proto")); - EXPECT_TRUE(pool.FindMessageTypeByName("NoSuchType") == NULL); + EXPECT_TRUE(pool.FindMessageTypeByName("NoSuchType") == nullptr); } TEST_F(DatabaseBackedPoolTest, FindExtensionByNumber) { DescriptorPool pool(&database_); const Descriptor* foo = pool.FindMessageTypeByName("Foo"); - ASSERT_TRUE(foo != NULL); + ASSERT_TRUE(foo != nullptr); const FieldDescriptor* extension = pool.FindExtensionByNumber(foo, 5); - ASSERT_TRUE(extension != NULL); + ASSERT_TRUE(extension != nullptr); EXPECT_EQ("foo_ext", extension->name()); EXPECT_EQ(extension->file(), pool.FindFileByName("bar.proto")); - EXPECT_TRUE(pool.FindExtensionByNumber(foo, 12) == NULL); + EXPECT_TRUE(pool.FindExtensionByNumber(foo, 12) == nullptr); } TEST_F(DatabaseBackedPoolTest, FindAllExtensions) { @@ -6694,7 +6797,7 @@ TEST_F(DatabaseBackedPoolTest, ErrorWithoutErrorCollector) { { ScopedMemoryLog log; - EXPECT_TRUE(pool.FindFileByName("error.proto") == NULL); + EXPECT_TRUE(pool.FindFileByName("error.proto") == nullptr); errors = log.GetMessages(ERROR); } @@ -6706,7 +6809,7 @@ TEST_F(DatabaseBackedPoolTest, ErrorWithErrorCollector) { MockErrorCollector error_collector; DescriptorPool pool(&error_database, &error_collector); - EXPECT_TRUE(pool.FindFileByName("error.proto") == NULL); + EXPECT_TRUE(pool.FindFileByName("error.proto") == nullptr); EXPECT_EQ( "error.proto: error2.proto: IMPORT: File recursively imports itself: " "error.proto -> error2.proto -> error.proto\n" @@ -6722,7 +6825,7 @@ TEST_F(DatabaseBackedPoolTest, UndeclaredDependencyOnUnbuiltType) { // in the descriptor database but that have not not been built yet. MockErrorCollector error_collector; DescriptorPool pool(&database_, &error_collector); - EXPECT_TRUE(pool.FindMessageTypeByName("Baz") == NULL); + EXPECT_TRUE(pool.FindMessageTypeByName("Baz") == nullptr); EXPECT_EQ( "baz.proto: Baz.foo: TYPE: \"Foo\" seems to be defined in \"foo.proto\", " "which is not imported by \"baz.proto\". To use it here, please add " @@ -6738,16 +6841,16 @@ TEST_F(DatabaseBackedPoolTest, RollbackAfterError) { // Baz is defined in the database, but the file is invalid because it is // missing a necessary import. DescriptorPool pool(&database_); - EXPECT_TRUE(pool.FindMessageTypeByName("Baz") == NULL); + EXPECT_TRUE(pool.FindMessageTypeByName("Baz") == nullptr); // Make sure that searching again for the file or the type fails. - EXPECT_TRUE(pool.FindFileByName("baz.proto") == NULL); - EXPECT_TRUE(pool.FindMessageTypeByName("Baz") == NULL); + EXPECT_TRUE(pool.FindFileByName("baz.proto") == nullptr); + EXPECT_TRUE(pool.FindMessageTypeByName("Baz") == nullptr); } TEST_F(DatabaseBackedPoolTest, UnittestProto) { // Try to load all of unittest.proto from a DescriptorDatabase. This should // thoroughly test all paths through DescriptorBuilder to insure that there - // are no deadlocking problems when pool_->mutex_ is non-NULL. + // are no deadlocking problems when pool_->mutex_ is non-null. const FileDescriptor* original_file = protobuf_unittest::TestAllTypes::descriptor()->file(); @@ -6756,7 +6859,7 @@ TEST_F(DatabaseBackedPoolTest, UnittestProto) { const FileDescriptor* file_from_database = pool.FindFileByName(original_file->name()); - ASSERT_TRUE(file_from_database != NULL); + ASSERT_TRUE(file_from_database != nullptr); FileDescriptorProto original_file_proto; original_file->CopyTo(&original_file_proto); @@ -6779,39 +6882,39 @@ TEST_F(DatabaseBackedPoolTest, DoesntRetryDbUnnecessarily) { DescriptorPool pool(&call_counter); const FileDescriptor* file = pool.FindFileByName("foo.proto"); - ASSERT_TRUE(file != NULL); + ASSERT_TRUE(file != nullptr); const Descriptor* foo = pool.FindMessageTypeByName("Foo"); - ASSERT_TRUE(foo != NULL); + ASSERT_TRUE(foo != nullptr); const EnumDescriptor* test_enum = pool.FindEnumTypeByName("TestEnum"); - ASSERT_TRUE(test_enum != NULL); + ASSERT_TRUE(test_enum != nullptr); const ServiceDescriptor* test_service = pool.FindServiceByName("TestService"); - ASSERT_TRUE(test_service != NULL); + ASSERT_TRUE(test_service != nullptr); EXPECT_NE(0, call_counter.call_count_); call_counter.Clear(); - EXPECT_TRUE(foo->FindFieldByName("no_such_field") == NULL); - EXPECT_TRUE(foo->FindExtensionByName("no_such_extension") == NULL); - EXPECT_TRUE(foo->FindNestedTypeByName("NoSuchMessageType") == NULL); - EXPECT_TRUE(foo->FindEnumTypeByName("NoSuchEnumType") == NULL); - EXPECT_TRUE(foo->FindEnumValueByName("NO_SUCH_VALUE") == NULL); - EXPECT_TRUE(test_enum->FindValueByName("NO_SUCH_VALUE") == NULL); - EXPECT_TRUE(test_service->FindMethodByName("NoSuchMethod") == NULL); + EXPECT_TRUE(foo->FindFieldByName("no_such_field") == nullptr); + EXPECT_TRUE(foo->FindExtensionByName("no_such_extension") == nullptr); + EXPECT_TRUE(foo->FindNestedTypeByName("NoSuchMessageType") == nullptr); + EXPECT_TRUE(foo->FindEnumTypeByName("NoSuchEnumType") == nullptr); + EXPECT_TRUE(foo->FindEnumValueByName("NO_SUCH_VALUE") == nullptr); + EXPECT_TRUE(test_enum->FindValueByName("NO_SUCH_VALUE") == nullptr); + EXPECT_TRUE(test_service->FindMethodByName("NoSuchMethod") == nullptr); - EXPECT_TRUE(file->FindMessageTypeByName("NoSuchMessageType") == NULL); - EXPECT_TRUE(file->FindEnumTypeByName("NoSuchEnumType") == NULL); - EXPECT_TRUE(file->FindEnumValueByName("NO_SUCH_VALUE") == NULL); - EXPECT_TRUE(file->FindServiceByName("NO_SUCH_VALUE") == NULL); - EXPECT_TRUE(file->FindExtensionByName("no_such_extension") == NULL); + EXPECT_TRUE(file->FindMessageTypeByName("NoSuchMessageType") == nullptr); + EXPECT_TRUE(file->FindEnumTypeByName("NoSuchEnumType") == nullptr); + EXPECT_TRUE(file->FindEnumValueByName("NO_SUCH_VALUE") == nullptr); + EXPECT_TRUE(file->FindServiceByName("NO_SUCH_VALUE") == nullptr); + EXPECT_TRUE(file->FindExtensionByName("no_such_extension") == nullptr); - EXPECT_TRUE(pool.FindFileContainingSymbol("Foo.no.such.field") == NULL); - EXPECT_TRUE(pool.FindFileContainingSymbol("Foo.no_such_field") == NULL); - EXPECT_TRUE(pool.FindMessageTypeByName("Foo.NoSuchMessageType") == NULL); - EXPECT_TRUE(pool.FindFieldByName("Foo.no_such_field") == NULL); - EXPECT_TRUE(pool.FindExtensionByName("Foo.no_such_extension") == NULL); - EXPECT_TRUE(pool.FindEnumTypeByName("Foo.NoSuchEnumType") == NULL); - EXPECT_TRUE(pool.FindEnumValueByName("Foo.NO_SUCH_VALUE") == NULL); - EXPECT_TRUE(pool.FindMethodByName("TestService.NoSuchMethod") == NULL); + EXPECT_TRUE(pool.FindFileContainingSymbol("Foo.no.such.field") == nullptr); + EXPECT_TRUE(pool.FindFileContainingSymbol("Foo.no_such_field") == nullptr); + EXPECT_TRUE(pool.FindMessageTypeByName("Foo.NoSuchMessageType") == nullptr); + EXPECT_TRUE(pool.FindFieldByName("Foo.no_such_field") == nullptr); + EXPECT_TRUE(pool.FindExtensionByName("Foo.no_such_extension") == nullptr); + EXPECT_TRUE(pool.FindEnumTypeByName("Foo.NoSuchEnumType") == nullptr); + EXPECT_TRUE(pool.FindEnumValueByName("Foo.NO_SUCH_VALUE") == nullptr); + EXPECT_TRUE(pool.FindMethodByName("TestService.NoSuchMethod") == nullptr); EXPECT_EQ(0, call_counter.call_count_); } @@ -6826,11 +6929,11 @@ TEST_F(DatabaseBackedPoolTest, DoesntReloadFilesUncesessarily) { // First make sure foo.proto is loaded. const Descriptor* foo = pool.FindMessageTypeByName("Foo"); - ASSERT_TRUE(foo != NULL); + ASSERT_TRUE(foo != nullptr); // Try inducing false positives. - EXPECT_TRUE(pool.FindMessageTypeByName("NoSuchSymbol") == NULL); - EXPECT_TRUE(pool.FindExtensionByNumber(foo, 22) == NULL); + EXPECT_TRUE(pool.FindMessageTypeByName("NoSuchSymbol") == nullptr); + EXPECT_TRUE(pool.FindExtensionByNumber(foo, 22) == nullptr); // No errors should have been reported. (If foo.proto was incorrectly // loaded multiple times, errors would have been reported.) @@ -6892,22 +6995,21 @@ class ExponentialErrorDatabase : public DescriptorDatabase { } bool PopulateFile(int file_num, FileDescriptorProto* output) { - using strings::Substitute; GOOGLE_CHECK_GE(file_num, 0); output->Clear(); - output->set_name(Substitute("file$0.proto", file_num)); + output->set_name(strings::Substitute("file$0.proto", file_num)); // file0.proto doesn't define Message0 if (file_num > 0) { DescriptorProto* message = output->add_message_type(); - message->set_name(Substitute("Message$0", file_num)); + message->set_name(strings::Substitute("Message$0", file_num)); for (int i = 0; i < file_num; ++i) { - output->add_dependency(Substitute("file$0.proto", i)); + output->add_dependency(strings::Substitute("file$0.proto", i)); FieldDescriptorProto* field = message->add_field(); - field->set_name(Substitute("field$0", i)); + field->set_name(strings::Substitute("field$0", i)); field->set_number(i); field->set_label(FieldDescriptorProto::LABEL_OPTIONAL); field->set_type(FieldDescriptorProto::TYPE_MESSAGE); - field->set_type_name(Substitute("Message$0", i)); + field->set_type_name(strings::Substitute("Message$0", i)); } } return true; @@ -6920,8 +7022,8 @@ TEST_F(DatabaseBackedPoolTest, DoesntReloadKnownBadFiles) { GOOGLE_LOG(INFO) << "A timeout in this test probably indicates a real bug."; - EXPECT_TRUE(pool.FindFileByName("file40.proto") == NULL); - EXPECT_TRUE(pool.FindMessageTypeByName("Message40") == NULL); + EXPECT_TRUE(pool.FindFileByName("file40.proto") == nullptr); + EXPECT_TRUE(pool.FindMessageTypeByName("Message40") == nullptr); } TEST_F(DatabaseBackedPoolTest, DoesntFallbackOnWrongType) { @@ -6932,22 +7034,22 @@ TEST_F(DatabaseBackedPoolTest, DoesntFallbackOnWrongType) { DescriptorPool pool(&call_counter); const FileDescriptor* file = pool.FindFileByName("foo.proto"); - ASSERT_TRUE(file != NULL); + ASSERT_TRUE(file != nullptr); const Descriptor* foo = pool.FindMessageTypeByName("Foo"); - ASSERT_TRUE(foo != NULL); + ASSERT_TRUE(foo != nullptr); const EnumDescriptor* test_enum = pool.FindEnumTypeByName("TestEnum"); - ASSERT_TRUE(test_enum != NULL); + ASSERT_TRUE(test_enum != nullptr); EXPECT_NE(0, call_counter.call_count_); call_counter.Clear(); - EXPECT_TRUE(pool.FindMessageTypeByName("TestEnum") == NULL); - EXPECT_TRUE(pool.FindFieldByName("Foo") == NULL); - EXPECT_TRUE(pool.FindExtensionByName("Foo") == NULL); - EXPECT_TRUE(pool.FindEnumTypeByName("Foo") == NULL); - EXPECT_TRUE(pool.FindEnumValueByName("Foo") == NULL); - EXPECT_TRUE(pool.FindServiceByName("Foo") == NULL); - EXPECT_TRUE(pool.FindMethodByName("Foo") == NULL); + EXPECT_TRUE(pool.FindMessageTypeByName("TestEnum") == nullptr); + EXPECT_TRUE(pool.FindFieldByName("Foo") == nullptr); + EXPECT_TRUE(pool.FindExtensionByName("Foo") == nullptr); + EXPECT_TRUE(pool.FindEnumTypeByName("Foo") == nullptr); + EXPECT_TRUE(pool.FindEnumValueByName("Foo") == nullptr); + EXPECT_TRUE(pool.FindServiceByName("Foo") == nullptr); + EXPECT_TRUE(pool.FindMethodByName("Foo") == nullptr); EXPECT_EQ(0, call_counter.call_count_); } @@ -6979,7 +7081,7 @@ class SingletonSourceTree : public compiler::SourceTree { virtual io::ZeroCopyInputStream* Open(const std::string& filename) { return filename == filename_ ? new io::ArrayInputStream(contents_.data(), contents_.size()) - : NULL; + : nullptr; } private: @@ -7082,8 +7184,8 @@ class SourceLocationTest : public testing::Test { static std::string PrintSourceLocation(const SourceLocation& loc) { return strings::Substitute("$0:$1-$2:$3", 1 + loc.start_line, - 1 + loc.start_column, 1 + loc.end_line, - 1 + loc.end_column); + 1 + loc.start_column, 1 + loc.end_line, + 1 + loc.end_column); } private: @@ -7098,9 +7200,9 @@ class SourceLocationTest : public testing::Test { DescriptorPool pool_; // tag number of all custom options in above test file - static const int kCustomOptionFieldNumber = 10101; + static constexpr int kCustomOptionFieldNumber = 10101; // tag number of field "a" in message type "A" in above test file - static const int kAFieldNumber = 1; + static constexpr int kAFieldNumber = 1; }; // TODO(adonovan): implement support for option fields and for @@ -7629,7 +7731,7 @@ TEST_F(CopySourceCodeInfoToTest, CopySourceCodeInfoTo) { class LazilyBuildDependenciesTest : public testing::Test { public: - LazilyBuildDependenciesTest() : pool_(&db_, NULL) { + LazilyBuildDependenciesTest() : pool_(&db_, nullptr) { pool_.InternalSetLazilyBuildDependencies(); } @@ -7699,7 +7801,7 @@ TEST_F(LazilyBuildDependenciesTest, Message) { const FileDescriptor* file = pool_.FindFileByName("foo.proto"); // Verify only foo gets built when asking for foo.proto - EXPECT_TRUE(file != NULL); + EXPECT_TRUE(file != nullptr); EXPECT_TRUE(pool_.InternalIsFileLoaded("foo.proto")); EXPECT_FALSE(pool_.InternalIsFileLoaded("bar.proto")); @@ -7708,15 +7810,15 @@ TEST_F(LazilyBuildDependenciesTest, Message) { // the field's type is defined in, as well. const Descriptor* desc = file->FindMessageTypeByName("Foo"); const FieldDescriptor* field = desc->FindFieldByName("bar"); - EXPECT_TRUE(field != NULL); + EXPECT_TRUE(field != nullptr); EXPECT_EQ(field, desc->FindFieldByNumber(1)); EXPECT_EQ(field, desc->FindFieldByLowercaseName("bar")); EXPECT_EQ(field, desc->FindFieldByCamelcaseName("bar")); EXPECT_FALSE(pool_.InternalIsFileLoaded("bar.proto")); // Finally, verify that if we call message_type() on the field, we will - // buid the file where the message is defined, and get a valid descriptor - EXPECT_TRUE(field->message_type() != NULL); + // build the file where the message is defined, and get a valid descriptor + EXPECT_TRUE(field->message_type() != nullptr); EXPECT_TRUE(pool_.InternalIsFileLoaded("bar.proto")); } @@ -7742,18 +7844,18 @@ TEST_F(LazilyBuildDependenciesTest, Enum) { // yet built will build the file and return a descriptor. EXPECT_FALSE(pool_.InternalIsFileLoaded("enum1.proto")); const Descriptor* desc = file->FindMessageTypeByName("Lazy"); - EXPECT_TRUE(desc != NULL); + EXPECT_TRUE(desc != nullptr); const FieldDescriptor* field = desc->FindFieldByName("enum1"); - EXPECT_TRUE(field != NULL); - EXPECT_TRUE(field->enum_type() != NULL); + EXPECT_TRUE(field != nullptr); + EXPECT_TRUE(field->enum_type() != nullptr); EXPECT_TRUE(pool_.InternalIsFileLoaded("enum1.proto")); // Verify calling default_value_enum() on a field whose definition is not // yet built will build the file and return a descriptor to the value. EXPECT_FALSE(pool_.InternalIsFileLoaded("enum2.proto")); field = desc->FindFieldByName("enum2"); - EXPECT_TRUE(field != NULL); - EXPECT_TRUE(field->default_value_enum() != NULL); + EXPECT_TRUE(field != nullptr); + EXPECT_TRUE(field->default_value_enum() != nullptr); EXPECT_TRUE(pool_.InternalIsFileLoaded("enum2.proto")); } @@ -7787,9 +7889,9 @@ TEST_F(LazilyBuildDependenciesTest, Type) { // build the type defined in another file. EXPECT_FALSE(pool_.InternalIsFileLoaded("message1.proto")); const Descriptor* desc = file->FindMessageTypeByName("Lazy"); - EXPECT_TRUE(desc != NULL); + EXPECT_TRUE(desc != nullptr); const FieldDescriptor* field = desc->FindFieldByName("message1"); - EXPECT_TRUE(field != NULL); + EXPECT_TRUE(field != nullptr); EXPECT_EQ(field->type(), FieldDescriptor::TYPE_MESSAGE); EXPECT_TRUE(pool_.InternalIsFileLoaded("message1.proto")); @@ -7797,7 +7899,7 @@ TEST_F(LazilyBuildDependenciesTest, Type) { // build the type defined in another file. EXPECT_FALSE(pool_.InternalIsFileLoaded("message2.proto")); field = desc->FindFieldByName("message2"); - EXPECT_TRUE(field != NULL); + EXPECT_TRUE(field != nullptr); EXPECT_EQ(field->cpp_type(), FieldDescriptor::CPPTYPE_MESSAGE); EXPECT_TRUE(pool_.InternalIsFileLoaded("message2.proto")); @@ -7805,7 +7907,7 @@ TEST_F(LazilyBuildDependenciesTest, Type) { // build the type defined in another file. EXPECT_FALSE(pool_.InternalIsFileLoaded("enum1.proto")); field = desc->FindFieldByName("enum1"); - EXPECT_TRUE(field != NULL); + EXPECT_TRUE(field != nullptr); EXPECT_EQ(field->type(), FieldDescriptor::TYPE_ENUM); EXPECT_TRUE(pool_.InternalIsFileLoaded("enum1.proto")); @@ -7813,7 +7915,7 @@ TEST_F(LazilyBuildDependenciesTest, Type) { // build the type defined in another file. EXPECT_FALSE(pool_.InternalIsFileLoaded("enum2.proto")); field = desc->FindFieldByName("enum2"); - EXPECT_TRUE(field != NULL); + EXPECT_TRUE(field != nullptr); EXPECT_EQ(field->cpp_type(), FieldDescriptor::CPPTYPE_ENUM); EXPECT_TRUE(pool_.InternalIsFileLoaded("enum2.proto")); } @@ -7844,7 +7946,7 @@ TEST_F(LazilyBuildDependenciesTest, Extension) { // Verify foo.bar gets loaded, and bar.proto gets loaded // to register the extension. baz.proto should not get loaded. - EXPECT_TRUE(file != NULL); + EXPECT_TRUE(file != nullptr); EXPECT_TRUE(pool_.InternalIsFileLoaded("foo.proto")); EXPECT_TRUE(pool_.InternalIsFileLoaded("bar.proto")); EXPECT_FALSE(pool_.InternalIsFileLoaded("baz.proto")); @@ -7874,15 +7976,15 @@ TEST_F(LazilyBuildDependenciesTest, Service) { // files defining the input and output type, and input_type() and // output_type() does indeed build the appropriate files. const ServiceDescriptor* service = file->FindServiceByName("LazyService"); - EXPECT_TRUE(service != NULL); + EXPECT_TRUE(service != nullptr); const MethodDescriptor* method = service->FindMethodByName("A"); EXPECT_FALSE(pool_.InternalIsFileLoaded("message1.proto")); EXPECT_FALSE(pool_.InternalIsFileLoaded("message2.proto")); - EXPECT_TRUE(method != NULL); - EXPECT_TRUE(method->input_type() != NULL); + EXPECT_TRUE(method != nullptr); + EXPECT_TRUE(method->input_type() != nullptr); EXPECT_TRUE(pool_.InternalIsFileLoaded("message1.proto")); EXPECT_FALSE(pool_.InternalIsFileLoaded("message2.proto")); - EXPECT_TRUE(method->output_type() != NULL); + EXPECT_TRUE(method->output_type() != nullptr); EXPECT_TRUE(pool_.InternalIsFileLoaded("message2.proto")); } @@ -7907,7 +8009,7 @@ TEST_F(LazilyBuildDependenciesTest, GeneratedFile) { // the generated function "descriptor()" doesn't somehow subvert the laziness // by manually loading the dependencies or something. EXPECT_TRUE(protobuf_unittest::lazy_imports::ImportedMessage::descriptor() != - NULL); + nullptr); EXPECT_TRUE(DescriptorPool::generated_pool()->InternalIsFileLoaded( "google/protobuf/unittest_lazy_dependencies.proto")); EXPECT_FALSE(DescriptorPool::generated_pool()->InternalIsFileLoaded( @@ -7965,7 +8067,7 @@ TEST_F(LazilyBuildDependenciesTest, Dependency) { AddSimpleMessageProtoFileToDb("baz", "Baz"); const FileDescriptor* foo_file = pool_.FindFileByName("foo.proto"); - EXPECT_TRUE(foo_file != NULL); + EXPECT_TRUE(foo_file != nullptr); // As expected, requesting foo.proto shouldn't build it's dependencies EXPECT_TRUE(pool_.InternalIsFileLoaded("foo.proto")); EXPECT_FALSE(pool_.InternalIsFileLoaded("bar.proto")); @@ -7974,7 +8076,7 @@ TEST_F(LazilyBuildDependenciesTest, Dependency) { // Verify calling dependency(N) will build the dependency, but // not that file's dependencies. const FileDescriptor* bar_file = foo_file->dependency(0); - EXPECT_TRUE(bar_file != NULL); + EXPECT_TRUE(bar_file != nullptr); EXPECT_TRUE(pool_.InternalIsFileLoaded("bar.proto")); EXPECT_FALSE(pool_.InternalIsFileLoaded("baz.proto")); } diff --git a/third_party/protobuf/src/google/protobuf/duration.pb.cc b/third_party/protobuf/src/google/protobuf/duration.pb.cc index ae476deb..26826620 100644 --- a/third_party/protobuf/src/google/protobuf/duration.pb.cc +++ b/third_party/protobuf/src/google/protobuf/duration.pb.cc @@ -5,7 +5,6 @@ #include -#include #include #include #include @@ -33,7 +32,7 @@ static void InitDefaultsscc_info_Duration_google_2fprotobuf_2fduration_2eproto() } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Duration_google_2fprotobuf_2fduration_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Duration_google_2fprotobuf_2fduration_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Duration_google_2fprotobuf_2fduration_2eproto}, {}}; static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fduration_2eproto[1]; static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fduration_2eproto = nullptr; @@ -56,7 +55,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Duration_default_instance_), }; -const char descriptor_table_protodef_google_2fprotobuf_2fduration_2eproto[] = +const char descriptor_table_protodef_google_2fprotobuf_2fduration_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\036google/protobuf/duration.proto\022\017google" ".protobuf\"*\n\010Duration\022\017\n\007seconds\030\001 \001(\003\022\r" "\n\005nanos\030\002 \001(\005B|\n\023com.google.protobufB\rDu" @@ -70,47 +69,34 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_goo &scc_info_Duration_google_2fprotobuf_2fduration_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fduration_2eproto_once; -static bool descriptor_table_google_2fprotobuf_2fduration_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fduration_2eproto = { - &descriptor_table_google_2fprotobuf_2fduration_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2fduration_2eproto, "google/protobuf/duration.proto", 227, + false, false, descriptor_table_protodef_google_2fprotobuf_2fduration_2eproto, "google/protobuf/duration.proto", 227, &descriptor_table_google_2fprotobuf_2fduration_2eproto_once, descriptor_table_google_2fprotobuf_2fduration_2eproto_sccs, descriptor_table_google_2fprotobuf_2fduration_2eproto_deps, 1, 0, schemas, file_default_instances, TableStruct_google_2fprotobuf_2fduration_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fduration_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fduration_2eproto, file_level_service_descriptors_google_2fprotobuf_2fduration_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_google_2fprotobuf_2fduration_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fduration_2eproto), true); +static bool dynamic_init_dummy_google_2fprotobuf_2fduration_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fduration_2eproto)), true); PROTOBUF_NAMESPACE_OPEN // =================================================================== void Duration::InitAsDefaultInstance() { } -class Duration::HasBitSetters { +class Duration::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Duration::kSecondsFieldNumber; -const int Duration::kNanosFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Duration::Duration() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.Duration) -} Duration::Duration(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Duration) } Duration::Duration(const Duration& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::memcpy(&seconds_, &from.seconds_, static_cast(reinterpret_cast(&nanos_) - reinterpret_cast(&seconds_)) + sizeof(nanos_)); @@ -126,10 +112,11 @@ void Duration::SharedCtor() { Duration::~Duration() { // @@protoc_insertion_point(destructor:google.protobuf.Duration) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Duration::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void Duration::ArenaDtor(void* object) { @@ -156,13 +143,12 @@ void Duration::Clear() { ::memset(&seconds_, 0, static_cast( reinterpret_cast(&nanos_) - reinterpret_cast(&seconds_)) + sizeof(nanos_)); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Duration::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -171,14 +157,14 @@ const char* Duration::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i // int64 seconds = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // int32 nanos = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -188,7 +174,9 @@ const char* Duration::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -201,106 +189,28 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Duration::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.Duration) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // int64 seconds = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - input, &seconds_))); - } else { - goto handle_unusual; - } - break; - } - - // int32 nanos = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &nanos_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.Duration) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.Duration) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Duration::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.Duration) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // int64 seconds = 1; - if (this->seconds() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->seconds(), output); - } - - // int32 nanos = 2; - if (this->nanos() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->nanos(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.Duration) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Duration::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Duration::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Duration) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // int64 seconds = 1; if (this->seconds() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->seconds(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_seconds(), target); } // int32 nanos = 2; if (this->nanos() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->nanos(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_nanos(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Duration) return target; @@ -310,11 +220,6 @@ size_t Duration::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Duration) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -323,16 +228,20 @@ size_t Duration::ByteSizeLong() const { if (this->seconds() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( - this->seconds()); + this->_internal_seconds()); } // int32 nanos = 2; if (this->nanos() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->nanos()); + this->_internal_nanos()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -356,15 +265,15 @@ void Duration::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Duration::MergeFrom(const Duration& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Duration) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.seconds() != 0) { - set_seconds(from.seconds()); + _internal_set_seconds(from._internal_seconds()); } if (from.nanos() != 0) { - set_nanos(from.nanos()); + _internal_set_nanos(from._internal_nanos()); } } @@ -386,30 +295,15 @@ bool Duration::IsInitialized() const { return true; } -void Duration::Swap(Duration* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - Duration* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void Duration::UnsafeArenaSwap(Duration* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void Duration::InternalSwap(Duration* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - swap(seconds_, other->seconds_); - swap(nanos_, other->nanos_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Duration, nanos_) + + sizeof(Duration::nanos_) + - PROTOBUF_FIELD_OFFSET(Duration, seconds_)>( + reinterpret_cast(&seconds_), + reinterpret_cast(&other->seconds_)); } ::PROTOBUF_NAMESPACE_ID::Metadata Duration::GetMetadata() const { diff --git a/third_party/protobuf/src/google/protobuf/duration.pb.h b/third_party/protobuf/src/google/protobuf/duration.pb.h index b117a0a7..0aa4e1f8 100644 --- a/third_party/protobuf/src/google/protobuf/duration.pb.h +++ b/third_party/protobuf/src/google/protobuf/duration.pb.h @@ -8,12 +8,12 @@ #include #include -#if PROTOBUF_VERSION < 3008000 +#if PROTOBUF_VERSION < 3012000 #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 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3012004 < 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. @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include // IWYU pragma: export @@ -66,10 +66,10 @@ PROTOBUF_NAMESPACE_OPEN // =================================================================== -class PROTOBUF_EXPORT Duration : +class PROTOBUF_EXPORT Duration PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Duration) */ { public: - Duration(); + inline Duration() : Duration(nullptr) {}; virtual ~Duration(); Duration(const Duration& from); @@ -83,7 +83,7 @@ class PROTOBUF_EXPORT Duration : return *this; } inline Duration& operator=(Duration&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -91,12 +91,6 @@ class PROTOBUF_EXPORT Duration : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -116,11 +110,22 @@ class PROTOBUF_EXPORT Duration : static constexpr int kIndexInFileMessages = 0; - void UnsafeArenaSwap(Duration* other); - void Swap(Duration* other); friend void swap(Duration& a, Duration& b) { a.Swap(&b); } + inline void Swap(Duration* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Duration* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -139,16 +144,9 @@ class PROTOBUF_EXPORT Duration : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -165,13 +163,6 @@ class PROTOBUF_EXPORT Duration : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -187,23 +178,32 @@ class PROTOBUF_EXPORT Duration : // accessors ------------------------------------------------------- + enum : int { + kSecondsFieldNumber = 1, + kNanosFieldNumber = 2, + }; // int64 seconds = 1; void clear_seconds(); - static const int kSecondsFieldNumber = 1; ::PROTOBUF_NAMESPACE_ID::int64 seconds() const; void set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_seconds() const; + void _internal_set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value); + public: // int32 nanos = 2; void clear_nanos(); - static const int kNanosFieldNumber = 2; ::PROTOBUF_NAMESPACE_ID::int32 nanos() const; void set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_nanos() const; + void _internal_set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.Duration) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -227,13 +227,19 @@ class PROTOBUF_EXPORT Duration : inline void Duration::clear_seconds() { seconds_ = PROTOBUF_LONGLONG(0); } -inline ::PROTOBUF_NAMESPACE_ID::int64 Duration::seconds() const { - // @@protoc_insertion_point(field_get:google.protobuf.Duration.seconds) +inline ::PROTOBUF_NAMESPACE_ID::int64 Duration::_internal_seconds() const { return seconds_; } -inline void Duration::set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) { +inline ::PROTOBUF_NAMESPACE_ID::int64 Duration::seconds() const { + // @@protoc_insertion_point(field_get:google.protobuf.Duration.seconds) + return _internal_seconds(); +} +inline void Duration::_internal_set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) { seconds_ = value; +} +inline void Duration::set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_seconds(value); // @@protoc_insertion_point(field_set:google.protobuf.Duration.seconds) } @@ -241,13 +247,19 @@ inline void Duration::set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) { inline void Duration::clear_nanos() { nanos_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Duration::nanos() const { - // @@protoc_insertion_point(field_get:google.protobuf.Duration.nanos) +inline ::PROTOBUF_NAMESPACE_ID::int32 Duration::_internal_nanos() const { return nanos_; } -inline void Duration::set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 Duration::nanos() const { + // @@protoc_insertion_point(field_get:google.protobuf.Duration.nanos) + return _internal_nanos(); +} +inline void Duration::_internal_set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) { nanos_ = value; +} +inline void Duration::set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_nanos(value); // @@protoc_insertion_point(field_set:google.protobuf.Duration.nanos) } diff --git a/third_party/protobuf/src/google/protobuf/duration.proto b/third_party/protobuf/src/google/protobuf/duration.proto index 9d8a52de..99cb102c 100644 --- a/third_party/protobuf/src/google/protobuf/duration.proto +++ b/third_party/protobuf/src/google/protobuf/duration.proto @@ -61,7 +61,7 @@ option objc_class_prefix = "GPB"; // if (duration.seconds < 0 && duration.nanos > 0) { // duration.seconds += 1; // duration.nanos -= 1000000000; -// } else if (durations.seconds > 0 && duration.nanos < 0) { +// } else if (duration.seconds > 0 && duration.nanos < 0) { // duration.seconds -= 1; // duration.nanos += 1000000000; // } diff --git a/third_party/protobuf/src/google/protobuf/dynamic_message.cc b/third_party/protobuf/src/google/protobuf/dynamic_message.cc index 5890f78e..fd523717 100644 --- a/third_party/protobuf/src/google/protobuf/dynamic_message.cc +++ b/third_party/protobuf/src/google/protobuf/dynamic_message.cc @@ -34,10 +34,10 @@ // // DynamicMessage is implemented by constructing a data structure which // has roughly the same memory layout as a generated message would have. -// Then, we use GeneratedMessageReflection to implement our reflection -// interface. All the other operations we need to implement (e.g. -// parsing, copying, etc.) are already implemented in terms of -// Reflection, so the rest is easy. +// Then, we use Reflection to implement our reflection interface. All +// the other operations we need to implement (e.g. parsing, copying, +// etc.) are already implemented in terms of Reflection, so the rest is +// easy. // // The up side of this strategy is that it's very efficient. We don't // need to use hash_maps or generic representations of fields. The @@ -62,17 +62,19 @@ // Item 8 of "More Effective C++" discusses this in more detail, though // I don't have the book on me right now so I'm not sure. +#include + #include +#include #include #include -#include - #include #include -#include #include #include +#include +#include #include #include #include @@ -82,13 +84,13 @@ #include #include +#include // NOLINT + namespace google { namespace protobuf { using internal::DynamicMapField; using internal::ExtensionSet; -using internal::GeneratedMessageReflection; -using internal::InternalMetadataWithArena; using internal::MapField; @@ -101,6 +103,28 @@ namespace { bool IsMapFieldInApi(const FieldDescriptor* field) { return field->is_map(); } +// Sync with helpers.h. +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(); +} + +inline bool InRealOneof(const FieldDescriptor* field) { + return field->containing_oneof() && + !field->containing_oneof()->is_synthetic(); +} + // Compute the byte size of the in-memory representation of the field. int FieldSpaceUsed(const FieldDescriptor* field) { typedef FieldDescriptor FD; // avoid line wrapping @@ -236,7 +260,6 @@ class DynamicMessage : public Message { int size; int has_bits_offset; int oneof_case_offset; - int internal_metadata_offset; int extensions_offset; // Not owned by the TypeInfo. @@ -248,7 +271,7 @@ class DynamicMessage : public Message { // important (the prototype must be deleted *before* the offsets). std::unique_ptr offsets; std::unique_ptr has_bits_indices; - std::unique_ptr reflection; + std::unique_ptr reflection; // Don't use a unique_ptr to hold the prototype: the destructor for // DynamicMessage needs to know whether it is the prototype, and does so by // looking back at this field. This would assume details about the @@ -275,7 +298,6 @@ class DynamicMessage : public Message { Message* New() const override; Message* New(Arena* arena) const override; - Arena* GetArena() const override { return arena_; } int GetCachedSize() const override; void SetCachedSize(int size) const override; @@ -296,6 +318,9 @@ class DynamicMessage : public Message { void SharedCtor(bool lock_factory); + // Needed to get the offset of the internal metadata member. + friend class DynamicMessageFactory; + inline bool is_prototype() const { return type_info_->prototype == this || // If type_info_->prototype is NULL, then we must be constructing @@ -322,7 +347,10 @@ DynamicMessage::DynamicMessage(const TypeInfo* type_info) } DynamicMessage::DynamicMessage(const TypeInfo* type_info, Arena* arena) - : type_info_(type_info), arena_(arena), cached_byte_size_(0) { + : Message(arena), + type_info_(type_info), + arena_(arena), + cached_byte_size_(0) { SharedCtor(true); } @@ -350,21 +378,20 @@ void DynamicMessage::SharedCtor(bool lock_factory) { const Descriptor* descriptor = type_info_->type; // Initialize oneof cases. + int oneof_count = 0; for (int i = 0; i < descriptor->oneof_decl_count(); ++i) { - new (OffsetToPointer(type_info_->oneof_case_offset + sizeof(uint32) * i)) - uint32(0); + if (descriptor->oneof_decl(i)->is_synthetic()) continue; + new (OffsetToPointer(type_info_->oneof_case_offset + + sizeof(uint32) * oneof_count++)) uint32(0); } - new (OffsetToPointer(type_info_->internal_metadata_offset)) - InternalMetadataWithArena(arena_); - if (type_info_->extensions_offset != -1) { new (OffsetToPointer(type_info_->extensions_offset)) ExtensionSet(arena_); } for (int i = 0; i < descriptor->field_count(); i++) { const FieldDescriptor* field = descriptor->field(i); void* field_ptr = OffsetToPointer(type_info_->offsets[i]); - if (field->containing_oneof()) { + if (InRealOneof(field)) { continue; } switch (field->cpp_type()) { @@ -459,9 +486,7 @@ void DynamicMessage::SharedCtor(bool lock_factory) { DynamicMessage::~DynamicMessage() { const Descriptor* descriptor = type_info_->type; - reinterpret_cast( - OffsetToPointer(type_info_->internal_metadata_offset)) - ->~InternalMetadataWithArena(); + _internal_metadata_.Delete(); if (type_info_->extensions_offset != -1) { reinterpret_cast( @@ -479,7 +504,7 @@ DynamicMessage::~DynamicMessage() { // be touched. for (int i = 0; i < descriptor->field_count(); i++) { const FieldDescriptor* field = descriptor->field(i); - if (field->containing_oneof()) { + if (InRealOneof(field)) { void* field_ptr = OffsetToPointer(type_info_->oneof_case_offset + sizeof(uint32) * field->containing_oneof()->index()); @@ -676,16 +701,22 @@ const Message* DynamicMessageFactory::GetPrototypeNoLock( type_info->pool = (pool_ == NULL) ? type->file()->pool() : pool_; type_info->factory = this; - // We need to construct all the structures passed to - // GeneratedMessageReflection's constructor. This includes: + // We need to construct all the structures passed to Reflection's constructor. + // This includes: // - A block of memory that contains space for all the message's fields. // - An array of integers indicating the byte offset of each field within // this block. // - A big bitfield containing a bit for each field indicating whether // or not that field is set. + int real_oneof_count = 0; + for (int i = 0; i < type->oneof_decl_count(); i++) { + if (!type->oneof_decl(i)->is_synthetic()) { + real_oneof_count++; + } + } // Compute size and offsets. - uint32* offsets = new uint32[type->field_count() + type->oneof_decl_count()]; + uint32* offsets = new uint32[type->field_count() + real_oneof_count]; type_info->offsets.reset(offsets); // Decide all field offsets by packing in order. @@ -695,26 +726,35 @@ const Message* DynamicMessageFactory::GetPrototypeNoLock( size = AlignOffset(size); // Next the has_bits, which is an array of uint32s. - if (type->file()->syntax() == FileDescriptor::SYNTAX_PROTO3) { - type_info->has_bits_offset = -1; - } else { - type_info->has_bits_offset = size; - int has_bits_array_size = - DivideRoundingUp(type->field_count(), bitsizeof(uint32)); + type_info->has_bits_offset = -1; + int max_hasbit = 0; + for (int i = 0; i < type->field_count(); i++) { + if (HasHasbit(type->field(i))) { + if (type_info->has_bits_offset == -1) { + // At least one field in the message requires a hasbit, so allocate + // hasbits. + type_info->has_bits_offset = size; + uint32* has_bits_indices = new uint32[type->field_count()]; + for (int i = 0; i < type->field_count(); i++) { + // Initialize to -1, fields that need a hasbit will overwrite. + has_bits_indices[i] = static_cast(-1); + } + type_info->has_bits_indices.reset(has_bits_indices); + } + type_info->has_bits_indices[i] = max_hasbit++; + } + } + + if (max_hasbit > 0) { + int has_bits_array_size = DivideRoundingUp(max_hasbit, bitsizeof(uint32)); size += has_bits_array_size * sizeof(uint32); size = AlignOffset(size); - - uint32* has_bits_indices = new uint32[type->field_count()]; - for (int i = 0; i < type->field_count(); i++) { - has_bits_indices[i] = i; - } - type_info->has_bits_indices.reset(has_bits_indices); } // The oneof_case, if any. It is an array of uint32s. - if (type->oneof_decl_count() > 0) { + if (real_oneof_count > 0) { type_info->oneof_case_offset = size; - size += type->oneof_decl_count() * sizeof(uint32); + size += real_oneof_count * sizeof(uint32); size = AlignOffset(size); } @@ -735,7 +775,7 @@ const Message* DynamicMessageFactory::GetPrototypeNoLock( for (int i = 0; i < type->field_count(); i++) { // Make sure field is aligned to avoid bus errors. // Oneof fields do not use any space. - if (!type->field(i)->containing_oneof()) { + if (!InRealOneof(type->field(i))) { int field_size = FieldSpaceUsed(type->field(i)); size = AlignTo(size, std::min(kSafeAlignment, field_size)); offsets[i] = size; @@ -745,16 +785,13 @@ const Message* DynamicMessageFactory::GetPrototypeNoLock( // The oneofs. for (int i = 0; i < type->oneof_decl_count(); i++) { - size = AlignTo(size, kSafeAlignment); - offsets[type->field_count() + i] = size; - size += kMaxOneofUnionSize; + if (!type->oneof_decl(i)->is_synthetic()) { + size = AlignTo(size, kSafeAlignment); + offsets[type->field_count() + i] = size; + size += kMaxOneofUnionSize; + } } - // Add the InternalMetadataWithArena to the end. - size = AlignOffset(size); - type_info->internal_metadata_offset = size; - size += sizeof(InternalMetadataWithArena); - type_info->weak_field_map_offset = -1; // Align the final size to make sure no clever allocators think that @@ -763,17 +800,16 @@ const Message* DynamicMessageFactory::GetPrototypeNoLock( // Construct the reflection object. - if (type->oneof_decl_count() > 0) { - // Compute the size of default oneof instance and offsets of default - // oneof fields. - for (int i = 0; i < type->oneof_decl_count(); i++) { - for (int j = 0; j < type->oneof_decl(i)->field_count(); j++) { - const FieldDescriptor* field = type->oneof_decl(i)->field(j); - int field_size = OneofFieldSpaceUsed(field); - size = AlignTo(size, std::min(kSafeAlignment, field_size)); - offsets[field->index()] = size; - size += field_size; - } + // Compute the size of default oneof instance and offsets of default + // oneof fields. + for (int i = 0; i < type->oneof_decl_count(); i++) { + if (type->oneof_decl(i)->is_synthetic()) continue; + for (int j = 0; j < type->oneof_decl(i)->field_count(); j++) { + const FieldDescriptor* field = type->oneof_decl(i)->field(j); + int field_size = OneofFieldSpaceUsed(field); + size = AlignTo(size, std::min(kSafeAlignment, field_size)); + offsets[field->index()] = size; + size += field_size; } } size = AlignOffset(size); @@ -785,24 +821,25 @@ const Message* DynamicMessageFactory::GetPrototypeNoLock( // of dynamic message to avoid dead lock. DynamicMessage* prototype = new (base) DynamicMessage(type_info, false); - if (type->oneof_decl_count() > 0 || num_weak_fields > 0) { + if (real_oneof_count > 0 || num_weak_fields > 0) { // Construct default oneof instance. ConstructDefaultOneofInstance(type_info->type, type_info->offsets.get(), prototype); } - internal::ReflectionSchema schema = {type_info->prototype, - type_info->offsets.get(), - type_info->has_bits_indices.get(), - type_info->has_bits_offset, - type_info->internal_metadata_offset, - type_info->extensions_offset, - type_info->oneof_case_offset, - type_info->size, - type_info->weak_field_map_offset}; + internal::ReflectionSchema schema = { + type_info->prototype, + type_info->offsets.get(), + type_info->has_bits_indices.get(), + type_info->has_bits_offset, + PROTOBUF_FIELD_OFFSET(DynamicMessage, _internal_metadata_), + type_info->extensions_offset, + type_info->oneof_case_offset, + type_info->size, + type_info->weak_field_map_offset}; - type_info->reflection.reset(new GeneratedMessageReflection( - type_info->type, schema, type_info->pool, this)); + type_info->reflection.reset( + new Reflection(type_info->type, schema, type_info->pool, this)); // Cross link prototypes. prototype->CrossLinkPrototypes(); @@ -814,6 +851,7 @@ void DynamicMessageFactory::ConstructDefaultOneofInstance( const Descriptor* type, const uint32 offsets[], void* default_oneof_or_weak_instance) { for (int i = 0; i < type->oneof_decl_count(); i++) { + if (type->oneof_decl(i)->is_synthetic()) continue; for (int j = 0; j < type->oneof_decl(i)->field_count(); j++) { const FieldDescriptor* field = type->oneof_decl(i)->field(j); void* field_ptr = @@ -860,6 +898,7 @@ void DynamicMessageFactory::DeleteDefaultOneofInstance( const Descriptor* type, const uint32 offsets[], const void* default_oneof_instance) { for (int i = 0; i < type->oneof_decl_count(); i++) { + if (type->oneof_decl(i)->is_synthetic()) continue; for (int j = 0; j < type->oneof_decl(i)->field_count(); j++) { const FieldDescriptor* field = type->oneof_decl(i)->field(j); if (field->cpp_type() == FieldDescriptor::CPPTYPE_STRING) { @@ -875,3 +914,5 @@ void DynamicMessageFactory::DeleteDefaultOneofInstance( } // namespace protobuf } // namespace google + +#include // NOLINT diff --git a/third_party/protobuf/src/google/protobuf/dynamic_message.h b/third_party/protobuf/src/google/protobuf/dynamic_message.h index 765f9e3a..9bd609f8 100644 --- a/third_party/protobuf/src/google/protobuf/dynamic_message.h +++ b/third_party/protobuf/src/google/protobuf/dynamic_message.h @@ -45,6 +45,7 @@ #include #include #include +#include #include #ifdef SWIG @@ -158,16 +159,13 @@ class PROTOBUF_EXPORT DynamicMapSorter { static std::vector Sort(const Message& message, int map_size, const Reflection* reflection, const FieldDescriptor* field) { - std::vector result(static_cast(map_size)); - const RepeatedPtrField& map_field = - reflection->GetRepeatedPtrField(message, field); - size_t i = 0; - for (RepeatedPtrField::const_pointer_iterator it = - map_field.pointer_begin(); - it != map_field.pointer_end();) { - result[i++] = *it++; + std::vector result; + result.reserve(map_size); + RepeatedFieldRef map_field = + reflection->GetRepeatedFieldRef(message, field); + for (auto it = map_field.begin(); it != map_field.end(); ++it) { + result.push_back(&*it); } - GOOGLE_DCHECK_EQ(result.size(), i); MapEntryMessageComparator comparator(field->message_type()); std::stable_sort(result.begin(), result.end(), comparator); // Complain if the keys aren't in ascending order. diff --git a/third_party/protobuf/src/google/protobuf/dynamic_message_unittest.cc b/third_party/protobuf/src/google/protobuf/dynamic_message_unittest.cc index 42759de7..6db6f5cf 100644 --- a/third_party/protobuf/src/google/protobuf/dynamic_message_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/dynamic_message_unittest.cc @@ -291,7 +291,7 @@ TEST_F(DynamicMessageTest, Proto3) { const Reflection* refl = message->GetReflection(); const Descriptor* desc = message->GetDescriptor(); - // Just test a single primtive and single message field here to make sure we + // Just test a single primitive and single message field here to make sure we // are getting the no-field-presence semantics elsewhere. DynamicMessage uses // GeneratedMessageReflection under the hood, so the rest should be fine as // long as GMR recognizes that we're using a proto3 message. diff --git a/third_party/protobuf/src/google/protobuf/empty.pb.cc b/third_party/protobuf/src/google/protobuf/empty.pb.cc index eb1e4667..855db18b 100644 --- a/third_party/protobuf/src/google/protobuf/empty.pb.cc +++ b/third_party/protobuf/src/google/protobuf/empty.pb.cc @@ -5,7 +5,6 @@ #include -#include #include #include #include @@ -33,7 +32,7 @@ static void InitDefaultsscc_info_Empty_google_2fprotobuf_2fempty_2eproto() { } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Empty_google_2fprotobuf_2fempty_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Empty_google_2fprotobuf_2fempty_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Empty_google_2fprotobuf_2fempty_2eproto}, {}}; static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fempty_2eproto[1]; static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fempty_2eproto = nullptr; @@ -54,7 +53,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Empty_default_instance_), }; -const char descriptor_table_protodef_google_2fprotobuf_2fempty_2eproto[] = +const char descriptor_table_protodef_google_2fprotobuf_2fempty_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\033google/protobuf/empty.proto\022\017google.pr" "otobuf\"\007\n\005EmptyBv\n\023com.google.protobufB\n" "EmptyProtoP\001Z\'github.com/golang/protobuf" @@ -67,45 +66,34 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_goo &scc_info_Empty_google_2fprotobuf_2fempty_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fempty_2eproto_once; -static bool descriptor_table_google_2fprotobuf_2fempty_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fempty_2eproto = { - &descriptor_table_google_2fprotobuf_2fempty_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2fempty_2eproto, "google/protobuf/empty.proto", 183, + false, false, descriptor_table_protodef_google_2fprotobuf_2fempty_2eproto, "google/protobuf/empty.proto", 183, &descriptor_table_google_2fprotobuf_2fempty_2eproto_once, descriptor_table_google_2fprotobuf_2fempty_2eproto_sccs, descriptor_table_google_2fprotobuf_2fempty_2eproto_deps, 1, 0, schemas, file_default_instances, TableStruct_google_2fprotobuf_2fempty_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fempty_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fempty_2eproto, file_level_service_descriptors_google_2fprotobuf_2fempty_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_google_2fprotobuf_2fempty_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fempty_2eproto), true); +static bool dynamic_init_dummy_google_2fprotobuf_2fempty_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fempty_2eproto)), true); PROTOBUF_NAMESPACE_OPEN // =================================================================== void Empty::InitAsDefaultInstance() { } -class Empty::HasBitSetters { +class Empty::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Empty::Empty() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.Empty) -} Empty::Empty(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Empty) } Empty::Empty(const Empty& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:google.protobuf.Empty) } @@ -115,10 +103,11 @@ void Empty::SharedCtor() { Empty::~Empty() { // @@protoc_insertion_point(destructor:google.protobuf.Empty) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Empty::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void Empty::ArenaDtor(void* object) { @@ -142,28 +131,25 @@ void Empty::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Empty::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); - switch (tag >> 3) { - default: { if ((tag & 7) == 4 || tag == 0) { ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; - } - } // switch } // while success: return ptr; @@ -172,55 +158,16 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Empty::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.Empty) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.Empty) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.Empty) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -void Empty::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.Empty) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.Empty) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Empty::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Empty::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Empty) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Empty) return target; @@ -230,15 +177,14 @@ size_t Empty::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Empty) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -262,7 +208,7 @@ void Empty::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Empty::MergeFrom(const Empty& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Empty) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -286,28 +232,9 @@ bool Empty::IsInitialized() const { return true; } -void Empty::Swap(Empty* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - Empty* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void Empty::UnsafeArenaSwap(Empty* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void Empty::InternalSwap(Empty* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); } ::PROTOBUF_NAMESPACE_ID::Metadata Empty::GetMetadata() const { diff --git a/third_party/protobuf/src/google/protobuf/empty.pb.h b/third_party/protobuf/src/google/protobuf/empty.pb.h index 8d48bb9e..1000ae38 100644 --- a/third_party/protobuf/src/google/protobuf/empty.pb.h +++ b/third_party/protobuf/src/google/protobuf/empty.pb.h @@ -8,12 +8,12 @@ #include #include -#if PROTOBUF_VERSION < 3008000 +#if PROTOBUF_VERSION < 3012000 #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 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3012004 < 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. @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include // IWYU pragma: export @@ -66,10 +66,10 @@ PROTOBUF_NAMESPACE_OPEN // =================================================================== -class PROTOBUF_EXPORT Empty : +class PROTOBUF_EXPORT Empty PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Empty) */ { public: - Empty(); + inline Empty() : Empty(nullptr) {}; virtual ~Empty(); Empty(const Empty& from); @@ -83,7 +83,7 @@ class PROTOBUF_EXPORT Empty : return *this; } inline Empty& operator=(Empty&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -91,12 +91,6 @@ class PROTOBUF_EXPORT Empty : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -116,11 +110,22 @@ class PROTOBUF_EXPORT Empty : static constexpr int kIndexInFileMessages = 0; - void UnsafeArenaSwap(Empty* other); - void Swap(Empty* other); friend void swap(Empty& a, Empty& b) { a.Swap(&b); } + inline void Swap(Empty* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Empty* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -139,16 +144,9 @@ class PROTOBUF_EXPORT Empty : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -165,13 +163,6 @@ class PROTOBUF_EXPORT Empty : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -189,9 +180,8 @@ class PROTOBUF_EXPORT Empty : // @@protoc_insertion_point(class_scope:google.protobuf.Empty) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; diff --git a/third_party/protobuf/src/google/protobuf/extension_set.cc b/third_party/protobuf/src/google/protobuf/extension_set.cc index 67b0fcab..3b1441e6 100644 --- a/third_party/protobuf/src/google/protobuf/extension_set.cc +++ b/third_party/protobuf/src/google/protobuf/extension_set.cc @@ -1063,7 +1063,7 @@ void ExtensionSet::InternalExtensionMergeFrom( } void ExtensionSet::Swap(ExtensionSet* x) { - if (GetArenaNoVirtual() == x->GetArenaNoVirtual()) { + if (GetArena() == x->GetArena()) { using std::swap; swap(flat_capacity_, x->flat_capacity_); swap(flat_size_, x->flat_size_); @@ -1091,7 +1091,7 @@ void ExtensionSet::SwapExtension(ExtensionSet* other, int number) { } if (this_ext != NULL && other_ext != NULL) { - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + if (GetArena() == other->GetArena()) { using std::swap; swap(*this_ext, *other_ext); } else { @@ -1112,7 +1112,7 @@ void ExtensionSet::SwapExtension(ExtensionSet* other, int number) { } if (this_ext == NULL) { - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + if (GetArena() == other->GetArena()) { *Insert(number).first = *other_ext; } else { InternalExtensionMergeFrom(number, *other_ext); @@ -1122,7 +1122,7 @@ void ExtensionSet::SwapExtension(ExtensionSet* other, int number) { } if (other_ext == NULL) { - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + if (GetArena() == other->GetArena()) { *other->Insert(number).first = *this_ext; } else { other->InternalExtensionMergeFrom(number, *this_ext); @@ -1196,32 +1196,30 @@ bool ExtensionSet::ParseField(uint32 tag, io::CodedInputStream* input, } } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* ExtensionSet::ParseField( - uint64 tag, const char* ptr, const MessageLite* containing_type, - internal::InternalMetadataWithArenaLite* metadata, - internal::ParseContext* ctx) { +const char* ExtensionSet::ParseField(uint64 tag, const char* ptr, + const MessageLite* containing_type, + internal::InternalMetadata* metadata, + internal::ParseContext* ctx) { GeneratedExtensionFinder finder(containing_type); int number = tag >> 3; bool was_packed_on_wire; ExtensionInfo extension; if (!FindExtensionInfoFromFieldNumber(tag & 7, number, &finder, &extension, &was_packed_on_wire)) { - return UnknownFieldParse(tag, metadata->mutable_unknown_fields(), ptr, ctx); + return UnknownFieldParse( + tag, metadata->mutable_unknown_fields(), ptr, ctx); } - return ParseFieldWithExtensionInfo(number, was_packed_on_wire, extension, - metadata, ptr, ctx); + return ParseFieldWithExtensionInfo( + number, was_packed_on_wire, extension, metadata, ptr, ctx); } const char* ExtensionSet::ParseMessageSetItem( const char* ptr, const MessageLite* containing_type, - internal::InternalMetadataWithArenaLite* metadata, - internal::ParseContext* ctx) { - return ParseMessageSetItemTmpl(ptr, containing_type, metadata, ctx); + internal::InternalMetadata* metadata, internal::ParseContext* ctx) { + return ParseMessageSetItemTmpl(ptr, containing_type, + metadata, ctx); } -#endif - bool ExtensionSet::ParseFieldWithExtensionInfo(int number, bool was_packed_on_wire, const ExtensionInfo& extension, @@ -1465,23 +1463,35 @@ bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input, return ParseMessageSetLite(input, &finder, &skipper); } -void ExtensionSet::SerializeWithCachedSizes( - int start_field_number, int end_field_number, - io::CodedOutputStream* output) const { +uint8* ExtensionSet::_InternalSerialize(int start_field_number, + int end_field_number, uint8* target, + io::EpsCopyOutputStream* stream) const { if (PROTOBUF_PREDICT_FALSE(is_large())) { const auto& end = map_.large->end(); for (auto it = map_.large->lower_bound(start_field_number); it != end && it->first < end_field_number; ++it) { - it->second.SerializeFieldWithCachedSizes(it->first, output); + target = it->second.InternalSerializeFieldWithCachedSizesToArray( + it->first, target, stream); } - return; + return target; } const KeyValue* end = flat_end(); for (const KeyValue* it = std::lower_bound( flat_begin(), end, start_field_number, KeyValue::FirstComparator()); it != end && it->first < end_field_number; ++it) { - it->second.SerializeFieldWithCachedSizes(it->first, output); + target = it->second.InternalSerializeFieldWithCachedSizesToArray( + it->first, target, stream); } + return target; +} + +uint8* ExtensionSet::InternalSerializeMessageSetWithCachedSizesToArray( + uint8* target, io::EpsCopyOutputStream* stream) const { + ForEach([&target, stream](int number, const Extension& ext) { + target = ext.InternalSerializeMessageSetItemWithCachedSizesToArray( + number, target, stream); + }); + return target; } size_t ExtensionSet::ByteSize() const { @@ -1552,115 +1562,6 @@ void ExtensionSet::Extension::Clear() { } } -void ExtensionSet::Extension::SerializeFieldWithCachedSizes( - int number, io::CodedOutputStream* output) const { - if (is_repeated) { - if (is_packed) { - if (cached_size == 0) return; - - WireFormatLite::WriteTag( - number, WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(cached_size); - - switch (real_type(type)) { -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ - case WireFormatLite::TYPE_##UPPERCASE: \ - for (int i = 0; i < repeated_##LOWERCASE##_value->size(); i++) { \ - WireFormatLite::Write##CAMELCASE##NoTag( \ - repeated_##LOWERCASE##_value->Get(i), output); \ - } \ - break - - HANDLE_TYPE(INT32, Int32, int32); - HANDLE_TYPE(INT64, Int64, int64); - HANDLE_TYPE(UINT32, UInt32, uint32); - HANDLE_TYPE(UINT64, UInt64, uint64); - HANDLE_TYPE(SINT32, SInt32, int32); - HANDLE_TYPE(SINT64, SInt64, int64); - HANDLE_TYPE(FIXED32, Fixed32, uint32); - HANDLE_TYPE(FIXED64, Fixed64, uint64); - HANDLE_TYPE(SFIXED32, SFixed32, int32); - HANDLE_TYPE(SFIXED64, SFixed64, int64); - HANDLE_TYPE(FLOAT, Float, float); - HANDLE_TYPE(DOUBLE, Double, double); - HANDLE_TYPE(BOOL, Bool, bool); - HANDLE_TYPE(ENUM, Enum, enum); -#undef HANDLE_TYPE - - case WireFormatLite::TYPE_STRING: - case WireFormatLite::TYPE_BYTES: - case WireFormatLite::TYPE_GROUP: - case WireFormatLite::TYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Non-primitive types can't be packed."; - break; - } - } else { - switch (real_type(type)) { -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ - case WireFormatLite::TYPE_##UPPERCASE: \ - for (int i = 0; i < repeated_##LOWERCASE##_value->size(); i++) { \ - WireFormatLite::Write##CAMELCASE( \ - number, repeated_##LOWERCASE##_value->Get(i), output); \ - } \ - break - - HANDLE_TYPE(INT32, Int32, int32); - HANDLE_TYPE(INT64, Int64, int64); - HANDLE_TYPE(UINT32, UInt32, uint32); - HANDLE_TYPE(UINT64, UInt64, uint64); - HANDLE_TYPE(SINT32, SInt32, int32); - HANDLE_TYPE(SINT64, SInt64, int64); - HANDLE_TYPE(FIXED32, Fixed32, uint32); - HANDLE_TYPE(FIXED64, Fixed64, uint64); - HANDLE_TYPE(SFIXED32, SFixed32, int32); - HANDLE_TYPE(SFIXED64, SFixed64, int64); - HANDLE_TYPE(FLOAT, Float, float); - HANDLE_TYPE(DOUBLE, Double, double); - HANDLE_TYPE(BOOL, Bool, bool); - HANDLE_TYPE(STRING, String, string); - HANDLE_TYPE(BYTES, Bytes, string); - HANDLE_TYPE(ENUM, Enum, enum); - HANDLE_TYPE(GROUP, Group, message); - HANDLE_TYPE(MESSAGE, Message, message); -#undef HANDLE_TYPE - } - } - } else if (!is_cleared) { - switch (real_type(type)) { -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, VALUE) \ - case WireFormatLite::TYPE_##UPPERCASE: \ - WireFormatLite::Write##CAMELCASE(number, VALUE, output); \ - break - - HANDLE_TYPE(INT32, Int32, int32_value); - HANDLE_TYPE(INT64, Int64, int64_value); - HANDLE_TYPE(UINT32, UInt32, uint32_value); - HANDLE_TYPE(UINT64, UInt64, uint64_value); - HANDLE_TYPE(SINT32, SInt32, int32_value); - HANDLE_TYPE(SINT64, SInt64, int64_value); - HANDLE_TYPE(FIXED32, Fixed32, uint32_value); - HANDLE_TYPE(FIXED64, Fixed64, uint64_value); - HANDLE_TYPE(SFIXED32, SFixed32, int32_value); - HANDLE_TYPE(SFIXED64, SFixed64, int64_value); - HANDLE_TYPE(FLOAT, Float, float_value); - HANDLE_TYPE(DOUBLE, Double, double_value); - HANDLE_TYPE(BOOL, Bool, bool_value); - HANDLE_TYPE(STRING, String, *string_value); - HANDLE_TYPE(BYTES, Bytes, *string_value); - HANDLE_TYPE(ENUM, Enum, enum_value); - HANDLE_TYPE(GROUP, Group, *message_value); -#undef HANDLE_TYPE - case WireFormatLite::TYPE_MESSAGE: - if (is_lazy) { - lazymessage_value->WriteMessage(number, output); - } else { - WireFormatLite::WriteMessage(number, *message_value, output); - } - break; - } - } -} - size_t ExtensionSet::Extension::ByteSize(int number) const { size_t result = 0; @@ -1776,7 +1677,7 @@ size_t ExtensionSet::Extension::ByteSize(int number) const { #undef HANDLE_TYPE case WireFormatLite::TYPE_MESSAGE: { if (is_lazy) { - size_t size = lazymessage_value->ByteSize(); + size_t size = lazymessage_value->ByteSizeLong(); result += io::CodedOutputStream::VarintSize32(size) + size; } else { result += WireFormatLite::MessageSize(*message_value); @@ -2025,33 +1926,184 @@ RepeatedStringTypeTraits::GetDefaultRepeatedField() { return instance; } -void ExtensionSet::Extension::SerializeMessageSetItemWithCachedSizes( - int number, io::CodedOutputStream* output) const { +uint8* ExtensionSet::Extension::InternalSerializeFieldWithCachedSizesToArray( + int number, uint8* target, io::EpsCopyOutputStream* stream) const { + if (is_repeated) { + if (is_packed) { + if (cached_size == 0) return target; + + target = stream->EnsureSpace(target); + target = WireFormatLite::WriteTagToArray( + number, WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); + target = WireFormatLite::WriteInt32NoTagToArray(cached_size, target); + + switch (real_type(type)) { +#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ + case WireFormatLite::TYPE_##UPPERCASE: \ + for (int i = 0; i < repeated_##LOWERCASE##_value->size(); i++) { \ + target = stream->EnsureSpace(target); \ + target = WireFormatLite::Write##CAMELCASE##NoTagToArray( \ + repeated_##LOWERCASE##_value->Get(i), target); \ + } \ + break + + HANDLE_TYPE(INT32, Int32, int32); + HANDLE_TYPE(INT64, Int64, int64); + HANDLE_TYPE(UINT32, UInt32, uint32); + HANDLE_TYPE(UINT64, UInt64, uint64); + HANDLE_TYPE(SINT32, SInt32, int32); + HANDLE_TYPE(SINT64, SInt64, int64); + HANDLE_TYPE(FIXED32, Fixed32, uint32); + HANDLE_TYPE(FIXED64, Fixed64, uint64); + HANDLE_TYPE(SFIXED32, SFixed32, int32); + HANDLE_TYPE(SFIXED64, SFixed64, int64); + HANDLE_TYPE(FLOAT, Float, float); + HANDLE_TYPE(DOUBLE, Double, double); + HANDLE_TYPE(BOOL, Bool, bool); + HANDLE_TYPE(ENUM, Enum, enum); +#undef HANDLE_TYPE + + case WireFormatLite::TYPE_STRING: + case WireFormatLite::TYPE_BYTES: + case WireFormatLite::TYPE_GROUP: + case WireFormatLite::TYPE_MESSAGE: + GOOGLE_LOG(FATAL) << "Non-primitive types can't be packed."; + break; + } + } else { + switch (real_type(type)) { +#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ + case WireFormatLite::TYPE_##UPPERCASE: \ + for (int i = 0; i < repeated_##LOWERCASE##_value->size(); i++) { \ + target = stream->EnsureSpace(target); \ + target = WireFormatLite::Write##CAMELCASE##ToArray( \ + number, repeated_##LOWERCASE##_value->Get(i), target); \ + } \ + break + + HANDLE_TYPE(INT32, Int32, int32); + HANDLE_TYPE(INT64, Int64, int64); + HANDLE_TYPE(UINT32, UInt32, uint32); + HANDLE_TYPE(UINT64, UInt64, uint64); + HANDLE_TYPE(SINT32, SInt32, int32); + HANDLE_TYPE(SINT64, SInt64, int64); + HANDLE_TYPE(FIXED32, Fixed32, uint32); + HANDLE_TYPE(FIXED64, Fixed64, uint64); + HANDLE_TYPE(SFIXED32, SFixed32, int32); + HANDLE_TYPE(SFIXED64, SFixed64, int64); + HANDLE_TYPE(FLOAT, Float, float); + HANDLE_TYPE(DOUBLE, Double, double); + HANDLE_TYPE(BOOL, Bool, bool); + HANDLE_TYPE(ENUM, Enum, enum); +#undef HANDLE_TYPE +#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ + case WireFormatLite::TYPE_##UPPERCASE: \ + for (int i = 0; i < repeated_##LOWERCASE##_value->size(); i++) { \ + target = stream->EnsureSpace(target); \ + target = stream->WriteString( \ + number, repeated_##LOWERCASE##_value->Get(i), target); \ + } \ + break + HANDLE_TYPE(STRING, String, string); + HANDLE_TYPE(BYTES, Bytes, string); +#undef HANDLE_TYPE +#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ + case WireFormatLite::TYPE_##UPPERCASE: \ + for (int i = 0; i < repeated_##LOWERCASE##_value->size(); i++) { \ + target = stream->EnsureSpace(target); \ + target = WireFormatLite::InternalWrite##CAMELCASE( \ + number, repeated_##LOWERCASE##_value->Get(i), target, stream); \ + } \ + break + + HANDLE_TYPE(GROUP, Group, message); + HANDLE_TYPE(MESSAGE, Message, message); +#undef HANDLE_TYPE + } + } + } else if (!is_cleared) { + switch (real_type(type)) { +#define HANDLE_TYPE(UPPERCASE, CAMELCASE, VALUE) \ + case WireFormatLite::TYPE_##UPPERCASE: \ + target = stream->EnsureSpace(target); \ + target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \ + break + + HANDLE_TYPE(INT32, Int32, int32_value); + HANDLE_TYPE(INT64, Int64, int64_value); + HANDLE_TYPE(UINT32, UInt32, uint32_value); + HANDLE_TYPE(UINT64, UInt64, uint64_value); + HANDLE_TYPE(SINT32, SInt32, int32_value); + HANDLE_TYPE(SINT64, SInt64, int64_value); + HANDLE_TYPE(FIXED32, Fixed32, uint32_value); + HANDLE_TYPE(FIXED64, Fixed64, uint64_value); + HANDLE_TYPE(SFIXED32, SFixed32, int32_value); + HANDLE_TYPE(SFIXED64, SFixed64, int64_value); + HANDLE_TYPE(FLOAT, Float, float_value); + HANDLE_TYPE(DOUBLE, Double, double_value); + HANDLE_TYPE(BOOL, Bool, bool_value); + HANDLE_TYPE(ENUM, Enum, enum_value); +#undef HANDLE_TYPE +#define HANDLE_TYPE(UPPERCASE, CAMELCASE, VALUE) \ + case WireFormatLite::TYPE_##UPPERCASE: \ + target = stream->EnsureSpace(target); \ + target = stream->WriteString(number, VALUE, target); \ + break + HANDLE_TYPE(STRING, String, *string_value); + HANDLE_TYPE(BYTES, Bytes, *string_value); +#undef HANDLE_TYPE + case WireFormatLite::TYPE_GROUP: + target = stream->EnsureSpace(target); + target = WireFormatLite::InternalWriteGroup(number, *message_value, + target, stream); + break; + case WireFormatLite::TYPE_MESSAGE: + if (is_lazy) { + target = + lazymessage_value->WriteMessageToArray(number, target, stream); + } else { + target = stream->EnsureSpace(target); + target = WireFormatLite::InternalWriteMessage(number, *message_value, + target, stream); + } + break; + } + } + return target; +} + +uint8* +ExtensionSet::Extension::InternalSerializeMessageSetItemWithCachedSizesToArray( + int number, uint8* target, io::EpsCopyOutputStream* stream) const { if (type != WireFormatLite::TYPE_MESSAGE || is_repeated) { // Not a valid MessageSet extension, but serialize it the normal way. - SerializeFieldWithCachedSizes(number, output); - return; + GOOGLE_LOG(WARNING) << "Invalid message set extension."; + return InternalSerializeFieldWithCachedSizesToArray(number, target, stream); } - if (is_cleared) return; + if (is_cleared) return target; + target = stream->EnsureSpace(target); // Start group. - output->WriteTag(WireFormatLite::kMessageSetItemStartTag); - + target = io::CodedOutputStream::WriteTagToArray( + WireFormatLite::kMessageSetItemStartTag, target); // Write type ID. - WireFormatLite::WriteUInt32(WireFormatLite::kMessageSetTypeIdNumber, number, - output); + target = WireFormatLite::WriteUInt32ToArray( + WireFormatLite::kMessageSetTypeIdNumber, number, target); // Write message. if (is_lazy) { - lazymessage_value->WriteMessage(WireFormatLite::kMessageSetMessageNumber, - output); + target = lazymessage_value->WriteMessageToArray( + WireFormatLite::kMessageSetMessageNumber, target, stream); } else { - WireFormatLite::WriteMessageMaybeToArray( - WireFormatLite::kMessageSetMessageNumber, *message_value, output); + target = WireFormatLite::InternalWriteMessage( + WireFormatLite::kMessageSetMessageNumber, *message_value, target, + stream); } - // End group. - output->WriteTag(WireFormatLite::kMessageSetItemEndTag); + target = stream->EnsureSpace(target); + target = io::CodedOutputStream::WriteTagToArray( + WireFormatLite::kMessageSetItemEndTag, target); + return target; } size_t ExtensionSet::Extension::MessageSetItemByteSize(int number) const { @@ -2082,13 +2134,6 @@ size_t ExtensionSet::Extension::MessageSetItemByteSize(int number) const { return our_size; } -void ExtensionSet::SerializeMessageSetWithCachedSizes( - io::CodedOutputStream* output) const { - ForEach([output](int number, const Extension& ext) { - ext.SerializeMessageSetItemWithCachedSizes(number, output); - }); -} - size_t ExtensionSet::MessageSetByteSize() const { size_t total_size = 0; ForEach([&total_size](int number, const Extension& ext) { diff --git a/third_party/protobuf/src/google/protobuf/extension_set.h b/third_party/protobuf/src/google/protobuf/extension_set.h index a3696624..b30a9608 100644 --- a/third_party/protobuf/src/google/protobuf/extension_set.h +++ b/third_party/protobuf/src/google/protobuf/extension_set.h @@ -69,13 +69,9 @@ class MessageLite; // message_lite.h class Message; // message.h class MessageFactory; // message.h class UnknownFieldSet; // unknown_field_set.h -namespace io { -class CodedInputStream; // coded_stream.h -class CodedOutputStream; // coded_stream.h -} // namespace io namespace internal { class FieldSkipper; // wire_format_lite.h -} +} // namespace internal } // namespace protobuf } // namespace google @@ -83,8 +79,7 @@ namespace google { namespace protobuf { namespace internal { -class InternalMetadataWithArenaLite; -class InternalMetadataWithArena; +class InternalMetadata; // Used to store values of type WireFormatLite::FieldType without having to // #include wire_format_lite.h. Also, ensures that we use only one byte to @@ -150,7 +145,7 @@ class PROTOBUF_EXPORT GeneratedExtensionFinder : public ExtensionFinder { public: GeneratedExtensionFinder(const MessageLite* containing_type) : containing_type_(containing_type) {} - virtual ~GeneratedExtensionFinder() {} + ~GeneratedExtensionFinder() override {} // Returns true and fills in *output if found, otherwise returns false. bool Find(int number, ExtensionInfo* output) override; @@ -272,11 +267,11 @@ class PROTOBUF_EXPORT ExtensionSet { void SetDouble(int number, FieldType type, double value, desc); void SetBool(int number, FieldType type, bool value, desc); void SetEnum(int number, FieldType type, int value, desc); - void SetString(int number, FieldType type, const std::string& value, desc); + void SetString(int number, FieldType type, std::string value, desc); std::string* MutableString(int number, FieldType type, desc); MessageLite* MutableMessage(int number, FieldType type, const MessageLite& prototype, desc); - MessageLite* MutableMessage(const FieldDescriptor* decsriptor, + MessageLite* MutableMessage(const FieldDescriptor* descriptor, MessageFactory* factory); // Adds the given message to the ExtensionSet, taking ownership of the // message object. Existing message with the same number will be deleted. @@ -296,7 +291,7 @@ class PROTOBUF_EXPORT ExtensionSet { MessageLite* UnsafeArenaReleaseMessage(const FieldDescriptor* descriptor, MessageFactory* factory); #undef desc - Arena* GetArenaNoVirtual() const { return arena_; } + Arena* GetArena() const { return arena_; } // repeated fields ------------------------------------------------- @@ -335,7 +330,7 @@ class PROTOBUF_EXPORT ExtensionSet { void SetRepeatedDouble(int number, int index, double value); void SetRepeatedBool(int number, int index, bool value); void SetRepeatedEnum(int number, int index, int value); - void SetRepeatedString(int number, int index, const std::string& value); + void SetRepeatedString(int number, int index, std::string value); std::string* MutableRepeatedString(int number, int index); MessageLite* MutableRepeatedMessage(int number, int index); @@ -348,7 +343,7 @@ class PROTOBUF_EXPORT ExtensionSet { void AddDouble(int number, FieldType type, bool packed, double value, desc); void AddBool(int number, FieldType type, bool packed, bool value, desc); void AddEnum(int number, FieldType type, bool packed, int value, desc); - void AddString(int number, FieldType type, const std::string& value, desc); + void AddString(int number, FieldType type, std::string value, desc); std::string* AddString(int number, FieldType type, desc); MessageLite* AddMessage(int number, FieldType type, const MessageLite& prototype, desc); @@ -398,27 +393,27 @@ class PROTOBUF_EXPORT ExtensionSet { const MessageLite* containing_type, io::CodedOutputStream* unknown_fields); -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER // Lite parser const char* ParseField(uint64 tag, const char* ptr, const MessageLite* containing_type, - internal::InternalMetadataWithArenaLite* metadata, + internal::InternalMetadata* metadata, internal::ParseContext* ctx); // Full parser const char* ParseField(uint64 tag, const char* ptr, const Message* containing_type, - internal::InternalMetadataWithArena* metadata, + internal::InternalMetadata* metadata, internal::ParseContext* ctx); - template + template const char* ParseMessageSet(const char* ptr, const Msg* containing_type, - Metadata* metadata, internal::ParseContext* ctx) { + InternalMetadata* metadata, + internal::ParseContext* ctx) { struct MessageSetItem { const char* _InternalParse(const char* ptr, ParseContext* ctx) { return me->ParseMessageSetItem(ptr, containing_type, metadata, ctx); } ExtensionSet* me; const Msg* containing_type; - Metadata* metadata; + InternalMetadata* metadata; } item{this, containing_type, metadata}; while (!ctx->Done(&ptr)) { uint32 tag; @@ -438,7 +433,6 @@ class PROTOBUF_EXPORT ExtensionSet { } return ptr; } -#endif // Parse an entire message in MessageSet format. Such messages have no // fields, only extensions. @@ -463,20 +457,27 @@ class PROTOBUF_EXPORT ExtensionSet { // to the output stream, using the cached sizes computed when ByteSize() was // last called. Note that the range bounds are inclusive-exclusive. void SerializeWithCachedSizes(int start_field_number, int end_field_number, - io::CodedOutputStream* output) const; + io::CodedOutputStream* output) const { + output->SetCur(_InternalSerialize(start_field_number, end_field_number, + output->Cur(), output->EpsCopy())); + } // Same as SerializeWithCachedSizes, but without any bounds checking. // The caller must ensure that target has sufficient capacity for the // serialized extensions. // // Returns a pointer past the last written byte. - uint8* InternalSerializeWithCachedSizesToArray(int start_field_number, - int end_field_number, - uint8* target) const; + uint8* _InternalSerialize(int start_field_number, int end_field_number, + uint8* target, + io::EpsCopyOutputStream* stream) const; // Like above but serializes in MessageSet format. - void SerializeMessageSetWithCachedSizes(io::CodedOutputStream* output) const; - uint8* InternalSerializeMessageSetWithCachedSizesToArray(uint8* target) const; + void SerializeMessageSetWithCachedSizes(io::CodedOutputStream* output) const { + output->SetCur(InternalSerializeMessageSetWithCachedSizesToArray( + output->Cur(), output->EpsCopy())); + } + uint8* InternalSerializeMessageSetWithCachedSizesToArray( + uint8* target, io::EpsCopyOutputStream* stream) const; // For backward-compatibility, versions of two of the above methods that // serialize deterministically iff SetDefaultSerializationDeterministic() @@ -537,12 +538,9 @@ class PROTOBUF_EXPORT ExtensionSet { virtual bool ReadMessage(const MessageLite& prototype, io::CodedInputStream* input) = 0; -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER virtual const char* _InternalParse(const char* ptr, ParseContext* ctx) = 0; -#endif - virtual void WriteMessage(int number, - io::CodedOutputStream* output) const = 0; - virtual uint8* WriteMessageToArray(int number, uint8* target) const = 0; + virtual uint8* WriteMessageToArray( + int number, uint8* target, io::EpsCopyOutputStream* stream) const = 0; private: virtual void UnusedKeyMethod(); // Dummy key method to avoid weak vtable. @@ -609,14 +607,10 @@ class PROTOBUF_EXPORT ExtensionSet { const FieldDescriptor* descriptor; // Some helper methods for operations on a single Extension. - void SerializeFieldWithCachedSizes(int number, - io::CodedOutputStream* output) const; - uint8* InternalSerializeFieldWithCachedSizesToArray(int number, - uint8* target) const; - void SerializeMessageSetItemWithCachedSizes( - int number, io::CodedOutputStream* output) const; + uint8* InternalSerializeFieldWithCachedSizesToArray( + int number, uint8* target, io::EpsCopyOutputStream* stream) const; uint8* InternalSerializeMessageSetItemWithCachedSizesToArray( - int number, uint8* target) const; + int number, uint8* target, io::EpsCopyOutputStream* stream) const; size_t ByteSize(int number) const; size_t MessageSetItemByteSize(int number) const; void Clear(); @@ -763,10 +757,9 @@ class PROTOBUF_EXPORT ExtensionSet { ExtensionFinder* extension_finder, MessageSetFieldSkipper* field_skipper); -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool FindExtension(int wire_type, uint32 field, const MessageLite* containing_type, - const internal::ParseContext* ctx, + const internal::ParseContext* /*ctx*/, ExtensionInfo* extension, bool* was_packed_on_wire) { GeneratedExtensionFinder finder(containing_type); return FindExtensionInfoFromFieldNumber(wire_type, field, &finder, @@ -777,38 +770,38 @@ class PROTOBUF_EXPORT ExtensionSet { const internal::ParseContext* ctx, ExtensionInfo* extension, bool* was_packed_on_wire); // Used for MessageSet only - const char* ParseFieldMaybeLazily( - uint64 tag, const char* ptr, const MessageLite* containing_type, - internal::InternalMetadataWithArenaLite* metadata, - internal::ParseContext* ctx) { + const char* ParseFieldMaybeLazily(uint64 tag, const char* ptr, + const MessageLite* containing_type, + internal::InternalMetadata* metadata, + internal::ParseContext* ctx) { // Lite MessageSet doesn't implement lazy. return ParseField(tag, ptr, containing_type, metadata, ctx); } - const char* ParseFieldMaybeLazily( - uint64 tag, const char* ptr, const Message* containing_type, - internal::InternalMetadataWithArena* metadata, - internal::ParseContext* ctx); - const char* ParseMessageSetItem( - const char* ptr, const MessageLite* containing_type, - internal::InternalMetadataWithArenaLite* metadata, - internal::ParseContext* ctx); + const char* ParseFieldMaybeLazily(uint64 tag, const char* ptr, + const Message* containing_type, + internal::InternalMetadata* metadata, + internal::ParseContext* ctx); + const char* ParseMessageSetItem(const char* ptr, + const MessageLite* containing_type, + internal::InternalMetadata* metadata, + internal::ParseContext* ctx); const char* ParseMessageSetItem(const char* ptr, const Message* containing_type, - internal::InternalMetadataWithArena* metadata, + internal::InternalMetadata* metadata, internal::ParseContext* ctx); // Implemented in extension_set_inl.h to keep code out of the header file. template const char* ParseFieldWithExtensionInfo(int number, bool was_packed_on_wire, const ExtensionInfo& info, - T* metadata, const char* ptr, + internal::InternalMetadata* metadata, + const char* ptr, internal::ParseContext* ctx); - template + template const char* ParseMessageSetItemTmpl(const char* ptr, const Msg* containing_type, - Metadata* metadata, + internal::InternalMetadata* metadata, internal::ParseContext* ctx); -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER // Hack: RepeatedPtrFieldBase declares ExtensionSet as a friend. This // friendship should automatically extend to ExtensionSet::Extension, but @@ -859,20 +852,19 @@ class PROTOBUF_EXPORT ExtensionSet { // These are just for convenience... inline void ExtensionSet::SetString(int number, FieldType type, - const std::string& value, + std::string value, const FieldDescriptor* descriptor) { - MutableString(number, type, descriptor)->assign(value); + MutableString(number, type, descriptor)->assign(std::move(value)); } inline void ExtensionSet::SetRepeatedString(int number, int index, - const std::string& value) { - MutableRepeatedString(number, index)->assign(value); + std::string value) { + MutableRepeatedString(number, index)->assign(std::move(value)); } inline void ExtensionSet::AddString(int number, FieldType type, - const std::string& value, + std::string value, const FieldDescriptor* descriptor) { - AddString(number, type, descriptor)->assign(value); + AddString(number, type, descriptor)->assign(std::move(value)); } - // =================================================================== // Glue for generated extension accessors @@ -1335,7 +1327,7 @@ RepeatedMessageTypeTraits::GetDefaultRepeatedField() { // This is the type of actual extension objects. E.g. if you have: // extends Foo with optional int32 bar = 1234; // then "bar" will be defined in C++ as: -// ExtensionIdentifier, 1, false> bar(1234); +// ExtensionIdentifier, 5, false> bar(1234); // // Note that we could, in theory, supply the field number as a template // parameter, and thus make an instance of ExtensionIdentifier have no @@ -1585,8 +1577,7 @@ template & extension) { - const void* volatile unused = &extension; - (void)&unused; // Use address to avoid an extra load of volatile variable. + internal::StrongReference(extension); } } // namespace protobuf diff --git a/third_party/protobuf/src/google/protobuf/extension_set_heavy.cc b/third_party/protobuf/src/google/protobuf/extension_set_heavy.cc index 32ca4356..86e710c6 100644 --- a/third_party/protobuf/src/google/protobuf/extension_set_heavy.cc +++ b/third_party/protobuf/src/google/protobuf/extension_set_heavy.cc @@ -318,7 +318,6 @@ bool DescriptorPoolExtensionFinder::Find(int number, ExtensionInfo* output) { } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool ExtensionSet::FindExtension(int wire_type, uint32 field, const Message* containing_type, const internal::ParseContext* ctx, @@ -341,37 +340,35 @@ bool ExtensionSet::FindExtension(int wire_type, uint32 field, return true; } -const char* ExtensionSet::ParseField( - uint64 tag, const char* ptr, const Message* containing_type, - internal::InternalMetadataWithArena* metadata, - internal::ParseContext* ctx) { +const char* ExtensionSet::ParseField(uint64 tag, const char* ptr, + const Message* containing_type, + internal::InternalMetadata* metadata, + internal::ParseContext* ctx) { int number = tag >> 3; bool was_packed_on_wire; ExtensionInfo extension; if (!FindExtension(tag & 7, number, containing_type, ctx, &extension, &was_packed_on_wire)) { - return UnknownFieldParse(tag, metadata->mutable_unknown_fields(), ptr, ctx); + return UnknownFieldParse( + tag, metadata->mutable_unknown_fields(), ptr, ctx); } - return ParseFieldWithExtensionInfo(number, was_packed_on_wire, extension, - metadata, ptr, ctx); + return ParseFieldWithExtensionInfo( + number, was_packed_on_wire, extension, metadata, ptr, ctx); } const char* ExtensionSet::ParseFieldMaybeLazily( uint64 tag, const char* ptr, const Message* containing_type, - internal::InternalMetadataWithArena* metadata, - internal::ParseContext* ctx) { + internal::InternalMetadata* metadata, internal::ParseContext* ctx) { return ParseField(tag, ptr, containing_type, metadata, ctx); } const char* ExtensionSet::ParseMessageSetItem( const char* ptr, const Message* containing_type, - internal::InternalMetadataWithArena* metadata, - internal::ParseContext* ctx) { - return ParseMessageSetItemTmpl(ptr, containing_type, metadata, ctx); + internal::InternalMetadata* metadata, internal::ParseContext* ctx) { + return ParseMessageSetItemTmpl(ptr, containing_type, + metadata, ctx); } -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - bool ExtensionSet::ParseField(uint32 tag, io::CodedInputStream* input, const Message* containing_type, UnknownFieldSet* unknown_fields) { @@ -472,199 +469,12 @@ size_t ExtensionSet::Extension::SpaceUsedExcludingSelfLong() const { return total_size; } -// The Serialize*ToArray methods are only needed in the heavy library, as -// the lite library only generates SerializeWithCachedSizes. -uint8* ExtensionSet::SerializeWithCachedSizesToArray(int start_field_number, - int end_field_number, - uint8* target) const { - return InternalSerializeWithCachedSizesToArray(start_field_number, - end_field_number, target); -} - uint8* ExtensionSet::SerializeMessageSetWithCachedSizesToArray( uint8* target) const { - return InternalSerializeMessageSetWithCachedSizesToArray(target); -} - -uint8* ExtensionSet::InternalSerializeWithCachedSizesToArray( - int start_field_number, int end_field_number, uint8* target) const { - if (PROTOBUF_PREDICT_FALSE(is_large())) { - const auto& end = map_.large->end(); - for (auto it = map_.large->lower_bound(start_field_number); - it != end && it->first < end_field_number; ++it) { - target = it->second.InternalSerializeFieldWithCachedSizesToArray( - it->first, target); - } - return target; - } - const KeyValue* end = flat_end(); - for (const KeyValue* it = std::lower_bound( - flat_begin(), end, start_field_number, KeyValue::FirstComparator()); - it != end && it->first < end_field_number; ++it) { - target = it->second.InternalSerializeFieldWithCachedSizesToArray(it->first, - target); - } - return target; -} - -uint8* ExtensionSet::InternalSerializeMessageSetWithCachedSizesToArray( - uint8* target) const { - ForEach([&target](int number, const Extension& ext) { - target = ext.InternalSerializeMessageSetItemWithCachedSizesToArray(number, - target); - }); - return target; -} - -uint8* ExtensionSet::Extension::InternalSerializeFieldWithCachedSizesToArray( - int number, uint8* target) const { - if (is_repeated) { - if (is_packed) { - if (cached_size == 0) return target; - - target = WireFormatLite::WriteTagToArray( - number, WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); - target = WireFormatLite::WriteInt32NoTagToArray(cached_size, target); - - switch (real_type(type)) { -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ - case FieldDescriptor::TYPE_##UPPERCASE: \ - for (int i = 0; i < repeated_##LOWERCASE##_value->size(); i++) { \ - target = WireFormatLite::Write##CAMELCASE##NoTagToArray( \ - repeated_##LOWERCASE##_value->Get(i), target); \ - } \ - break - - HANDLE_TYPE(INT32, Int32, int32); - HANDLE_TYPE(INT64, Int64, int64); - HANDLE_TYPE(UINT32, UInt32, uint32); - HANDLE_TYPE(UINT64, UInt64, uint64); - HANDLE_TYPE(SINT32, SInt32, int32); - HANDLE_TYPE(SINT64, SInt64, int64); - HANDLE_TYPE(FIXED32, Fixed32, uint32); - HANDLE_TYPE(FIXED64, Fixed64, uint64); - HANDLE_TYPE(SFIXED32, SFixed32, int32); - HANDLE_TYPE(SFIXED64, SFixed64, int64); - HANDLE_TYPE(FLOAT, Float, float); - HANDLE_TYPE(DOUBLE, Double, double); - HANDLE_TYPE(BOOL, Bool, bool); - HANDLE_TYPE(ENUM, Enum, enum); -#undef HANDLE_TYPE - - case FieldDescriptor::TYPE_STRING: - case FieldDescriptor::TYPE_BYTES: - case FieldDescriptor::TYPE_GROUP: - case FieldDescriptor::TYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Non-primitive types can't be packed."; - break; - } - } else { - switch (real_type(type)) { -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ - case FieldDescriptor::TYPE_##UPPERCASE: \ - for (int i = 0; i < repeated_##LOWERCASE##_value->size(); i++) { \ - target = WireFormatLite::Write##CAMELCASE##ToArray( \ - number, repeated_##LOWERCASE##_value->Get(i), target); \ - } \ - break - - HANDLE_TYPE(INT32, Int32, int32); - HANDLE_TYPE(INT64, Int64, int64); - HANDLE_TYPE(UINT32, UInt32, uint32); - HANDLE_TYPE(UINT64, UInt64, uint64); - HANDLE_TYPE(SINT32, SInt32, int32); - HANDLE_TYPE(SINT64, SInt64, int64); - HANDLE_TYPE(FIXED32, Fixed32, uint32); - HANDLE_TYPE(FIXED64, Fixed64, uint64); - HANDLE_TYPE(SFIXED32, SFixed32, int32); - HANDLE_TYPE(SFIXED64, SFixed64, int64); - HANDLE_TYPE(FLOAT, Float, float); - HANDLE_TYPE(DOUBLE, Double, double); - HANDLE_TYPE(BOOL, Bool, bool); - HANDLE_TYPE(STRING, String, string); - HANDLE_TYPE(BYTES, Bytes, string); - HANDLE_TYPE(ENUM, Enum, enum); -#undef HANDLE_TYPE -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ - case FieldDescriptor::TYPE_##UPPERCASE: \ - for (int i = 0; i < repeated_##LOWERCASE##_value->size(); i++) { \ - target = WireFormatLite::InternalWrite##CAMELCASE##ToArray( \ - number, repeated_##LOWERCASE##_value->Get(i), target); \ - } \ - break - - HANDLE_TYPE(GROUP, Group, message); - HANDLE_TYPE(MESSAGE, Message, message); -#undef HANDLE_TYPE - } - } - } else if (!is_cleared) { - switch (real_type(type)) { -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, VALUE) \ - case FieldDescriptor::TYPE_##UPPERCASE: \ - target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \ - break - - HANDLE_TYPE(INT32, Int32, int32_value); - HANDLE_TYPE(INT64, Int64, int64_value); - HANDLE_TYPE(UINT32, UInt32, uint32_value); - HANDLE_TYPE(UINT64, UInt64, uint64_value); - HANDLE_TYPE(SINT32, SInt32, int32_value); - HANDLE_TYPE(SINT64, SInt64, int64_value); - HANDLE_TYPE(FIXED32, Fixed32, uint32_value); - HANDLE_TYPE(FIXED64, Fixed64, uint64_value); - HANDLE_TYPE(SFIXED32, SFixed32, int32_value); - HANDLE_TYPE(SFIXED64, SFixed64, int64_value); - HANDLE_TYPE(FLOAT, Float, float_value); - HANDLE_TYPE(DOUBLE, Double, double_value); - HANDLE_TYPE(BOOL, Bool, bool_value); - HANDLE_TYPE(STRING, String, *string_value); - HANDLE_TYPE(BYTES, Bytes, *string_value); - HANDLE_TYPE(ENUM, Enum, enum_value); - HANDLE_TYPE(GROUP, Group, *message_value); -#undef HANDLE_TYPE - case FieldDescriptor::TYPE_MESSAGE: - if (is_lazy) { - target = lazymessage_value->WriteMessageToArray(number, target); - } else { - target = WireFormatLite::InternalWriteMessageToArray( - number, *message_value, target); - } - break; - } - } - return target; -} - -uint8* -ExtensionSet::Extension::InternalSerializeMessageSetItemWithCachedSizesToArray( - int number, uint8* target) const { - if (type != WireFormatLite::TYPE_MESSAGE || is_repeated) { - // Not a valid MessageSet extension, but serialize it the normal way. - GOOGLE_LOG(WARNING) << "Invalid message set extension."; - return InternalSerializeFieldWithCachedSizesToArray(number, target); - } - - if (is_cleared) return target; - - // Start group. - target = io::CodedOutputStream::WriteTagToArray( - WireFormatLite::kMessageSetItemStartTag, target); - // Write type ID. - target = WireFormatLite::WriteUInt32ToArray( - WireFormatLite::kMessageSetTypeIdNumber, number, target); - // Write message. - if (is_lazy) { - target = lazymessage_value->WriteMessageToArray( - WireFormatLite::kMessageSetMessageNumber, target); - } else { - target = WireFormatLite::InternalWriteMessageToArray( - WireFormatLite::kMessageSetMessageNumber, *message_value, target); - } - // End group. - target = io::CodedOutputStream::WriteTagToArray( - WireFormatLite::kMessageSetItemEndTag, target); - return target; + io::EpsCopyOutputStream stream( + target, MessageSetByteSize(), + io::CodedOutputStream::IsDefaultSerializationDeterministic()); + return InternalSerializeMessageSetWithCachedSizesToArray(target, &stream); } bool ExtensionSet::ParseFieldMaybeLazily( diff --git a/third_party/protobuf/src/google/protobuf/extension_set_inl.h b/third_party/protobuf/src/google/protobuf/extension_set_inl.h index 4e6995ef..9957f8ba 100644 --- a/third_party/protobuf/src/google/protobuf/extension_set_inl.h +++ b/third_party/protobuf/src/google/protobuf/extension_set_inl.h @@ -33,16 +33,16 @@ #include #include +#include namespace google { namespace protobuf { namespace internal { -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER template const char* ExtensionSet::ParseFieldWithExtensionInfo( int number, bool was_packed_on_wire, const ExtensionInfo& extension, - T* metadata, const char* ptr, internal::ParseContext* ctx) { + InternalMetadata* metadata, const char* ptr, internal::ParseContext* ctx) { if (was_packed_on_wire) { switch (extension.type) { #define HANDLE_TYPE(UPPERCASE, CPP_CAMELCASE) \ @@ -67,12 +67,11 @@ const char* ExtensionSet::ParseFieldWithExtensionInfo( #undef HANDLE_TYPE case WireFormatLite::TYPE_ENUM: - return internal::PackedEnumParserArg( + return internal::PackedEnumParserArg( MutableRawRepeatedField(number, extension.type, extension.is_packed, extension.descriptor), ptr, ctx, extension.enum_validity_check.func, - extension.enum_validity_check.arg, - metadata->mutable_unknown_fields(), number); + extension.enum_validity_check.arg, metadata, number); case WireFormatLite::TYPE_STRING: case WireFormatLite::TYPE_BYTES: case WireFormatLite::TYPE_GROUP: @@ -85,7 +84,7 @@ const char* ExtensionSet::ParseFieldWithExtensionInfo( #define HANDLE_VARINT_TYPE(UPPERCASE, CPP_CAMELCASE) \ case WireFormatLite::TYPE_##UPPERCASE: { \ uint64 value; \ - ptr = ParseVarint64(ptr, &value); \ + ptr = VarintParse(ptr, &value); \ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); \ if (extension.is_repeated) { \ Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, \ @@ -100,11 +99,12 @@ const char* ExtensionSet::ParseFieldWithExtensionInfo( HANDLE_VARINT_TYPE(INT64, Int64); HANDLE_VARINT_TYPE(UINT32, UInt32); HANDLE_VARINT_TYPE(UINT64, UInt64); + HANDLE_VARINT_TYPE(BOOL, Bool); #undef HANDLE_VARINT_TYPE #define HANDLE_SVARINT_TYPE(UPPERCASE, CPP_CAMELCASE, SIZE) \ case WireFormatLite::TYPE_##UPPERCASE: { \ uint64 val; \ - ptr = ParseVarint64(ptr, &val); \ + ptr = VarintParse(ptr, &val); \ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); \ auto value = WireFormatLite::ZigZagDecode##SIZE(val); \ if (extension.is_repeated) { \ @@ -121,8 +121,7 @@ const char* ExtensionSet::ParseFieldWithExtensionInfo( #undef HANDLE_SVARINT_TYPE #define HANDLE_FIXED_TYPE(UPPERCASE, CPP_CAMELCASE, CPPTYPE) \ case WireFormatLite::TYPE_##UPPERCASE: { \ - CPPTYPE value; \ - std::memcpy(&value, ptr, sizeof(CPPTYPE)); \ + auto value = UnalignedLoad(ptr); \ ptr += sizeof(CPPTYPE); \ if (extension.is_repeated) { \ Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, \ @@ -139,18 +138,17 @@ const char* ExtensionSet::ParseFieldWithExtensionInfo( HANDLE_FIXED_TYPE(SFIXED64, Int64, int64); HANDLE_FIXED_TYPE(FLOAT, Float, float); HANDLE_FIXED_TYPE(DOUBLE, Double, double); - HANDLE_FIXED_TYPE(BOOL, Bool, bool); #undef HANDLE_FIXED_TYPE case WireFormatLite::TYPE_ENUM: { uint64 val; - ptr = ParseVarint64(ptr, &val); + ptr = VarintParse(ptr, &val); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); int value = val; if (!extension.enum_validity_check.func( extension.enum_validity_check.arg, value)) { - WriteVarint(number, val, metadata->mutable_unknown_fields()); + WriteVarint(number, val, metadata->mutable_unknown_fields()); } else if (extension.is_repeated) { AddEnum(number, WireFormatLite::TYPE_ENUM, extension.is_packed, value, extension.descriptor); @@ -203,18 +201,17 @@ const char* ExtensionSet::ParseFieldWithExtensionInfo( return ptr; } -template -const char* ExtensionSet::ParseMessageSetItemTmpl(const char* ptr, - const Msg* containing_type, - Metadata* metadata, - internal::ParseContext* ctx) { +template +const char* ExtensionSet::ParseMessageSetItemTmpl( + const char* ptr, const Msg* containing_type, + internal::InternalMetadata* metadata, internal::ParseContext* ctx) { std::string payload; uint32 type_id = 0; while (!ctx->Done(&ptr)) { uint32 tag = static_cast(*ptr++); if (tag == WireFormatLite::kMessageSetTypeIdTag) { uint64 tmp; - ptr = ParseVarint64Inline(ptr, &tmp); + ptr = ParseBigVarint(ptr, &tmp); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); type_id = tmp; if (!payload.empty()) { @@ -223,7 +220,7 @@ const char* ExtensionSet::ParseMessageSetItemTmpl(const char* ptr, if (!FindExtension(2, type_id, containing_type, ctx, &extension, &was_packed_on_wire)) { WriteLengthDelimited(type_id, payload, - metadata->mutable_unknown_fields()); + metadata->mutable_unknown_fields()); } else { MessageLite* value = extension.is_repeated @@ -258,13 +255,7 @@ const char* ExtensionSet::ParseMessageSetItemTmpl(const char* ptr, GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); } } else { - if (tag >= 128) { - // Parse remainder of tag varint - uint32 tmp; - ptr = VarintParse<4>(ptr, &tmp); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - tag += (tmp - 1) << 7; - } + ptr = ReadTag(ptr - 1, &tag); if (tag == 0 || (tag & 7) == 4) { ctx->SetLastTag(tag); return ptr; @@ -275,7 +266,6 @@ const char* ExtensionSet::ParseMessageSetItemTmpl(const char* ptr, } return ptr; } -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER } // namespace internal } // namespace protobuf diff --git a/third_party/protobuf/src/google/protobuf/extension_set_unittest.cc b/third_party/protobuf/src/google/protobuf/extension_set_unittest.cc index 6dd6f7d8..ccda9930 100644 --- a/third_party/protobuf/src/google/protobuf/extension_set_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/extension_set_unittest.cc @@ -33,7 +33,6 @@ // Sanjay Ghemawat, Jeff Dean, and others. #include - #include #include #include @@ -822,7 +821,7 @@ TEST(ExtensionSetTest, SpaceUsedExcludingSelf) { const int old_capacity = \ message.GetRepeatedExtension(unittest::repeated_##type##_extension) \ .Capacity(); \ - EXPECT_GE(old_capacity, kMinRepeatedFieldAllocationSize); \ + EXPECT_GE(old_capacity, kRepeatedFieldLowerClampLimit); \ for (int i = 0; i < 16; ++i) { \ message.AddExtension(unittest::repeated_##type##_extension, value); \ } \ @@ -865,7 +864,7 @@ TEST(ExtensionSetTest, SpaceUsedExcludingSelf) { message.AddExtension(unittest::repeated_string_extension, value); } min_expected_size += - (sizeof(value) + value.size()) * (16 - kMinRepeatedFieldAllocationSize); + (sizeof(value) + value.size()) * (16 - kRepeatedFieldLowerClampLimit); EXPECT_LE(min_expected_size, message.SpaceUsed()); } // Repeated messages @@ -881,7 +880,7 @@ TEST(ExtensionSetTest, SpaceUsedExcludingSelf) { ->CopyFrom(prototype); } min_expected_size += - (16 - kMinRepeatedFieldAllocationSize) * prototype.SpaceUsed(); + (16 - kRepeatedFieldLowerClampLimit) * prototype.SpaceUsed(); EXPECT_LE(min_expected_size, message.SpaceUsed()); } } @@ -1320,6 +1319,13 @@ TEST(ExtensionSetTest, DynamicExtensions) { } } +TEST(ExtensionSetTest, BoolExtension) { + unittest::TestAllExtensions msg; + uint8 wire_bytes[2] = {13 * 8, 42 /* out of bounds payload for bool */}; + EXPECT_TRUE(msg.ParseFromArray(wire_bytes, 2)); + EXPECT_TRUE(msg.GetExtension(protobuf_unittest::optional_bool_extension)); +} + } // namespace } // namespace internal } // namespace protobuf diff --git a/third_party/protobuf/src/google/protobuf/field_mask.pb.cc b/third_party/protobuf/src/google/protobuf/field_mask.pb.cc index 482bffa5..42e077f3 100644 --- a/third_party/protobuf/src/google/protobuf/field_mask.pb.cc +++ b/third_party/protobuf/src/google/protobuf/field_mask.pb.cc @@ -5,7 +5,6 @@ #include -#include #include #include #include @@ -33,7 +32,7 @@ static void InitDefaultsscc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2epr } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto}, {}}; static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[1]; static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr; @@ -55,7 +54,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_FieldMask_default_instance_), }; -const char descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto[] = +const char descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n google/protobuf/field_mask.proto\022\017goog" "le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB" "\214\001\n\023com.google.protobufB\016FieldMaskProtoP" @@ -69,38 +68,27 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_goo &scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once; -static bool descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto = { - &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto, "google/protobuf/field_mask.proto", 230, + false, false, descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto, "google/protobuf/field_mask.proto", 230, &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once, descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_sccs, descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_deps, 1, 0, schemas, file_default_instances, TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets, file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto, file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_google_2fprotobuf_2ffield_5fmask_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto), true); +static bool dynamic_init_dummy_google_2fprotobuf_2ffield_5fmask_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto)), true); PROTOBUF_NAMESPACE_OPEN // =================================================================== void FieldMask::InitAsDefaultInstance() { } -class FieldMask::HasBitSetters { +class FieldMask::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int FieldMask::kPathsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -FieldMask::FieldMask() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.FieldMask) -} FieldMask::FieldMask(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), paths_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -108,9 +96,8 @@ FieldMask::FieldMask(::PROTOBUF_NAMESPACE_ID::Arena* arena) } FieldMask::FieldMask(const FieldMask& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), paths_(from.paths_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldMask) } @@ -121,10 +108,11 @@ void FieldMask::SharedCtor() { FieldMask::~FieldMask() { // @@protoc_insertion_point(destructor:google.protobuf.FieldMask) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void FieldMask::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void FieldMask::ArenaDtor(void* object) { @@ -149,13 +137,12 @@ void FieldMask::Clear() { (void) cached_has_bits; paths_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* FieldMask::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -167,10 +154,12 @@ const char* FieldMask::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: ptr -= 1; do { ptr += 1; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_paths(), ptr, ctx, "google.protobuf.FieldMask.paths"); + auto str = _internal_add_paths(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FieldMask.paths")); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); } else goto handle_unusual; continue; default: { @@ -179,7 +168,9 @@ const char* FieldMask::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -192,96 +183,26 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool FieldMask::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.FieldMask) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated string paths = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->add_paths())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->paths(this->paths_size() - 1).data(), - static_cast(this->paths(this->paths_size() - 1).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.FieldMask.paths")); - } else { - goto handle_unusual; - } - break; - } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.FieldMask) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.FieldMask) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void FieldMask::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.FieldMask) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated string paths = 1; - for (int i = 0, n = this->paths_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->paths(i).data(), static_cast(this->paths(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.FieldMask.paths"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( - 1, this->paths(i), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.FieldMask) -} - -::PROTOBUF_NAMESPACE_ID::uint8* FieldMask::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* FieldMask::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated string paths = 1; - for (int i = 0, n = this->paths_size(); i < n; i++) { + for (int i = 0, n = this->_internal_paths_size(); i < n; i++) { + const auto& s = this->_internal_paths(i); ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->paths(i).data(), static_cast(this->paths(i).length()), + s.data(), static_cast(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.FieldMask.paths"); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteStringToArray(1, this->paths(i), target); + target = stream->WriteString(1, s, target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldMask) return target; @@ -291,23 +212,22 @@ size_t FieldMask::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldMask) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated string paths = 1; total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->paths_size()); - for (int i = 0, n = this->paths_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(paths_.size()); + for (int i = 0, n = paths_.size(); i < n; i++) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->paths(i)); + paths_.Get(i)); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -331,7 +251,7 @@ void FieldMask::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void FieldMask::MergeFrom(const FieldMask& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldMask) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -356,29 +276,10 @@ bool FieldMask::IsInitialized() const { return true; } -void FieldMask::Swap(FieldMask* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - FieldMask* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void FieldMask::UnsafeArenaSwap(FieldMask* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void FieldMask::InternalSwap(FieldMask* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - paths_.InternalSwap(CastToBase(&other->paths_)); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + paths_.InternalSwap(&other->paths_); } ::PROTOBUF_NAMESPACE_ID::Metadata FieldMask::GetMetadata() const { diff --git a/third_party/protobuf/src/google/protobuf/field_mask.pb.h b/third_party/protobuf/src/google/protobuf/field_mask.pb.h index bc99ea79..20dbd3cd 100644 --- a/third_party/protobuf/src/google/protobuf/field_mask.pb.h +++ b/third_party/protobuf/src/google/protobuf/field_mask.pb.h @@ -8,12 +8,12 @@ #include #include -#if PROTOBUF_VERSION < 3008000 +#if PROTOBUF_VERSION < 3012000 #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 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3012004 < 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. @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include // IWYU pragma: export @@ -66,10 +66,10 @@ PROTOBUF_NAMESPACE_OPEN // =================================================================== -class PROTOBUF_EXPORT FieldMask : +class PROTOBUF_EXPORT FieldMask PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldMask) */ { public: - FieldMask(); + inline FieldMask() : FieldMask(nullptr) {}; virtual ~FieldMask(); FieldMask(const FieldMask& from); @@ -83,7 +83,7 @@ class PROTOBUF_EXPORT FieldMask : return *this; } inline FieldMask& operator=(FieldMask&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -91,12 +91,6 @@ class PROTOBUF_EXPORT FieldMask : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -116,11 +110,22 @@ class PROTOBUF_EXPORT FieldMask : static constexpr int kIndexInFileMessages = 0; - void UnsafeArenaSwap(FieldMask* other); - void Swap(FieldMask* other); friend void swap(FieldMask& a, FieldMask& b) { a.Swap(&b); } + inline void Swap(FieldMask* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FieldMask* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -139,16 +144,9 @@ class PROTOBUF_EXPORT FieldMask : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -165,13 +163,6 @@ class PROTOBUF_EXPORT FieldMask : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -187,10 +178,15 @@ class PROTOBUF_EXPORT FieldMask : // accessors ------------------------------------------------------- + enum : int { + kPathsFieldNumber = 1, + }; // repeated string paths = 1; int paths_size() const; + private: + int _internal_paths_size() const; + public: void clear_paths(); - static const int kPathsFieldNumber = 1; const std::string& paths(int index) const; std::string* mutable_paths(int index); void set_paths(int index, const std::string& value); @@ -204,12 +200,15 @@ class PROTOBUF_EXPORT FieldMask : void add_paths(const char* value, size_t size); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& paths() const; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_paths(); + private: + const std::string& _internal_paths(int index) const; + std::string* _internal_add_paths(); + public: // @@protoc_insertion_point(class_scope:google.protobuf.FieldMask) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -229,15 +228,25 @@ class PROTOBUF_EXPORT FieldMask : // FieldMask // repeated string paths = 1; -inline int FieldMask::paths_size() const { +inline int FieldMask::_internal_paths_size() const { return paths_.size(); } +inline int FieldMask::paths_size() const { + return _internal_paths_size(); +} inline void FieldMask::clear_paths() { paths_.Clear(); } +inline std::string* FieldMask::add_paths() { + // @@protoc_insertion_point(field_add_mutable:google.protobuf.FieldMask.paths) + return _internal_add_paths(); +} +inline const std::string& FieldMask::_internal_paths(int index) const { + return paths_.Get(index); +} inline const std::string& FieldMask::paths(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FieldMask.paths) - return paths_.Get(index); + return _internal_paths(index); } inline std::string* FieldMask::mutable_paths(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FieldMask.paths) @@ -261,8 +270,7 @@ inline void FieldMask::set_paths(int index, const char* value, size_t size) { reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldMask.paths) } -inline std::string* FieldMask::add_paths() { - // @@protoc_insertion_point(field_add_mutable:google.protobuf.FieldMask.paths) +inline std::string* FieldMask::_internal_add_paths() { return paths_.Add(); } inline void FieldMask::add_paths(const std::string& value) { diff --git a/third_party/protobuf/src/google/protobuf/field_mask.proto b/third_party/protobuf/src/google/protobuf/field_mask.proto index 4015b1a3..baac8744 100644 --- a/third_party/protobuf/src/google/protobuf/field_mask.proto +++ b/third_party/protobuf/src/google/protobuf/field_mask.proto @@ -238,7 +238,7 @@ option cc_enable_arenas = true; // // The implementation of any API method which has a FieldMask type field in the // request should verify the included field paths, and return an -// `INVALID_ARGUMENT` error if any path is duplicated or unmappable. +// `INVALID_ARGUMENT` error if any path is unmappable. message FieldMask { // The set of field mask paths. repeated string paths = 1; diff --git a/third_party/protobuf/src/google/protobuf/io/coded_stream_inl.h b/third_party/protobuf/src/google/protobuf/generated_enum_util.cc similarity index 50% rename from third_party/protobuf/src/google/protobuf/io/coded_stream_inl.h rename to third_party/protobuf/src/google/protobuf/generated_enum_util.cc index 0c10e655..d0c25a96 100644 --- a/third_party/protobuf/src/google/protobuf/io/coded_stream_inl.h +++ b/third_party/protobuf/src/google/protobuf/generated_enum_util.cc @@ -28,63 +28,68 @@ // (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: jasonh@google.com (Jason Hsueh) -// -// Implements methods of coded_stream.h that need to be inlined for performance -// reasons, but should not be defined in a public header. +#include -#ifndef GOOGLE_PROTOBUF_IO_CODED_STREAM_INL_H__ -#define GOOGLE_PROTOBUF_IO_CODED_STREAM_INL_H__ +#include -#include -#include -#include -#include -#include -#include +#include namespace google { namespace protobuf { -namespace io { +namespace internal { +namespace { -inline bool CodedInputStream::InternalReadStringInline(std::string* buffer, - int size) { - if (size < 0) return false; // security: size is often user-supplied - - if (BufferSize() >= size) { - STLStringResizeUninitialized(buffer, size); - std::pair z = as_string_data(buffer); - if (z.second) { - // Oddly enough, memcpy() requires its first two args to be non-NULL even - // if we copy 0 bytes. So, we have ensured that z.first is non-NULL here. - GOOGLE_DCHECK(z.first != NULL); - memcpy(z.first, buffer_, size); - Advance(size); - } - return true; - } - - return ReadStringFallback(buffer, size); +bool EnumCompareByName(const EnumEntry& a, const EnumEntry& b) { + return StringPiece(a.name) < StringPiece(b.name); } -inline bool CodedInputStream::InternalReadRawInline(void* buffer, int size) { - int current_buffer_size; - while ((current_buffer_size = BufferSize()) < size) { - // Reading past end of buffer. Copy what we have, then refresh. - memcpy(buffer, buffer_, current_buffer_size); - buffer = reinterpret_cast(buffer) + current_buffer_size; - size -= current_buffer_size; - Advance(current_buffer_size); - if (!Refresh()) return false; +// Gets the numeric value of the EnumEntry at the given index, but returns a +// special value for the index -1. This gives a way to use std::lower_bound on a +// sorted array of indices while searching for value that we associate with -1. +int GetValue(const EnumEntry* enums, int i, int target) { + if (i == -1) { + return target; + } else { + return enums[i].value; } +} - memcpy(buffer, buffer_, size); - Advance(size); +} // namespace +bool LookUpEnumValue(const EnumEntry* enums, size_t size, + StringPiece name, int* value) { + EnumEntry target{name, 0}; + auto it = std::lower_bound(enums, enums + size, target, EnumCompareByName); + if (it != enums + size && it->name == name) { + *value = it->value; + return true; + } + return false; +} + +int LookUpEnumName(const EnumEntry* enums, const int* sorted_indices, + size_t size, int value) { + auto comparator = [enums, value](int a, int b) { + return GetValue(enums, a, value) < GetValue(enums, b, value); + }; + auto it = + std::lower_bound(sorted_indices, sorted_indices + size, -1, comparator); + if (it != sorted_indices + size && enums[*it].value == value) { + return it - sorted_indices; + } + return -1; +} + +bool InitializeEnumStrings( + const EnumEntry* enums, const int* sorted_indices, size_t size, + internal::ExplicitlyConstructed* enum_strings) { + for (int i = 0; i < size; ++i) { + enum_strings[i].Construct(enums[sorted_indices[i]].name); + internal::OnShutdownDestroyString(enum_strings[i].get_mutable()); + } return true; } -} // namespace io +} // namespace internal } // namespace protobuf } // namespace google -#endif // GOOGLE_PROTOBUF_IO_CODED_STREAM_INL_H__ diff --git a/third_party/protobuf/src/google/protobuf/generated_enum_util.h b/third_party/protobuf/src/google/protobuf/generated_enum_util.h index 55db124c..f1002e2d 100644 --- a/third_party/protobuf/src/google/protobuf/generated_enum_util.h +++ b/third_party/protobuf/src/google/protobuf/generated_enum_util.h @@ -33,6 +33,11 @@ #include +#include +#include + +#include + #ifdef SWIG #error "You cannot SWIG proto headers" #endif @@ -45,7 +50,34 @@ namespace protobuf { template struct is_proto_enum : ::std::false_type {}; +namespace internal { + +// The table entry format for storing enum name-to-value mapping used with lite +// protos. This struct and the following related functions should only be used +// by protobuf generated code. +struct EnumEntry { + StringPiece name; + int value; +}; + +// Looks up a numeric enum value given the string name. +PROTOBUF_EXPORT bool LookUpEnumValue(const EnumEntry* enums, size_t size, + StringPiece name, int* value); + +// Looks up an enum name given the numeric value. +PROTOBUF_EXPORT int LookUpEnumName(const EnumEntry* enums, + const int* sorted_indices, size_t size, + int value); + +// Initializes the list of enum names in std::string form. +PROTOBUF_EXPORT bool InitializeEnumStrings( + const EnumEntry* enums, const int* sorted_indices, size_t size, + internal::ExplicitlyConstructed* enum_strings); + +} // namespace internal } // namespace protobuf } // namespace google +#include + #endif // GOOGLE_PROTOBUF_GENERATED_ENUM_UTIL_H__ diff --git a/third_party/protobuf/src/google/protobuf/generated_message_reflection.cc b/third_party/protobuf/src/google/protobuf/generated_message_reflection.cc index 52e8746d..da6ba406 100644 --- a/third_party/protobuf/src/google/protobuf/generated_message_reflection.cc +++ b/third_party/protobuf/src/google/protobuf/generated_message_reflection.cc @@ -32,6 +32,8 @@ // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. +#include + #include #include @@ -40,13 +42,13 @@ #include #include #include -#include #include #include #include #include #include #include +#include #include @@ -54,48 +56,55 @@ #define GOOGLE_PROTOBUF_HAS_ONEOF +using google::protobuf::internal::ArenaStringPtr; +using google::protobuf::internal::DescriptorTable; +using google::protobuf::internal::ExtensionSet; +using google::protobuf::internal::GenericTypeHandler; +using google::protobuf::internal::GetEmptyString; +using google::protobuf::internal::InlinedStringField; +using google::protobuf::internal::InternalMetadata; +using google::protobuf::internal::LazyField; +using google::protobuf::internal::MapFieldBase; +using google::protobuf::internal::MigrationSchema; +using google::protobuf::internal::OnShutdownDelete; +using google::protobuf::internal::ReflectionSchema; +using google::protobuf::internal::RepeatedPtrFieldBase; +using google::protobuf::internal::StringSpaceUsedExcludingSelfLong; +using google::protobuf::internal::WrappedMutex; + namespace google { namespace protobuf { -namespace internal { namespace { bool IsMapFieldInApi(const FieldDescriptor* field) { return field->is_map(); } } // anonymous namespace +namespace internal { + bool ParseNamedEnum(const EnumDescriptor* descriptor, const std::string& name, int* value) { const EnumValueDescriptor* d = descriptor->FindValueByName(name); - if (d == NULL) return false; + if (d == nullptr) return false; *value = d->number(); return true; } const std::string& NameOfEnum(const EnumDescriptor* descriptor, int value) { const EnumValueDescriptor* d = descriptor->FindValueByNumber(value); - return (d == NULL ? GetEmptyString() : d->name()); + return (d == nullptr ? GetEmptyString() : d->name()); } +} // namespace internal + // =================================================================== // Helpers for reporting usage errors (e.g. trying to use GetInt32() on // a string field). namespace { -template -To* GetPointerAtOffset(Message* message, uint32 offset) { - return reinterpret_cast(reinterpret_cast(message) + offset); -} - -template -const To* GetConstPointerAtOffset(const Message* message, uint32 offset) { - return reinterpret_cast(reinterpret_cast(message) + - offset); -} - -template -const To& GetConstRefAtOffset(const Message& message, uint32 offset) { - return *GetConstPointerAtOffset(&message, offset); -} +using internal::GetConstPointerAtOffset; +using internal::GetConstRefAtOffset; +using internal::GetPointerAtOffset; void ReportReflectionUsageError(const Descriptor* descriptor, const FieldDescriptor* field, @@ -198,31 +207,30 @@ static void ReportReflectionUsageEnumTypeError( // =================================================================== -GeneratedMessageReflection::GeneratedMessageReflection( - const Descriptor* descriptor, const ReflectionSchema& schema, - const DescriptorPool* pool, MessageFactory* factory) +Reflection::Reflection(const Descriptor* descriptor, + const internal::ReflectionSchema& schema, + const DescriptorPool* pool, MessageFactory* factory) : descriptor_(descriptor), schema_(schema), - descriptor_pool_((pool == NULL) ? DescriptorPool::generated_pool() - : pool), + descriptor_pool_( + (pool == nullptr) ? DescriptorPool::internal_generated_pool() : pool), message_factory_(factory), last_non_weak_field_index_(-1) { last_non_weak_field_index_ = descriptor_->field_count() - 1; } -GeneratedMessageReflection::~GeneratedMessageReflection() {} - -const UnknownFieldSet& GeneratedMessageReflection::GetUnknownFields( +const UnknownFieldSet& Reflection::GetUnknownFields( const Message& message) const { - return GetInternalMetadataWithArena(message).unknown_fields(); + return GetInternalMetadata(message).unknown_fields( + UnknownFieldSet::default_instance); } -UnknownFieldSet* GeneratedMessageReflection::MutableUnknownFields( - Message* message) const { - return MutableInternalMetadataWithArena(message)->mutable_unknown_fields(); +UnknownFieldSet* Reflection::MutableUnknownFields(Message* message) const { + return MutableInternalMetadata(message) + ->mutable_unknown_fields(); } -size_t GeneratedMessageReflection::SpaceUsedLong(const Message& message) const { +size_t Reflection::SpaceUsedLong(const Message& message) const { // object_size_ already includes the in-memory representation of each field // in the message, so we only need to account for additional memory used by // the fields. @@ -266,7 +274,7 @@ size_t GeneratedMessageReflection::SpaceUsedLong(const Message& message) const { case FieldDescriptor::CPPTYPE_MESSAGE: if (IsMapFieldInApi(field)) { - total_size += GetRaw(message, field) + total_size += GetRaw(message, field) .SpaceUsedExcludingSelfLong(); } else { // We don't know which subclass of RepeatedPtrFieldBase the type is, @@ -279,7 +287,7 @@ size_t GeneratedMessageReflection::SpaceUsedLong(const Message& message) const { break; } } else { - if (field->containing_oneof() && !HasOneofField(message, field)) { + if (schema_.InRealOneof(field) && !HasOneofField(message, field)) { continue; } switch (field->cpp_type()) { @@ -331,7 +339,7 @@ size_t GeneratedMessageReflection::SpaceUsedLong(const Message& message) const { // external type's prototype, so there is no extra memory usage. } else { const Message* sub_message = GetRaw(message, field); - if (sub_message != NULL) { + if (sub_message != nullptr) { total_size += sub_message->SpaceUsedLong(); } } @@ -342,8 +350,8 @@ size_t GeneratedMessageReflection::SpaceUsedLong(const Message& message) const { return total_size; } -void GeneratedMessageReflection::SwapField(Message* message1, Message* message2, - const FieldDescriptor* field) const { +void Reflection::SwapField(Message* message1, Message* message2, + const FieldDescriptor* field) const { if (field->is_repeated()) { switch (field->cpp_type()) { #define SWAP_ARRAYS(CPPTYPE, TYPE) \ @@ -410,12 +418,12 @@ void GeneratedMessageReflection::SwapField(Message* message1, Message* message2, } else { Message** sub_msg1 = MutableRaw(message1, field); Message** sub_msg2 = MutableRaw(message2, field); - if (*sub_msg1 == NULL && *sub_msg2 == NULL) break; + if (*sub_msg1 == nullptr && *sub_msg2 == nullptr) break; if (*sub_msg1 && *sub_msg2) { (*sub_msg1)->GetReflection()->Swap(*sub_msg1, *sub_msg2); break; } - if (*sub_msg1 == NULL) { + if (*sub_msg1 == nullptr) { *sub_msg1 = (*sub_msg2)->New(message1->GetArena()); (*sub_msg1)->CopyFrom(**sub_msg2); ClearField(message2, field); @@ -466,9 +474,9 @@ void GeneratedMessageReflection::SwapField(Message* message1, Message* message2, } } -void GeneratedMessageReflection::SwapOneofField( - Message* message1, Message* message2, - const OneofDescriptor* oneof_descriptor) const { +void Reflection::SwapOneofField(Message* message1, Message* message2, + const OneofDescriptor* oneof_descriptor) const { + GOOGLE_DCHECK(!oneof_descriptor->is_synthetic()); uint32 oneof_case1 = GetOneofCase(*message1, oneof_descriptor); uint32 oneof_case2 = GetOneofCase(*message2, oneof_descriptor); @@ -480,11 +488,11 @@ void GeneratedMessageReflection::SwapOneofField( double temp_double; bool temp_bool; int temp_int; - Message* temp_message = NULL; + Message* temp_message = nullptr; std::string temp_string; // Stores message1's oneof field to a temp variable. - const FieldDescriptor* field1 = NULL; + const FieldDescriptor* field1 = nullptr; if (oneof_case1 > 0) { field1 = descriptor_->FindFieldByNumber(oneof_case1); // oneof_descriptor->field(oneof_case1); @@ -582,8 +590,7 @@ void GeneratedMessageReflection::SwapOneofField( } } -void GeneratedMessageReflection::Swap(Message* message1, - Message* message2) const { +void Reflection::Swap(Message* message1, Message* message2) const { if (message1 == message2) return; // TODO(kenton): Other Reflection methods should probably check this too. @@ -613,7 +620,7 @@ void GeneratedMessageReflection::Swap(Message* message1, temp->MergeFrom(*message2); message2->CopyFrom(*message1); Swap(message1, temp); - if (GetArena(message1) == NULL) { + if (GetArena(message1) == nullptr) { delete temp; } return; @@ -626,7 +633,7 @@ void GeneratedMessageReflection::Swap(Message* message1, int fields_with_has_bits = 0; for (int i = 0; i < descriptor_->field_count(); i++) { const FieldDescriptor* field = descriptor_->field(i); - if (field->is_repeated() || field->containing_oneof()) { + if (field->is_repeated() || schema_.InRealOneof(field)) { continue; } fields_with_has_bits++; @@ -641,12 +648,15 @@ void GeneratedMessageReflection::Swap(Message* message1, for (int i = 0; i <= last_non_weak_field_index_; i++) { const FieldDescriptor* field = descriptor_->field(i); - if (field->containing_oneof()) continue; + if (schema_.InRealOneof(field)) continue; SwapField(message1, message2, field); } const int oneof_decl_count = descriptor_->oneof_decl_count(); for (int i = 0; i < oneof_decl_count; i++) { - SwapOneofField(message1, message2, descriptor_->oneof_decl(i)); + const OneofDescriptor* oneof = descriptor_->oneof_decl(i); + if (!oneof->is_synthetic()) { + SwapOneofField(message1, message2, oneof); + } } if (schema_.HasExtensionSet()) { @@ -656,7 +666,7 @@ void GeneratedMessageReflection::Swap(Message* message1, MutableUnknownFields(message1)->Swap(MutableUnknownFields(message2)); } -void GeneratedMessageReflection::SwapFields( +void Reflection::SwapFields( Message* message1, Message* message2, const std::vector& fields) const { if (message1 == message2) return; @@ -688,7 +698,7 @@ void GeneratedMessageReflection::SwapFields( MutableExtensionSet(message1)->SwapExtension( MutableExtensionSet(message2), field->number()); } else { - if (field->containing_oneof()) { + if (schema_.InRealOneof(field)) { int oneof_index = field->containing_oneof()->index(); // Only swap the oneof field once. if (swapped_oneof.find(oneof_index) != swapped_oneof.end()) { @@ -711,15 +721,15 @@ void GeneratedMessageReflection::SwapFields( // ------------------------------------------------------------------- -bool GeneratedMessageReflection::HasField(const Message& message, - const FieldDescriptor* field) const { +bool Reflection::HasField(const Message& message, + const FieldDescriptor* field) const { USAGE_CHECK_MESSAGE_TYPE(HasField); USAGE_CHECK_SINGULAR(HasField); if (field->is_extension()) { return GetExtensionSet(message).Has(field->number()); } else { - if (field->containing_oneof()) { + if (schema_.InRealOneof(field)) { return HasOneofField(message, field); } else { return HasBit(message, field); @@ -727,8 +737,8 @@ bool GeneratedMessageReflection::HasField(const Message& message, } } -int GeneratedMessageReflection::FieldSize(const Message& message, - const FieldDescriptor* field) const { +int Reflection::FieldSize(const Message& message, + const FieldDescriptor* field) const { USAGE_CHECK_MESSAGE_TYPE(FieldSize); USAGE_CHECK_REPEATED(FieldSize); @@ -772,14 +782,14 @@ int GeneratedMessageReflection::FieldSize(const Message& message, } } -void GeneratedMessageReflection::ClearField( - Message* message, const FieldDescriptor* field) const { +void Reflection::ClearField(Message* message, + const FieldDescriptor* field) const { USAGE_CHECK_MESSAGE_TYPE(ClearField); if (field->is_extension()) { MutableExtensionSet(message)->ClearExtension(field->number()); } else if (!field->is_repeated()) { - if (field->containing_oneof()) { + if (schema_.InRealOneof(field)) { ClearOneofField(message, field); return; } @@ -822,7 +832,7 @@ void GeneratedMessageReflection::ClearField( const std::string* default_ptr = &DefaultRaw(field).Get(); MutableRaw(message, field) - ->SetAllocated(default_ptr, NULL, GetArena(message)); + ->SetAllocated(default_ptr, nullptr, GetArena(message)); break; } } @@ -832,11 +842,11 @@ void GeneratedMessageReflection::ClearField( case FieldDescriptor::CPPTYPE_MESSAGE: if (!schema_.HasHasbits()) { // Proto3 does not have has-bits and we need to set a message field - // to NULL in order to indicate its un-presence. - if (GetArena(message) == NULL) { + // to nullptr in order to indicate its un-presence. + if (GetArena(message) == nullptr) { delete *MutableRaw(message, field); } - *MutableRaw(message, field) = NULL; + *MutableRaw(message, field) = nullptr; } else { (*MutableRaw(message, field))->Clear(); } @@ -885,8 +895,8 @@ void GeneratedMessageReflection::ClearField( } } -void GeneratedMessageReflection::RemoveLast( - Message* message, const FieldDescriptor* field) const { +void Reflection::RemoveLast(Message* message, + const FieldDescriptor* field) const { USAGE_CHECK_MESSAGE_TYPE(RemoveLast); USAGE_CHECK_REPEATED(RemoveLast); @@ -933,8 +943,8 @@ void GeneratedMessageReflection::RemoveLast( } } -Message* GeneratedMessageReflection::ReleaseLast( - Message* message, const FieldDescriptor* field) const { +Message* Reflection::ReleaseLast(Message* message, + const FieldDescriptor* field) const { USAGE_CHECK_ALL(ReleaseLast, REPEATED, MESSAGE); if (field->is_extension()) { @@ -952,9 +962,8 @@ Message* GeneratedMessageReflection::ReleaseLast( } } -void GeneratedMessageReflection::SwapElements(Message* message, - const FieldDescriptor* field, - int index1, int index2) const { +void Reflection::SwapElements(Message* message, const FieldDescriptor* field, + int index1, int index2) const { USAGE_CHECK_MESSAGE_TYPE(Swap); USAGE_CHECK_REPEATED(Swap); @@ -1002,16 +1011,27 @@ struct FieldNumberSorter { } }; -inline bool IsIndexInHasBitSet(const uint32* has_bit_set, - uint32 has_bit_index) { +bool IsIndexInHasBitSet(const uint32* has_bit_set, uint32 has_bit_index) { GOOGLE_DCHECK_NE(has_bit_index, ~0u); return ((has_bit_set[has_bit_index / 32] >> (has_bit_index % 32)) & static_cast(1)) != 0; } + +bool CreateUnknownEnumValues(const FileDescriptor* file) { + return file->syntax() == FileDescriptor::SYNTAX_PROTO3; +} } // namespace -void GeneratedMessageReflection::ListFields( - const Message& message, std::vector* output) const { +namespace internal { +bool CreateUnknownEnumValues(const FieldDescriptor* field) { + bool open_enum = false; + return field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 || open_enum; +} +} // namespace internal +using internal::CreateUnknownEnumValues; + +void Reflection::ListFields(const Message& message, + std::vector* output) const { output->clear(); // Optimization: The default instance never has any fields set. @@ -1019,11 +1039,11 @@ void GeneratedMessageReflection::ListFields( // Optimization: Avoid calling GetHasBits() and HasOneofField() many times // within the field loop. We allow this violation of ReflectionSchema - // encapsulation because this function takes a noticable about of CPU + // encapsulation because this function takes a noticeable about of CPU // fleetwide and properly allowing this optimization through public interfaces // seems more trouble than it is worth. const uint32* const has_bits = - schema_.HasHasbits() ? GetHasBits(message) : NULL; + schema_.HasHasbits() ? GetHasBits(message) : nullptr; const uint32* const has_bits_indices = schema_.has_bit_indices_; output->reserve(descriptor_->field_count()); for (int i = 0; i <= last_non_weak_field_index_; i++) { @@ -1034,14 +1054,14 @@ void GeneratedMessageReflection::ListFields( } } else { const OneofDescriptor* containing_oneof = field->containing_oneof(); - if (containing_oneof) { + if (schema_.InRealOneof(field)) { const uint32* const oneof_case_array = GetConstPointerAtOffset( &message, schema_.oneof_case_offset_); // Equivalent to: HasOneofField(message, field) if (oneof_case_array[containing_oneof->index()] == field->number()) { output->push_back(field); } - } else if (has_bits) { + } else if (has_bits && has_bits_indices[i] != -1) { // Equivalent to: HasBit(message, field) if (IsIndexInHasBitSet(has_bits, has_bits_indices[i])) { output->push_back(field); @@ -1064,8 +1084,8 @@ void GeneratedMessageReflection::ListFields( #undef DEFINE_PRIMITIVE_ACCESSORS #define DEFINE_PRIMITIVE_ACCESSORS(TYPENAME, TYPE, PASSTYPE, CPPTYPE) \ - PASSTYPE GeneratedMessageReflection::Get##TYPENAME( \ - const Message& message, const FieldDescriptor* field) const { \ + PASSTYPE Reflection::Get##TYPENAME(const Message& message, \ + const FieldDescriptor* field) const { \ USAGE_CHECK_ALL(Get##TYPENAME, SINGULAR, CPPTYPE); \ if (field->is_extension()) { \ return GetExtensionSet(message).Get##TYPENAME( \ @@ -1075,7 +1095,7 @@ void GeneratedMessageReflection::ListFields( } \ } \ \ - void GeneratedMessageReflection::Set##TYPENAME( \ + void Reflection::Set##TYPENAME( \ Message* message, const FieldDescriptor* field, PASSTYPE value) const { \ USAGE_CHECK_ALL(Set##TYPENAME, SINGULAR, CPPTYPE); \ if (field->is_extension()) { \ @@ -1086,7 +1106,7 @@ void GeneratedMessageReflection::ListFields( } \ } \ \ - PASSTYPE GeneratedMessageReflection::GetRepeated##TYPENAME( \ + PASSTYPE Reflection::GetRepeated##TYPENAME( \ const Message& message, const FieldDescriptor* field, int index) const { \ USAGE_CHECK_ALL(GetRepeated##TYPENAME, REPEATED, CPPTYPE); \ if (field->is_extension()) { \ @@ -1097,9 +1117,9 @@ void GeneratedMessageReflection::ListFields( } \ } \ \ - void GeneratedMessageReflection::SetRepeated##TYPENAME( \ - Message* message, const FieldDescriptor* field, int index, \ - PASSTYPE value) const { \ + void Reflection::SetRepeated##TYPENAME(Message* message, \ + const FieldDescriptor* field, \ + int index, PASSTYPE value) const { \ USAGE_CHECK_ALL(SetRepeated##TYPENAME, REPEATED, CPPTYPE); \ if (field->is_extension()) { \ MutableExtensionSet(message)->SetRepeated##TYPENAME(field->number(), \ @@ -1109,7 +1129,7 @@ void GeneratedMessageReflection::ListFields( } \ } \ \ - void GeneratedMessageReflection::Add##TYPENAME( \ + void Reflection::Add##TYPENAME( \ Message* message, const FieldDescriptor* field, PASSTYPE value) const { \ USAGE_CHECK_ALL(Add##TYPENAME, REPEATED, CPPTYPE); \ if (field->is_extension()) { \ @@ -1132,8 +1152,8 @@ DEFINE_PRIMITIVE_ACCESSORS(Bool, bool, bool, BOOL) // ------------------------------------------------------------------- -std::string GeneratedMessageReflection::GetString( - const Message& message, const FieldDescriptor* field) const { +std::string Reflection::GetString(const Message& message, + const FieldDescriptor* field) const { USAGE_CHECK_ALL(GetString, SINGULAR, STRING); if (field->is_extension()) { return GetExtensionSet(message).GetString(field->number(), @@ -1152,9 +1172,9 @@ std::string GeneratedMessageReflection::GetString( } } -const std::string& GeneratedMessageReflection::GetStringReference( - const Message& message, const FieldDescriptor* field, - std::string* scratch) const { +const std::string& Reflection::GetStringReference(const Message& message, + const FieldDescriptor* field, + std::string* scratch) const { USAGE_CHECK_ALL(GetStringReference, SINGULAR, STRING); if (field->is_extension()) { return GetExtensionSet(message).GetString(field->number(), @@ -1174,33 +1194,32 @@ const std::string& GeneratedMessageReflection::GetStringReference( } -void GeneratedMessageReflection::SetString(Message* message, - const FieldDescriptor* field, - const std::string& value) const { +void Reflection::SetString(Message* message, const FieldDescriptor* field, + std::string value) const { USAGE_CHECK_ALL(SetString, SINGULAR, STRING); if (field->is_extension()) { - return MutableExtensionSet(message)->SetString(field->number(), - field->type(), value, field); + return MutableExtensionSet(message)->SetString( + field->number(), field->type(), std::move(value), field); } else { switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: { if (IsInlined(field)) { MutableField(message, field) - ->SetNoArena(NULL, value); + ->SetNoArena(nullptr, std::move(value)); break; } const std::string* default_ptr = &DefaultRaw(field).Get(); - if (field->containing_oneof() && !HasOneofField(*message, field)) { + if (schema_.InRealOneof(field) && !HasOneofField(*message, field)) { ClearOneof(message, field->containing_oneof()); MutableField(message, field) ->UnsafeSetDefault(default_ptr); } MutableField(message, field) ->Mutable(default_ptr, GetArena(message)) - ->assign(value); + ->assign(std::move(value)); break; } } @@ -1208,8 +1227,9 @@ void GeneratedMessageReflection::SetString(Message* message, } -std::string GeneratedMessageReflection::GetRepeatedString( - const Message& message, const FieldDescriptor* field, int index) const { +std::string Reflection::GetRepeatedString(const Message& message, + const FieldDescriptor* field, + int index) const { USAGE_CHECK_ALL(GetRepeatedString, REPEATED, STRING); if (field->is_extension()) { return GetExtensionSet(message).GetRepeatedString(field->number(), index); @@ -1222,7 +1242,7 @@ std::string GeneratedMessageReflection::GetRepeatedString( } } -const std::string& GeneratedMessageReflection::GetRepeatedStringReference( +const std::string& Reflection::GetRepeatedStringReference( const Message& message, const FieldDescriptor* field, int index, std::string* scratch) const { USAGE_CHECK_ALL(GetRepeatedStringReference, REPEATED, STRING); @@ -1238,36 +1258,36 @@ const std::string& GeneratedMessageReflection::GetRepeatedStringReference( } -void GeneratedMessageReflection::SetRepeatedString( - Message* message, const FieldDescriptor* field, int index, - const std::string& value) const { +void Reflection::SetRepeatedString(Message* message, + const FieldDescriptor* field, int index, + std::string value) const { USAGE_CHECK_ALL(SetRepeatedString, REPEATED, STRING); if (field->is_extension()) { MutableExtensionSet(message)->SetRepeatedString(field->number(), index, - value); + std::move(value)); } else { switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: - *MutableRepeatedField(message, field, index) = value; + MutableRepeatedField(message, field, index) + ->assign(std::move(value)); break; } } } -void GeneratedMessageReflection::AddString(Message* message, - const FieldDescriptor* field, - const std::string& value) const { +void Reflection::AddString(Message* message, const FieldDescriptor* field, + std::string value) const { USAGE_CHECK_ALL(AddString, REPEATED, STRING); if (field->is_extension()) { MutableExtensionSet(message)->AddString(field->number(), field->type(), - value, field); + std::move(value), field); } else { switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: - *AddField(message, field) = value; + AddField(message, field)->assign(std::move(value)); break; } } @@ -1276,19 +1296,15 @@ void GeneratedMessageReflection::AddString(Message* message, // ------------------------------------------------------------------- -inline bool CreateUnknownEnumValues(const FileDescriptor* file) { - return file->syntax() == FileDescriptor::SYNTAX_PROTO3; -} - -const EnumValueDescriptor* GeneratedMessageReflection::GetEnum( +const EnumValueDescriptor* Reflection::GetEnum( const Message& message, const FieldDescriptor* field) const { // Usage checked by GetEnumValue. int value = GetEnumValue(message, field); return field->enum_type()->FindValueByNumberCreatingIfUnknown(value); } -int GeneratedMessageReflection::GetEnumValue( - const Message& message, const FieldDescriptor* field) const { +int Reflection::GetEnumValue(const Message& message, + const FieldDescriptor* field) const { USAGE_CHECK_ALL(GetEnumValue, SINGULAR, ENUM); int32 value; @@ -1301,24 +1317,22 @@ int GeneratedMessageReflection::GetEnumValue( return value; } -void GeneratedMessageReflection::SetEnum( - Message* message, const FieldDescriptor* field, - const EnumValueDescriptor* value) const { +void Reflection::SetEnum(Message* message, const FieldDescriptor* field, + const EnumValueDescriptor* value) const { // Usage checked by SetEnumValue. USAGE_CHECK_ENUM_VALUE(SetEnum); SetEnumValueInternal(message, field, value->number()); } -void GeneratedMessageReflection::SetEnumValue(Message* message, - const FieldDescriptor* field, - int value) const { +void Reflection::SetEnumValue(Message* message, const FieldDescriptor* field, + int value) const { USAGE_CHECK_ALL(SetEnumValue, SINGULAR, ENUM); - if (!CreateUnknownEnumValues(descriptor_->file())) { + if (!CreateUnknownEnumValues(field)) { // Check that the value is valid if we don't support direct storage of // unknown enum values. const EnumValueDescriptor* value_desc = field->enum_type()->FindValueByNumber(value); - if (value_desc == NULL) { + if (value_desc == nullptr) { MutableUnknownFields(message)->AddVarint(field->number(), value); return; } @@ -1326,8 +1340,9 @@ void GeneratedMessageReflection::SetEnumValue(Message* message, SetEnumValueInternal(message, field, value); } -void GeneratedMessageReflection::SetEnumValueInternal( - Message* message, const FieldDescriptor* field, int value) const { +void Reflection::SetEnumValueInternal(Message* message, + const FieldDescriptor* field, + int value) const { if (field->is_extension()) { MutableExtensionSet(message)->SetEnum(field->number(), field->type(), value, field); @@ -1336,15 +1351,16 @@ void GeneratedMessageReflection::SetEnumValueInternal( } } -const EnumValueDescriptor* GeneratedMessageReflection::GetRepeatedEnum( +const EnumValueDescriptor* Reflection::GetRepeatedEnum( const Message& message, const FieldDescriptor* field, int index) const { // Usage checked by GetRepeatedEnumValue. int value = GetRepeatedEnumValue(message, field, index); return field->enum_type()->FindValueByNumberCreatingIfUnknown(value); } -int GeneratedMessageReflection::GetRepeatedEnumValue( - const Message& message, const FieldDescriptor* field, int index) const { +int Reflection::GetRepeatedEnumValue(const Message& message, + const FieldDescriptor* field, + int index) const { USAGE_CHECK_ALL(GetRepeatedEnumValue, REPEATED, ENUM); int value; @@ -1356,24 +1372,24 @@ int GeneratedMessageReflection::GetRepeatedEnumValue( return value; } -void GeneratedMessageReflection::SetRepeatedEnum( - Message* message, const FieldDescriptor* field, int index, - const EnumValueDescriptor* value) const { +void Reflection::SetRepeatedEnum(Message* message, const FieldDescriptor* field, + int index, + const EnumValueDescriptor* value) const { // Usage checked by SetRepeatedEnumValue. USAGE_CHECK_ENUM_VALUE(SetRepeatedEnum); SetRepeatedEnumValueInternal(message, field, index, value->number()); } -void GeneratedMessageReflection::SetRepeatedEnumValue( - Message* message, const FieldDescriptor* field, int index, - int value) const { +void Reflection::SetRepeatedEnumValue(Message* message, + const FieldDescriptor* field, int index, + int value) const { USAGE_CHECK_ALL(SetRepeatedEnum, REPEATED, ENUM); - if (!CreateUnknownEnumValues(descriptor_->file())) { + if (!CreateUnknownEnumValues(field)) { // Check that the value is valid if we don't support direct storage of // unknown enum values. const EnumValueDescriptor* value_desc = field->enum_type()->FindValueByNumber(value); - if (value_desc == NULL) { + if (value_desc == nullptr) { MutableUnknownFields(message)->AddVarint(field->number(), value); return; } @@ -1381,9 +1397,9 @@ void GeneratedMessageReflection::SetRepeatedEnumValue( SetRepeatedEnumValueInternal(message, field, index, value); } -void GeneratedMessageReflection::SetRepeatedEnumValueInternal( - Message* message, const FieldDescriptor* field, int index, - int value) const { +void Reflection::SetRepeatedEnumValueInternal(Message* message, + const FieldDescriptor* field, + int index, int value) const { if (field->is_extension()) { MutableExtensionSet(message)->SetRepeatedEnum(field->number(), index, value); @@ -1392,24 +1408,22 @@ void GeneratedMessageReflection::SetRepeatedEnumValueInternal( } } -void GeneratedMessageReflection::AddEnum( - Message* message, const FieldDescriptor* field, - const EnumValueDescriptor* value) const { +void Reflection::AddEnum(Message* message, const FieldDescriptor* field, + const EnumValueDescriptor* value) const { // Usage checked by AddEnumValue. USAGE_CHECK_ENUM_VALUE(AddEnum); AddEnumValueInternal(message, field, value->number()); } -void GeneratedMessageReflection::AddEnumValue(Message* message, - const FieldDescriptor* field, - int value) const { +void Reflection::AddEnumValue(Message* message, const FieldDescriptor* field, + int value) const { USAGE_CHECK_ALL(AddEnum, REPEATED, ENUM); - if (!CreateUnknownEnumValues(descriptor_->file())) { + if (!CreateUnknownEnumValues(field)) { // Check that the value is valid if we don't support direct storage of // unknown enum values. const EnumValueDescriptor* value_desc = field->enum_type()->FindValueByNumber(value); - if (value_desc == NULL) { + if (value_desc == nullptr) { MutableUnknownFields(message)->AddVarint(field->number(), value); return; } @@ -1417,8 +1431,9 @@ void GeneratedMessageReflection::AddEnumValue(Message* message, AddEnumValueInternal(message, field, value); } -void GeneratedMessageReflection::AddEnumValueInternal( - Message* message, const FieldDescriptor* field, int value) const { +void Reflection::AddEnumValueInternal(Message* message, + const FieldDescriptor* field, + int value) const { if (field->is_extension()) { MutableExtensionSet(message)->AddEnum(field->number(), field->type(), field->options().packed(), value, @@ -1430,31 +1445,31 @@ void GeneratedMessageReflection::AddEnumValueInternal( // ------------------------------------------------------------------- -const Message& GeneratedMessageReflection::GetMessage( - const Message& message, const FieldDescriptor* field, - MessageFactory* factory) const { +const Message& Reflection::GetMessage(const Message& message, + const FieldDescriptor* field, + MessageFactory* factory) const { USAGE_CHECK_ALL(GetMessage, SINGULAR, MESSAGE); - if (factory == NULL) factory = message_factory_; + if (factory == nullptr) factory = message_factory_; if (field->is_extension()) { return static_cast(GetExtensionSet(message).GetMessage( field->number(), field->message_type(), factory)); } else { const Message* result = GetRaw(message, field); - if (result == NULL) { + if (result == nullptr) { result = DefaultRaw(field); } return *result; } } -Message* GeneratedMessageReflection::MutableMessage( - Message* message, const FieldDescriptor* field, - MessageFactory* factory) const { +Message* Reflection::MutableMessage(Message* message, + const FieldDescriptor* field, + MessageFactory* factory) const { USAGE_CHECK_ALL(MutableMessage, SINGULAR, MESSAGE); - if (factory == NULL) factory = message_factory_; + if (factory == nullptr) factory = message_factory_; if (field->is_extension()) { return static_cast( @@ -1464,7 +1479,7 @@ Message* GeneratedMessageReflection::MutableMessage( Message** result_holder = MutableRaw(message, field); - if (field->containing_oneof()) { + if (schema_.InRealOneof(field)) { if (!HasOneofField(*message, field)) { ClearOneof(message, field->containing_oneof()); result_holder = MutableField(message, field); @@ -1475,7 +1490,7 @@ Message* GeneratedMessageReflection::MutableMessage( SetBit(message, field); } - if (*result_holder == NULL) { + if (*result_holder == nullptr) { const Message* default_message = DefaultRaw(field); *result_holder = default_message->New(message->GetArena()); } @@ -1484,7 +1499,7 @@ Message* GeneratedMessageReflection::MutableMessage( } } -void GeneratedMessageReflection::UnsafeArenaSetAllocatedMessage( +void Reflection::UnsafeArenaSetAllocatedMessage( Message* message, Message* sub_message, const FieldDescriptor* field) const { USAGE_CHECK_ALL(SetAllocatedMessage, SINGULAR, MESSAGE); @@ -1493,8 +1508,8 @@ void GeneratedMessageReflection::UnsafeArenaSetAllocatedMessage( MutableExtensionSet(message)->UnsafeArenaSetAllocatedMessage( field->number(), field->type(), field, sub_message); } else { - if (field->containing_oneof()) { - if (sub_message == NULL) { + if (schema_.InRealOneof(field)) { + if (sub_message == nullptr) { ClearOneof(message, field->containing_oneof()); return; } @@ -1504,27 +1519,27 @@ void GeneratedMessageReflection::UnsafeArenaSetAllocatedMessage( return; } - if (sub_message == NULL) { + if (sub_message == nullptr) { ClearBit(message, field); } else { SetBit(message, field); } Message** sub_message_holder = MutableRaw(message, field); - if (GetArena(message) == NULL) { + if (GetArena(message) == nullptr) { delete *sub_message_holder; } *sub_message_holder = sub_message; } } -void GeneratedMessageReflection::SetAllocatedMessage( - Message* message, Message* sub_message, - const FieldDescriptor* field) const { +void Reflection::SetAllocatedMessage(Message* message, Message* sub_message, + const FieldDescriptor* field) const { // If message and sub-message are in different memory ownership domains // (different arenas, or one is on heap and one is not), then we may need to // do a copy. - if (sub_message != NULL && sub_message->GetArena() != message->GetArena()) { - if (sub_message->GetArena() == NULL && message->GetArena() != NULL) { + if (sub_message != nullptr && + sub_message->GetArena() != message->GetArena()) { + if (sub_message->GetArena() == nullptr && message->GetArena() != nullptr) { // Case 1: parent is on an arena and child is heap-allocated. We can add // the child to the arena's Own() list to free on arena destruction, then // set our pointer. @@ -1543,40 +1558,40 @@ void GeneratedMessageReflection::SetAllocatedMessage( } } -Message* GeneratedMessageReflection::UnsafeArenaReleaseMessage( - Message* message, const FieldDescriptor* field, - MessageFactory* factory) const { +Message* Reflection::UnsafeArenaReleaseMessage(Message* message, + const FieldDescriptor* field, + MessageFactory* factory) const { USAGE_CHECK_ALL(ReleaseMessage, SINGULAR, MESSAGE); - if (factory == NULL) factory = message_factory_; + if (factory == nullptr) factory = message_factory_; if (field->is_extension()) { return static_cast( MutableExtensionSet(message)->UnsafeArenaReleaseMessage(field, factory)); } else { - if (!(field->is_repeated() || field->containing_oneof())) { + if (!(field->is_repeated() || schema_.InRealOneof(field))) { ClearBit(message, field); } - if (field->containing_oneof()) { + if (schema_.InRealOneof(field)) { if (HasOneofField(*message, field)) { *MutableOneofCase(message, field->containing_oneof()) = 0; } else { - return NULL; + return nullptr; } } Message** result = MutableRaw(message, field); Message* ret = *result; - *result = NULL; + *result = nullptr; return ret; } } -Message* GeneratedMessageReflection::ReleaseMessage( - Message* message, const FieldDescriptor* field, - MessageFactory* factory) const { +Message* Reflection::ReleaseMessage(Message* message, + const FieldDescriptor* field, + MessageFactory* factory) const { Message* released = UnsafeArenaReleaseMessage(message, field, factory); - if (GetArena(message) != NULL && released != NULL) { + if (GetArena(message) != nullptr && released != nullptr) { Message* copy_from_arena = released->New(); copy_from_arena->CopyFrom(*released); released = copy_from_arena; @@ -1584,8 +1599,9 @@ Message* GeneratedMessageReflection::ReleaseMessage( return released; } -const Message& GeneratedMessageReflection::GetRepeatedMessage( - const Message& message, const FieldDescriptor* field, int index) const { +const Message& Reflection::GetRepeatedMessage(const Message& message, + const FieldDescriptor* field, + int index) const { USAGE_CHECK_ALL(GetRepeatedMessage, REPEATED, MESSAGE); if (field->is_extension()) { @@ -1603,8 +1619,9 @@ const Message& GeneratedMessageReflection::GetRepeatedMessage( } } -Message* GeneratedMessageReflection::MutableRepeatedMessage( - Message* message, const FieldDescriptor* field, int index) const { +Message* Reflection::MutableRepeatedMessage(Message* message, + const FieldDescriptor* field, + int index) const { USAGE_CHECK_ALL(MutableRepeatedMessage, REPEATED, MESSAGE); if (field->is_extension()) { @@ -1623,22 +1640,21 @@ Message* GeneratedMessageReflection::MutableRepeatedMessage( } } -Message* GeneratedMessageReflection::AddMessage(Message* message, - const FieldDescriptor* field, - MessageFactory* factory) const { +Message* Reflection::AddMessage(Message* message, const FieldDescriptor* field, + MessageFactory* factory) const { USAGE_CHECK_ALL(AddMessage, REPEATED, MESSAGE); - if (factory == NULL) factory = message_factory_; + if (factory == nullptr) factory = message_factory_; if (field->is_extension()) { return static_cast( MutableExtensionSet(message)->AddMessage(field, factory)); } else { - Message* result = NULL; + Message* result = nullptr; // We can't use AddField() because RepeatedPtrFieldBase doesn't // know how to allocate one. - RepeatedPtrFieldBase* repeated = NULL; + RepeatedPtrFieldBase* repeated = nullptr; if (IsMapFieldInApi(field)) { repeated = MutableRaw(message, field)->MutableRepeatedField(); @@ -1646,7 +1662,7 @@ Message* GeneratedMessageReflection::AddMessage(Message* message, repeated = MutableRaw(message, field); } result = repeated->AddFromCleared >(); - if (result == NULL) { + if (result == nullptr) { // We must allocate a new object. const Message* prototype; if (repeated->size() == 0) { @@ -1665,14 +1681,15 @@ Message* GeneratedMessageReflection::AddMessage(Message* message, } } -void GeneratedMessageReflection::AddAllocatedMessage( - Message* message, const FieldDescriptor* field, Message* new_entry) const { +void Reflection::AddAllocatedMessage(Message* message, + const FieldDescriptor* field, + Message* new_entry) const { USAGE_CHECK_ALL(AddAllocatedMessage, REPEATED, MESSAGE); if (field->is_extension()) { MutableExtensionSet(message)->AddAllocatedMessage(field, new_entry); } else { - RepeatedPtrFieldBase* repeated = NULL; + RepeatedPtrFieldBase* repeated = nullptr; if (IsMapFieldInApi(field)) { repeated = MutableRaw(message, field)->MutableRepeatedField(); @@ -1683,14 +1700,18 @@ void GeneratedMessageReflection::AddAllocatedMessage( } } -void* GeneratedMessageReflection::MutableRawRepeatedField( - Message* message, const FieldDescriptor* field, - FieldDescriptor::CppType cpptype, int ctype, const Descriptor* desc) const { +void* Reflection::MutableRawRepeatedField(Message* message, + const FieldDescriptor* field, + FieldDescriptor::CppType cpptype, + int ctype, + const Descriptor* desc) const { USAGE_CHECK_REPEATED("MutableRawRepeatedField"); - if (field->cpp_type() != cpptype) + if (field->cpp_type() != cpptype && + (field->cpp_type() != FieldDescriptor::CPPTYPE_ENUM || + cpptype != FieldDescriptor::CPPTYPE_INT32)) ReportReflectionUsageTypeError(descriptor_, field, "MutableRawRepeatedField", cpptype); - if (desc != NULL) + if (desc != nullptr) GOOGLE_CHECK_EQ(field->message_type(), desc) << "wrong submessage type"; if (field->is_extension()) { return MutableExtensionSet(message)->MutableRawRepeatedField( @@ -1705,16 +1726,18 @@ void* GeneratedMessageReflection::MutableRawRepeatedField( } } -const void* GeneratedMessageReflection::GetRawRepeatedField( - const Message& message, const FieldDescriptor* field, - FieldDescriptor::CppType cpptype, int ctype, const Descriptor* desc) const { +const void* Reflection::GetRawRepeatedField(const Message& message, + const FieldDescriptor* field, + FieldDescriptor::CppType cpptype, + int ctype, + const Descriptor* desc) const { USAGE_CHECK_REPEATED("GetRawRepeatedField"); if (field->cpp_type() != cpptype) ReportReflectionUsageTypeError(descriptor_, field, "GetRawRepeatedField", cpptype); if (ctype >= 0) GOOGLE_CHECK_EQ(field->options().ctype(), ctype) << "subtype mismatch"; - if (desc != NULL) + if (desc != nullptr) GOOGLE_CHECK_EQ(field->message_type(), desc) << "wrong submessage type"; if (field->is_extension()) { // Should use extension_set::GetRawRepeatedField. However, the required @@ -1733,26 +1756,31 @@ const void* GeneratedMessageReflection::GetRawRepeatedField( } } -const FieldDescriptor* GeneratedMessageReflection::GetOneofFieldDescriptor( +const FieldDescriptor* Reflection::GetOneofFieldDescriptor( const Message& message, const OneofDescriptor* oneof_descriptor) const { + if (oneof_descriptor->is_synthetic()) { + const FieldDescriptor* field = oneof_descriptor->field(0); + return HasField(message, field) ? field : nullptr; + } uint32 field_number = GetOneofCase(message, oneof_descriptor); if (field_number == 0) { - return NULL; + return nullptr; } return descriptor_->FindFieldByNumber(field_number); } -bool GeneratedMessageReflection::ContainsMapKey(const Message& message, - const FieldDescriptor* field, - const MapKey& key) const { +bool Reflection::ContainsMapKey(const Message& message, + const FieldDescriptor* field, + const MapKey& key) const { USAGE_CHECK(IsMapFieldInApi(field), "LookupMapValue", "Field is not a map field."); return GetRaw(message, field).ContainsMapKey(key); } -bool GeneratedMessageReflection::InsertOrLookupMapValue( - Message* message, const FieldDescriptor* field, const MapKey& key, - MapValueRef* val) const { +bool Reflection::InsertOrLookupMapValue(Message* message, + const FieldDescriptor* field, + const MapKey& key, + MapValueRef* val) const { USAGE_CHECK(IsMapFieldInApi(field), "InsertOrLookupMapValue", "Field is not a map field."); val->SetType(field->message_type()->FindFieldByName("value")->cpp_type()); @@ -1760,75 +1788,50 @@ bool GeneratedMessageReflection::InsertOrLookupMapValue( ->InsertOrLookupMapValue(key, val); } -bool GeneratedMessageReflection::DeleteMapValue(Message* message, - const FieldDescriptor* field, - const MapKey& key) const { +bool Reflection::DeleteMapValue(Message* message, const FieldDescriptor* field, + const MapKey& key) const { USAGE_CHECK(IsMapFieldInApi(field), "DeleteMapValue", "Field is not a map field."); return MutableRaw(message, field)->DeleteMapValue(key); } -MapIterator GeneratedMessageReflection::MapBegin( - Message* message, const FieldDescriptor* field) const { +MapIterator Reflection::MapBegin(Message* message, + const FieldDescriptor* field) const { USAGE_CHECK(IsMapFieldInApi(field), "MapBegin", "Field is not a map field."); MapIterator iter(message, field); GetRaw(*message, field).MapBegin(&iter); return iter; } -MapIterator GeneratedMessageReflection::MapEnd( - Message* message, const FieldDescriptor* field) const { +MapIterator Reflection::MapEnd(Message* message, + const FieldDescriptor* field) const { USAGE_CHECK(IsMapFieldInApi(field), "MapEnd", "Field is not a map field."); MapIterator iter(message, field); GetRaw(*message, field).MapEnd(&iter); return iter; } -int GeneratedMessageReflection::MapSize(const Message& message, - const FieldDescriptor* field) const { +int Reflection::MapSize(const Message& message, + const FieldDescriptor* field) const { USAGE_CHECK(IsMapFieldInApi(field), "MapSize", "Field is not a map field."); return GetRaw(message, field).size(); } // ----------------------------------------------------------------------------- -const FieldDescriptor* GeneratedMessageReflection::FindKnownExtensionByName( +const FieldDescriptor* Reflection::FindKnownExtensionByName( const std::string& name) const { - if (!schema_.HasExtensionSet()) return NULL; - - const FieldDescriptor* result = descriptor_pool_->FindExtensionByName(name); - if (result != NULL && result->containing_type() == descriptor_) { - return result; - } - - if (descriptor_->options().message_set_wire_format()) { - // MessageSet extensions may be identified by type name. - const Descriptor* type = descriptor_pool_->FindMessageTypeByName(name); - if (type != NULL) { - // Look for a matching extension in the foreign type's scope. - const int type_extension_count = type->extension_count(); - for (int i = 0; i < type_extension_count; i++) { - const FieldDescriptor* extension = type->extension(i); - if (extension->containing_type() == descriptor_ && - extension->type() == FieldDescriptor::TYPE_MESSAGE && - extension->is_optional() && extension->message_type() == type) { - // Found it. - return extension; - } - } - } - } - - return NULL; + if (!schema_.HasExtensionSet()) return nullptr; + return descriptor_pool_->FindExtensionByPrintableName(descriptor_, name); } -const FieldDescriptor* GeneratedMessageReflection::FindKnownExtensionByNumber( +const FieldDescriptor* Reflection::FindKnownExtensionByNumber( int number) const { - if (!schema_.HasExtensionSet()) return NULL; + if (!schema_.HasExtensionSet()) return nullptr; return descriptor_pool_->FindExtensionByNumber(descriptor_, number); } -bool GeneratedMessageReflection::SupportsUnknownEnumValues() const { +bool Reflection::SupportsUnknownEnumValues() const { return CreateUnknownEnumValues(descriptor_->file()); } @@ -1839,111 +1842,100 @@ bool GeneratedMessageReflection::SupportsUnknownEnumValues() const { // the given field. template -const Type& GeneratedMessageReflection::GetRawNonOneof( - const Message& message, const FieldDescriptor* field) const { +const Type& Reflection::GetRawNonOneof(const Message& message, + const FieldDescriptor* field) const { return GetConstRefAtOffset(message, schema_.GetFieldOffsetNonOneof(field)); } template -Type* GeneratedMessageReflection::MutableRawNonOneof( - Message* message, const FieldDescriptor* field) const { +Type* Reflection::MutableRawNonOneof(Message* message, + const FieldDescriptor* field) const { return GetPointerAtOffset(message, schema_.GetFieldOffsetNonOneof(field)); } template -const Type& GeneratedMessageReflection::GetRaw( - const Message& message, const FieldDescriptor* field) const { - if (field->containing_oneof() && !HasOneofField(message, field)) { +const Type& Reflection::GetRaw(const Message& message, + const FieldDescriptor* field) const { + if (schema_.InRealOneof(field) && !HasOneofField(message, field)) { return DefaultRaw(field); } return GetConstRefAtOffset(message, schema_.GetFieldOffset(field)); } -bool GeneratedMessageReflection::IsInlined(const FieldDescriptor* field) const { +bool Reflection::IsInlined(const FieldDescriptor* field) const { return schema_.IsFieldInlined(field); } template -Type* GeneratedMessageReflection::MutableRaw( - Message* message, const FieldDescriptor* field) const { +Type* Reflection::MutableRaw(Message* message, + const FieldDescriptor* field) const { return GetPointerAtOffset(message, schema_.GetFieldOffset(field)); } -inline const uint32* GeneratedMessageReflection::GetHasBits( - const Message& message) const { +const uint32* Reflection::GetHasBits(const Message& message) const { GOOGLE_DCHECK(schema_.HasHasbits()); return &GetConstRefAtOffset(message, schema_.HasBitsOffset()); } -inline uint32* GeneratedMessageReflection::MutableHasBits( - Message* message) const { +uint32* Reflection::MutableHasBits(Message* message) const { GOOGLE_DCHECK(schema_.HasHasbits()); return GetPointerAtOffset(message, schema_.HasBitsOffset()); } -inline uint32 GeneratedMessageReflection::GetOneofCase( - const Message& message, const OneofDescriptor* oneof_descriptor) const { +uint32 Reflection::GetOneofCase(const Message& message, + const OneofDescriptor* oneof_descriptor) const { + GOOGLE_DCHECK(!oneof_descriptor->is_synthetic()); return GetConstRefAtOffset( message, schema_.GetOneofCaseOffset(oneof_descriptor)); } -inline uint32* GeneratedMessageReflection::MutableOneofCase( +uint32* Reflection::MutableOneofCase( Message* message, const OneofDescriptor* oneof_descriptor) const { + GOOGLE_DCHECK(!oneof_descriptor->is_synthetic()); return GetPointerAtOffset( message, schema_.GetOneofCaseOffset(oneof_descriptor)); } -inline const ExtensionSet& GeneratedMessageReflection::GetExtensionSet( - const Message& message) const { +const ExtensionSet& Reflection::GetExtensionSet(const Message& message) const { return GetConstRefAtOffset(message, schema_.GetExtensionSetOffset()); } -inline ExtensionSet* GeneratedMessageReflection::MutableExtensionSet( - Message* message) const { +ExtensionSet* Reflection::MutableExtensionSet(Message* message) const { return GetPointerAtOffset(message, schema_.GetExtensionSetOffset()); } -inline Arena* GeneratedMessageReflection::GetArena(Message* message) const { - return GetInternalMetadataWithArena(*message).arena(); +Arena* Reflection::GetArena(Message* message) const { + return GetInternalMetadata(*message).arena(); } -inline const InternalMetadataWithArena& -GeneratedMessageReflection::GetInternalMetadataWithArena( +const InternalMetadata& Reflection::GetInternalMetadata( const Message& message) const { - return GetConstRefAtOffset( - message, schema_.GetMetadataOffset()); + return GetConstRefAtOffset(message, + schema_.GetMetadataOffset()); } -inline InternalMetadataWithArena* -GeneratedMessageReflection::MutableInternalMetadataWithArena( - Message* message) const { - return GetPointerAtOffset( - message, schema_.GetMetadataOffset()); -} - -template -inline const Type& GeneratedMessageReflection::DefaultRaw( - const FieldDescriptor* field) const { - return *reinterpret_cast(schema_.GetFieldDefault(field)); +InternalMetadata* Reflection::MutableInternalMetadata(Message* message) const { + return GetPointerAtOffset(message, + schema_.GetMetadataOffset()); } // Simple accessors for manipulating has_bits_. -inline bool GeneratedMessageReflection::HasBit( - const Message& message, const FieldDescriptor* field) const { +bool Reflection::HasBit(const Message& message, + const FieldDescriptor* field) const { GOOGLE_DCHECK(!field->options().weak()); - if (schema_.HasHasbits()) { + if (schema_.HasBitIndex(field) != -1) { return IsIndexInHasBitSet(GetHasBits(message), schema_.HasBitIndex(field)); } // proto3: no has-bits. All fields present except messages, which are - // present only if their message-field pointer is non-NULL. + // present only if their message-field pointer is non-null. if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { return !schema_.IsDefaultInstance(message) && - GetRaw(message, field) != NULL; + GetRaw(message, field) != nullptr; } else { // Non-message field (and non-oneof, since that was handled in HasField() // before calling us), and singular (again, checked in HasField). So, this @@ -1993,19 +1985,16 @@ inline bool GeneratedMessageReflection::HasBit( } } -inline void GeneratedMessageReflection::SetBit( - Message* message, const FieldDescriptor* field) const { +void Reflection::SetBit(Message* message, const FieldDescriptor* field) const { GOOGLE_DCHECK(!field->options().weak()); - if (!schema_.HasHasbits()) { - return; - } const uint32 index = schema_.HasBitIndex(field); + if (index == -1) return; MutableHasBits(message)[index / 32] |= (static_cast(1) << (index % 32)); } -inline void GeneratedMessageReflection::ClearBit( - Message* message, const FieldDescriptor* field) const { +void Reflection::ClearBit(Message* message, + const FieldDescriptor* field) const { GOOGLE_DCHECK(!field->options().weak()); if (!schema_.HasHasbits()) { return; @@ -2015,8 +2004,8 @@ inline void GeneratedMessageReflection::ClearBit( ~(static_cast(1) << (index % 32)); } -inline void GeneratedMessageReflection::SwapBit( - Message* message1, Message* message2, const FieldDescriptor* field) const { +void Reflection::SwapBit(Message* message1, Message* message2, + const FieldDescriptor* field) const { GOOGLE_DCHECK(!field->options().weak()); if (!schema_.HasHasbits()) { return; @@ -2034,37 +2023,44 @@ inline void GeneratedMessageReflection::SwapBit( } } -inline bool GeneratedMessageReflection::HasOneof( - const Message& message, const OneofDescriptor* oneof_descriptor) const { +bool Reflection::HasOneof(const Message& message, + const OneofDescriptor* oneof_descriptor) const { + if (oneof_descriptor->is_synthetic()) { + return HasField(message, oneof_descriptor->field(0)); + } return (GetOneofCase(message, oneof_descriptor) > 0); } -inline bool GeneratedMessageReflection::HasOneofField( - const Message& message, const FieldDescriptor* field) const { +bool Reflection::HasOneofField(const Message& message, + const FieldDescriptor* field) const { return (GetOneofCase(message, field->containing_oneof()) == field->number()); } -inline void GeneratedMessageReflection::SetOneofCase( - Message* message, const FieldDescriptor* field) const { +void Reflection::SetOneofCase(Message* message, + const FieldDescriptor* field) const { *MutableOneofCase(message, field->containing_oneof()) = field->number(); } -inline void GeneratedMessageReflection::ClearOneofField( - Message* message, const FieldDescriptor* field) const { +void Reflection::ClearOneofField(Message* message, + const FieldDescriptor* field) const { if (HasOneofField(*message, field)) { ClearOneof(message, field->containing_oneof()); } } -inline void GeneratedMessageReflection::ClearOneof( - Message* message, const OneofDescriptor* oneof_descriptor) const { +void Reflection::ClearOneof(Message* message, + const OneofDescriptor* oneof_descriptor) const { + if (oneof_descriptor->is_synthetic()) { + ClearField(message, oneof_descriptor->field(0)); + return; + } // TODO(jieluo): Consider to cache the unused object instead of deleting // it. It will be much faster if an application switches a lot from // a few oneof fields. Time/space tradeoff uint32 oneof_case = GetOneofCase(*message, oneof_descriptor); if (oneof_case > 0) { const FieldDescriptor* field = descriptor_->FindFieldByNumber(oneof_case); - if (GetArena(message) == NULL) { + if (GetArena(message) == nullptr) { switch (field->cpp_type()) { case FieldDescriptor::CPPTYPE_STRING: { switch (field->options().ctype()) { @@ -2092,84 +2088,120 @@ inline void GeneratedMessageReflection::ClearOneof( } } +#define HANDLE_TYPE(TYPE, CPPTYPE, CTYPE) \ + template <> \ + const RepeatedField& Reflection::GetRepeatedFieldInternal( \ + const Message& message, const FieldDescriptor* field) const { \ + return *static_cast*>(MutableRawRepeatedField( \ + const_cast(&message), field, CPPTYPE, CTYPE, NULL)); \ + } \ + \ + template <> \ + RepeatedField* Reflection::MutableRepeatedFieldInternal( \ + Message * message, const FieldDescriptor* field) const { \ + return static_cast*>( \ + MutableRawRepeatedField(message, field, CPPTYPE, CTYPE, NULL)); \ + } + +HANDLE_TYPE(int32, FieldDescriptor::CPPTYPE_INT32, -1); +HANDLE_TYPE(int64, FieldDescriptor::CPPTYPE_INT64, -1); +HANDLE_TYPE(uint32, FieldDescriptor::CPPTYPE_UINT32, -1); +HANDLE_TYPE(uint64, FieldDescriptor::CPPTYPE_UINT64, -1); +HANDLE_TYPE(float, FieldDescriptor::CPPTYPE_FLOAT, -1); +HANDLE_TYPE(double, FieldDescriptor::CPPTYPE_DOUBLE, -1); +HANDLE_TYPE(bool, FieldDescriptor::CPPTYPE_BOOL, -1); + + +#undef HANDLE_TYPE + +void* Reflection::MutableRawRepeatedString(Message* message, + const FieldDescriptor* field, + bool is_string) const { + return MutableRawRepeatedField(message, field, + FieldDescriptor::CPPTYPE_STRING, + FieldOptions::STRING, NULL); +} + // Template implementations of basic accessors. Inline because each // template instance is only called from one location. These are // used for all types except messages. template -inline const Type& GeneratedMessageReflection::GetField( - const Message& message, const FieldDescriptor* field) const { +const Type& Reflection::GetField(const Message& message, + const FieldDescriptor* field) const { return GetRaw(message, field); } template -inline void GeneratedMessageReflection::SetField(Message* message, - const FieldDescriptor* field, - const Type& value) const { - if (field->containing_oneof() && !HasOneofField(*message, field)) { +void Reflection::SetField(Message* message, const FieldDescriptor* field, + const Type& value) const { + bool real_oneof = schema_.InRealOneof(field); + if (real_oneof && !HasOneofField(*message, field)) { ClearOneof(message, field->containing_oneof()); } *MutableRaw(message, field) = value; - field->containing_oneof() ? SetOneofCase(message, field) - : SetBit(message, field); + real_oneof ? SetOneofCase(message, field) : SetBit(message, field); } template -inline Type* GeneratedMessageReflection::MutableField( - Message* message, const FieldDescriptor* field) const { - field->containing_oneof() ? SetOneofCase(message, field) - : SetBit(message, field); +Type* Reflection::MutableField(Message* message, + const FieldDescriptor* field) const { + schema_.InRealOneof(field) ? SetOneofCase(message, field) + : SetBit(message, field); return MutableRaw(message, field); } template -inline const Type& GeneratedMessageReflection::GetRepeatedField( - const Message& message, const FieldDescriptor* field, int index) const { +const Type& Reflection::GetRepeatedField(const Message& message, + const FieldDescriptor* field, + int index) const { return GetRaw >(message, field).Get(index); } template -inline const Type& GeneratedMessageReflection::GetRepeatedPtrField( - const Message& message, const FieldDescriptor* field, int index) const { +const Type& Reflection::GetRepeatedPtrField(const Message& message, + const FieldDescriptor* field, + int index) const { return GetRaw >(message, field).Get(index); } template -inline void GeneratedMessageReflection::SetRepeatedField( - Message* message, const FieldDescriptor* field, int index, - Type value) const { +void Reflection::SetRepeatedField(Message* message, + const FieldDescriptor* field, int index, + Type value) const { MutableRaw >(message, field)->Set(index, value); } template -inline Type* GeneratedMessageReflection::MutableRepeatedField( - Message* message, const FieldDescriptor* field, int index) const { +Type* Reflection::MutableRepeatedField(Message* message, + const FieldDescriptor* field, + int index) const { RepeatedPtrField* repeated = MutableRaw >(message, field); return repeated->Mutable(index); } template -inline void GeneratedMessageReflection::AddField(Message* message, - const FieldDescriptor* field, - const Type& value) const { +void Reflection::AddField(Message* message, const FieldDescriptor* field, + const Type& value) const { MutableRaw >(message, field)->Add(value); } template -inline Type* GeneratedMessageReflection::AddField( - Message* message, const FieldDescriptor* field) const { +Type* Reflection::AddField(Message* message, + const FieldDescriptor* field) const { RepeatedPtrField* repeated = MutableRaw >(message, field); return repeated->Add(); } -MessageFactory* GeneratedMessageReflection::GetMessageFactory() const { +MessageFactory* Reflection::GetMessageFactory() const { return message_factory_; } -void* GeneratedMessageReflection::RepeatedFieldData( - Message* message, const FieldDescriptor* field, - FieldDescriptor::CppType cpp_type, const Descriptor* message_type) const { +void* Reflection::RepeatedFieldData(Message* message, + const FieldDescriptor* field, + FieldDescriptor::CppType cpp_type, + const Descriptor* message_type) const { GOOGLE_CHECK(field->is_repeated()); GOOGLE_CHECK(field->cpp_type() == cpp_type || (field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM && @@ -2177,7 +2209,7 @@ void* GeneratedMessageReflection::RepeatedFieldData( << "The type parameter T in RepeatedFieldRef API doesn't match " << "the actual field type (for enums T should be the generated enum " << "type or int32)."; - if (message_type != NULL) { + if (message_type != nullptr) { GOOGLE_CHECK_EQ(message_type, field->message_type()); } if (field->is_extension()) { @@ -2188,15 +2220,15 @@ void* GeneratedMessageReflection::RepeatedFieldData( } } -MapFieldBase* GeneratedMessageReflection::MutableMapData( - Message* message, const FieldDescriptor* field) const { +MapFieldBase* Reflection::MutableMapData(Message* message, + const FieldDescriptor* field) const { USAGE_CHECK(IsMapFieldInApi(field), "GetMapData", "Field is not a map field."); return MutableRaw(message, field); } -const MapFieldBase* GeneratedMessageReflection::GetMapData( - const Message& message, const FieldDescriptor* field) const { +const MapFieldBase* Reflection::GetMapData(const Message& message, + const FieldDescriptor* field) const { USAGE_CHECK(IsMapFieldInApi(field), "GetMapData", "Field is not a map field."); return &(GetRaw(message, field)); @@ -2223,13 +2255,14 @@ ReflectionSchema MigrationToReflectionSchema( return result; } -template +} // namespace + class AssignDescriptorsHelper { public: AssignDescriptorsHelper(MessageFactory* factory, Metadata* file_level_metadata, const EnumDescriptor** file_level_enum_descriptors, - const Schema* schemas, + const MigrationSchema* schemas, const Message* const* default_instance_data, const uint32* offsets) : factory_(factory), @@ -2246,11 +2279,11 @@ class AssignDescriptorsHelper { file_level_metadata_->descriptor = descriptor; - file_level_metadata_->reflection = new GeneratedMessageReflection( - descriptor, - MigrationToReflectionSchema(default_instance_data_, offsets_, - *schemas_), - DescriptorPool::generated_pool(), factory_); + file_level_metadata_->reflection = + new Reflection(descriptor, + MigrationToReflectionSchema(default_instance_data_, + offsets_, *schemas_), + DescriptorPool::internal_generated_pool(), factory_); for (int i = 0; i < descriptor->enum_type_count(); i++) { AssignEnumDescriptor(descriptor->enum_type(i)); } @@ -2270,11 +2303,13 @@ class AssignDescriptorsHelper { MessageFactory* factory_; Metadata* file_level_metadata_; const EnumDescriptor** file_level_enum_descriptors_; - const Schema* schemas_; + const MigrationSchema* schemas_; const Message* const* default_instance_data_; const uint32* offsets_; }; +namespace { + // We have the routines that assign descriptors and build reflection // automatically delete the allocated reflection. MetadataOwner owns // all the allocated reflection instances. @@ -2305,7 +2340,7 @@ struct MetadataOwner { std::vector > metadata_arrays_; }; -void AssignDescriptorsImpl(const DescriptorTable* table) { +void AssignDescriptorsImpl(const DescriptorTable* table, bool eager) { // Ensure the file descriptor is added to the pool. { // This only happens once per proto file. So a global mutex to serialize @@ -2315,14 +2350,34 @@ void AssignDescriptorsImpl(const DescriptorTable* table) { AddDescriptors(table); mu.Unlock(); } + if (eager) { + // Normally we do not want to eagerly build descriptors of our deps. + // However if this proto is optimized for code size (ie using reflection) + // and it has a message extending a custom option of a descriptor with that + // message being optimized for code size as well. Building the descriptors + // in this file requires parsing the serialized file descriptor, which now + // requires parsing the message extension, which potentially requires + // building the descriptor of the message extending one of the options. + // However we are already updating descriptor pool under a lock. To prevent + // this the compiler statically looks for this case and we just make sure we + // first build the descriptors of all our dependencies, preventing the + // deadlock. + int num_deps = table->num_deps; + for (int i = 0; i < num_deps; i++) { + // In case of weak fields deps[i] could be null. + if (table->deps[i]) AssignDescriptors(table->deps[i], true); + } + } + // Fill the arrays with pointers to descriptors and reflection classes. const FileDescriptor* file = - DescriptorPool::generated_pool()->FindFileByName(table->filename); - GOOGLE_CHECK(file != NULL); + DescriptorPool::internal_generated_pool()->FindFileByName( + table->filename); + GOOGLE_CHECK(file != nullptr); MessageFactory* factory = MessageFactory::generated_factory(); - AssignDescriptorsHelper helper( + AssignDescriptorsHelper helper( factory, table->file_level_metadata, table->file_level_enum_descriptors, table->schemas, table->default_instances, table->offsets); @@ -2351,7 +2406,8 @@ void AddDescriptorsImpl(const DescriptorTable* table) { // Ensure all dependent descriptors are registered to the generated descriptor // pool and message factory. - for (int i = 0; i < table->num_deps; i++) { + int num_deps = table->num_deps; + for (int i = 0; i < num_deps; i++) { // In case of weak fields deps[i] could be null. if (table->deps[i]) AddDescriptors(table->deps[i]); } @@ -2363,8 +2419,22 @@ void AddDescriptorsImpl(const DescriptorTable* table) { } // namespace -void AssignDescriptors(const DescriptorTable* table) { - call_once(*table->once, AssignDescriptorsImpl, table); +// Separate function because it needs to be a friend of +// Reflection +void RegisterAllTypesInternal(const Metadata* file_level_metadata, int size) { + for (int i = 0; i < size; i++) { + const Reflection* reflection = file_level_metadata[i].reflection; + MessageFactory::InternalRegisterGeneratedMessage( + file_level_metadata[i].descriptor, + reflection->schema_.default_instance_); + } +} + +namespace internal { + +void AssignDescriptors(const DescriptorTable* table, bool eager) { + if (!eager) eager = table->is_eager; + call_once(*table->once, AssignDescriptorsImpl, table, eager); } void AddDescriptors(const DescriptorTable* table) { @@ -2372,24 +2442,11 @@ void AddDescriptors(const DescriptorTable* table) { // properly serialized. This function is only called pre-main by global // descriptors and we can assume single threaded access or it's called // by AssignDescriptorImpl which uses a mutex to sequence calls. - if (*table->is_initialized) return; - *table->is_initialized = true; + if (table->is_initialized) return; + table->is_initialized = true; AddDescriptorsImpl(table); } -// Separate function because it needs to be a friend of -// GeneratedMessageReflection -void RegisterAllTypesInternal(const Metadata* file_level_metadata, int size) { - for (int i = 0; i < size; i++) { - const GeneratedMessageReflection* reflection = - static_cast( - file_level_metadata[i].reflection); - MessageFactory::InternalRegisterGeneratedMessage( - file_level_metadata[i].descriptor, - reflection->schema_.default_instance_); - } -} - void RegisterFileLevelMetadata(const DescriptorTable* table) { AssignDescriptors(table); RegisterAllTypesInternal(table->file_level_metadata, table->num_messages); @@ -2399,11 +2456,12 @@ void UnknownFieldSetSerializer(const uint8* base, uint32 offset, uint32 tag, uint32 has_offset, io::CodedOutputStream* output) { const void* ptr = base + offset; - const InternalMetadataWithArena* metadata = - static_cast(ptr); + const InternalMetadata* metadata = static_cast(ptr); if (metadata->have_unknown_fields()) { - internal::WireFormat::SerializeUnknownFields(metadata->unknown_fields(), - output); + internal::WireFormat::SerializeUnknownFields( + metadata->unknown_fields( + UnknownFieldSet::default_instance), + output); } } diff --git a/third_party/protobuf/src/google/protobuf/generated_message_reflection.h b/third_party/protobuf/src/google/protobuf/generated_message_reflection.h index a0555b57..e2eae772 100644 --- a/third_party/protobuf/src/google/protobuf/generated_message_reflection.h +++ b/third_party/protobuf/src/google/protobuf/generated_message_reflection.h @@ -44,9 +44,8 @@ #include // TODO(jasonh): Remove this once the compiler change to directly include this // is released to components. +#include #include -#include -#include #include #include #include @@ -58,30 +57,21 @@ #error "You cannot SWIG proto headers" #endif -namespace upb { -namespace google_opensource { -class GMR_Handlers; -} // namespace google_opensource -} // namespace upb - namespace google { namespace protobuf { class DescriptorPool; class MapKey; class MapValueRef; +class MessageLayoutInspector; +class Message; +struct Metadata; } // namespace protobuf } // namespace google - namespace google { namespace protobuf { namespace internal { class DefaultEmptyOneof; -class ReflectionAccessor; - -// Defined in this file. -class GeneratedMessageReflection; - // Defined in other files. class ExtensionSet; // extension_set.h class WeakFieldMap; // weak_field_map.h @@ -92,7 +82,7 @@ class WeakFieldMap; // weak_field_map.h // used to obtain pointers to default instances of embedded // messages, which GetMessage() will return if the particular // sub-message has not been initialized yet. (Thus, all -// embedded message fields *must* have non-NULL pointers +// embedded message fields *must* have non-null pointers // in the default instance.) // offsets: An array of ints giving the byte offsets. // For each oneof or weak field, the offset is relative to the @@ -134,16 +124,21 @@ struct ReflectionSchema { // Size of a google::protobuf::Message object of this type. uint32 GetObjectSize() const { return static_cast(object_size_); } + bool InRealOneof(const FieldDescriptor* field) const { + return field->containing_oneof() && + !field->containing_oneof()->is_synthetic(); + } + // Offset of a non-oneof field. Getting a field offset is slightly more // efficient when we know statically that it is not a oneof field. uint32 GetFieldOffsetNonOneof(const FieldDescriptor* field) const { - GOOGLE_DCHECK(!field->containing_oneof()); + GOOGLE_DCHECK(!InRealOneof(field)); return OffsetValue(offsets_[field->index()], field->type()); } // Offset of any field. uint32 GetFieldOffset(const FieldDescriptor* field) const { - if (field->containing_oneof()) { + if (InRealOneof(field)) { size_t offset = static_cast(field->containing_type()->field_count() + field->containing_oneof()->index()); @@ -154,7 +149,7 @@ struct ReflectionSchema { } bool IsFieldInlined(const FieldDescriptor* field) const { - if (field->containing_oneof()) { + if (InRealOneof(field)) { size_t offset = static_cast(field->containing_type()->field_count() + field->containing_oneof()->index()); @@ -174,6 +169,7 @@ struct ReflectionSchema { // Bit index within the bit array of hasbits. Bit order is low-to-high. uint32 HasBitIndex(const FieldDescriptor* field) const { + if (has_bits_offset_ == -1) return static_cast(-1); GOOGLE_DCHECK(HasHasbits()); return has_bit_indices_[field->index()]; } @@ -269,398 +265,11 @@ struct MigrationSchema { int object_size; }; -// THIS CLASS IS NOT INTENDED FOR DIRECT USE. It is intended for use -// by generated code. This class is just a big hack that reduces code -// size. -// -// A GeneratedMessageReflection is an implementation of Reflection -// which expects all fields to be backed by simple variables located in -// memory. The locations are given using a base pointer and a set of -// offsets. -// -// It is required that the user represents fields of each type in a standard -// way, so that GeneratedMessageReflection can cast the void* pointer to -// the appropriate type. For primitive fields and string fields, each -// field should be represented using the obvious C++ primitive type. Enums and -// Messages are different: -// - Singular Message fields are stored as a pointer to a Message. These -// should start out NULL, except for in the default instance where they -// should start out pointing to other default instances. -// - Enum fields are stored as an int. This int must always contain -// a valid value, such that EnumDescriptor::FindValueByNumber() would -// not return NULL. -// - Repeated fields are stored as RepeatedFields or RepeatedPtrFields -// of whatever type the individual field would be. Strings and -// Messages use RepeatedPtrFields while everything else uses -// RepeatedFields. -class GeneratedMessageReflection final : public Reflection { - public: - // Constructs a GeneratedMessageReflection. - // Parameters: - // descriptor: The descriptor for the message type being implemented. - // schema: The description of the internal guts of the message. - // pool: DescriptorPool to search for extension definitions. Only - // used by FindKnownExtensionByName() and - // FindKnownExtensionByNumber(). - // factory: MessageFactory to use to construct extension messages. - GeneratedMessageReflection(const Descriptor* descriptor, - const ReflectionSchema& schema, - const DescriptorPool* pool, - MessageFactory* factory); - - ~GeneratedMessageReflection() override; - - // implements Reflection ------------------------------------------- - - const UnknownFieldSet& GetUnknownFields( - const Message& message) const override; - UnknownFieldSet* MutableUnknownFields(Message* message) const override; - - size_t SpaceUsedLong(const Message& message) const override; - - bool HasField(const Message& message, - const FieldDescriptor* field) const override; - int FieldSize(const Message& message, - const FieldDescriptor* field) const override; - void ClearField(Message* message, - const FieldDescriptor* field) const override; - bool HasOneof(const Message& message, - const OneofDescriptor* oneof_descriptor) const override; - void ClearOneof(Message* message, - const OneofDescriptor* oneof_descriptor) const override; - void RemoveLast(Message* message, - const FieldDescriptor* field) const override; - Message* ReleaseLast(Message* message, - const FieldDescriptor* field) const override; - void Swap(Message* message1, Message* message2) const override; - void SwapFields( - Message* message1, Message* message2, - const std::vector& fields) const override; - void SwapElements(Message* message, const FieldDescriptor* field, int index1, - int index2) const override; - void ListFields(const Message& message, - std::vector* output) const override; - int32 GetInt32(const Message& message, - const FieldDescriptor* field) const override; - int64 GetInt64(const Message& message, - const FieldDescriptor* field) const override; - uint32 GetUInt32(const Message& message, - const FieldDescriptor* field) const override; - uint64 GetUInt64(const Message& message, - const FieldDescriptor* field) const override; - float GetFloat(const Message& message, - const FieldDescriptor* field) const override; - double GetDouble(const Message& message, - const FieldDescriptor* field) const override; - bool GetBool(const Message& message, - const FieldDescriptor* field) const override; - std::string GetString(const Message& message, - const FieldDescriptor* field) const override; - const std::string& GetStringReference(const Message& message, - const FieldDescriptor* field, - std::string* scratch) const override; - const EnumValueDescriptor* GetEnum( - const Message& message, const FieldDescriptor* field) const override; - int GetEnumValue(const Message& message, - const FieldDescriptor* field) const override; - const Message& GetMessage(const Message& message, - const FieldDescriptor* field, - MessageFactory* factory = NULL) const override; - - const FieldDescriptor* GetOneofFieldDescriptor( - const Message& message, - const OneofDescriptor* oneof_descriptor) const override; - - private: - bool ContainsMapKey(const Message& message, const FieldDescriptor* field, - const MapKey& key) const override; - bool InsertOrLookupMapValue(Message* message, const FieldDescriptor* field, - const MapKey& key, - MapValueRef* val) const override; - bool DeleteMapValue(Message* message, const FieldDescriptor* field, - const MapKey& key) const override; - MapIterator MapBegin(Message* message, - const FieldDescriptor* field) const override; - MapIterator MapEnd(Message* message, - const FieldDescriptor* field) const override; - int MapSize(const Message& message, - const FieldDescriptor* field) const override; - - public: - void SetInt32(Message* message, const FieldDescriptor* field, - int32 value) const override; - void SetInt64(Message* message, const FieldDescriptor* field, - int64 value) const override; - void SetUInt32(Message* message, const FieldDescriptor* field, - uint32 value) const override; - void SetUInt64(Message* message, const FieldDescriptor* field, - uint64 value) const override; - void SetFloat(Message* message, const FieldDescriptor* field, - float value) const override; - void SetDouble(Message* message, const FieldDescriptor* field, - double value) const override; - void SetBool(Message* message, const FieldDescriptor* field, - bool value) const override; - void SetString(Message* message, const FieldDescriptor* field, - const std::string& value) const override; - void SetEnum(Message* message, const FieldDescriptor* field, - const EnumValueDescriptor* value) const override; - void SetEnumValue(Message* message, const FieldDescriptor* field, - int value) const override; - Message* MutableMessage(Message* message, const FieldDescriptor* field, - MessageFactory* factory = NULL) const override; - void SetAllocatedMessage(Message* message, Message* sub_message, - const FieldDescriptor* field) const override; - Message* ReleaseMessage(Message* message, const FieldDescriptor* field, - MessageFactory* factory = NULL) const override; - - int32 GetRepeatedInt32(const Message& message, const FieldDescriptor* field, - int index) const override; - int64 GetRepeatedInt64(const Message& message, const FieldDescriptor* field, - int index) const override; - uint32 GetRepeatedUInt32(const Message& message, const FieldDescriptor* field, - int index) const override; - uint64 GetRepeatedUInt64(const Message& message, const FieldDescriptor* field, - int index) const override; - float GetRepeatedFloat(const Message& message, const FieldDescriptor* field, - int index) const override; - double GetRepeatedDouble(const Message& message, const FieldDescriptor* field, - int index) const override; - bool GetRepeatedBool(const Message& message, const FieldDescriptor* field, - int index) const override; - std::string GetRepeatedString(const Message& message, - const FieldDescriptor* field, - int index) const override; - const std::string& GetRepeatedStringReference( - const Message& message, const FieldDescriptor* field, int index, - std::string* scratch) const override; - const EnumValueDescriptor* GetRepeatedEnum(const Message& message, - const FieldDescriptor* field, - int index) const override; - int GetRepeatedEnumValue(const Message& message, const FieldDescriptor* field, - int index) const override; - const Message& GetRepeatedMessage(const Message& message, - const FieldDescriptor* field, - int index) const override; - - // Set the value of a field. - void SetRepeatedInt32(Message* message, const FieldDescriptor* field, - int index, int32 value) const override; - void SetRepeatedInt64(Message* message, const FieldDescriptor* field, - int index, int64 value) const override; - void SetRepeatedUInt32(Message* message, const FieldDescriptor* field, - int index, uint32 value) const override; - void SetRepeatedUInt64(Message* message, const FieldDescriptor* field, - int index, uint64 value) const override; - void SetRepeatedFloat(Message* message, const FieldDescriptor* field, - int index, float value) const override; - void SetRepeatedDouble(Message* message, const FieldDescriptor* field, - int index, double value) const override; - void SetRepeatedBool(Message* message, const FieldDescriptor* field, - int index, bool value) const override; - void SetRepeatedString(Message* message, const FieldDescriptor* field, - int index, const std::string& value) const override; - void SetRepeatedEnum(Message* message, const FieldDescriptor* field, - int index, - const EnumValueDescriptor* value) const override; - void SetRepeatedEnumValue(Message* message, const FieldDescriptor* field, - int index, int value) const override; - // Get a mutable pointer to a field with a message type. - Message* MutableRepeatedMessage(Message* message, - const FieldDescriptor* field, - int index) const override; - - void AddInt32(Message* message, const FieldDescriptor* field, - int32 value) const override; - void AddInt64(Message* message, const FieldDescriptor* field, - int64 value) const override; - void AddUInt32(Message* message, const FieldDescriptor* field, - uint32 value) const override; - void AddUInt64(Message* message, const FieldDescriptor* field, - uint64 value) const override; - void AddFloat(Message* message, const FieldDescriptor* field, - float value) const override; - void AddDouble(Message* message, const FieldDescriptor* field, - double value) const override; - void AddBool(Message* message, const FieldDescriptor* field, - bool value) const override; - void AddString(Message* message, const FieldDescriptor* field, - const std::string& value) const override; - void AddEnum(Message* message, const FieldDescriptor* field, - const EnumValueDescriptor* value) const override; - void AddEnumValue(Message* message, const FieldDescriptor* field, - int value) const override; - Message* AddMessage(Message* message, const FieldDescriptor* field, - MessageFactory* factory = NULL) const override; - void AddAllocatedMessage(Message* message, const FieldDescriptor* field, - Message* new_entry) const override; - - const FieldDescriptor* FindKnownExtensionByName( - const std::string& name) const override; - const FieldDescriptor* FindKnownExtensionByNumber(int number) const override; - - bool SupportsUnknownEnumValues() const override; - - // This value for arena_offset_ indicates that there is no arena pointer in - // this message (e.g., old generated code). - static const int kNoArenaPointer = -1; - - // This value for unknown_field_offset_ indicates that there is no - // UnknownFieldSet in this message, and that instead, we are using the - // Zero-Overhead Arena Pointer trick. When this is the case, arena_offset_ - // actually indexes to an InternalMetadataWithArena instance, which can return - // either an arena pointer or an UnknownFieldSet or both. It is never the case - // that unknown_field_offset_ == kUnknownFieldSetInMetadata && arena_offset_ - // == kNoArenaPointer. - static const int kUnknownFieldSetInMetadata = -1; - - protected: - void* MutableRawRepeatedField(Message* message, const FieldDescriptor* field, - FieldDescriptor::CppType, int ctype, - const Descriptor* desc) const override; - - const void* GetRawRepeatedField(const Message& message, - const FieldDescriptor* field, - FieldDescriptor::CppType, int ctype, - const Descriptor* desc) const override; - - MessageFactory* GetMessageFactory() const override; - - void* RepeatedFieldData(Message* message, const FieldDescriptor* field, - FieldDescriptor::CppType cpp_type, - const Descriptor* message_type) const override; - - private: - friend class ReflectionAccessor; - friend class upb::google_opensource::GMR_Handlers; - - const Descriptor* const descriptor_; - const ReflectionSchema schema_; - const DescriptorPool* const descriptor_pool_; - MessageFactory* const message_factory_; - - // Last non weak field index. This is an optimization when most weak fields - // are at the end of the containing message. If a message proto doesn't - // contain weak fields, then this field equals descriptor_->field_count(). - int last_non_weak_field_index_; - - template - const T& GetRawNonOneof(const Message& message, - const FieldDescriptor* field) const; - template - T* MutableRawNonOneof(Message* message, const FieldDescriptor* field) const; - - template - const Type& GetRaw(const Message& message, - const FieldDescriptor* field) const; - template - inline Type* MutableRaw(Message* message, const FieldDescriptor* field) const; - template - inline const Type& DefaultRaw(const FieldDescriptor* field) const; - - inline const uint32* GetHasBits(const Message& message) const; - inline uint32* MutableHasBits(Message* message) const; - inline uint32 GetOneofCase(const Message& message, - const OneofDescriptor* oneof_descriptor) const; - inline uint32* MutableOneofCase( - Message* message, const OneofDescriptor* oneof_descriptor) const; - inline const ExtensionSet& GetExtensionSet(const Message& message) const; - inline ExtensionSet* MutableExtensionSet(Message* message) const; - inline Arena* GetArena(Message* message) const; - - inline const InternalMetadataWithArena& GetInternalMetadataWithArena( - const Message& message) const; - - inline InternalMetadataWithArena* MutableInternalMetadataWithArena( - Message* message) const; - - inline bool IsInlined(const FieldDescriptor* field) const; - - inline bool HasBit(const Message& message, - const FieldDescriptor* field) const; - inline void SetBit(Message* message, const FieldDescriptor* field) const; - inline void ClearBit(Message* message, const FieldDescriptor* field) const; - inline void SwapBit(Message* message1, Message* message2, - const FieldDescriptor* field) const; - - // This function only swaps the field. Should swap corresponding has_bit - // before or after using this function. - void SwapField(Message* message1, Message* message2, - const FieldDescriptor* field) const; - - void SwapOneofField(Message* message1, Message* message2, - const OneofDescriptor* oneof_descriptor) const; - - inline bool HasOneofField(const Message& message, - const FieldDescriptor* field) const; - inline void SetOneofCase(Message* message, - const FieldDescriptor* field) const; - inline void ClearOneofField(Message* message, - const FieldDescriptor* field) const; - - template - inline const Type& GetField(const Message& message, - const FieldDescriptor* field) const; - template - inline void SetField(Message* message, const FieldDescriptor* field, - const Type& value) const; - template - inline Type* MutableField(Message* message, - const FieldDescriptor* field) const; - template - inline const Type& GetRepeatedField(const Message& message, - const FieldDescriptor* field, - int index) const; - template - inline const Type& GetRepeatedPtrField(const Message& message, - const FieldDescriptor* field, - int index) const; - template - inline void SetRepeatedField(Message* message, const FieldDescriptor* field, - int index, Type value) const; - template - inline Type* MutableRepeatedField(Message* message, - const FieldDescriptor* field, - int index) const; - template - inline void AddField(Message* message, const FieldDescriptor* field, - const Type& value) const; - template - inline Type* AddField(Message* message, const FieldDescriptor* field) const; - - int GetExtensionNumberOrDie(const Descriptor* type) const; - - // Internal versions of EnumValue API perform no checking. Called after checks - // by public methods. - void SetEnumValueInternal(Message* message, const FieldDescriptor* field, - int value) const; - void SetRepeatedEnumValueInternal(Message* message, - const FieldDescriptor* field, int index, - int value) const; - void AddEnumValueInternal(Message* message, const FieldDescriptor* field, - int value) const; - - Message* UnsafeArenaReleaseMessage(Message* message, - const FieldDescriptor* field, - MessageFactory* factory = NULL) const; - - void UnsafeArenaSetAllocatedMessage(Message* message, Message* sub_message, - const FieldDescriptor* field) const; - - internal::MapFieldBase* MutableMapData( - Message* message, const FieldDescriptor* field) const override; - - const internal::MapFieldBase* GetMapData( - const Message& message, const FieldDescriptor* field) const override; - - friend inline // inline so nobody can call this function. - void - RegisterAllTypesInternal(const Metadata* file_level_metadata, int size); - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(GeneratedMessageReflection); -}; +struct SCCInfoBase; struct PROTOBUF_EXPORT DescriptorTable { - bool* is_initialized; + mutable bool is_initialized; + bool is_eager; const char* descriptor; const char* filename; int size; // of serialized descriptor @@ -684,7 +293,8 @@ struct PROTOBUF_EXPORT DescriptorTable { // the descriptor objects. It also constructs the reflection objects. It is // called the first time anyone calls descriptor() or GetReflection() on one of // the types defined in the file. AssignDescriptors() is thread-safe. -void PROTOBUF_EXPORT AssignDescriptors(const DescriptorTable* table); +void PROTOBUF_EXPORT AssignDescriptors(const DescriptorTable* table, + bool eager = false); // AddDescriptors() is a file-level procedure which adds the encoded // FileDescriptorProto for this .proto file to the global DescriptorPool for diff --git a/third_party/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc b/third_party/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc index eea5da53..1c9d408d 100644 --- a/third_party/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc @@ -43,15 +43,15 @@ // rather than generated accessors. #include + #include +#include +#include #include #include #include #include - -#include -#include #include #include diff --git a/third_party/protobuf/src/google/protobuf/generated_message_table_driven.cc b/third_party/protobuf/src/google/protobuf/generated_message_table_driven.cc index fb82a8ec..56f1a6af 100644 --- a/third_party/protobuf/src/google/protobuf/generated_message_table_driven.cc +++ b/third_party/protobuf/src/google/protobuf/generated_message_table_driven.cc @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -47,8 +46,8 @@ namespace internal { namespace { UnknownFieldSet* MutableUnknownFields(MessageLite* msg, int64 arena_offset) { - return Raw(msg, arena_offset) - ->mutable_unknown_fields(); + return Raw(msg, arena_offset) + ->mutable_unknown_fields(); } struct UnknownFieldHandler { @@ -95,9 +94,8 @@ struct UnknownFieldHandler { bool MergePartialFromCodedStream(MessageLite* msg, const ParseTable& table, io::CodedInputStream* input) { - return MergePartialFromCodedStreamImpl(msg, table, - input); + return MergePartialFromCodedStreamImpl(msg, table, + input); } } // namespace internal diff --git a/third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.cc b/third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.cc index 82de6bc9..02e6dace 100644 --- a/third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.cc +++ b/third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.cc @@ -44,8 +44,8 @@ namespace internal { namespace { std::string* MutableUnknownFields(MessageLite* msg, int64 arena_offset) { - return Raw(msg, arena_offset) - ->mutable_unknown_fields(); + return Raw(msg, arena_offset) + ->mutable_unknown_fields(); } struct UnknownFieldHandlerLite { @@ -97,9 +97,8 @@ struct UnknownFieldHandlerLite { bool MergePartialFromCodedStreamLite(MessageLite* msg, const ParseTable& table, io::CodedInputStream* input) { - return MergePartialFromCodedStreamImpl( - msg, table, input); + return MergePartialFromCodedStreamImpl(msg, table, + input); } } // namespace internal diff --git a/third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.h b/third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.h index b36e51ba..ae13b363 100644 --- a/third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.h +++ b/third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.h @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -82,15 +81,6 @@ inline const Type* Raw(const MessageLite* msg, int64 offset) { offset); } -template -inline Arena* GetArena(MessageLite* msg, int64 arena_offset) { - if (PROTOBUF_PREDICT_FALSE(arena_offset == -1)) { - return NULL; - } - - return Raw(msg, arena_offset)->arena(); -} - inline ExtensionSet* GetExtensionSet(MessageLite* msg, int64 extension_offset) { if (extension_offset == -1) { return NULL; @@ -237,7 +227,7 @@ static inline bool HandleString(io::CodedInputStream* input, MessageLite* msg, switch (ctype) { case StringType_INLINED: { - InlinedStringField* s; + InlinedStringField* s = nullptr; switch (cardinality) { case Cardinality_SINGULAR: // TODO(ckennelly): Is this optimal? @@ -290,9 +280,13 @@ static inline bool HandleString(io::CodedInputStream* input, MessageLite* msg, } utf8_string_data = field->Get(); } break; + default: + PROTOBUF_ASSUME(false); } break; } + default: + PROTOBUF_ASSUME(false); } if (kValidateUtf8) { @@ -304,8 +298,7 @@ static inline bool HandleString(io::CodedInputStream* input, MessageLite* msg, return true; } -template +template inline bool HandleEnum(const ParseTable& table, io::CodedInputStream* input, MessageLite* msg, uint32* presence, uint32 presence_index, int64 offset, uint32 tag, @@ -328,12 +321,13 @@ inline bool HandleEnum(const ParseTable& table, io::CodedInputStream* input, AddField(msg, offset, value); break; case Cardinality_ONEOF: - ClearOneofField(table.fields[presence[presence_index]], - GetArena(msg, table.arena_offset), + ClearOneofField(table.fields[presence[presence_index]], msg->GetArena(), msg); SetOneofField(msg, presence, presence_index, offset, field_number, value); break; + default: + PROTOBUF_ASSUME(false); } } else { UnknownFieldHandler::Varint(msg, table, tag, value); @@ -372,8 +366,7 @@ class MergePartialFromCodedStreamHelper { } }; -template +template bool MergePartialFromCodedStreamInlined(MessageLite* msg, const ParseTable& table, io::CodedInputStream* input) { @@ -419,9 +412,6 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, const unsigned char processing_type = data->processing_type; if (data->normal_wiretype == static_cast(wire_type)) { - // TODO(ckennelly): Use a computed goto on GCC/LLVM or otherwise eliminate - // the bounds check on processing_type. - switch (processing_type) { #define HANDLE_TYPE(TYPE, CPPTYPE) \ case (WireFormatLite::TYPE_##TYPE): { \ @@ -451,8 +441,8 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, CPPTYPE, WireFormatLite::TYPE_##TYPE>(input, &value)))) { \ return false; \ } \ - ClearOneofField(table.fields[oneof_case[presence_index]], \ - GetArena(msg, table.arena_offset), msg); \ + ClearOneofField(table.fields[oneof_case[presence_index]], msg->GetArena(), \ + msg); \ SetOneofField(msg, oneof_case, presence_index, offset, field_number, \ value); \ break; \ @@ -480,8 +470,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, case WireFormatLite::TYPE_STRING: #endif // GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED { - Arena* const arena = - GetArena(msg, table.arena_offset); + Arena* const arena = msg->GetArena(); const void* default_ptr = table.aux[field_number].strings.default_ptr; if (PROTOBUF_PREDICT_FALSE( @@ -498,8 +487,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, case TYPE_STRING_INLINED: #endif // !GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED { - Arena* const arena = - GetArena(msg, table.arena_offset); + Arena* const arena = msg->GetArena(); const void* default_ptr = table.aux[field_number].strings.default_ptr; if (PROTOBUF_PREDICT_FALSE( @@ -516,8 +504,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, case WireFormatLite::TYPE_STRING | kOneofMask: #endif // !GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED { - Arena* const arena = - GetArena(msg, table.arena_offset); + Arena* const arena = msg->GetArena(); uint32* oneof_case = Raw(msg, table.oneof_case_offset); const void* default_ptr = table.aux[field_number].strings.default_ptr; @@ -541,8 +528,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, case TYPE_STRING_INLINED | kRepeatedMask: #endif // !GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED { - Arena* const arena = - GetArena(msg, table.arena_offset); + Arena* const arena = msg->GetArena(); const void* default_ptr = table.aux[field_number].strings.default_ptr; if (PROTOBUF_PREDICT_FALSE( @@ -556,8 +542,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, } #ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED case (WireFormatLite::TYPE_STRING): { - Arena* const arena = - GetArena(msg, table.arena_offset); + Arena* const arena = msg->GetArena(); const void* default_ptr = table.aux[field_number].strings.default_ptr; const char* field_name = table.aux[field_number].strings.field_name; @@ -572,8 +557,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, } case TYPE_STRING_INLINED | kRepeatedMask: case (WireFormatLite::TYPE_STRING) | kRepeatedMask: { - Arena* const arena = - GetArena(msg, table.arena_offset); + Arena* const arena = msg->GetArena(); const void* default_ptr = table.aux[field_number].strings.default_ptr; const char* field_name = table.aux[field_number].strings.field_name; @@ -587,8 +571,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, break; } case (WireFormatLite::TYPE_STRING) | kOneofMask: { - Arena* const arena = - GetArena(msg, table.arena_offset); + Arena* const arena = msg->GetArena(); uint32* oneof_case = Raw(msg, table.oneof_case_offset); const void* default_ptr = table.aux[field_number].strings.default_ptr; const char* field_name = table.aux[field_number].strings.field_name; @@ -609,8 +592,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, #endif // GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED case WireFormatLite::TYPE_ENUM: { if (PROTOBUF_PREDICT_FALSE( - (!HandleEnum( + (!HandleEnum( table, input, msg, has_bits, presence_index, offset, tag, field_number)))) { return false; @@ -619,8 +601,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, } case WireFormatLite::TYPE_ENUM | kRepeatedMask: { if (PROTOBUF_PREDICT_FALSE( - (!HandleEnum( + (!HandleEnum( table, input, msg, has_bits, presence_index, offset, tag, field_number)))) { return false; @@ -630,10 +611,9 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, case WireFormatLite::TYPE_ENUM | kOneofMask: { uint32* oneof_case = Raw(msg, table.oneof_case_offset); if (PROTOBUF_PREDICT_FALSE( - (!HandleEnum(table, input, msg, oneof_case, - presence_index, offset, tag, - field_number)))) { + (!HandleEnum( + table, input, msg, oneof_case, presence_index, offset, + tag, field_number)))) { return false; } break; @@ -644,8 +624,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, MessageLite* submsg = *submsg_holder; if (submsg == NULL) { - Arena* const arena = - GetArena(msg, table.arena_offset); + Arena* const arena = msg->GetArena(); const MessageLite* prototype = table.aux[field_number].messages.default_message(); submsg = prototype->New(arena); @@ -681,8 +660,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, MessageLite* submsg = *submsg_holder; if (submsg == NULL) { - Arena* const arena = - GetArena(msg, table.arena_offset); + Arena* const arena = msg->GetArena(); const MessageLite* prototype = table.aux[field_number].messages.default_message(); if (prototype == NULL) { @@ -720,8 +698,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, break; } case WireFormatLite::TYPE_MESSAGE | kOneofMask: { - Arena* const arena = - GetArena(msg, table.arena_offset); + Arena* const arena = msg->GetArena(); uint32* oneof_case = Raw(msg, table.oneof_case_offset); MessageLite** submsg_holder = Raw(msg, offset); ResetOneofField( @@ -738,8 +715,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, } #ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED case TYPE_STRING_INLINED: { - Arena* const arena = - GetArena(msg, table.arena_offset); + Arena* const arena = msg->GetArena(); const void* default_ptr = table.aux[field_number].strings.default_ptr; const char* field_name = table.aux[field_number].strings.field_name; @@ -766,7 +742,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, return true; } default: - break; + PROTOBUF_ASSUME(false); } } else if (data->packed_wiretype == static_cast(wire_type)) { // Non-packable fields have their packed_wiretype masked with @@ -778,8 +754,6 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, GOOGLE_DCHECK_NE(TYPE_BYTES_INLINED | kRepeatedMask, processing_type); GOOGLE_DCHECK_NE(TYPE_STRING_INLINED | kRepeatedMask, processing_type); - // TODO(ckennelly): Use a computed goto on GCC/LLVM. - // // Mask out kRepeatedMask bit, allowing the jump table to be smaller. switch (static_cast(processing_type ^ kRepeatedMask)) { @@ -813,7 +787,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, #undef HANDLE_PACKED_TYPE case WireFormatLite::TYPE_ENUM: { // To avoid unnecessarily calling MutableUnknownFields (which mutates - // InternalMetadataWithArena) when all inputs in the repeated series + // InternalMetadata) when all inputs in the repeated series // are valid, we implement our own parser rather than call // WireFormat::ReadPackedEnumPreserveUnknowns. uint32 length; @@ -852,7 +826,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, GOOGLE_DCHECK(false); return false; default: - break; + PROTOBUF_ASSUME(false); } } else { if (wire_type == WireFormatLite::WIRETYPE_END_GROUP) { @@ -876,23 +850,21 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, } } -template +template bool MergePartialFromCodedStreamImpl(MessageLite* msg, const ParseTable& table, io::CodedInputStream* input) { // The main beneficial cutoff values are 1 and 2 byte tags. // Instantiate calls with the appropriate upper tag range if (table.max_field_number <= (0x7F >> 3)) { - return MergePartialFromCodedStreamInlined( + return MergePartialFromCodedStreamInlined( msg, table, input); } else if (table.max_field_number <= (0x3FFF >> 3)) { - return MergePartialFromCodedStreamInlined( + return MergePartialFromCodedStreamInlined( msg, table, input); } else { return MergePartialFromCodedStreamInlined< - UnknownFieldHandler, InternalMetadata, - std::numeric_limits::max()>(msg, table, input); + UnknownFieldHandler, std::numeric_limits::max()>(msg, table, + input); } } diff --git a/third_party/protobuf/src/google/protobuf/generated_message_util.cc b/third_party/protobuf/src/google/protobuf/generated_message_util.cc index 363eca42..15eb9d65 100644 --- a/third_party/protobuf/src/google/protobuf/generated_message_util.cc +++ b/third_party/protobuf/src/google/protobuf/generated_message_util.cc @@ -44,19 +44,18 @@ #include -#include #include +#include #include #include #include #include #include #include +#include #include #include -#include - namespace google { namespace protobuf { @@ -299,15 +298,11 @@ void SerializeMessageNoTable(const MessageLite* msg, } void SerializeMessageNoTable(const MessageLite* msg, ArrayOutput* output) { - if (output->is_deterministic) { - io::ArrayOutputStream array_stream(output->ptr, INT_MAX); - io::CodedOutputStream o(&array_stream); - o.SetSerializationDeterministic(true); - msg->SerializeWithCachedSizes(&o); - output->ptr += o.ByteCount(); - } else { - output->ptr = msg->InternalSerializeWithCachedSizesToArray(output->ptr); - } + io::ArrayOutputStream array_stream(output->ptr, INT_MAX); + io::CodedOutputStream o(&array_stream); + o.SetSerializationDeterministic(output->is_deterministic); + msg->SerializeWithCachedSizes(&o); + output->ptr += o.ByteCount(); } // Helper to branch to fast path if possible @@ -316,16 +311,6 @@ void SerializeMessageDispatch(const MessageLite& msg, int32 cached_size, io::CodedOutputStream* output) { const uint8* base = reinterpret_cast(&msg); - if (!output->IsSerializationDeterministic()) { - // Try the fast path - uint8* ptr = output->GetDirectBufferForNBytesAndAdvance(cached_size); - if (ptr) { - // We use virtual dispatch to enable dedicated generated code for the - // fast path. - msg.InternalSerializeWithCachedSizesToArray(ptr); - return; - } - } SerializeInternal(base, field_table, num_fields, output); } @@ -733,8 +718,8 @@ void UnknownFieldSerializerLite(const uint8* ptr, uint32 offset, uint32 tag, uint32 has_offset, io::CodedOutputStream* output) { output->WriteString( - reinterpret_cast(ptr + offset) - ->unknown_fields()); + reinterpret_cast(ptr + offset) + ->unknown_fields(&internal::GetEmptyString)); } MessageLite* DuplicateIfNonNullInternal(MessageLite* message) { @@ -747,6 +732,15 @@ MessageLite* DuplicateIfNonNullInternal(MessageLite* message) { } } +void GenericSwap(MessageLite* m1, MessageLite* m2) { + std::unique_ptr tmp(m1->New()); + tmp->CheckTypeAndMergeFrom(*m1); + m1->Clear(); + m1->CheckTypeAndMergeFrom(*m2); + m2->Clear(); + m2->CheckTypeAndMergeFrom(*tmp); +} + // Returns a message owned by this Arena. This may require Own()ing or // duplicating the message. MessageLite* GetOwnedMessageInternal(Arena* message_arena, @@ -771,10 +765,19 @@ void InitSCC_DFS(SCCInfoBase* scc) { SCCInfoBase::kUninitialized) return; scc->visit_status.store(SCCInfoBase::kRunning, std::memory_order_relaxed); - // Each base is followed by an array of pointers to deps - auto deps = reinterpret_cast(scc + 1); - for (int i = 0; i < scc->num_deps; i++) { - if (deps[i]) InitSCC_DFS(deps[i]); + // Each base is followed by an array of void*, containing first pointers to + // SCCInfoBase and then pointers-to-pointers to SCCInfoBase. + auto deps = reinterpret_cast(scc + 1); + auto strong_deps = reinterpret_cast(deps); + for (int i = 0; i < scc->num_deps; ++i) { + if (strong_deps[i]) InitSCC_DFS(strong_deps[i]); + } + auto implicit_weak_deps = + reinterpret_cast(deps + scc->num_deps); + for (int i = 0; i < scc->num_implicit_weak_deps; ++i) { + if (*implicit_weak_deps[i]) { + InitSCC_DFS(*implicit_weak_deps[i]); + } } scc->init_func(); // Mark done (note we use memory order release here), other threads could diff --git a/third_party/protobuf/src/google/protobuf/generated_message_util.h b/third_party/protobuf/src/google/protobuf/generated_message_util.h index bf0e5b9b..7cae4e12 100644 --- a/third_party/protobuf/src/google/protobuf/generated_message_util.h +++ b/third_party/protobuf/src/google/protobuf/generated_message_util.h @@ -39,17 +39,20 @@ #define GOOGLE_PROTOBUF_GENERATED_MESSAGE_UTIL_H__ #include + #include #include #include #include #include +#include #include #include #include #include // Add direct dep on port for pb.cc #include +#include #include #include #include @@ -64,6 +67,7 @@ namespace google { namespace protobuf { class Arena; +class Message; namespace io { class CodedInputStream; @@ -95,8 +99,8 @@ PROTOBUF_EXPORT inline const std::string& GetEmptyString() { // helper here to keep the protobuf compiler from ever having to emit loops in // IsInitialized() methods. We want the C++ compiler to inline this or not // as it sees fit. -template -bool AllAreInitialized(const Type& t) { +template +bool AllAreInitialized(const RepeatedPtrField& t) { for (int i = t.size(); --i >= 0;) { if (!t.Get(i).IsInitialized()) return false; } @@ -145,6 +149,9 @@ PROTOBUF_EXPORT MessageLite* DuplicateIfNonNullInternal(MessageLite* message); PROTOBUF_EXPORT MessageLite* GetOwnedMessageInternal(Arena* message_arena, MessageLite* submessage, Arena* submessage_arena); +PROTOBUF_EXPORT void GenericSwap(MessageLite* m1, MessageLite* m2); +// We specialize GenericSwap for non-lite messages to benefit from reflection. +PROTOBUF_EXPORT void GenericSwap(Message* m1, Message* m2); template T* DuplicateIfNonNull(T* message) { @@ -186,7 +193,7 @@ struct PROTOBUF_EXPORT SCCInfoBase { kUninitialized = -1, // initial state }; #if defined(_MSC_VER) && !defined(__clang__) - // MSVC doesnt make std::atomic constant initialized. This union trick + // MSVC doesn't make std::atomic constant initialized. This union trick // makes it so. union { int visit_status_to_make_linker_init; @@ -196,21 +203,35 @@ struct PROTOBUF_EXPORT SCCInfoBase { std::atomic visit_status; #endif int num_deps; + int num_implicit_weak_deps; void (*init_func)(); // This is followed by an array of num_deps // const SCCInfoBase* deps[]; }; +// Zero-length arrays are a language extension available in GCC and Clang but +// not MSVC. +#ifdef __GNUC__ +#define PROTOBUF_ARRAY_SIZE(n) (n) +#else +#define PROTOBUF_ARRAY_SIZE(n) ((n) ? (n) : 1) +#endif + template struct SCCInfo { SCCInfoBase base; // Semantically this is const SCCInfo* which is is a templated type. // The obvious inheriting from SCCInfoBase mucks with struct initialization. // Attempts showed the compiler was generating dynamic initialization code. - // Zero length arrays produce warnings with MSVC. - SCCInfoBase* deps[N ? N : 1]; + // This deps array consists of base.num_deps pointers to SCCInfoBase followed + // by base.num_implicit_weak_deps pointers to SCCInfoBase*. We need the extra + // pointer indirection for implicit weak fields. We cannot use a union type + // here, since that would prevent the array from being linker-initialized. + void* deps[PROTOBUF_ARRAY_SIZE(N)]; }; +#undef PROTOBUF_ARRAY_SIZE + PROTOBUF_EXPORT void InitSCCImpl(SCCInfoBase* scc); inline void InitSCC(SCCInfoBase* scc) { diff --git a/third_party/protobuf/src/google/protobuf/has_bits.h b/third_party/protobuf/src/google/protobuf/has_bits.h index 11afde71..540cac28 100644 --- a/third_party/protobuf/src/google/protobuf/has_bits.h +++ b/third_party/protobuf/src/google/protobuf/has_bits.h @@ -70,7 +70,7 @@ class HasBits { } void Or(const HasBits& rhs) { - for (int i = 0; i < doublewords; i++) has_bits_[i] |= rhs[i]; + for (size_t i = 0; i < doublewords; i++) has_bits_[i] |= rhs[i]; } bool empty() const; diff --git a/third_party/protobuf/src/google/protobuf/implicit_weak_message.cc b/third_party/protobuf/src/google/protobuf/implicit_weak_message.cc index 35e64f07..53906169 100644 --- a/third_party/protobuf/src/google/protobuf/implicit_weak_message.cc +++ b/third_party/protobuf/src/google/protobuf/implicit_weak_message.cc @@ -41,19 +41,10 @@ namespace google { namespace protobuf { namespace internal { -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* ImplicitWeakMessage::_InternalParse(const char* ptr, ParseContext* ctx) { return ctx->AppendString(ptr, &data_); } -#else -bool ImplicitWeakMessage::MergePartialFromCodedStream( - io::CodedInputStream* input) { - io::StringOutputStream string_stream(&data_); - io::CodedOutputStream coded_stream(&string_stream, false); - return WireFormatLite::SkipMessage(input, &coded_stream); -} -#endif ExplicitlyConstructed implicit_weak_message_default_instance; diff --git a/third_party/protobuf/src/google/protobuf/implicit_weak_message.h b/third_party/protobuf/src/google/protobuf/implicit_weak_message.h index cab5df97..ec028eb5 100644 --- a/third_party/protobuf/src/google/protobuf/implicit_weak_message.h +++ b/third_party/protobuf/src/google/protobuf/implicit_weak_message.h @@ -32,16 +32,18 @@ #define GOOGLE_PROTOBUF_IMPLICIT_WEAK_MESSAGE_H__ #include + #include #include #include - -#include +#include #ifdef SWIG #error "You cannot SWIG proto headers" #endif +#include + // This file is logically internal-only and should only be used by protobuf // generated code. @@ -54,8 +56,8 @@ namespace internal { // message type does not get linked into the binary. class PROTOBUF_EXPORT ImplicitWeakMessage : public MessageLite { public: - ImplicitWeakMessage() : arena_(NULL) {} - explicit ImplicitWeakMessage(Arena* arena) : arena_(arena) {} + ImplicitWeakMessage() {} + explicit ImplicitWeakMessage(Arena* arena) : MessageLite(arena) {} static const ImplicitWeakMessage* default_instance(); @@ -66,8 +68,6 @@ class PROTOBUF_EXPORT ImplicitWeakMessage : public MessageLite { return Arena::CreateMessage(arena); } - Arena* GetArena() const override { return arena_; } - void Clear() override { data_.clear(); } bool IsInitialized() const override { return true; } @@ -76,16 +76,14 @@ class PROTOBUF_EXPORT ImplicitWeakMessage : public MessageLite { data_.append(static_cast(other).data_); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ParseContext* ctx) final; -#else - bool MergePartialFromCodedStream(io::CodedInputStream* input) override; -#endif size_t ByteSizeLong() const override { return data_.size(); } - void SerializeWithCachedSizes(io::CodedOutputStream* output) const override { - output->WriteString(data_); + uint8* _InternalSerialize(uint8* target, + io::EpsCopyOutputStream* stream) const final { + return stream->WriteRaw(data_.data(), static_cast(data_.size()), + target); } int GetCachedSize() const override { return static_cast(data_.size()); } @@ -93,7 +91,6 @@ class PROTOBUF_EXPORT ImplicitWeakMessage : public MessageLite { typedef void InternalArenaConstructable_; private: - Arena* const arena_; std::string data_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ImplicitWeakMessage); }; @@ -102,15 +99,9 @@ class PROTOBUF_EXPORT ImplicitWeakMessage : public MessageLite { template class ImplicitWeakTypeHandler { public: - typedef ImplicitWeakType Type; - typedef MessageLite WeakType; - static const bool Moveable = false; + typedef MessageLite Type; + static constexpr bool Moveable = false; - // With implicit weak fields, we need separate NewFromPrototype and - // NewFromPrototypeWeak functions. The former is used when we want to create a - // strong dependency on the message type, and it just delegates to the - // GenericTypeHandler. The latter avoids creating a strong dependency, by - // simply calling MessageLite::New. static inline MessageLite* NewFromPrototype(const MessageLite* prototype, Arena* arena = NULL) { return prototype->New(arena); @@ -131,12 +122,66 @@ class ImplicitWeakTypeHandler { static void Merge(const MessageLite& from, MessageLite* to) { to->CheckTypeAndMergeFrom(from); } - static inline size_t SpaceUsedLong(const Type& value) { - return value.SpaceUsedLong(); - } }; } // namespace internal + +template +struct WeakRepeatedPtrField { + using TypeHandler = internal::ImplicitWeakTypeHandler; + WeakRepeatedPtrField() : weak() {} + explicit WeakRepeatedPtrField(Arena* arena) : weak(arena) {} + ~WeakRepeatedPtrField() { weak.template Destroy(); } + + typedef internal::RepeatedPtrIterator iterator; + typedef internal::RepeatedPtrIterator const_iterator; + typedef internal::RepeatedPtrOverPtrsIterator + pointer_iterator; + typedef internal::RepeatedPtrOverPtrsIterator + const_pointer_iterator; + + iterator begin() { return iterator(base().raw_data()); } + const_iterator begin() const { return iterator(base().raw_data()); } + const_iterator cbegin() const { return begin(); } + iterator end() { return begin() + base().size(); } + const_iterator end() const { return begin() + base().size(); } + const_iterator cend() const { return end(); } + pointer_iterator pointer_begin() { + return pointer_iterator(base().raw_mutable_data()); + } + const_pointer_iterator pointer_begin() const { + return const_pointer_iterator(base().raw_mutable_data()); + } + pointer_iterator pointer_end() { + return pointer_iterator(base().raw_mutable_data() + base().size()); + } + const_pointer_iterator pointer_end() const { + return const_pointer_iterator(base().raw_mutable_data() + base().size()); + } + + MessageLite* AddWeak(const MessageLite* prototype) { + return base().AddWeak(prototype); + } + T* Add() { return weak.Add(); } + void Clear() { base().template Clear(); } + void MergeFrom(const WeakRepeatedPtrField& other) { + base().template MergeFrom(other.base()); + } + void InternalSwap(WeakRepeatedPtrField* other) { + base().InternalSwap(&other->base()); + } + + const internal::RepeatedPtrFieldBase& base() const { return weak; } + internal::RepeatedPtrFieldBase& base() { return weak; } + // Union disables running the destructor. Which would create a strong link. + // Instead we explicitly destroy the underlying base through the virtual + // destructor. + union { + RepeatedPtrField weak; + }; +}; + } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/inlined_string_field.h b/third_party/protobuf/src/google/protobuf/inlined_string_field.h index 781059da..991c0e1f 100644 --- a/third_party/protobuf/src/google/protobuf/inlined_string_field.h +++ b/third_party/protobuf/src/google/protobuf/inlined_string_field.h @@ -35,8 +35,9 @@ #include #include -#include +#include +// Must be included last. #include #ifdef SWIG diff --git a/third_party/protobuf/src/google/protobuf/io/coded_stream.cc b/third_party/protobuf/src/google/protobuf/io/coded_stream.cc index 6aaaa0b4..59d86f98 100644 --- a/third_party/protobuf/src/google/protobuf/io/coded_stream.cc +++ b/third_party/protobuf/src/google/protobuf/io/coded_stream.cc @@ -38,14 +38,19 @@ // will not cross the end of the buffer, since we can avoid a lot // of branching in this case. +#include + #include + #include +#include #include + #include #include -#include -#include #include +#include +#include #include @@ -84,10 +89,6 @@ CodedInputStream::~CodedInputStream() { int CodedInputStream::default_recursion_limit_ = 100; -void CodedOutputStream::EnableAliasing(bool enabled) { - aliasing_enabled_ = enabled && output_->AllowsAliasing(); -} - void CodedInputStream::BackUpInputToCurrentPosition() { int backup_bytes = BufferSize() + buffer_size_after_limit_ + overflow_bytes_; if (backup_bytes > 0) { @@ -189,12 +190,13 @@ int CodedInputStream::BytesUntilTotalBytesLimit() const { } void CodedInputStream::PrintTotalBytesLimitError() { - GOOGLE_LOG(ERROR) << "A protocol message was rejected because it was too " - "big (more than " - << total_bytes_limit_ - << " bytes). To increase the limit (or to disable these " - "warnings), see CodedInputStream::SetTotalBytesLimit() " - "in net/proto2/io/public/coded_stream.h."; + GOOGLE_LOG(ERROR) + << "A protocol message was rejected because it was too " + "big (more than " + << total_bytes_limit_ + << " bytes). To increase the limit (or to disable these " + "warnings), see CodedInputStream::SetTotalBytesLimit() " + "in third_party/protobuf/src/google/protobuf/io/coded_stream.h."; } bool CodedInputStream::SkipFallback(int count, int original_buffer_size) { @@ -237,12 +239,39 @@ bool CodedInputStream::GetDirectBufferPointer(const void** data, int* size) { } bool CodedInputStream::ReadRaw(void* buffer, int size) { - return InternalReadRawInline(buffer, size); + int current_buffer_size; + while ((current_buffer_size = BufferSize()) < size) { + // Reading past end of buffer. Copy what we have, then refresh. + memcpy(buffer, buffer_, current_buffer_size); + buffer = reinterpret_cast(buffer) + current_buffer_size; + size -= current_buffer_size; + Advance(current_buffer_size); + if (!Refresh()) return false; + } + + memcpy(buffer, buffer_, size); + Advance(size); + + return true; } bool CodedInputStream::ReadString(std::string* buffer, int size) { if (size < 0) return false; // security: size is often user-supplied - return InternalReadStringInline(buffer, size); + + if (BufferSize() >= size) { + STLStringResizeUninitialized(buffer, size); + std::pair z = as_string_data(buffer); + if (z.second) { + // Oddly enough, memcpy() requires its first two args to be non-NULL even + // if we copy 0 bytes. So, we have ensured that z.first is non-NULL here. + GOOGLE_DCHECK(z.first != NULL); + memcpy(z.first, buffer_, size); + Advance(size); + } + return true; + } + + return ReadStringFallback(buffer, size); } bool CodedInputStream::ReadStringFallback(std::string* buffer, int size) { @@ -637,152 +666,283 @@ bool CodedInputStream::Refresh() { // CodedOutputStream ================================================= +void EpsCopyOutputStream::EnableAliasing(bool enabled) { + aliasing_enabled_ = enabled && stream_->AllowsAliasing(); +} + +int64 EpsCopyOutputStream::ByteCount(uint8* ptr) const { + // Calculate the current offset relative to the end of the stream buffer. + int delta = (end_ - ptr) + (buffer_end_ ? 0 : kSlopBytes); + return stream_->ByteCount() - delta; +} + +// Flushes what's written out to the underlying ZeroCopyOutputStream buffers. +// Returns the size remaining in the buffer and sets buffer_end_ to the start +// of the remaining buffer, ie. [buffer_end_, buffer_end_ + return value) +int EpsCopyOutputStream::Flush(uint8* ptr) { + while (buffer_end_ && ptr > end_) { + int overrun = ptr - end_; + GOOGLE_DCHECK(!had_error_); + GOOGLE_DCHECK(overrun <= kSlopBytes); // NOLINT + ptr = Next() + overrun; + if (had_error_) return 0; + } + int s; + if (buffer_end_) { + std::memcpy(buffer_end_, buffer_, ptr - buffer_); + buffer_end_ += ptr - buffer_; + s = end_ - ptr; + } else { + // The stream is writing directly in the ZeroCopyOutputStream buffer. + s = end_ + kSlopBytes - ptr; + buffer_end_ = ptr; + } + GOOGLE_DCHECK(s >= 0); // NOLINT + return s; +} + +uint8* EpsCopyOutputStream::Trim(uint8* ptr) { + if (had_error_) return ptr; + int s = Flush(ptr); + if (s) stream_->BackUp(s); + // Reset to initial state (expecting new buffer) + buffer_end_ = end_ = buffer_; + return buffer_; +} + + +uint8* EpsCopyOutputStream::FlushAndResetBuffer(uint8* ptr) { + if (had_error_) return buffer_; + int s = Flush(ptr); + if (had_error_) return buffer_; + return SetInitialBuffer(buffer_end_, s); +} + +bool EpsCopyOutputStream::Skip(int count, uint8** pp) { + if (count < 0) return false; + if (had_error_) { + *pp = buffer_; + return false; + } + int size = Flush(*pp); + if (had_error_) { + *pp = buffer_; + return false; + } + void* data = buffer_end_; + while (count > size) { + count -= size; + if (!stream_->Next(&data, &size)) { + *pp = Error(); + return false; + } + } + *pp = SetInitialBuffer(static_cast(data) + count, size - count); + return true; +} + +bool EpsCopyOutputStream::GetDirectBufferPointer(void** data, int* size, + uint8** pp) { + if (had_error_) { + *pp = buffer_; + return false; + } + *size = Flush(*pp); + if (had_error_) { + *pp = buffer_; + return false; + } + *data = buffer_end_; + while (*size == 0) { + if (!stream_->Next(data, size)) { + *pp = Error(); + return false; + } + } + *pp = SetInitialBuffer(*data, *size); + return true; +} + +uint8* EpsCopyOutputStream::GetDirectBufferForNBytesAndAdvance(int size, + uint8** pp) { + if (had_error_) { + *pp = buffer_; + return nullptr; + } + int s = Flush(*pp); + if (had_error_) { + *pp = buffer_; + return nullptr; + } + if (s >= size) { + auto res = buffer_end_; + *pp = SetInitialBuffer(buffer_end_ + size, s - size); + return res; + } else { + *pp = SetInitialBuffer(buffer_end_, s); + return nullptr; + } +} + +uint8* EpsCopyOutputStream::Next() { + GOOGLE_DCHECK(!had_error_); // NOLINT + if (PROTOBUF_PREDICT_FALSE(stream_ == nullptr)) return Error(); + if (buffer_end_) { + // We're in the patch buffer and need to fill up the previous buffer. + std::memcpy(buffer_end_, buffer_, end_ - buffer_); + uint8* ptr; + int size; + do { + void* data; + if (PROTOBUF_PREDICT_FALSE(!stream_->Next(&data, &size))) { + // Stream has an error, we use the patch buffer to continue to be + // able to write. + return Error(); + } + ptr = static_cast(data); + } while (size == 0); + if (PROTOBUF_PREDICT_TRUE(size > kSlopBytes)) { + std::memcpy(ptr, end_, kSlopBytes); + end_ = ptr + size - kSlopBytes; + buffer_end_ = nullptr; + return ptr; + } else { + GOOGLE_DCHECK(size > 0); // NOLINT + // Buffer to small + std::memmove(buffer_, end_, kSlopBytes); + buffer_end_ = ptr; + end_ = buffer_ + size; + return buffer_; + } + } else { + std::memcpy(buffer_, end_, kSlopBytes); + buffer_end_ = end_; + end_ = buffer_ + kSlopBytes; + return buffer_; + } +} + +uint8* EpsCopyOutputStream::EnsureSpaceFallback(uint8* ptr) { + do { + if (PROTOBUF_PREDICT_FALSE(had_error_)) return buffer_; + int overrun = ptr - end_; + GOOGLE_DCHECK(overrun >= 0); // NOLINT + GOOGLE_DCHECK(overrun <= kSlopBytes); // NOLINT + ptr = Next() + overrun; + } while (ptr >= end_); + GOOGLE_DCHECK(ptr < end_); // NOLINT + return ptr; +} + +uint8* EpsCopyOutputStream::WriteRawFallback(const void* data, int size, + uint8* ptr) { + int s = GetSize(ptr); + while (s < size) { + std::memcpy(ptr, data, s); + size -= s; + data = static_cast(data) + s; + ptr = EnsureSpaceFallback(ptr + s); + s = GetSize(ptr); + } + std::memcpy(ptr, data, size); + return ptr + size; +} + +uint8* EpsCopyOutputStream::WriteAliasedRaw(const void* data, int size, + uint8* ptr) { + if (size < GetSize(ptr) + ) { + return WriteRaw(data, size, ptr); + } else { + ptr = Trim(ptr); + if (stream_->WriteAliasedRaw(data, size)) return ptr; + return Error(); + } +} + +#ifndef PROTOBUF_LITTLE_ENDIAN +uint8* EpsCopyOutputStream::WriteRawLittleEndian32(const void* data, int size, + uint8* ptr) { + auto p = static_cast(data); + auto end = p + size; + while (end - p >= kSlopBytes) { + ptr = EnsureSpace(ptr); + uint32 buffer[4]; + static_assert(sizeof(buffer) == kSlopBytes, "Buffer must be kSlopBytes"); + std::memcpy(buffer, p, kSlopBytes); + p += kSlopBytes; + for (auto x : buffer) + ptr = CodedOutputStream::WriteLittleEndian32ToArray(x, ptr); + } + while (p < end) { + ptr = EnsureSpace(ptr); + uint32 buffer; + std::memcpy(&buffer, p, 4); + p += 4; + ptr = CodedOutputStream::WriteLittleEndian32ToArray(buffer, ptr); + } + return ptr; +} + +uint8* EpsCopyOutputStream::WriteRawLittleEndian64(const void* data, int size, + uint8* ptr) { + auto p = static_cast(data); + auto end = p + size; + while (end - p >= kSlopBytes) { + ptr = EnsureSpace(ptr); + uint64 buffer[2]; + static_assert(sizeof(buffer) == kSlopBytes, "Buffer must be kSlopBytes"); + std::memcpy(buffer, p, kSlopBytes); + p += kSlopBytes; + for (auto x : buffer) + ptr = CodedOutputStream::WriteLittleEndian64ToArray(x, ptr); + } + while (p < end) { + ptr = EnsureSpace(ptr); + uint64 buffer; + std::memcpy(&buffer, p, 8); + p += 8; + ptr = CodedOutputStream::WriteLittleEndian64ToArray(buffer, ptr); + } + return ptr; +} +#endif + + +uint8* EpsCopyOutputStream::WriteStringMaybeAliasedOutline(uint32 num, + const std::string& s, + uint8* ptr) { + ptr = EnsureSpace(ptr); + uint32 size = s.size(); + ptr = WriteLengthDelim(num, size, ptr); + return WriteRawMaybeAliased(s.data(), size, ptr); +} + +uint8* EpsCopyOutputStream::WriteStringOutline(uint32 num, const std::string& s, + uint8* ptr) { + ptr = EnsureSpace(ptr); + uint32 size = s.size(); + ptr = WriteLengthDelim(num, size, ptr); + return WriteRaw(s.data(), size, ptr); +} + std::atomic CodedOutputStream::default_serialization_deterministic_{ false}; -CodedOutputStream::CodedOutputStream(ZeroCopyOutputStream* output) - : CodedOutputStream(output, true) {} - -CodedOutputStream::CodedOutputStream(ZeroCopyOutputStream* output, +CodedOutputStream::CodedOutputStream(ZeroCopyOutputStream* stream, bool do_eager_refresh) - : output_(output), - buffer_(NULL), - buffer_size_(0), - total_bytes_(0), - had_error_(false), - aliasing_enabled_(false), - is_serialization_deterministic_(IsDefaultSerializationDeterministic()) { + : impl_(stream, IsDefaultSerializationDeterministic(), &cur_), + start_count_(stream->ByteCount()) { if (do_eager_refresh) { - // Eagerly Refresh() so buffer space is immediately available. - Refresh(); - // The Refresh() may have failed. If the client doesn't write any data, - // though, don't consider this an error. If the client does write data, then - // another Refresh() will be attempted and it will set the error once again. - had_error_ = false; + void* data; + int size; + if (!stream->Next(&data, &size) || size == 0) return; + cur_ = impl_.SetInitialBuffer(data, size); } } CodedOutputStream::~CodedOutputStream() { Trim(); } -void CodedOutputStream::Trim() { - if (buffer_size_ > 0) { - output_->BackUp(buffer_size_); - total_bytes_ -= buffer_size_; - buffer_size_ = 0; - buffer_ = NULL; - } -} - -bool CodedOutputStream::Skip(int count) { - if (count < 0) return false; - - while (count > buffer_size_) { - count -= buffer_size_; - if (!Refresh()) return false; - } - - Advance(count); - return true; -} - -bool CodedOutputStream::GetDirectBufferPointer(void** data, int* size) { - if (buffer_size_ == 0 && !Refresh()) return false; - - *data = buffer_; - *size = buffer_size_; - return true; -} - -void CodedOutputStream::WriteRaw(const void* data, int size) { - while (buffer_size_ < size) { - memcpy(buffer_, data, buffer_size_); - size -= buffer_size_; - data = reinterpret_cast(data) + buffer_size_; - if (!Refresh()) return; - } - - memcpy(buffer_, data, size); - Advance(size); -} - -uint8* CodedOutputStream::WriteRawToArray(const void* data, int size, - uint8* target) { - memcpy(target, data, size); - return target + size; -} - - -void CodedOutputStream::WriteAliasedRaw(const void* data, int size) { - if (size < buffer_size_ - ) { - WriteRaw(data, size); - } else { - Trim(); - - total_bytes_ += size; - had_error_ |= !output_->WriteAliasedRaw(data, size); - } -} - -void CodedOutputStream::WriteLittleEndian32(uint32 value) { - uint8 bytes[sizeof(value)]; - - bool use_fast = buffer_size_ >= sizeof(value); - uint8* ptr = use_fast ? buffer_ : bytes; - - WriteLittleEndian32ToArray(value, ptr); - - if (use_fast) { - Advance(sizeof(value)); - } else { - WriteRaw(bytes, sizeof(value)); - } -} - -void CodedOutputStream::WriteLittleEndian64(uint64 value) { - uint8 bytes[sizeof(value)]; - - bool use_fast = buffer_size_ >= sizeof(value); - uint8* ptr = use_fast ? buffer_ : bytes; - - WriteLittleEndian64ToArray(value, ptr); - - if (use_fast) { - Advance(sizeof(value)); - } else { - WriteRaw(bytes, sizeof(value)); - } -} - -void CodedOutputStream::WriteVarint32SlowPath(uint32 value) { - uint8 bytes[kMaxVarint32Bytes]; - uint8* target = &bytes[0]; - uint8* end = WriteVarint32ToArray(value, target); - int size = end - target; - WriteRaw(bytes, size); -} - -void CodedOutputStream::WriteVarint64SlowPath(uint64 value) { - uint8 bytes[kMaxVarintBytes]; - uint8* target = &bytes[0]; - uint8* end = WriteVarint64ToArray(value, target); - int size = end - target; - WriteRaw(bytes, size); -} - -bool CodedOutputStream::Refresh() { - void* void_buffer; - if (output_->Next(&void_buffer, &buffer_size_)) { - buffer_ = reinterpret_cast(void_buffer); - total_bytes_ += buffer_size_; - return true; - } else { - buffer_ = NULL; - buffer_size_ = 0; - had_error_ = true; - return false; - } -} uint8* CodedOutputStream::WriteStringWithSizeToArray(const std::string& str, uint8* target) { diff --git a/third_party/protobuf/src/google/protobuf/io/coded_stream.h b/third_party/protobuf/src/google/protobuf/io/coded_stream.h index 5d065fc2..5f9feb80 100644 --- a/third_party/protobuf/src/google/protobuf/io/coded_stream.h +++ b/third_party/protobuf/src/google/protobuf/io/coded_stream.h @@ -109,11 +109,17 @@ #ifndef GOOGLE_PROTOBUF_IO_CODED_STREAM_H__ #define GOOGLE_PROTOBUF_IO_CODED_STREAM_H__ + #include + #include #include +#include +#include #include +#include #include + #ifdef _MSC_VER // Assuming windows is always little-endian. #if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST) @@ -133,6 +139,8 @@ #endif #endif #include +#include +#include #include #include @@ -212,17 +220,8 @@ class PROTOBUF_EXPORT CodedInputStream { // Read raw bytes, copying them into the given buffer. bool ReadRaw(void* buffer, int size); - // Like the above, with inlined optimizations. This should only be used - // by the protobuf implementation. - PROTOBUF_ALWAYS_INLINE - bool InternalReadRawInline(void* buffer, int size); - // Like ReadRaw, but reads into a string. bool ReadString(std::string* buffer, int size); - // Like the above, with inlined optimizations. This should only be used - // by the protobuf implementation. - PROTOBUF_ALWAYS_INLINE - bool InternalReadStringInline(std::string* buffer, int size); // Read a 32-bit little-endian integer. @@ -644,6 +643,360 @@ class PROTOBUF_EXPORT CodedInputStream { friend class google::protobuf::internal::EpsCopyByteStream; }; +// EpsCopyOutputStream wraps a ZeroCopyOutputStream and exposes a new stream, +// which has the property you can write kSlopBytes (16 bytes) from the current +// position without bounds checks. The cursor into the stream is managed by +// the user of the class and is an explicit parameter in the methods. Careful +// use of this class, ie. keep ptr a local variable, eliminates the need to +// for the compiler to sync the ptr value between register and memory. +class PROTOBUF_EXPORT EpsCopyOutputStream { + public: + enum { kSlopBytes = 16 }; + + // Initialize from a stream. + EpsCopyOutputStream(ZeroCopyOutputStream* stream, bool deterministic, + uint8** pp) + : end_(buffer_), + stream_(stream), + is_serialization_deterministic_(deterministic) { + *pp = buffer_; + } + + // Only for array serialization. No overflow protection, end_ will be the + // pointed to the end of the array. When using this the total size is already + // known, so no need to maintain the slop region. + EpsCopyOutputStream(void* data, int size, bool deterministic) + : end_(static_cast(data) + size), + buffer_end_(nullptr), + stream_(nullptr), + is_serialization_deterministic_(deterministic) {} + + // Initialize from stream but with the first buffer already given (eager). + EpsCopyOutputStream(void* data, int size, ZeroCopyOutputStream* stream, + bool deterministic, uint8** pp) + : stream_(stream), is_serialization_deterministic_(deterministic) { + *pp = SetInitialBuffer(data, size); + } + + // Flush everything that's written into the underlying ZeroCopyOutputStream + // and trims the underlying stream to the location of ptr. + uint8* Trim(uint8* ptr); + + // After this it's guaranteed you can safely write kSlopBytes to ptr. This + // will never fail! The underlying stream can produce an error. Use HadError + // to check for errors. + PROTOBUF_MUST_USE_RESULT uint8* EnsureSpace(uint8* ptr) { + if (PROTOBUF_PREDICT_FALSE(ptr >= end_)) { + return EnsureSpaceFallback(ptr); + } + return ptr; + } + + uint8* WriteRaw(const void* data, int size, uint8* ptr) { + if (PROTOBUF_PREDICT_FALSE(end_ - ptr < size)) { + return WriteRawFallback(data, size, ptr); + } + std::memcpy(ptr, data, size); + return ptr + size; + } + // Writes the buffer specified by data, size to the stream. Possibly by + // aliasing the buffer (ie. not copying the data). The caller is responsible + // to make sure the buffer is alive for the duration of the + // ZeroCopyOutputStream. + uint8* WriteRawMaybeAliased(const void* data, int size, uint8* ptr) { + if (aliasing_enabled_) { + return WriteAliasedRaw(data, size, ptr); + } else { + return WriteRaw(data, size, ptr); + } + } + + + uint8* WriteStringMaybeAliased(uint32 num, const std::string& s, uint8* ptr) { + std::ptrdiff_t size = s.size(); + if (PROTOBUF_PREDICT_FALSE( + size >= 128 || end_ - ptr + 16 - TagSize(num << 3) - 1 < size)) { + return WriteStringMaybeAliasedOutline(num, s, ptr); + } + ptr = UnsafeVarint((num << 3) | 2, ptr); + *ptr++ = static_cast(size); + std::memcpy(ptr, s.data(), size); + return ptr + size; + } + uint8* WriteBytesMaybeAliased(uint32 num, const std::string& s, uint8* ptr) { + return WriteStringMaybeAliased(num, s, ptr); + } + + template + PROTOBUF_ALWAYS_INLINE uint8* WriteString(uint32 num, const T& s, + uint8* ptr) { + std::ptrdiff_t size = s.size(); + if (PROTOBUF_PREDICT_FALSE( + size >= 128 || end_ - ptr + 16 - TagSize(num << 3) - 1 < size)) { + return WriteStringOutline(num, s, ptr); + } + ptr = UnsafeVarint((num << 3) | 2, ptr); + *ptr++ = static_cast(size); + std::memcpy(ptr, s.data(), size); + return ptr + size; + } + template + uint8* WriteBytes(uint32 num, const T& s, uint8* ptr) { + return WriteString(num, s, ptr); + } + + template + PROTOBUF_ALWAYS_INLINE uint8* WriteInt32Packed(int num, const T& r, int size, + uint8* ptr) { + return WriteVarintPacked(num, r, size, ptr, Encode64); + } + template + PROTOBUF_ALWAYS_INLINE uint8* WriteUInt32Packed(int num, const T& r, int size, + uint8* ptr) { + return WriteVarintPacked(num, r, size, ptr, Encode32); + } + template + PROTOBUF_ALWAYS_INLINE uint8* WriteSInt32Packed(int num, const T& r, int size, + uint8* ptr) { + return WriteVarintPacked(num, r, size, ptr, ZigZagEncode32); + } + template + PROTOBUF_ALWAYS_INLINE uint8* WriteInt64Packed(int num, const T& r, int size, + uint8* ptr) { + return WriteVarintPacked(num, r, size, ptr, Encode64); + } + template + PROTOBUF_ALWAYS_INLINE uint8* WriteUInt64Packed(int num, const T& r, int size, + uint8* ptr) { + return WriteVarintPacked(num, r, size, ptr, Encode64); + } + template + PROTOBUF_ALWAYS_INLINE uint8* WriteSInt64Packed(int num, const T& r, int size, + uint8* ptr) { + return WriteVarintPacked(num, r, size, ptr, ZigZagEncode64); + } + template + PROTOBUF_ALWAYS_INLINE uint8* WriteEnumPacked(int num, const T& r, int size, + uint8* ptr) { + return WriteVarintPacked(num, r, size, ptr, Encode64); + } + + template + PROTOBUF_ALWAYS_INLINE uint8* WriteFixedPacked(int num, const T& r, + uint8* ptr) { + ptr = EnsureSpace(ptr); + constexpr auto element_size = sizeof(typename T::value_type); + auto size = r.size() * element_size; + ptr = WriteLengthDelim(num, size, ptr); + return WriteRawLittleEndian(r.data(), static_cast(size), + ptr); + } + + // Returns true if there was an underlying I/O error since this object was + // created. + bool HadError() const { return had_error_; } + + // Instructs the EpsCopyOutputStream to allow the underlying + // ZeroCopyOutputStream to hold pointers to the original structure instead of + // copying, if it supports it (i.e. output->AllowsAliasing() is true). If the + // underlying stream does not support aliasing, then enabling it has no + // affect. For now, this only affects the behavior of + // WriteRawMaybeAliased(). + // + // NOTE: It is caller's responsibility to ensure that the chunk of memory + // remains live until all of the data has been consumed from the stream. + void EnableAliasing(bool enabled); + + // See documentation on CodedOutputStream::SetSerializationDeterministic. + void SetSerializationDeterministic(bool value) { + is_serialization_deterministic_ = value; + } + + // See documentation on CodedOutputStream::IsSerializationDeterministic. + bool IsSerializationDeterministic() const { + return is_serialization_deterministic_; + } + + // The number of bytes written to the stream at position ptr, relative to the + // stream's overall position. + int64 ByteCount(uint8* ptr) const; + + + private: + uint8* end_; + uint8* buffer_end_ = buffer_; + uint8 buffer_[2 * kSlopBytes]; + ZeroCopyOutputStream* stream_; + bool had_error_ = false; + bool aliasing_enabled_ = false; // See EnableAliasing(). + bool is_serialization_deterministic_; + + uint8* EnsureSpaceFallback(uint8* ptr); + inline uint8* Next(); + int Flush(uint8* ptr); + std::ptrdiff_t GetSize(uint8* ptr) const { + GOOGLE_DCHECK(ptr <= end_ + kSlopBytes); // NOLINT + return end_ + kSlopBytes - ptr; + } + + uint8* Error() { + had_error_ = true; + // We use the patch buffer to always guarantee space to write to. + end_ = buffer_ + kSlopBytes; + return buffer_; + } + + static constexpr int TagSize(uint32 tag) { + return (tag < (1 << 7)) + ? 1 + : (tag < (1 << 14)) + ? 2 + : (tag < (1 << 21)) ? 3 : (tag < (1 << 28)) ? 4 : 5; + } + + PROTOBUF_ALWAYS_INLINE uint8* WriteTag(uint32 num, uint32 wt, uint8* ptr) { + GOOGLE_DCHECK(ptr < end_); // NOLINT + return UnsafeVarint((num << 3) | wt, ptr); + } + + PROTOBUF_ALWAYS_INLINE uint8* WriteLengthDelim(int num, uint32 size, + uint8* ptr) { + ptr = WriteTag(num, 2, ptr); + return UnsafeWriteSize(size, ptr); + } + + uint8* WriteRawFallback(const void* data, int size, uint8* ptr); + + uint8* WriteAliasedRaw(const void* data, int size, uint8* ptr); + + uint8* WriteStringMaybeAliasedOutline(uint32 num, const std::string& s, + uint8* ptr); + uint8* WriteStringOutline(uint32 num, const std::string& s, uint8* ptr); + + template + PROTOBUF_ALWAYS_INLINE uint8* WriteVarintPacked(int num, const T& r, int size, + uint8* ptr, const E& encode) { + ptr = EnsureSpace(ptr); + ptr = WriteLengthDelim(num, size, ptr); + auto it = r.data(); + auto end = it + r.size(); + do { + ptr = EnsureSpace(ptr); + ptr = UnsafeVarint(encode(*it++), ptr); + } while (it < end); + return ptr; + } + + static uint32 Encode32(uint32 v) { return v; } + static uint64 Encode64(uint64 v) { return v; } + static uint32 ZigZagEncode32(int32 v) { + return (static_cast(v) << 1) ^ static_cast(v >> 31); + } + static uint64 ZigZagEncode64(int64 v) { + return (static_cast(v) << 1) ^ static_cast(v >> 63); + } + + template + PROTOBUF_ALWAYS_INLINE static uint8* UnsafeVarint(T value, uint8* ptr) { + static_assert(std::is_unsigned::value, + "Varint serialization must be unsigned"); + if (value < 0x80) { + ptr[0] = static_cast(value); + return ptr + 1; + } + ptr[0] = static_cast(value | 0x80); + value >>= 7; + if (value < 0x80) { + ptr[1] = static_cast(value); + return ptr + 2; + } + ptr++; + do { + *ptr = static_cast(value | 0x80); + value >>= 7; + ++ptr; + } while (PROTOBUF_PREDICT_FALSE(value >= 0x80)); + *ptr++ = static_cast(value); + return ptr; + } + + PROTOBUF_ALWAYS_INLINE static uint8* UnsafeWriteSize(uint32 value, + uint8* ptr) { + while (PROTOBUF_PREDICT_FALSE(value >= 0x80)) { + *ptr = static_cast(value | 0x80); + value >>= 7; + ++ptr; + } + *ptr++ = static_cast(value); + return ptr; + } + + template + uint8* WriteRawLittleEndian(const void* data, int size, uint8* ptr); +#ifndef PROTOBUF_LITTLE_ENDIAN + uint8* WriteRawLittleEndian32(const void* data, int size, uint8* ptr); + uint8* WriteRawLittleEndian64(const void* data, int size, uint8* ptr); +#endif + + // These methods are for CodedOutputStream. Ideally they should be private + // but to match current behavior of CodedOutputStream as close as possible + // we allow it some functionality. + public: + uint8* SetInitialBuffer(void* data, int size) { + auto ptr = static_cast(data); + if (size > kSlopBytes) { + end_ = ptr + size - kSlopBytes; + buffer_end_ = nullptr; + return ptr; + } else { + end_ = buffer_ + size; + buffer_end_ = ptr; + return buffer_; + } + } + + private: + // Needed by CodedOutputStream HadError. HadError needs to flush the patch + // buffers to ensure there is no error as of yet. + uint8* FlushAndResetBuffer(uint8*); + + // The following functions mimick the old CodedOutputStream behavior as close + // as possible. They flush the current state to the stream, behave as + // the old CodedOutputStream and then return to normal operation. + bool Skip(int count, uint8** pp); + bool GetDirectBufferPointer(void** data, int* size, uint8** pp); + uint8* GetDirectBufferForNBytesAndAdvance(int size, uint8** pp); + + friend class CodedOutputStream; +}; + +template <> +inline uint8* EpsCopyOutputStream::WriteRawLittleEndian<1>(const void* data, + int size, + uint8* ptr) { + return WriteRaw(data, size, ptr); +} +template <> +inline uint8* EpsCopyOutputStream::WriteRawLittleEndian<4>(const void* data, + int size, + uint8* ptr) { +#ifdef PROTOBUF_LITTLE_ENDIAN + return WriteRaw(data, size, ptr); +#else + return WriteRawLittleEndian32(data, size, ptr); +#endif +} +template <> +inline uint8* EpsCopyOutputStream::WriteRawLittleEndian<8>(const void* data, + int size, + uint8* ptr) { +#ifdef PROTOBUF_LITTLE_ENDIAN + return WriteRaw(data, size, ptr); +#else + return WriteRawLittleEndian64(data, size, ptr); +#endif +} + // Class which encodes and writes binary data which is composed of varint- // encoded integers and fixed-width pieces. Wraps a ZeroCopyOutputStream. // Most users will not need to deal with CodedOutputStream. @@ -664,7 +1017,7 @@ class PROTOBUF_EXPORT CodedInputStream { // individual value. // i.e., in the example above: // -// CodedOutputStream coded_output = new CodedOutputStream(raw_output); +// CodedOutputStream* coded_output = new CodedOutputStream(raw_output); // int magic_number = 1234; // char text[] = "Hello world!"; // @@ -674,7 +1027,7 @@ class PROTOBUF_EXPORT CodedInputStream { // // uint8* buffer = // coded_output->GetDirectBufferForNBytesAndAdvance(coded_size); -// if (buffer != NULL) { +// if (buffer != nullptr) { // // The output stream has enough space in the buffer: write directly to // // the array. // buffer = CodedOutputStream::WriteLittleEndian32ToArray(magic_number, @@ -693,19 +1046,29 @@ class PROTOBUF_EXPORT CodedInputStream { class PROTOBUF_EXPORT CodedOutputStream { public: // Create an CodedOutputStream that writes to the given ZeroCopyOutputStream. - explicit CodedOutputStream(ZeroCopyOutputStream* output); - CodedOutputStream(ZeroCopyOutputStream* output, bool do_eager_refresh); + explicit CodedOutputStream(ZeroCopyOutputStream* stream) + : CodedOutputStream(stream, true) {} + CodedOutputStream(ZeroCopyOutputStream* stream, bool do_eager_refresh); // Destroy the CodedOutputStream and position the underlying // ZeroCopyOutputStream immediately after the last byte written. ~CodedOutputStream(); + // Returns true if there was an underlying I/O error since this object was + // created. On should call Trim before this function in order to catch all + // errors. + bool HadError() { + cur_ = impl_.FlushAndResetBuffer(cur_); + GOOGLE_DCHECK(cur_); + return impl_.HadError(); + } + // Trims any unused space in the underlying buffer so that its size matches // the number of bytes written by this stream. The underlying buffer will // automatically be trimmed when this stream is destroyed; this call is only // necessary if the underlying buffer is accessed *before* the stream is // destroyed. - void Trim(); + void Trim() { cur_ = impl_.Trim(cur_); } // Skips a number of bytes, leaving the bytes unmodified in the underlying // buffer. Returns false if an underlying write error occurs. This is @@ -713,7 +1076,7 @@ class PROTOBUF_EXPORT CodedOutputStream { // Note of caution, the skipped bytes may contain uninitialized data. The // caller must make sure that the skipped bytes are properly initialized, // otherwise you might leak bytes from your heap. - bool Skip(int count); + bool Skip(int count) { return impl_.Skip(count, &cur_); } // Sets *data to point directly at the unwritten part of the // CodedOutputStream's underlying buffer, and *size to the size of that @@ -723,7 +1086,9 @@ class PROTOBUF_EXPORT CodedOutputStream { // the consumed bytes. This may be useful for implementing external fast // serialization routines for types of data not covered by the // CodedOutputStream interface. - bool GetDirectBufferPointer(void** data, int* size); + bool GetDirectBufferPointer(void** data, int* size) { + return impl_.GetDirectBufferPointer(data, size, &cur_); + } // If there are at least "size" bytes available in the current buffer, // returns a pointer directly into the buffer and advances over these bytes. @@ -732,10 +1097,14 @@ class PROTOBUF_EXPORT CodedOutputStream { // there are not enough bytes available, returns NULL. The return pointer is // invalidated as soon as any other non-const method of CodedOutputStream // is called. - inline uint8* GetDirectBufferForNBytesAndAdvance(int size); + inline uint8* GetDirectBufferForNBytesAndAdvance(int size) { + return impl_.GetDirectBufferForNBytesAndAdvance(size, &cur_); + } // Write raw bytes, copying them from the given buffer. - void WriteRaw(const void* buffer, int size); + void WriteRaw(const void* buffer, int size) { + cur_ = impl_.WriteRaw(buffer, size, cur_); + } // Like WriteRaw() but will try to write aliased data if aliasing is // turned on. void WriteRawMaybeAliased(const void* data, int size); @@ -755,23 +1124,18 @@ class PROTOBUF_EXPORT CodedOutputStream { uint8* target); - // Instructs the CodedOutputStream to allow the underlying - // ZeroCopyOutputStream to hold pointers to the original structure instead of - // copying, if it supports it (i.e. output->AllowsAliasing() is true). If the - // underlying stream does not support aliasing, then enabling it has no - // affect. For now, this only affects the behavior of - // WriteRawMaybeAliased(). - // - // NOTE: It is caller's responsibility to ensure that the chunk of memory - // remains live until all of the data has been consumed from the stream. - void EnableAliasing(bool enabled); - // Write a 32-bit little-endian integer. - void WriteLittleEndian32(uint32 value); + void WriteLittleEndian32(uint32 value) { + cur_ = impl_.EnsureSpace(cur_); + SetCur(WriteLittleEndian32ToArray(value, Cur())); + } // Like WriteLittleEndian32() but writing directly to the target array. static uint8* WriteLittleEndian32ToArray(uint32 value, uint8* target); // Write a 64-bit little-endian integer. - void WriteLittleEndian64(uint64 value); + void WriteLittleEndian64(uint64 value) { + cur_ = impl_.EnsureSpace(cur_); + SetCur(WriteLittleEndian64ToArray(value, Cur())); + } // Like WriteLittleEndian64() but writing directly to the target array. static uint8* WriteLittleEndian64ToArray(uint64 value, uint8* target); @@ -807,7 +1171,7 @@ class PROTOBUF_EXPORT CodedOutputStream { // Returns the number of bytes needed to encode the given value as a varint. static size_t VarintSize64(uint64 value); - // If negative, 10 bytes. Otheriwse, same as VarintSize32(). + // If negative, 10 bytes. Otherwise, same as VarintSize32(). static size_t VarintSize32SignExtended(int32 value); // Compile-time equivalent of VarintSize32(). @@ -822,45 +1186,49 @@ class PROTOBUF_EXPORT CodedOutputStream { }; // Returns the total number of bytes written since this object was created. - inline int ByteCount() const; + int ByteCount() const { + return static_cast(impl_.ByteCount(cur_) - start_count_); + } - // Returns true if there was an underlying I/O error since this object was - // created. - bool HadError() const { return had_error_; } - - // Deterministic serialization, if requested, guarantees that for a given - // binary, equal messages will always be serialized to the same bytes. This - // implies: - // . repeated serialization of a message will return the same bytes - // . different processes of the same binary (which may be executing on - // different machines) will serialize equal messages to the same bytes. + // Instructs the CodedOutputStream to allow the underlying + // ZeroCopyOutputStream to hold pointers to the original structure instead of + // copying, if it supports it (i.e. output->AllowsAliasing() is true). If the + // underlying stream does not support aliasing, then enabling it has no + // affect. For now, this only affects the behavior of + // WriteRawMaybeAliased(). // - // Note the deterministic serialization is NOT canonical across languages; it - // is also unstable across different builds with schema changes due to unknown - // fields. Users who need canonical serialization, e.g., persistent storage in - // a canonical form, fingerprinting, etc., should define their own + // NOTE: It is caller's responsibility to ensure that the chunk of memory + // remains live until all of the data has been consumed from the stream. + void EnableAliasing(bool enabled) { impl_.EnableAliasing(enabled); } + + // Indicate to the serializer whether the user wants derministic + // serialization. The default when this is not called comes from the global + // default, controlled by SetDefaultSerializationDeterministic. + // + // What deterministic serialization means is entirely up to the driver of the + // serialization process (i.e. the caller of methods like WriteVarint32). In + // the case of serializing a proto buffer message using one of the methods of + // MessageLite, this means that for a given binary equal messages will always + // be serialized to the same bytes. This implies: + // + // * Repeated serialization of a message will return the same bytes. + // + // * Different processes running the same binary (including on different + // machines) will serialize equal messages to the same bytes. + // + // Note that this is *not* canonical across languages. It is also unstable + // across different builds with intervening message definition changes, due to + // unknown fields. Users who need canonical serialization (e.g. persistent + // storage in a canonical form, fingerprinting) should define their own // canonicalization specification and implement the serializer using // reflection APIs rather than relying on this API. - // - // If deterministic serialization is requested, the serializer will - // sort map entries by keys in lexicographical order or numerical order. - // (This is an implementation detail and may subject to change.) - // - // There are two ways to determine whether serialization should be - // deterministic for this CodedOutputStream. If SetSerializationDeterministic - // has not yet been called, then the default comes from the global default, - // which is false, until SetDefaultSerializationDeterministic has been called. - // Otherwise, SetSerializationDeterministic has been called, and the last - // value passed to it is all that matters. void SetSerializationDeterministic(bool value) { - is_serialization_deterministic_ = value; + impl_.SetSerializationDeterministic(value); } - // See above. Also, note that users of this CodedOutputStream may need to - // call IsSerializationDeterministic() to serialize in the intended way. This - // CodedOutputStream cannot enforce a desire for deterministic serialization - // by itself. + + // Return whether the user wants deterministic serialization. See above. bool IsSerializationDeterministic() const { - return is_serialization_deterministic_; + return impl_.IsSerializationDeterministic(); } static bool IsDefaultSerializationDeterministic() { @@ -868,34 +1236,19 @@ class PROTOBUF_EXPORT CodedOutputStream { std::memory_order_relaxed) != 0; } + template + void Serialize(const Func& func); + + uint8* Cur() const { return cur_; } + void SetCur(uint8* ptr) { cur_ = ptr; } + EpsCopyOutputStream* EpsCopy() { return &impl_; } + private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CodedOutputStream); - - ZeroCopyOutputStream* output_; - uint8* buffer_; - int buffer_size_; - int total_bytes_; // Sum of sizes of all buffers seen so far. - bool had_error_; // Whether an error occurred during output. - bool aliasing_enabled_; // See EnableAliasing(). - bool is_serialization_deterministic_; + EpsCopyOutputStream impl_; + uint8* cur_; + int64 start_count_; static std::atomic default_serialization_deterministic_; - // Advance the buffer by a given number of bytes. - void Advance(int amount); - - // Called when the buffer runs out to request more data. Implies an - // Advance(buffer_size_). - bool Refresh(); - - // Like WriteRaw() but may avoid copying if the underlying - // ZeroCopyOutputStream supports it. - void WriteAliasedRaw(const void* buffer, int size); - - // If this write might cross the end of the buffer, we compose the bytes first - // then use WriteRaw(). - void WriteVarint32SlowPath(uint32 value); - void WriteVarint64SlowPath(uint64 value); - // See above. Other projects may use "friend" to allow them to call this. // After SetDefaultSerializationDeterministic() completes, all protocol // buffer serializations will be deterministic by default. Thread safe. @@ -907,6 +1260,7 @@ class PROTOBUF_EXPORT CodedOutputStream { static void SetDefaultSerializationDeterministic() { default_serialization_deterministic_.store(true, std::memory_order_relaxed); } + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CodedOutputStream); }; // inline methods ==================================================== @@ -1109,7 +1463,7 @@ inline const uint8* CodedInputStream::ExpectTagFromArray(const uint8* buffer, return buffer + 2; } } - return NULL; + return nullptr; } inline void CodedInputStream::GetDirectBufferPointerInline(const void** data, @@ -1136,36 +1490,109 @@ inline int CodedInputStream::CurrentPosition() const { return total_bytes_read_ - (BufferSize() + buffer_size_after_limit_); } -inline uint8* CodedOutputStream::GetDirectBufferForNBytesAndAdvance(int size) { - if (buffer_size_ < size) { - return NULL; - } else { - uint8* result = buffer_; - Advance(size); - return result; +inline void CodedInputStream::Advance(int amount) { buffer_ += amount; } + +inline void CodedInputStream::SetRecursionLimit(int limit) { + recursion_budget_ += limit - recursion_limit_; + recursion_limit_ = limit; +} + +inline bool CodedInputStream::IncrementRecursionDepth() { + --recursion_budget_; + return recursion_budget_ >= 0; +} + +inline void CodedInputStream::DecrementRecursionDepth() { + if (recursion_budget_ < recursion_limit_) ++recursion_budget_; +} + +inline void CodedInputStream::UnsafeDecrementRecursionDepth() { + assert(recursion_budget_ < recursion_limit_); + ++recursion_budget_; +} + +inline void CodedInputStream::SetExtensionRegistry(const DescriptorPool* pool, + MessageFactory* factory) { + extension_pool_ = pool; + extension_factory_ = factory; +} + +inline const DescriptorPool* CodedInputStream::GetExtensionPool() { + return extension_pool_; +} + +inline MessageFactory* CodedInputStream::GetExtensionFactory() { + return extension_factory_; +} + +inline int CodedInputStream::BufferSize() const { + return static_cast(buffer_end_ - buffer_); +} + +inline CodedInputStream::CodedInputStream(ZeroCopyInputStream* input) + : buffer_(nullptr), + buffer_end_(nullptr), + input_(input), + total_bytes_read_(0), + overflow_bytes_(0), + last_tag_(0), + legitimate_message_end_(false), + aliasing_enabled_(false), + current_limit_(kint32max), + buffer_size_after_limit_(0), + total_bytes_limit_(kDefaultTotalBytesLimit), + recursion_budget_(default_recursion_limit_), + recursion_limit_(default_recursion_limit_), + extension_pool_(nullptr), + extension_factory_(nullptr) { + // Eagerly Refresh() so buffer space is immediately available. + Refresh(); +} + +inline CodedInputStream::CodedInputStream(const uint8* buffer, int size) + : buffer_(buffer), + buffer_end_(buffer + size), + input_(nullptr), + total_bytes_read_(size), + overflow_bytes_(0), + last_tag_(0), + legitimate_message_end_(false), + aliasing_enabled_(false), + current_limit_(size), + buffer_size_after_limit_(0), + total_bytes_limit_(kDefaultTotalBytesLimit), + recursion_budget_(default_recursion_limit_), + recursion_limit_(default_recursion_limit_), + extension_pool_(nullptr), + extension_factory_(nullptr) { + // Note that setting current_limit_ == size is important to prevent some + // code paths from trying to access input_ and segfaulting. +} + +inline bool CodedInputStream::IsFlat() const { return input_ == nullptr; } + +inline bool CodedInputStream::Skip(int count) { + if (count < 0) return false; // security: count is often user-supplied + + const int original_buffer_size = BufferSize(); + + if (count <= original_buffer_size) { + // Just skipping within the current buffer. Easy. + Advance(count); + return true; } + + return SkipFallback(count, original_buffer_size); } inline uint8* CodedOutputStream::WriteVarint32ToArray(uint32 value, uint8* target) { - while (value >= 0x80) { - *target = static_cast(value | 0x80); - value >>= 7; - ++target; - } - *target = static_cast(value); - return target + 1; + return EpsCopyOutputStream::UnsafeVarint(value, target); } inline uint8* CodedOutputStream::WriteVarint64ToArray(uint64 value, uint8* target) { - while (value >= 0x80) { - *target = static_cast(value | 0x80); - value >>= 7; - ++target; - } - *target = static_cast(value); - return target + 1; + return EpsCopyOutputStream::UnsafeVarint(value, target); } inline void CodedOutputStream::WriteVarint32SignExtended(int32 value) { @@ -1211,29 +1638,13 @@ inline uint8* CodedOutputStream::WriteLittleEndian64ToArray(uint64 value, } inline void CodedOutputStream::WriteVarint32(uint32 value) { - if (buffer_size_ >= 5) { - // Fast path: We have enough bytes left in the buffer to guarantee that - // this write won't cross the end, so we can skip the checks. - uint8* target = buffer_; - uint8* end = WriteVarint32ToArray(value, target); - int size = static_cast(end - target); - Advance(size); - } else { - WriteVarint32SlowPath(value); - } + cur_ = impl_.EnsureSpace(cur_); + SetCur(WriteVarint32ToArray(value, Cur())); } inline void CodedOutputStream::WriteVarint64(uint64 value) { - if (buffer_size_ >= 10) { - // Fast path: We have enough bytes left in the buffer to guarantee that - // this write won't cross the end, so we can skip the checks. - uint8* target = buffer_; - uint8* end = WriteVarint64ToArray(value, target); - int size = static_cast(end - target); - Advance(size); - } else { - WriteVarint64SlowPath(value); - } + cur_ = impl_.EnsureSpace(cur_); + SetCur(WriteVarint64ToArray(value, Cur())); } inline void CodedOutputStream::WriteTag(uint32 value) { WriteVarint32(value); } @@ -1276,11 +1687,13 @@ inline void CodedOutputStream::WriteString(const std::string& str) { inline void CodedOutputStream::WriteRawMaybeAliased(const void* data, int size) { - if (aliasing_enabled_) { - WriteAliasedRaw(data, size); - } else { - WriteRaw(data, size); - } + cur_ = impl_.WriteRawMaybeAliased(data, size, cur_); +} + +inline uint8* CodedOutputStream::WriteRawToArray(const void* data, int size, + uint8* target) { + memcpy(target, data, size); + return target + size; } inline uint8* CodedOutputStream::WriteStringToArray(const std::string& str, @@ -1288,110 +1701,6 @@ inline uint8* CodedOutputStream::WriteStringToArray(const std::string& str, return WriteRawToArray(str.data(), static_cast(str.size()), target); } -inline int CodedOutputStream::ByteCount() const { - return total_bytes_ - buffer_size_; -} - -inline void CodedInputStream::Advance(int amount) { buffer_ += amount; } - -inline void CodedOutputStream::Advance(int amount) { - buffer_ += amount; - buffer_size_ -= amount; -} - -inline void CodedInputStream::SetRecursionLimit(int limit) { - recursion_budget_ += limit - recursion_limit_; - recursion_limit_ = limit; -} - -inline bool CodedInputStream::IncrementRecursionDepth() { - --recursion_budget_; - return recursion_budget_ >= 0; -} - -inline void CodedInputStream::DecrementRecursionDepth() { - if (recursion_budget_ < recursion_limit_) ++recursion_budget_; -} - -inline void CodedInputStream::UnsafeDecrementRecursionDepth() { - assert(recursion_budget_ < recursion_limit_); - ++recursion_budget_; -} - -inline void CodedInputStream::SetExtensionRegistry(const DescriptorPool* pool, - MessageFactory* factory) { - extension_pool_ = pool; - extension_factory_ = factory; -} - -inline const DescriptorPool* CodedInputStream::GetExtensionPool() { - return extension_pool_; -} - -inline MessageFactory* CodedInputStream::GetExtensionFactory() { - return extension_factory_; -} - -inline int CodedInputStream::BufferSize() const { - return static_cast(buffer_end_ - buffer_); -} - -inline CodedInputStream::CodedInputStream(ZeroCopyInputStream* input) - : buffer_(NULL), - buffer_end_(NULL), - input_(input), - total_bytes_read_(0), - overflow_bytes_(0), - last_tag_(0), - legitimate_message_end_(false), - aliasing_enabled_(false), - current_limit_(kint32max), - buffer_size_after_limit_(0), - total_bytes_limit_(kDefaultTotalBytesLimit), - recursion_budget_(default_recursion_limit_), - recursion_limit_(default_recursion_limit_), - extension_pool_(NULL), - extension_factory_(NULL) { - // Eagerly Refresh() so buffer space is immediately available. - Refresh(); -} - -inline CodedInputStream::CodedInputStream(const uint8* buffer, int size) - : buffer_(buffer), - buffer_end_(buffer + size), - input_(NULL), - total_bytes_read_(size), - overflow_bytes_(0), - last_tag_(0), - legitimate_message_end_(false), - aliasing_enabled_(false), - current_limit_(size), - buffer_size_after_limit_(0), - total_bytes_limit_(kDefaultTotalBytesLimit), - recursion_budget_(default_recursion_limit_), - recursion_limit_(default_recursion_limit_), - extension_pool_(NULL), - extension_factory_(NULL) { - // Note that setting current_limit_ == size is important to prevent some - // code paths from trying to access input_ and segfaulting. -} - -inline bool CodedInputStream::IsFlat() const { return input_ == NULL; } - -inline bool CodedInputStream::Skip(int count) { - if (count < 0) return false; // security: count is often user-supplied - - const int original_buffer_size = BufferSize(); - - if (count <= original_buffer_size) { - // Just skipping within the current buffer. Easy. - Advance(count); - return true; - } - - return SkipFallback(count, original_buffer_size); -} - } // namespace io } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/io/coded_stream_unittest.cc b/third_party/protobuf/src/google/protobuf/io/coded_stream_unittest.cc index 26e6a7c5..266b902e 100644 --- a/third_party/protobuf/src/google/protobuf/io/coded_stream_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/io/coded_stream_unittest.cc @@ -34,13 +34,13 @@ // // This file contains tests and benchmarks. -#include -#include - #include #include +#include +#include + #include #include #include @@ -132,7 +132,7 @@ namespace { class CodedStreamTest : public testing::Test { protected: // Buffer used during most of the tests. This assumes tests run sequentially. - static const int kBufferSize = 1024 * 64; + static constexpr int kBufferSize = 1024 * 64; static uint8 buffer_[kBufferSize]; }; @@ -228,17 +228,17 @@ TEST_F(CodedStreamTest, EmptyInputBeforeEos) { In() : count_(0) {} private: - virtual bool Next(const void** data, int* size) { + bool Next(const void** data, int* size) override { *data = NULL; *size = 0; return count_++ < 2; } - virtual void BackUp(int count) { GOOGLE_LOG(FATAL) << "Tests never call this."; } - virtual bool Skip(int count) { + void BackUp(int count) override { GOOGLE_LOG(FATAL) << "Tests never call this."; } + bool Skip(int count) override { GOOGLE_LOG(FATAL) << "Tests never call this."; return false; } - virtual int64 ByteCount() const { return 0; } + int64_t ByteCount() const override { return 0; } int count_; } in; CodedInputStream input(&in); @@ -1009,41 +1009,6 @@ TEST_F(CodedStreamTest, GetDirectBufferPointerInlineInput) { EXPECT_EQ(0, size); } -TEST_F(CodedStreamTest, GetDirectBufferPointerOutput) { - ArrayOutputStream output(buffer_, sizeof(buffer_), 8); - CodedOutputStream coded_output(&output); - - void* ptr; - int size; - - EXPECT_TRUE(coded_output.GetDirectBufferPointer(&ptr, &size)); - EXPECT_EQ(buffer_, ptr); - EXPECT_EQ(8, size); - - // Peeking again should return the same pointer. - EXPECT_TRUE(coded_output.GetDirectBufferPointer(&ptr, &size)); - EXPECT_EQ(buffer_, ptr); - EXPECT_EQ(8, size); - - // Skip forward in the same buffer then peek again. - EXPECT_TRUE(coded_output.Skip(3)); - EXPECT_TRUE(coded_output.GetDirectBufferPointer(&ptr, &size)); - EXPECT_EQ(buffer_ + 3, ptr); - EXPECT_EQ(5, size); - - // Skip to end of buffer and peek -- should get next buffer. - EXPECT_TRUE(coded_output.Skip(5)); - EXPECT_TRUE(coded_output.GetDirectBufferPointer(&ptr, &size)); - EXPECT_EQ(buffer_ + 8, ptr); - EXPECT_EQ(8, size); - - // Skip over multiple buffers. - EXPECT_TRUE(coded_output.Skip(22)); - EXPECT_TRUE(coded_output.GetDirectBufferPointer(&ptr, &size)); - EXPECT_EQ(buffer_ + 30, ptr); - EXPECT_EQ(2, size); -} - // ------------------------------------------------------------------- // Limits @@ -1315,7 +1280,7 @@ class ReallyBigInputStream : public ZeroCopyInputStream { ~ReallyBigInputStream() {} // implements ZeroCopyInputStream ---------------------------------- - bool Next(const void** data, int* size) { + bool Next(const void** data, int* size) override { // We only expect BackUp() to be called at the end. EXPECT_EQ(0, backup_amount_); @@ -1337,13 +1302,13 @@ class ReallyBigInputStream : public ZeroCopyInputStream { } } - void BackUp(int count) { backup_amount_ = count; } + void BackUp(int count) override { backup_amount_ = count; } - bool Skip(int count) { + bool Skip(int count) override { GOOGLE_LOG(FATAL) << "Not implemented."; return false; } - int64 ByteCount() const { + int64_t ByteCount() const override { GOOGLE_LOG(FATAL) << "Not implemented."; return 0; } diff --git a/third_party/protobuf/src/google/protobuf/io/gzip_stream.cc b/third_party/protobuf/src/google/protobuf/io/gzip_stream.cc index a3e04384..86e21267 100644 --- a/third_party/protobuf/src/google/protobuf/io/gzip_stream.cc +++ b/third_party/protobuf/src/google/protobuf/io/gzip_stream.cc @@ -185,7 +185,7 @@ bool GzipInputStream::Skip(int count) { } return ok; } -int64 GzipInputStream::ByteCount() const { +int64_t GzipInputStream::ByteCount() const { int64 ret = byte_count_ + zcontext_.total_out; if (zcontext_.next_out != NULL && output_position_ != NULL) { ret += reinterpret_cast(zcontext_.next_out) - @@ -301,7 +301,7 @@ void GzipOutputStream::BackUp(int count) { GOOGLE_CHECK_GE(zcontext_.avail_in, count); zcontext_.avail_in -= count; } -int64 GzipOutputStream::ByteCount() const { +int64_t GzipOutputStream::ByteCount() const { return zcontext_.total_in + zcontext_.avail_in; } diff --git a/third_party/protobuf/src/google/protobuf/io/gzip_stream.h b/third_party/protobuf/src/google/protobuf/io/gzip_stream.h index 9980e5b4..b1ce1d36 100644 --- a/third_party/protobuf/src/google/protobuf/io/gzip_stream.h +++ b/third_party/protobuf/src/google/protobuf/io/gzip_stream.h @@ -43,6 +43,7 @@ #ifndef GOOGLE_PROTOBUF_IO_GZIP_STREAM_H__ #define GOOGLE_PROTOBUF_IO_GZIP_STREAM_H__ + #include #include #include @@ -82,7 +83,7 @@ class PROTOBUF_EXPORT GzipInputStream : public ZeroCopyInputStream { bool Next(const void** data, int* size); void BackUp(int count); bool Skip(int count); - int64 ByteCount() const; + int64_t ByteCount() const; private: Format format_; @@ -168,7 +169,7 @@ class PROTOBUF_EXPORT GzipOutputStream : public ZeroCopyOutputStream { // implements ZeroCopyOutputStream --------------------------------- bool Next(void** data, int* size); void BackUp(int count); - int64 ByteCount() const; + int64_t ByteCount() const; private: ZeroCopyOutputStream* sub_stream_; diff --git a/third_party/protobuf/src/google/protobuf/io/io_win32.cc b/third_party/protobuf/src/google/protobuf/io/io_win32.cc old mode 100755 new mode 100644 index b8f9bf8f..d22ceac7 --- a/third_party/protobuf/src/google/protobuf/io/io_win32.cc +++ b/third_party/protobuf/src/google/protobuf/io/io_win32.cc @@ -42,25 +42,29 @@ // // This file is only used on Windows, it's empty on other platforms. -#if defined(_WIN32) +#if defined(_WIN32) && !defined(_XBOX_ONE) // Comment this out to fall back to using the ANSI versions (open, mkdir, ...) // instead of the Unicode ones (_wopen, _wmkdir, ...). Doing so can be useful to // debug failing tests if that's caused by the long path support. #define SUPPORT_LONGPATHS +#include + #include #include #include #include #include -#include #include #include #include -#include -#include +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#endif + +#include #include #include @@ -357,6 +361,56 @@ wstring testonly_utf8_to_winpath(const char* path) { return as_windows_path(path, &wpath) ? wpath : wstring(); } +ExpandWildcardsResult ExpandWildcards( + const string& path, std::function consume) { + if (path.find_first_of("*?") == string::npos) { + // There are no wildcards in the path, we don't need to expand it. + consume(path); + return ExpandWildcardsResult::kSuccess; + } + + wstring wpath; + if (!as_windows_path(path.c_str(), &wpath)) { + return ExpandWildcardsResult::kErrorInputPathConversion; + } + + static const wstring kDot = L"."; + static const wstring kDotDot = L".."; + WIN32_FIND_DATAW metadata; + HANDLE handle = ::FindFirstFileW(wpath.c_str(), &metadata); + if (handle == INVALID_HANDLE_VALUE) { + // The pattern does not match any files (or directories). + return ExpandWildcardsResult::kErrorNoMatchingFile; + } + + string::size_type pos = path.find_last_of("\\/"); + string dirname; + if (pos != string::npos) { + dirname = path.substr(0, pos + 1); + } + + ExpandWildcardsResult matched = ExpandWildcardsResult::kErrorNoMatchingFile; + do { + // Ignore ".", "..", and directories. + if ((metadata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0 && + kDot != metadata.cFileName && kDotDot != metadata.cFileName) { + matched = ExpandWildcardsResult::kSuccess; + string filename; + if (!strings::wcs_to_utf8(metadata.cFileName, &filename)) { + return ExpandWildcardsResult::kErrorOutputPathConversion; + } + + if (dirname.empty()) { + consume(filename); + } else { + consume(dirname + filename); + } + } + } while (::FindNextFileW(handle, &metadata)); + FindClose(handle); + return matched; +} + namespace strings { bool wcs_to_mbs(const WCHAR* s, string* out, bool outUtf8) { diff --git a/third_party/protobuf/src/google/protobuf/io/io_win32.h b/third_party/protobuf/src/google/protobuf/io/io_win32.h old mode 100755 new mode 100644 index cf5cb326..7d11dc2b --- a/third_party/protobuf/src/google/protobuf/io/io_win32.h +++ b/third_party/protobuf/src/google/protobuf/io/io_win32.h @@ -49,9 +49,10 @@ #if defined(_WIN32) +#include #include -#include +#include #include // Compilers on Windows other than MSVC (e.g. Cygwin, MinGW32) define the @@ -75,6 +76,24 @@ PROTOBUF_EXPORT int stat(const char* path, struct _stat* buffer); PROTOBUF_EXPORT int write(int fd, const void* buffer, size_t size); PROTOBUF_EXPORT std::wstring testonly_utf8_to_winpath(const char* path); +enum class ExpandWildcardsResult { + kSuccess = 0, + kErrorNoMatchingFile = 1, + kErrorInputPathConversion = 2, + kErrorOutputPathConversion = 3, +}; + +// Expand wildcards in a path pattern, feed the result to a consumer function. +// +// `path` must be a valid, Windows-style path. It may be absolute, or relative +// to the current working directory, and it may contain wildcards ("*" and "?") +// in the last path segment. This function passes all matching file names to +// `consume`. The resulting paths may not be absolute nor normalized. +// +// The function returns a value from `ExpandWildcardsResult`. +PROTOBUF_EXPORT ExpandWildcardsResult ExpandWildcards( + const std::string& path, std::function consume); + namespace strings { // Convert from UTF-16 to Active-Code-Page-encoded or to UTF-8-encoded text. diff --git a/third_party/protobuf/src/google/protobuf/io/io_win32_unittest.cc b/third_party/protobuf/src/google/protobuf/io/io_win32_unittest.cc old mode 100755 new mode 100644 index 53aa3339..c50f68d6 --- a/third_party/protobuf/src/google/protobuf/io/io_win32_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/io/io_win32_unittest.cc @@ -40,6 +40,8 @@ #if defined(_WIN32) #define WIN32_LEAN_AND_MEAN +#include + #include #include #include @@ -49,12 +51,12 @@ #include #include -#include -#include - #include #include #include +#include + +#include namespace google { namespace protobuf { @@ -84,6 +86,7 @@ const wchar_t kUtf16Text[] = { }; using std::string; +using std::vector; using std::wstring; class IoWin32Test : public ::testing::Test { @@ -145,12 +148,24 @@ bool GetCwdAsUtf8(string* result) { } } +bool CreateEmptyFile(const wstring& path) { + HANDLE h = CreateFileW(path.c_str(), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, NULL); + if (h == INVALID_HANDLE_VALUE) { + return false; + } + CloseHandle(h); + return true; +} + } // namespace void IoWin32Test::SetUp() { test_tmpdir.clear(); wtest_tmpdir.clear(); - EXPECT_GT(::GetCurrentDirectoryW(MAX_PATH, working_directory), 0); + DWORD size = ::GetCurrentDirectoryW(MAX_PATH, working_directory); + EXPECT_GT(size, 0); + EXPECT_LT(size, MAX_PATH); string tmp; bool ok = false; @@ -353,11 +368,11 @@ TEST_F(IoWin32Test, MkdirTestNonAscii) { ASSERT_INITIALIZED; // Create a non-ASCII path. - // Ensure that we can create the directory using SetCurrentDirectoryW. + // Ensure that we can create the directory using CreateDirectoryW. EXPECT_TRUE(CreateDirectoryW((wtest_tmpdir + L"\\1").c_str(), nullptr)); EXPECT_TRUE(CreateDirectoryW((wtest_tmpdir + L"\\1\\" + kUtf16Text).c_str(), nullptr)); // Ensure that we can create a very similarly named directory using mkdir. - // We don't attemp to delete and recreate the same directory, because on + // We don't attempt to delete and recreate the same directory, because on // Windows, deleting files and directories seems to be asynchronous. EXPECT_EQ(mkdir((test_tmpdir + "\\2").c_str(), 0644), 0); EXPECT_EQ(mkdir((test_tmpdir + "\\2\\" + kUtf8Text).c_str(), 0644), 0); @@ -401,6 +416,168 @@ TEST_F(IoWin32Test, ChdirTestNonAscii) { ASSERT_EQ(wNonAscii, cwd); } +TEST_F(IoWin32Test, ExpandWildcardsInRelativePathTest) { + wstring wNonAscii(wtest_tmpdir + L"\\" + kUtf16Text); + EXPECT_TRUE(CreateDirectoryW(wNonAscii.c_str(), nullptr)); + // Create mock files we will test pattern matching on. + EXPECT_TRUE(CreateEmptyFile(wNonAscii + L"\\foo_a.proto")); + EXPECT_TRUE(CreateEmptyFile(wNonAscii + L"\\foo_b.proto")); + EXPECT_TRUE(CreateEmptyFile(wNonAscii + L"\\bar.proto")); + // `cd` into `wtest_tmpdir`. + EXPECT_TRUE(SetCurrentDirectoryW(wtest_tmpdir.c_str())); + + int found_a = 0; + int found_b = 0; + vector found_bad; + // Assert matching a relative path pattern. Results should also be relative. + ExpandWildcardsResult result = + ExpandWildcards(string(kUtf8Text) + "\\foo*.proto", + [&found_a, &found_b, &found_bad](const string& p) { + if (p == string(kUtf8Text) + "\\foo_a.proto") { + found_a++; + } else if (p == string(kUtf8Text) + "\\foo_b.proto") { + found_b++; + } else { + found_bad.push_back(p); + } + }); + EXPECT_EQ(result, ExpandWildcardsResult::kSuccess); + EXPECT_EQ(found_a, 1); + EXPECT_EQ(found_b, 1); + if (!found_bad.empty()) { + FAIL() << found_bad[0]; + } + + // Assert matching the exact filename. + found_a = 0; + found_bad.clear(); + result = ExpandWildcards(string(kUtf8Text) + "\\foo_a.proto", + [&found_a, &found_bad](const string& p) { + if (p == string(kUtf8Text) + "\\foo_a.proto") { + found_a++; + } else { + found_bad.push_back(p); + } + }); + EXPECT_EQ(result, ExpandWildcardsResult::kSuccess); + EXPECT_EQ(found_a, 1); + if (!found_bad.empty()) { + FAIL() << found_bad[0]; + } +} + +TEST_F(IoWin32Test, ExpandWildcardsInAbsolutePathTest) { + wstring wNonAscii(wtest_tmpdir + L"\\" + kUtf16Text); + EXPECT_TRUE(CreateDirectoryW(wNonAscii.c_str(), nullptr)); + // Create mock files we will test pattern matching on. + EXPECT_TRUE(CreateEmptyFile(wNonAscii + L"\\foo_a.proto")); + EXPECT_TRUE(CreateEmptyFile(wNonAscii + L"\\foo_b.proto")); + EXPECT_TRUE(CreateEmptyFile(wNonAscii + L"\\bar.proto")); + + int found_a = 0; + int found_b = 0; + vector found_bad; + // Assert matching an absolute path. The results should also use absolute + // path. + ExpandWildcardsResult result = + ExpandWildcards(string(test_tmpdir) + "\\" + kUtf8Text + "\\foo*.proto", + [this, &found_a, &found_b, &found_bad](const string& p) { + if (p == string(this->test_tmpdir) + "\\" + kUtf8Text + + "\\foo_a.proto") { + found_a++; + } else if (p == string(this->test_tmpdir) + "\\" + + kUtf8Text + "\\foo_b.proto") { + found_b++; + } else { + found_bad.push_back(p); + } + }); + EXPECT_EQ(result, ExpandWildcardsResult::kSuccess); + EXPECT_EQ(found_a, 1); + EXPECT_EQ(found_b, 1); + if (!found_bad.empty()) { + FAIL() << found_bad[0]; + } + + // Assert matching the exact filename. + found_a = 0; + found_bad.clear(); + result = + ExpandWildcards(string(test_tmpdir) + "\\" + kUtf8Text + "\\foo_a.proto", + [this, &found_a, &found_bad](const string& p) { + if (p == string(this->test_tmpdir) + "\\" + kUtf8Text + + "\\foo_a.proto") { + found_a++; + } else { + found_bad.push_back(p); + } + }); + EXPECT_EQ(result, ExpandWildcardsResult::kSuccess); + EXPECT_EQ(found_a, 1); + if (!found_bad.empty()) { + FAIL() << found_bad[0]; + } +} + +TEST_F(IoWin32Test, ExpandWildcardsIgnoresDirectoriesTest) { + wstring wNonAscii(wtest_tmpdir + L"\\" + kUtf16Text); + EXPECT_TRUE(CreateDirectoryW(wNonAscii.c_str(), nullptr)); + // Create mock files we will test pattern matching on. + EXPECT_TRUE(CreateEmptyFile(wNonAscii + L"\\foo_a.proto")); + EXPECT_TRUE( + CreateDirectoryW((wNonAscii + L"\\foo_b.proto").c_str(), nullptr)); + EXPECT_TRUE(CreateEmptyFile(wNonAscii + L"\\foo_c.proto")); + // `cd` into `wtest_tmpdir`. + EXPECT_TRUE(SetCurrentDirectoryW(wtest_tmpdir.c_str())); + + int found_a = 0; + int found_c = 0; + vector found_bad; + // Assert that the pattern matches exactly the expected files, and using the + // absolute path as did the input pattern. + ExpandWildcardsResult result = + ExpandWildcards(string(kUtf8Text) + "\\foo*.proto", + [&found_a, &found_c, &found_bad](const string& p) { + if (p == string(kUtf8Text) + "\\foo_a.proto") { + found_a++; + } else if (p == string(kUtf8Text) + "\\foo_c.proto") { + found_c++; + } else { + found_bad.push_back(p); + } + }); + EXPECT_EQ(result, ExpandWildcardsResult::kSuccess); + EXPECT_EQ(found_a, 1); + EXPECT_EQ(found_c, 1); + if (!found_bad.empty()) { + FAIL() << found_bad[0]; + } +} + +TEST_F(IoWin32Test, ExpandWildcardsFailsIfNoFileMatchesTest) { + wstring wNonAscii(wtest_tmpdir + L"\\" + kUtf16Text); + EXPECT_TRUE(CreateDirectoryW(wNonAscii.c_str(), nullptr)); + // Create mock files we will test pattern matching on. + EXPECT_TRUE(CreateEmptyFile(wNonAscii + L"\\foo_a.proto")); + // `cd` into `wtest_tmpdir`. + EXPECT_TRUE(SetCurrentDirectoryW(wtest_tmpdir.c_str())); + + // Control test: should match foo*.proto + ExpandWildcardsResult result = + ExpandWildcards(string(kUtf8Text) + "\\foo*.proto", [](const string&) {}); + EXPECT_EQ(result, ExpandWildcardsResult::kSuccess); + + // Control test: should match foo_a.proto + result = ExpandWildcards(string(kUtf8Text) + "\\foo_a.proto", + [](const string&) {}); + EXPECT_EQ(result, ExpandWildcardsResult::kSuccess); + + // Actual test: should not match anything. + result = + ExpandWildcards(string(kUtf8Text) + "\\bar*.proto", [](const string&) {}); + ASSERT_EQ(result, ExpandWildcardsResult::kErrorNoMatchingFile); +} + TEST_F(IoWin32Test, AsWindowsPathTest) { DWORD size = GetCurrentDirectoryW(0, nullptr); std::unique_ptr cwd_str(new wchar_t[size]); diff --git a/third_party/protobuf/src/google/protobuf/io/printer.cc b/third_party/protobuf/src/google/protobuf/io/printer.cc index 6a86c58c..f8d4d2b1 100644 --- a/third_party/protobuf/src/google/protobuf/io/printer.cc +++ b/third_party/protobuf/src/google/protobuf/io/printer.cc @@ -32,11 +32,12 @@ // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. +#include + #include #include #include -#include #include namespace google { diff --git a/third_party/protobuf/src/google/protobuf/io/printer.h b/third_party/protobuf/src/google/protobuf/io/printer.h index a55946e9..64336ebc 100644 --- a/third_party/protobuf/src/google/protobuf/io/printer.h +++ b/third_party/protobuf/src/google/protobuf/io/printer.h @@ -37,11 +37,12 @@ #ifndef GOOGLE_PROTOBUF_IO_PRINTER_H__ #define GOOGLE_PROTOBUF_IO_PRINTER_H__ + #include #include #include -#include +#include #include namespace google { @@ -53,7 +54,7 @@ class ZeroCopyOutputStream; // zero_copy_stream.h // Records annotations about a Printer's output. class PROTOBUF_EXPORT AnnotationCollector { public: - // Annotation is a ofset range and a payload pair. + // Annotation is a offset range and a payload pair. typedef std::pair, std::string> Annotation; // Records that the bytes in file_path beginning with begin_offset and ending @@ -193,8 +194,8 @@ class PROTOBUF_EXPORT Printer { ~Printer(); - // Link a subsitution variable emitted by the last call to Print to the object - // described by descriptor. + // Link a substitution variable emitted by the last call to Print to the + // object described by descriptor. template void Annotate(const char* varname, const SomeDescriptor* descriptor) { Annotate(varname, varname, descriptor); @@ -217,7 +218,7 @@ class PROTOBUF_EXPORT Printer { Annotate(begin_varname, end_varname, descriptor->file()->name(), path); } - // Link a subsitution variable emitted by the last call to Print to the file + // Link a substitution variable emitted by the last call to Print to the file // with path file_name. void Annotate(const char* varname, const std::string& file_name) { Annotate(varname, varname, file_name); diff --git a/third_party/protobuf/src/google/protobuf/io/printer_unittest.cc b/third_party/protobuf/src/google/protobuf/io/printer_unittest.cc index b847fa70..ca45d678 100644 --- a/third_party/protobuf/src/google/protobuf/io/printer_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/io/printer_unittest.cc @@ -32,16 +32,16 @@ // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. -#include - #include -#include -#include + +#include #include #include +#include #include #include +#include namespace google { namespace protobuf { diff --git a/third_party/protobuf/src/google/protobuf/io/strtod.cc b/third_party/protobuf/src/google/protobuf/io/strtod.cc index 01164441..03acb5b2 100644 --- a/third_party/protobuf/src/google/protobuf/io/strtod.cc +++ b/third_party/protobuf/src/google/protobuf/io/strtod.cc @@ -38,81 +38,16 @@ #include #include +#include + namespace google { namespace protobuf { namespace io { -// ---------------------------------------------------------------------- -// NoLocaleStrtod() -// This code will make you cry. -// ---------------------------------------------------------------------- - -namespace { - // This approximately 0x1.ffffffp127, but we don't use 0x1.ffffffp127 because // it won't compile in MSVC. const double MAX_FLOAT_AS_DOUBLE_ROUNDED = 3.4028235677973366e+38; -// Returns a string identical to *input except that the character pointed to -// by radix_pos (which should be '.') is replaced with the locale-specific -// radix character. -std::string LocalizeRadix(const char* input, const char* radix_pos) { - // Determine the locale-specific radix character by calling sprintf() to - // print the number 1.5, then stripping off the digits. As far as I can - // tell, this is the only portable, thread-safe way to get the C library - // to divuldge the locale's radix character. No, localeconv() is NOT - // thread-safe. - char temp[16]; - int size = sprintf(temp, "%.1f", 1.5); - GOOGLE_CHECK_EQ(temp[0], '1'); - GOOGLE_CHECK_EQ(temp[size - 1], '5'); - GOOGLE_CHECK_LE(size, 6); - - // Now replace the '.' in the input with it. - std::string result; - result.reserve(strlen(input) + size - 3); - result.append(input, radix_pos); - result.append(temp + 1, size - 2); - result.append(radix_pos + 1); - return result; -} - -} // namespace - -double NoLocaleStrtod(const char* text, char** original_endptr) { - // We cannot simply set the locale to "C" temporarily with setlocale() - // as this is not thread-safe. Instead, we try to parse in the current - // locale first. If parsing stops at a '.' character, then this is a - // pretty good hint that we're actually in some other locale in which - // '.' is not the radix character. - - char* temp_endptr; - double result = strtod(text, &temp_endptr); - if (original_endptr != NULL) *original_endptr = temp_endptr; - if (*temp_endptr != '.') return result; - - // Parsing halted on a '.'. Perhaps we're in a different locale? Let's - // try to replace the '.' with a locale-specific radix character and - // try again. - std::string localized = LocalizeRadix(text, temp_endptr); - const char* localized_cstr = localized.c_str(); - char* localized_endptr; - result = strtod(localized_cstr, &localized_endptr); - if ((localized_endptr - localized_cstr) > (temp_endptr - text)) { - // This attempt got further, so replacing the decimal must have helped. - // Update original_endptr to point at the right location. - if (original_endptr != NULL) { - // size_diff is non-zero if the localized radix has multiple bytes. - int size_diff = localized.size() - strlen(text); - // const_cast is necessary to match the strtod() interface. - *original_endptr = const_cast( - text + (localized_endptr - localized_cstr - size_diff)); - } - } - - return result; -} - float SafeDoubleToFloat(double value) { // static_cast on a number larger than float can result in illegal // instruction error, so we need to manually convert it to infinity or max. @@ -138,6 +73,10 @@ float SafeDoubleToFloat(double value) { } } +double NoLocaleStrtod(const char* str, char** endptr) { + return google::protobuf::internal::NoLocaleStrtod(str, endptr); +} + } // namespace io } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/io/tokenizer.cc b/third_party/protobuf/src/google/protobuf/io/tokenizer.cc index f8cf2ebd..ff839467 100644 --- a/third_party/protobuf/src/google/protobuf/io/tokenizer.cc +++ b/third_party/protobuf/src/google/protobuf/io/tokenizer.cc @@ -89,12 +89,13 @@ // exactly pretty. #include + #include #include #include +#include #include #include -#include #include namespace google { diff --git a/third_party/protobuf/src/google/protobuf/io/tokenizer.h b/third_party/protobuf/src/google/protobuf/io/tokenizer.h index cb33b931..551516ea 100644 --- a/third_party/protobuf/src/google/protobuf/io/tokenizer.h +++ b/third_party/protobuf/src/google/protobuf/io/tokenizer.h @@ -37,11 +37,12 @@ #ifndef GOOGLE_PROTOBUF_IO_TOKENIZER_H__ #define GOOGLE_PROTOBUF_IO_TOKENIZER_H__ + #include #include + #include #include - #include namespace google { diff --git a/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc b/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc index 37628ab2..b14eddf9 100644 --- a/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc @@ -32,18 +32,18 @@ // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. +#include + #include #include #include -#include -#include - #include #include #include #include +#include #include #include @@ -56,7 +56,7 @@ namespace { // Data-Driven Test Infrastructure // TODO(kenton): This is copied from coded_stream_unittest. This is -// temporary until these fetaures are integrated into gTest itself. +// temporary until these features are integrated into gTest itself. // TEST_1D and TEST_2D are macros I'd eventually like to see added to // gTest. These macros can be used to declare tests which should be @@ -127,7 +127,7 @@ class TestInputStream : public ZeroCopyInputStream { ~TestInputStream() {} // implements ZeroCopyInputStream ---------------------------------- - bool Next(const void** data, int* size) { + bool Next(const void** data, int* size) override { // We'll return empty buffers starting with the first buffer, and every // 3 and 5 buffers after that. if (counter_ % 3 == 0 || counter_ % 5 == 0) { @@ -141,9 +141,9 @@ class TestInputStream : public ZeroCopyInputStream { } } - void BackUp(int count) { return array_stream_.BackUp(count); } - bool Skip(int count) { return array_stream_.Skip(count); } - int64 ByteCount() const { return array_stream_.ByteCount(); } + void BackUp(int count) override { return array_stream_.BackUp(count); } + bool Skip(int count) override { return array_stream_.Skip(count); } + int64_t ByteCount() const override { return array_stream_.ByteCount(); } private: ArrayInputStream array_stream_; diff --git a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h b/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h index de2374b5..d3bd6dae 100644 --- a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h +++ b/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h @@ -107,9 +107,10 @@ #ifndef GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_H__ #define GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_H__ -#include -#include +#include + +#include #include @@ -171,7 +172,7 @@ class PROTOBUF_EXPORT ZeroCopyInputStream { virtual bool Skip(int count) = 0; // Returns the total number of bytes read since this object was created. - virtual int64 ByteCount() const = 0; + virtual int64_t ByteCount() const = 0; private: @@ -226,7 +227,7 @@ class PROTOBUF_EXPORT ZeroCopyOutputStream { virtual void BackUp(int count) = 0; // Returns the total number of bytes written since this object was created. - virtual int64 ByteCount() const = 0; + virtual int64_t ByteCount() const = 0; // Write a given chunk of data to the output. Some output streams may // implement this in a way that avoids copying. Check AllowsAliasing() before diff --git a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc b/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc index 4af76b78..4b1bf802 100644 --- a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc +++ b/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc @@ -39,8 +39,10 @@ #include #endif #include + #include #include + #include #include #include @@ -93,7 +95,7 @@ void FileInputStream::BackUp(int count) { impl_.BackUp(count); } bool FileInputStream::Skip(int count) { return impl_.Skip(count); } -int64 FileInputStream::ByteCount() const { return impl_.ByteCount(); } +int64_t FileInputStream::ByteCount() const { return impl_.ByteCount(); } FileInputStream::CopyingFileInputStream::CopyingFileInputStream( int file_descriptor) @@ -180,7 +182,7 @@ bool FileOutputStream::Next(void** data, int* size) { void FileOutputStream::BackUp(int count) { impl_.BackUp(count); } -int64 FileOutputStream::ByteCount() const { return impl_.ByteCount(); } +int64_t FileOutputStream::ByteCount() const { return impl_.ByteCount(); } FileOutputStream::CopyingFileOutputStream::CopyingFileOutputStream( int file_descriptor) @@ -260,7 +262,7 @@ void IstreamInputStream::BackUp(int count) { impl_.BackUp(count); } bool IstreamInputStream::Skip(int count) { return impl_.Skip(count); } -int64 IstreamInputStream::ByteCount() const { return impl_.ByteCount(); } +int64_t IstreamInputStream::ByteCount() const { return impl_.ByteCount(); } IstreamInputStream::CopyingIstreamInputStream::CopyingIstreamInputStream( std::istream* input) @@ -291,7 +293,7 @@ bool OstreamOutputStream::Next(void** data, int* size) { void OstreamOutputStream::BackUp(int count) { impl_.BackUp(count); } -int64 OstreamOutputStream::ByteCount() const { return impl_.ByteCount(); } +int64_t OstreamOutputStream::ByteCount() const { return impl_.ByteCount(); } OstreamOutputStream::CopyingOstreamOutputStream::CopyingOstreamOutputStream( std::ostream* output) @@ -357,7 +359,7 @@ bool ConcatenatingInputStream::Skip(int count) { return false; } -int64 ConcatenatingInputStream::ByteCount() const { +int64_t ConcatenatingInputStream::ByteCount() const { if (stream_count_ == 0) { return bytes_retired_; } else { diff --git a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h b/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h index fd06c06c..b23a86d4 100644 --- a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h +++ b/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h @@ -40,8 +40,10 @@ #ifndef GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_IMPL_H__ #define GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_IMPL_H__ + #include #include + #include #include #include @@ -91,7 +93,7 @@ class PROTOBUF_EXPORT FileInputStream : public ZeroCopyInputStream { bool Next(const void** data, int* size) override; void BackUp(int count) override; bool Skip(int count) override; - int64 ByteCount() const override; + int64_t ByteCount() const override; private: class PROTOBUF_EXPORT CopyingFileInputStream : public CopyingInputStream { @@ -173,7 +175,7 @@ class PROTOBUF_EXPORT FileOutputStream : public ZeroCopyOutputStream { // implements ZeroCopyOutputStream --------------------------------- bool Next(void** data, int* size) override; void BackUp(int count) override; - int64 ByteCount() const override; + int64_t ByteCount() const override; private: class PROTOBUF_EXPORT CopyingFileOutputStream : public CopyingOutputStream { @@ -224,7 +226,7 @@ class PROTOBUF_EXPORT IstreamInputStream : public ZeroCopyInputStream { bool Next(const void** data, int* size) override; void BackUp(int count) override; bool Skip(int count) override; - int64 ByteCount() const override; + int64_t ByteCount() const override; private: class PROTOBUF_EXPORT CopyingIstreamInputStream : public CopyingInputStream { @@ -267,7 +269,7 @@ class PROTOBUF_EXPORT OstreamOutputStream : public ZeroCopyOutputStream { // implements ZeroCopyOutputStream --------------------------------- bool Next(void** data, int* size) override; void BackUp(int count) override; - int64 ByteCount() const override; + int64_t ByteCount() const override; private: class PROTOBUF_EXPORT CopyingOstreamOutputStream @@ -312,7 +314,7 @@ class PROTOBUF_EXPORT ConcatenatingInputStream : public ZeroCopyInputStream { bool Next(const void** data, int* size) override; void BackUp(int count) override; bool Skip(int count) override; - int64 ByteCount() const override; + int64_t ByteCount() const override; private: diff --git a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc b/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc index dd45a4cc..51cda2a8 100644 --- a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc +++ b/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc @@ -97,7 +97,7 @@ bool ArrayInputStream::Skip(int count) { } } -int64 ArrayInputStream::ByteCount() const { return position_; } +int64_t ArrayInputStream::ByteCount() const { return position_; } // =================================================================== @@ -132,7 +132,7 @@ void ArrayOutputStream::BackUp(int count) { last_returned_size_ = 0; // Don't let caller back up further. } -int64 ArrayOutputStream::ByteCount() const { return position_; } +int64_t ArrayOutputStream::ByteCount() const { return position_; } // =================================================================== @@ -176,7 +176,7 @@ void StringOutputStream::BackUp(int count) { target_->resize(target_->size() - count); } -int64 StringOutputStream::ByteCount() const { +int64_t StringOutputStream::ByteCount() const { GOOGLE_CHECK(target_ != NULL); return target_->size(); } @@ -282,7 +282,7 @@ bool CopyingInputStreamAdaptor::Skip(int count) { return skipped == count; } -int64 CopyingInputStreamAdaptor::ByteCount() const { +int64_t CopyingInputStreamAdaptor::ByteCount() const { return position_ - backup_bytes_; } @@ -342,7 +342,7 @@ void CopyingOutputStreamAdaptor::BackUp(int count) { buffer_used_ -= count; } -int64 CopyingOutputStreamAdaptor::ByteCount() const { +int64_t CopyingOutputStreamAdaptor::ByteCount() const { return position_ + buffer_used_; } @@ -424,7 +424,7 @@ bool LimitingInputStream::Skip(int count) { } } -int64 LimitingInputStream::ByteCount() const { +int64_t LimitingInputStream::ByteCount() const { if (limit_ < 0) { return input_->ByteCount() + limit_ - prior_bytes_read_; } else { diff --git a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h b/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h index ebb20176..26572cc5 100644 --- a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h +++ b/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h @@ -44,9 +44,11 @@ #ifndef GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_IMPL_LITE_H__ #define GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_IMPL_LITE_H__ + #include #include #include + #include #include #include @@ -78,7 +80,7 @@ class PROTOBUF_EXPORT ArrayInputStream : public ZeroCopyInputStream { bool Next(const void** data, int* size) override; void BackUp(int count) override; bool Skip(int count) override; - int64 ByteCount() const override; + int64_t ByteCount() const override; private: @@ -111,7 +113,7 @@ class PROTOBUF_EXPORT ArrayOutputStream : public ZeroCopyOutputStream { // implements ZeroCopyOutputStream --------------------------------- bool Next(void** data, int* size) override; void BackUp(int count) override; - int64 ByteCount() const override; + int64_t ByteCount() const override; private: uint8* const data_; // The byte array. @@ -145,7 +147,7 @@ class PROTOBUF_EXPORT StringOutputStream : public ZeroCopyOutputStream { // implements ZeroCopyOutputStream --------------------------------- bool Next(void** data, int* size) override; void BackUp(int count) override; - int64 ByteCount() const override; + int64_t ByteCount() const override; private: static const int kMinimumSize = 16; @@ -217,7 +219,7 @@ class PROTOBUF_EXPORT CopyingInputStreamAdaptor : public ZeroCopyInputStream { bool Next(const void** data, int* size) override; void BackUp(int count) override; bool Skip(int count) override; - int64 ByteCount() const override; + int64_t ByteCount() const override; private: // Insures that buffer_ is not NULL. @@ -229,7 +231,7 @@ class PROTOBUF_EXPORT CopyingInputStreamAdaptor : public ZeroCopyInputStream { CopyingInputStream* copying_stream_; bool owns_copying_stream_; - // True if we have seen a permenant error from the underlying stream. + // True if we have seen a permanent error from the underlying stream. bool failed_; // The current position of copying_stream_, relative to the point where @@ -304,7 +306,7 @@ class PROTOBUF_EXPORT CopyingOutputStreamAdaptor : public ZeroCopyOutputStream { // implements ZeroCopyOutputStream --------------------------------- bool Next(void** data, int* size) override; void BackUp(int count) override; - int64 ByteCount() const override; + int64_t ByteCount() const override; private: // Write the current buffer, if it is present. @@ -318,7 +320,7 @@ class PROTOBUF_EXPORT CopyingOutputStreamAdaptor : public ZeroCopyOutputStream { CopyingOutputStream* copying_stream_; bool owns_copying_stream_; - // True if we have seen a permenant error from the underlying stream. + // True if we have seen a permanent error from the underlying stream. bool failed_; // The current position of copying_stream_, relative to the point where @@ -351,7 +353,7 @@ class PROTOBUF_EXPORT LimitingInputStream : public ZeroCopyInputStream { bool Next(const void** data, int* size) override; void BackUp(int count) override; bool Skip(int count) override; - int64 ByteCount() const override; + int64_t ByteCount() const override; private: diff --git a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_unittest.cc b/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_unittest.cc index 5f7b6104..bec9df0a 100644 --- a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_unittest.cc @@ -55,13 +55,14 @@ #include #include #include + #include #include #include #include -#include #include +#include #include #if HAVE_ZLIB diff --git a/third_party/protobuf/src/google/protobuf/lite_unittest.cc b/third_party/protobuf/src/google/protobuf/lite_unittest.cc index c16bdf7e..cd5ccc4e 100644 --- a/third_party/protobuf/src/google/protobuf/lite_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/lite_unittest.cc @@ -1062,11 +1062,9 @@ TEST(Lite, CorrectEnding) { // for non-group messages (like TestAllTypesLite) which made it not accept // end-group. This is not a real big deal, but I think going forward its // good to have all parse loops behave 'exactly' the same. -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER EXPECT_TRUE(msg.MergePartialFromCodedStream(&cis)); EXPECT_FALSE(cis.ConsumedEntireMessage()); EXPECT_TRUE(cis.LastTagWas(132)); -#endif } { // This is an incomplete end-group tag. This should be a genuine parse @@ -1076,9 +1074,7 @@ TEST(Lite, CorrectEnding) { // Unfortunately the old parser detects a parse error in ReadTag and returns // 0 (as it states 0 is an invalid tag). However 0 is not an invalid tag // as it can be used to terminate the stream, so this returns true. -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER EXPECT_FALSE(msg.MergePartialFromCodedStream(&cis)); -#endif } } @@ -1097,5 +1093,99 @@ TEST(Lite, DebugString) { EXPECT_NE(message1.DebugString(), message2.DebugString()); } +TEST(Lite, EnumValueToName) { + EXPECT_EQ("FOREIGN_LITE_FOO", protobuf_unittest::ForeignEnumLite_Name( + protobuf_unittest::FOREIGN_LITE_FOO)); + EXPECT_EQ("FOREIGN_LITE_BAR", protobuf_unittest::ForeignEnumLite_Name( + protobuf_unittest::FOREIGN_LITE_BAR)); + EXPECT_EQ("FOREIGN_LITE_BAZ", protobuf_unittest::ForeignEnumLite_Name( + protobuf_unittest::FOREIGN_LITE_BAZ)); + EXPECT_EQ("", protobuf_unittest::ForeignEnumLite_Name(0)); + EXPECT_EQ("", protobuf_unittest::ForeignEnumLite_Name(999)); +} + +TEST(Lite, NestedEnumValueToName) { + EXPECT_EQ("FOO", protobuf_unittest::TestAllTypesLite::NestedEnum_Name( + protobuf_unittest::TestAllTypesLite::FOO)); + EXPECT_EQ("BAR", protobuf_unittest::TestAllTypesLite::NestedEnum_Name( + protobuf_unittest::TestAllTypesLite::BAR)); + EXPECT_EQ("BAZ", protobuf_unittest::TestAllTypesLite::NestedEnum_Name( + protobuf_unittest::TestAllTypesLite::BAZ)); + EXPECT_EQ("", protobuf_unittest::TestAllTypesLite::NestedEnum_Name(0)); + EXPECT_EQ("", protobuf_unittest::TestAllTypesLite::NestedEnum_Name(999)); +} + +TEST(Lite, EnumNameToValue) { + protobuf_unittest::ForeignEnumLite value; + + ASSERT_TRUE( + protobuf_unittest::ForeignEnumLite_Parse("FOREIGN_LITE_FOO", &value)); + EXPECT_EQ(protobuf_unittest::FOREIGN_LITE_FOO, value); + + ASSERT_TRUE( + protobuf_unittest::ForeignEnumLite_Parse("FOREIGN_LITE_BAR", &value)); + EXPECT_EQ(protobuf_unittest::FOREIGN_LITE_BAR, value); + + ASSERT_TRUE( + protobuf_unittest::ForeignEnumLite_Parse("FOREIGN_LITE_BAZ", &value)); + EXPECT_EQ(protobuf_unittest::FOREIGN_LITE_BAZ, value); + + // Non-existent values + EXPECT_FALSE(protobuf_unittest::ForeignEnumLite_Parse("E", &value)); + EXPECT_FALSE( + protobuf_unittest::ForeignEnumLite_Parse("FOREIGN_LITE_C", &value)); + EXPECT_FALSE(protobuf_unittest::ForeignEnumLite_Parse("G", &value)); +} + +TEST(Lite, NestedEnumNameToValue) { + protobuf_unittest::TestAllTypesLite::NestedEnum value; + + ASSERT_TRUE( + protobuf_unittest::TestAllTypesLite::NestedEnum_Parse("FOO", &value)); + EXPECT_EQ(protobuf_unittest::TestAllTypesLite::FOO, value); + + ASSERT_TRUE( + protobuf_unittest::TestAllTypesLite::NestedEnum_Parse("BAR", &value)); + EXPECT_EQ(protobuf_unittest::TestAllTypesLite::BAR, value); + + ASSERT_TRUE( + protobuf_unittest::TestAllTypesLite::NestedEnum_Parse("BAZ", &value)); + EXPECT_EQ(protobuf_unittest::TestAllTypesLite::BAZ, value); + + // Non-existent values + EXPECT_FALSE( + protobuf_unittest::TestAllTypesLite::NestedEnum_Parse("A", &value)); + EXPECT_FALSE( + protobuf_unittest::TestAllTypesLite::NestedEnum_Parse("C", &value)); + EXPECT_FALSE( + protobuf_unittest::TestAllTypesLite::NestedEnum_Parse("G", &value)); +} + +TEST(Lite, AliasedEnum) { + // Enums with allow_alias = true can have multiple entries with the same + // value. + EXPECT_EQ("FOO1", protobuf_unittest::DupEnum::TestEnumWithDupValueLite_Name( + protobuf_unittest::DupEnum::FOO1)); + EXPECT_EQ("FOO1", protobuf_unittest::DupEnum::TestEnumWithDupValueLite_Name( + protobuf_unittest::DupEnum::FOO2)); + EXPECT_EQ("BAR1", protobuf_unittest::DupEnum::TestEnumWithDupValueLite_Name( + protobuf_unittest::DupEnum::BAR1)); + EXPECT_EQ("BAR1", protobuf_unittest::DupEnum::TestEnumWithDupValueLite_Name( + protobuf_unittest::DupEnum::BAR2)); + EXPECT_EQ("BAZ", protobuf_unittest::DupEnum::TestEnumWithDupValueLite_Name( + protobuf_unittest::DupEnum::BAZ)); + EXPECT_EQ("", protobuf_unittest::DupEnum::TestEnumWithDupValueLite_Name(999)); + + protobuf_unittest::DupEnum::TestEnumWithDupValueLite value; + ASSERT_TRUE( + protobuf_unittest::DupEnum::TestEnumWithDupValueLite_Parse("FOO1", &value)); + EXPECT_EQ(protobuf_unittest::DupEnum::FOO1, value); + + value = static_cast(0); + ASSERT_TRUE( + protobuf_unittest::DupEnum::TestEnumWithDupValueLite_Parse("FOO2", &value)); + EXPECT_EQ(protobuf_unittest::DupEnum::FOO2, value); +} + } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/map.h b/third_party/protobuf/src/google/protobuf/map.h index 2750c023..8b656ab7 100644 --- a/third_party/protobuf/src/google/protobuf/map.h +++ b/third_party/protobuf/src/google/protobuf/map.h @@ -41,6 +41,7 @@ #include #include // To support Visual Studio 2008 #include +#include #include #include @@ -83,16 +84,145 @@ class TypeDefinedMapFieldBase; class DynamicMapField; class GeneratedMessageReflection; + +// re-implement std::allocator to use arena allocator for memory allocation. +// Used for Map implementation. Users should not use this class +// directly. +template +class MapAllocator { + public: + using value_type = U; + using pointer = value_type*; + using const_pointer = const value_type*; + using reference = value_type&; + using const_reference = const value_type&; + using size_type = size_t; + using difference_type = ptrdiff_t; + + MapAllocator() : arena_(nullptr) {} + explicit MapAllocator(Arena* arena) : arena_(arena) {} + template + MapAllocator(const MapAllocator& allocator) // NOLINT(runtime/explicit) + : arena_(allocator.arena()) {} + + pointer allocate(size_type n, const void* /* hint */ = nullptr) { + // If arena is not given, malloc needs to be called which doesn't + // construct element object. + if (arena_ == nullptr) { + return static_cast(::operator new(n * sizeof(value_type))); + } else { + return reinterpret_cast( + Arena::CreateArray(arena_, n * sizeof(value_type))); + } + } + + void deallocate(pointer p, size_type n) { + if (arena_ == nullptr) { +#if defined(__GXX_DELETE_WITH_SIZE__) || defined(__cpp_sized_deallocation) + ::operator delete(p, n * sizeof(value_type)); +#else + (void)n; + ::operator delete(p); +#endif + } + } + +#if __cplusplus >= 201103L && !defined(GOOGLE_PROTOBUF_OS_APPLE) && \ + !defined(GOOGLE_PROTOBUF_OS_NACL) && \ + !defined(GOOGLE_PROTOBUF_OS_EMSCRIPTEN) + template + void construct(NodeType* p, Args&&... args) { + // Clang 3.6 doesn't compile static casting to void* directly. (Issue + // #1266) According C++ standard 5.2.9/1: "The static_cast operator shall + // not cast away constness". So first the maybe const pointer is casted to + // const void* and after the const void* is const casted. + new (const_cast(static_cast(p))) + NodeType(std::forward(args)...); + } + + template + void destroy(NodeType* p) { + p->~NodeType(); + } +#else + void construct(pointer p, const_reference t) { new (p) value_type(t); } + + void destroy(pointer p) { p->~value_type(); } +#endif + + template + struct rebind { + using other = MapAllocator; + }; + + template + bool operator==(const MapAllocator& other) const { + return arena_ == other.arena_; + } + + template + bool operator!=(const MapAllocator& other) const { + return arena_ != other.arena_; + } + + // To support Visual Studio 2008 + size_type max_size() const { + // parentheses around (std::...:max) prevents macro warning of max() + return (std::numeric_limits::max)(); + } + + // To support gcc-4.4, which does not properly + // support templated friend classes + Arena* arena() const { return arena_; } + + private: + using DestructorSkippable_ = void; + Arena* const arena_; +}; + +template +struct DerefCompare { + bool operator()(const Key* n0, const Key* n1) const { return *n0 < *n1; } +}; + +// This class is used to get trivially destructible views of std::string and +// MapKey, which are the only non-trivially destructible allowed key types. +template +class KeyView { + public: + KeyView(const Key& key) : key_(&key) {} // NOLINT(runtime/explicit) + + const Key& get() const { return *key_; } + // Allows implicit conversions to `const Key&`, which allows us to use the + // hasher defined for Key. + operator const Key&() const { return get(); } // NOLINT(runtime/explicit) + + bool operator==(const KeyView& other) const { return get() == other.get(); } + bool operator==(const Key& other) const { return get() == other; } + bool operator<(const KeyView& other) const { return get() < other.get(); } + bool operator<(const Key& other) const { return get() < other; } + + private: + const Key* key_; +}; + +// Allows the InnerMap type to support skippable destruction. +template +struct GetTrivialKey { + using type = + typename std::conditional::value, Key, + KeyView>::type; +}; + } // namespace internal // This is the class for Map's internal value_type. Instead of using // std::pair as value_type, we use this class which provides us more control of // its process of construction and destruction. template -class MapPair { - public: - typedef const Key first_type; - typedef T second_type; +struct MapPair { + using first_type = const Key; + using second_type = T; MapPair(const Key& other_first, const T& other_second) : first(other_first), second(other_second) {} @@ -103,7 +233,7 @@ class MapPair { // Implicitly convertible to std::pair of compatible types. template - operator std::pair() const { + operator std::pair() const { // NOLINT(runtime/explicit) return std::pair(first, second); } @@ -128,23 +258,23 @@ class MapPair { template class Map { public: - typedef Key key_type; - typedef T mapped_type; - typedef MapPair value_type; + using key_type = Key; + using mapped_type = T; + using value_type = MapPair; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef value_type& reference; - typedef const value_type& const_reference; + using pointer = value_type*; + using const_pointer = const value_type*; + using reference = value_type&; + using const_reference = const value_type&; - typedef size_t size_type; - typedef hash hasher; + using size_type = size_t; + using hasher = hash; - Map() : arena_(NULL), default_enum_value_(0) { Init(); } + Map() : arena_(nullptr), default_enum_value_(0) { Init(); } explicit Map(Arena* arena) : arena_(arena), default_enum_value_(0) { Init(); } Map(const Map& other) - : arena_(NULL), default_enum_value_(other.default_enum_value_) { + : arena_(nullptr), default_enum_value_(other.default_enum_value_) { Init(); insert(other.begin(), other.end()); } @@ -169,138 +299,44 @@ class Map { template Map(const InputIt& first, const InputIt& last) - : arena_(NULL), default_enum_value_(0) { + : arena_(nullptr), default_enum_value_(0) { Init(); insert(first, last); } ~Map() { clear(); - if (arena_ == NULL) { + if (arena_ == nullptr) { delete elements_; } } private: - void Init() { - elements_ = - Arena::Create(arena_, 0u, hasher(), Allocator(arena_)); - } + void Init() { elements_ = Arena::CreateMessage(arena_, 0u); } - // re-implement std::allocator to use arena allocator for memory allocation. - // Used for Map implementation. Users should not use this class - // directly. - template - class MapAllocator { - public: - typedef U value_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - - MapAllocator() : arena_(NULL) {} - explicit MapAllocator(Arena* arena) : arena_(arena) {} - template - MapAllocator(const MapAllocator& allocator) - : arena_(allocator.arena()) {} - - pointer allocate(size_type n, const void* /* hint */ = 0) { - // If arena is not given, malloc needs to be called which doesn't - // construct element object. - if (arena_ == NULL) { - return static_cast(::operator new(n * sizeof(value_type))); - } else { - return reinterpret_cast( - Arena::CreateArray(arena_, n * sizeof(value_type))); - } - } - - void deallocate(pointer p, size_type n) { - if (arena_ == NULL) { -#if defined(__GXX_DELETE_WITH_SIZE__) || defined(__cpp_sized_deallocation) - ::operator delete(p, n * sizeof(value_type)); -#else - (void)n; - ::operator delete(p); -#endif - } - } - -#if __cplusplus >= 201103L && !defined(GOOGLE_PROTOBUF_OS_APPLE) && \ - !defined(GOOGLE_PROTOBUF_OS_NACL) && \ - !defined(GOOGLE_PROTOBUF_OS_EMSCRIPTEN) - template - void construct(NodeType* p, Args&&... args) { - // Clang 3.6 doesn't compile static casting to void* directly. (Issue - // #1266) According C++ standard 5.2.9/1: "The static_cast operator shall - // not cast away constness". So first the maybe const pointer is casted to - // const void* and after the const void* is const casted. - new (const_cast(static_cast(p))) - NodeType(std::forward(args)...); - } - - template - void destroy(NodeType* p) { - p->~NodeType(); - } -#else - void construct(pointer p, const_reference t) { new (p) value_type(t); } - - void destroy(pointer p) { p->~value_type(); } -#endif - - template - struct rebind { - typedef MapAllocator other; - }; - - template - bool operator==(const MapAllocator& other) const { - return arena_ == other.arena_; - } - - template - bool operator!=(const MapAllocator& other) const { - return arena_ != other.arena_; - } - - // To support Visual Studio 2008 - size_type max_size() const { - // parentheses around (std::...:max) prevents macro warning of max() - return (std::numeric_limits::max)(); - } - - // To support gcc-4.4, which does not properly - // support templated friend classes - Arena* arena() const { return arena_; } - - private: - typedef void DestructorSkippable_; - Arena* const arena_; - }; - - // InnerMap's key type is Key and its value type is value_type*. We use a - // custom class here and for Node, below, to ensure that k_ is at offset 0, - // allowing safe conversion from pointer to Node to pointer to Key, and vice - // versa when appropriate. + // InnerMap's key type is TrivialKey and its value type is value_type*. We + // use a custom class here and for Node, below, to ensure that k_ is at offset + // 0, allowing safe conversion from pointer to Node to pointer to TrivialKey, + // and vice versa when appropriate. We use GetTrivialKey to adapt Key to + // be a trivially destructible view if Key is not already trivially + // destructible. This view points into the Key inside v_ once it's + // initialized. + using TrivialKey = typename internal::GetTrivialKey::type; class KeyValuePair { public: - KeyValuePair(const Key& k, value_type* v) : k_(k), v_(v) {} + KeyValuePair(const TrivialKey& k, value_type* v) : k_(k), v_(v) {} - const Key& key() const { return k_; } - Key& key() { return k_; } + const TrivialKey& key() const { return k_; } + TrivialKey& key() { return k_; } value_type* value() const { return v_; } value_type*& value() { return v_; } private: - Key k_; + TrivialKey k_; value_type* v_; }; - typedef MapAllocator Allocator; + using Allocator = internal::MapAllocator; // InnerMap is a generic hash-based map. It doesn't contain any // protocol-buffer-specific logic. It is a chaining hash map with the @@ -317,7 +353,7 @@ class Map { // 2. The number of buckets is a power of two. // 3. Buckets are converted to trees in pairs: if we convert bucket b then // buckets b and b^1 will share a tree. Invariant: buckets b and b^1 have - // the same non-NULL value iff they are sharing a tree. (An alternative + // the same non-null value iff they are sharing a tree. (An alternative // implementation strategy would be to have a tag bit per bucket.) // 4. As is typical for hash_map and such, the Keys and Values are always // stored in linked list nodes. Pointers to elements are never invalidated @@ -327,27 +363,36 @@ class Map { // 6. Once we've tree-converted a bucket, it is never converted back. However, // the items a tree contains may wind up assigned to trees or lists upon a // rehash. - // 7. The code requires no C++ features from C++11 or later. + // 7. The code requires no C++ features from C++14 or later. // 8. Mutations to a map do not invalidate the map's iterators, pointers to // elements, or references to elements. // 9. Except for erase(iterator), any non-const method can reorder iterators. + // 10. InnerMap's key is TrivialKey, which is either Key, if Key is trivially + // destructible, or a trivially destructible view of Key otherwise. This + // allows InnerMap's destructor to be skipped when InnerMap is + // arena-allocated. class InnerMap : private hasher { public: - typedef value_type* Value; + using Value = value_type*; - InnerMap(size_type n, hasher h, Allocator alloc) - : hasher(h), + explicit InnerMap(size_type n) : InnerMap(nullptr, n) {} + InnerMap(Arena* arena, size_type n) + : hasher(), num_elements_(0), seed_(Seed()), - table_(NULL), - alloc_(alloc) { + table_(nullptr), + alloc_(arena) { n = TableSize(n); table_ = CreateEmptyTable(n); num_buckets_ = index_of_first_non_null_ = n; + static_assert( + std::is_trivially_destructible::value, + "We require KeyValuePair to be trivially destructible so that we can " + "skip InnerMap's destructor when it's arena allocated."); } ~InnerMap() { - if (table_ != NULL) { + if (table_ != nullptr) { clear(); Dealloc(table_, num_buckets_); } @@ -364,36 +409,36 @@ class Map { // This is safe only if the given pointer is known to point to a Key that is // part of a Node. - static Node* NodePtrFromKeyPtr(Key* k) { + static Node* NodePtrFromKeyPtr(TrivialKey* k) { return reinterpret_cast(k); } - static Key* KeyPtrFromNodePtr(Node* node) { return &node->kv.key(); } + static TrivialKey* KeyPtrFromNodePtr(Node* node) { return &node->kv.key(); } // Trees. The payload type is pointer to Key, so that we can query the tree // with Keys that are not in any particular data structure. When we insert, // though, the pointer is always pointing to a Key that is inside a Node. - struct KeyCompare { - bool operator()(const Key* n0, const Key* n1) const { return *n0 < *n1; } - }; - typedef typename Allocator::template rebind::other KeyPtrAllocator; - typedef std::set Tree; - typedef typename Tree::iterator TreeIterator; + using KeyPtrAllocator = + typename Allocator::template rebind::other; + using Tree = std::set, + KeyPtrAllocator>; + using TreeIterator = typename Tree::iterator; // iterator and const_iterator are instantiations of iterator_base. template - struct iterator_base { - typedef KeyValueType& reference; - typedef KeyValueType* pointer; + class iterator_base { + public: + using reference = KeyValueType&; + using pointer = KeyValueType*; // Invariants: // node_ is always correct. This is handy because the most common // operations are operator* and operator-> and they only use node_. - // When node_ is set to a non-NULL value, all the other non-const fields + // When node_ is set to a non-null value, all the other non-const fields // are updated to be correct also, but those fields can become stale // if the underlying map is modified. When those fields are needed they // are rechecked, and updated if necessary. - iterator_base() : node_(NULL), m_(NULL), bucket_index_(0) {} + iterator_base() : node_(nullptr), m_(nullptr), bucket_index_(0) {} explicit iterator_base(const InnerMap* m) : m_(m) { SearchFrom(m->index_of_first_non_null_); @@ -417,11 +462,11 @@ class Map { } // Advance through buckets, looking for the first that isn't empty. - // If nothing non-empty is found then leave node_ == NULL. + // If nothing non-empty is found then leave node_ == nullptr. void SearchFrom(size_type start_bucket) { GOOGLE_DCHECK(m_->index_of_first_non_null_ == m_->num_buckets_ || - m_->table_[m_->index_of_first_non_null_] != NULL); - node_ = NULL; + m_->table_[m_->index_of_first_non_null_] != nullptr); + node_ = nullptr; for (bucket_index_ = start_bucket; bucket_index_ < m_->num_buckets_; bucket_index_++) { if (m_->TableEntryIsNonEmptyList(bucket_index_)) { @@ -447,7 +492,7 @@ class Map { } iterator_base& operator++() { - if (node_->next == NULL) { + if (node_->next == nullptr) { TreeIterator tree_it; const bool is_list = revalidate_if_necessary(&tree_it); if (is_list) { @@ -473,12 +518,12 @@ class Map { return tmp; } - // Assumes node_ and m_ are correct and non-NULL, but other fields may be + // Assumes node_ and m_ are correct and non-null, but other fields may be // stale. Fix them as needed. Then return true iff node_ points to a // Node in a list. If false is returned then *it is modified to be // a valid iterator for node_. bool revalidate_if_necessary(TreeIterator* it) { - GOOGLE_DCHECK(node_ != NULL && m_ != NULL); + GOOGLE_DCHECK(node_ != nullptr && m_ != nullptr); // Force bucket_index_ to be in range. bucket_index_ &= (m_->num_buckets_ - 1); // Common case: the bucket we think is relevant points to node_. @@ -487,7 +532,7 @@ class Map { // but not at the head. if (m_->TableEntryIsNonEmptyList(bucket_index_)) { Node* l = static_cast(m_->table_[bucket_index_]); - while ((l = l->next) != NULL) { + while ((l = l->next) != nullptr) { if (l == node_) { return true; } @@ -496,7 +541,7 @@ class Map { // Well, bucket_index_ still might be correct, but probably // not. Revalidate just to be sure. This case is rare enough that we // don't worry about potential optimizations, such as having a custom - // find-like method that compares Node* instead of const Key&. + // find-like method that compares Node* instead of TrivialKey. iterator_base i(m_->find(*KeyPtrFromNodePtr(node_), it)); bucket_index_ = i.bucket_index_; return m_->TableEntryIsList(bucket_index_); @@ -508,8 +553,8 @@ class Map { }; public: - typedef iterator_base iterator; - typedef iterator_base const_iterator; + using iterator = iterator_base; + using const_iterator = iterator_base; iterator begin() { return iterator(this); } iterator end() { return iterator(); } @@ -520,16 +565,16 @@ class Map { for (size_type b = 0; b < num_buckets_; b++) { if (TableEntryIsNonEmptyList(b)) { Node* node = static_cast(table_[b]); - table_[b] = NULL; + table_[b] = nullptr; do { Node* next = node->next; DestroyNode(node); node = next; - } while (node != NULL); + } while (node != nullptr); } else if (TableEntryIsTree(b)) { Tree* tree = static_cast(table_[b]); GOOGLE_DCHECK(table_[b] == table_[b + 1] && (b & 1) == 0); - table_[b] = table_[b + 1] = NULL; + table_[b] = table_[b + 1] = nullptr; typename Tree::iterator tree_it = tree->begin(); do { Node* node = NodePtrFromKeyPtr(*tree_it); @@ -555,15 +600,15 @@ class Map { size_type size() const { return num_elements_; } bool empty() const { return size() == 0; } - iterator find(const Key& k) { return iterator(FindHelper(k).first); } - const_iterator find(const Key& k) const { return find(k, NULL); } - bool contains(const Key& k) const { return find(k) != end(); } + iterator find(const TrivialKey& k) { return iterator(FindHelper(k).first); } + const_iterator find(const TrivialKey& k) const { return find(k, nullptr); } + bool contains(const TrivialKey& k) const { return find(k) != end(); } // In traditional C++ style, this performs "insert if not present." std::pair insert(const KeyValuePair& kv) { std::pair p = FindHelper(kv.key()); // Case 1: key was already present. - if (p.first.node_ != NULL) + if (p.first.node_ != nullptr) return std::make_pair(iterator(p.first), false); // Case 2: insert. if (ResizeIfLoadIsOutOfRange(num_elements_ + 1)) { @@ -579,10 +624,10 @@ class Map { // The same, but if an insertion is necessary then the value portion of the // inserted key-value pair is left uninitialized. - std::pair insert(const Key& k) { + std::pair insert(const TrivialKey& k) { std::pair p = FindHelper(k); // Case 1: key was already present. - if (p.first.node_ != NULL) + if (p.first.node_ != nullptr) return std::make_pair(iterator(p.first), false); // Case 2: insert. if (ResizeIfLoadIsOutOfRange(num_elements_ + 1)) { @@ -590,16 +635,19 @@ class Map { } const size_type b = p.second; // bucket number Node* node = Alloc(1); - typedef typename Allocator::template rebind::other KeyAllocator; + using KeyAllocator = + typename Allocator::template rebind::other; KeyAllocator(alloc_).construct(&node->kv.key(), k); iterator result = InsertUnique(b, node); ++num_elements_; return std::make_pair(result, true); } - Value& operator[](const Key& k) { + // Returns iterator so that outer map can update the TrivialKey to point to + // the Key inside value_type in case TrivialKey is a view type. + iterator operator[](const TrivialKey& k) { KeyValuePair kv(k, Value()); - return insert(kv).first->value(); + return insert(kv).first; } void erase(iterator it) { @@ -622,27 +670,27 @@ class Map { // only because we want index_of_first_non_null_ to be correct. b &= ~static_cast(1); DestroyTree(tree); - table_[b] = table_[b + 1] = NULL; + table_[b] = table_[b + 1] = nullptr; } } DestroyNode(item); --num_elements_; if (PROTOBUF_PREDICT_FALSE(b == index_of_first_non_null_)) { while (index_of_first_non_null_ < num_buckets_ && - table_[index_of_first_non_null_] == NULL) { + table_[index_of_first_non_null_] == nullptr) { ++index_of_first_non_null_; } } } private: - const_iterator find(const Key& k, TreeIterator* it) const { + const_iterator find(const TrivialKey& k, TreeIterator* it) const { return FindHelper(k, it).first; } - std::pair FindHelper(const Key& k) const { - return FindHelper(k, NULL); + std::pair FindHelper(const TrivialKey& k) const { + return FindHelper(k, nullptr); } - std::pair FindHelper(const Key& k, + std::pair FindHelper(const TrivialKey& k, TreeIterator* it) const { size_type b = BucketNumber(k); if (TableEntryIsNonEmptyList(b)) { @@ -653,15 +701,15 @@ class Map { } else { node = node->next; } - } while (node != NULL); + } while (node != nullptr); } else if (TableEntryIsTree(b)) { GOOGLE_DCHECK_EQ(table_[b], table_[b ^ 1]); b &= ~static_cast(1); Tree* tree = static_cast(table_[b]); - Key* key = const_cast(&k); + TrivialKey* key = const_cast(&k); typename Tree::iterator tree_it = tree->find(key); if (tree_it != tree->end()) { - if (it != NULL) *it = tree_it; + if (it != nullptr) *it = tree_it; return std::make_pair(const_iterator(tree_it, this, b), b); } } @@ -674,7 +722,7 @@ class Map { // bucket. num_elements_ is not modified. iterator InsertUnique(size_type b, Node* node) { GOOGLE_DCHECK(index_of_first_non_null_ == num_buckets_ || - table_[index_of_first_non_null_] != NULL); + table_[index_of_first_non_null_] != nullptr); // In practice, the code that led to this point may have already // determined whether we are inserting into an empty list, a short list, // or whatever. But it's probably cheap enough to recompute that here; @@ -716,8 +764,8 @@ class Map { // Tree. iterator InsertUniqueInTree(size_type b, Node* node) { GOOGLE_DCHECK_EQ(table_[b], table_[b ^ 1]); - // Maintain the invariant that node->next is NULL for all Nodes in Trees. - node->next = NULL; + // Maintain the invariant that node->next is null for all Nodes in Trees. + node->next = nullptr; return iterator( static_cast(table_[b])->insert(KeyPtrFromNodePtr(node)).first, this, b & ~static_cast(1)); @@ -789,7 +837,7 @@ class Map { Node* next = node->next; InsertUnique(BucketNumber(*KeyPtrFromNodePtr(node)), node); node = next; - } while (node != NULL); + } while (node != nullptr); } void TransferTree(void* const* table, size_type index) { @@ -824,10 +872,10 @@ class Map { return TableEntryIsList(table_, b); } static bool TableEntryIsEmpty(void* const* table, size_type b) { - return table[b] == NULL; + return table[b] == nullptr; } static bool TableEntryIsNonEmptyList(void* const* table, size_type b) { - return table[b] != NULL && table[b] != table[b ^ 1]; + return table[b] != nullptr && table[b] != table[b ^ 1]; } static bool TableEntryIsTree(void* const* table, size_type b) { return !TableEntryIsEmpty(table, b) && @@ -845,8 +893,8 @@ class Map { // create a temporary and use the two-arg construct that's known to exist. // It's clunky, but the compiler should be able to generate more-or-less // the same code. - tree_allocator.construct(tree, - Tree(KeyCompare(), KeyPtrAllocator(alloc_))); + tree_allocator.construct( + tree, Tree(typename Tree::key_compare(), KeyPtrAllocator(alloc_))); // Now the tree is ready to use. size_type count = CopyListToTree(b, tree) + CopyListToTree(b ^ 1, tree); GOOGLE_DCHECK_EQ(count, tree->size()); @@ -858,11 +906,11 @@ class Map { size_type CopyListToTree(size_type b, Tree* tree) { size_type count = 0; Node* node = static_cast(table_[b]); - while (node != NULL) { + while (node != nullptr) { tree->insert(KeyPtrFromNodePtr(node)); ++count; Node* next = node->next; - node->next = NULL; + node->next = nullptr; node = next; } return count; @@ -877,20 +925,19 @@ class Map { do { ++count; node = node->next; - } while (node != NULL); + } while (node != nullptr); // Invariant: no linked list ever is more than kMaxLength in length. GOOGLE_DCHECK_LE(count, kMaxLength); return count >= kMaxLength; } - size_type BucketNumber(const Key& k) const { - // We inherit from hasher, so one-arg operator() provides a hash function. - size_type h = (*const_cast(this))(k); + size_type BucketNumber(const TrivialKey& k) const { + size_type h = hash_function()(k); return (h + seed_) & (num_buckets_ - 1); } - bool IsMatch(const Key& k0, const Key& k1) const { - return std::equal_to()(k0, k1); + bool IsMatch(const TrivialKey& k0, const TrivialKey& k1) const { + return k0 == k1; } // Return a power of two no less than max(kMinTableSize, n). @@ -904,14 +951,14 @@ class Map { // Use alloc_ to allocate an array of n objects of type U. template U* Alloc(size_type n) { - typedef typename Allocator::template rebind::other alloc_type; + using alloc_type = typename Allocator::template rebind::other; return alloc_type(alloc_).allocate(n); } // Use alloc_ to deallocate an array of n objects of type U. template void Dealloc(U* t, size_type n) { - typedef typename Allocator::template rebind::other alloc_type; + using alloc_type = typename Allocator::template rebind::other; alloc_type(alloc_).deallocate(t, n); } @@ -937,7 +984,8 @@ class Map { // Return a randomish value. size_type Seed() const { size_type s = static_cast(reinterpret_cast(this)); -#if defined(__x86_64__) && defined(__GNUC__) +#if defined(__x86_64__) && defined(__GNUC__) && \ + !defined(GOOGLE_PROTOBUF_NO_RDTSC) uint32 hi, lo; asm("rdtsc" : "=a"(lo), "=d"(hi)); s += ((static_cast(hi) << 32) | lo); @@ -945,6 +993,10 @@ class Map { return s; } + friend class Arena; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + size_type num_elements_; size_type num_buckets_; size_type seed_; @@ -957,14 +1009,14 @@ class Map { public: // Iterators class const_iterator { - typedef typename InnerMap::const_iterator InnerIt; + using InnerIt = typename InnerMap::const_iterator; public: - typedef std::forward_iterator_tag iterator_category; - typedef typename Map::value_type value_type; - typedef ptrdiff_t difference_type; - typedef const value_type* pointer; - typedef const value_type& reference; + using iterator_category = std::forward_iterator_tag; + using value_type = typename Map::value_type; + using difference_type = ptrdiff_t; + using pointer = const value_type*; + using reference = const value_type&; const_iterator() {} explicit const_iterator(const InnerIt& it) : it_(it) {} @@ -990,14 +1042,14 @@ class Map { }; class iterator { - typedef typename InnerMap::iterator InnerIt; + using InnerIt = typename InnerMap::iterator; public: - typedef std::forward_iterator_tag iterator_category; - typedef typename Map::value_type value_type; - typedef ptrdiff_t difference_type; - typedef value_type* pointer; - typedef value_type& reference; + using iterator_category = std::forward_iterator_tag; + using value_type = typename Map::value_type; + using difference_type = ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; iterator() {} explicit iterator(const InnerIt& it) : it_(it) {} @@ -1012,7 +1064,7 @@ class Map { iterator operator++(int) { return iterator(it_++); } // Allow implicit conversion to const_iterator. - operator const_iterator() const { + operator const_iterator() const { // NOLINT(runtime/explicit) return const_iterator(typename InnerMap::const_iterator(it_)); } @@ -1046,9 +1098,12 @@ class Map { // Element access T& operator[](const key_type& key) { - value_type** value = &(*elements_)[key]; - if (*value == NULL) { + typename InnerMap::iterator it = (*elements_)[key]; + value_type** value = &it->value(); + if (*value == nullptr) { *value = CreateValueTypeInternal(key); + // We need to update the key in case it's a view type. + it->key() = (*value)->first; internal::MapValueInitializer::value, T>::Initialize( (*value)->second, default_enum_value_); } @@ -1102,6 +1157,8 @@ class Map { elements_->insert(value.first); if (p.second) { p.first->value() = CreateValueTypeInternal(value); + // We need to update the key in case it's a view type. + p.first->key() = p.first->value()->first; } return std::pair(iterator(p.first), p.second); } @@ -1129,9 +1186,12 @@ class Map { } } iterator erase(iterator pos) { - if (arena_ == NULL) delete pos.operator->(); + value_type* value = pos.operator->(); iterator i = pos++; elements_->erase(i.it_); + // Note: we need to delete the value after erasing from the inner map + // because the inner map's key may be a view of the value's key. + if (arena_ == nullptr) delete value; return pos; } void erase(iterator first, iterator last) { @@ -1175,27 +1235,26 @@ class Map { } value_type* CreateValueTypeInternal(const Key& key) { - if (arena_ == NULL) { + if (arena_ == nullptr) { return new value_type(key); } else { value_type* value = reinterpret_cast( Arena::CreateArray(arena_, sizeof(value_type))); - Arena::CreateInArenaStorage(const_cast(&value->first), arena_); + Arena::CreateInArenaStorage(const_cast(&value->first), arena_, key); Arena::CreateInArenaStorage(&value->second, arena_); - const_cast(value->first) = key; return value; } } value_type* CreateValueTypeInternal(const value_type& value) { - if (arena_ == NULL) { + if (arena_ == nullptr) { return new value_type(value); } else { value_type* p = reinterpret_cast( Arena::CreateArray(arena_, sizeof(value_type))); - Arena::CreateInArenaStorage(const_cast(&p->first), arena_); + Arena::CreateInArenaStorage(const_cast(&p->first), arena_, + value.first); Arena::CreateInArenaStorage(&p->second, arena_); - const_cast(p->first) = value.first; p->second = value.second; return p; } @@ -1206,8 +1265,8 @@ class Map { InnerMap* elements_; friend class Arena; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; template #include #include -#include #include #include #include @@ -101,6 +100,10 @@ class MapEntry : MapEntryImpl(arena), _internal_metadata_(arena) {} + ~MapEntry() { + Message::_internal_metadata_.Delete(); + _internal_metadata_.Delete(); + } typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -118,7 +121,7 @@ class MapEntry return size; } - InternalMetadataWithArena _internal_metadata_; + InternalMetadata _internal_metadata_; private: friend class ::PROTOBUF_NAMESPACE_ID::Arena; @@ -126,7 +129,6 @@ class MapEntry WireFormatLite::FieldType k_wire_type, WireFormatLite::FieldType, int default_enum> friend class internal::MapField; - friend class internal::GeneratedMessageReflection; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapEntry); }; @@ -151,9 +153,9 @@ template > { typedef K Key; typedef V Value; - static const WireFormatLite::FieldType kKeyFieldType = key; - static const WireFormatLite::FieldType kValueFieldType = value; - static const int default_enum_value = default_enum; + static constexpr WireFormatLite::FieldType kKeyFieldType = key; + static constexpr WireFormatLite::FieldType kValueFieldType = value; + static constexpr int default_enum_value = default_enum; }; } // namespace internal diff --git a/third_party/protobuf/src/google/protobuf/map_entry_lite.h b/third_party/protobuf/src/google/protobuf/map_entry_lite.h index c7d7558b..7125ba18 100644 --- a/third_party/protobuf/src/google/protobuf/map_entry_lite.h +++ b/third_party/protobuf/src/google/protobuf/map_entry_lite.h @@ -101,6 +101,44 @@ struct MoveHelper { // strings and similar } }; +// Functions for operating on a map entry. Does not contain any representation +// (this class is not intended to be instantiated). +template +struct MapEntryFuncs { + typedef MapTypeHandler KeyTypeHandler; + typedef MapTypeHandler ValueTypeHandler; + static const int kKeyFieldNumber = 1; + static const int kValueFieldNumber = 2; + + static uint8* InternalSerialize(int field_number, const Key& key, + const Value& value, uint8* ptr, + io::EpsCopyOutputStream* stream) { + ptr = stream->EnsureSpace(ptr); + ptr = WireFormatLite::WriteTagToArray( + field_number, WireFormatLite::WIRETYPE_LENGTH_DELIMITED, ptr); + ptr = io::CodedOutputStream::WriteVarint32ToArray(GetCachedSize(key, value), + ptr); + + ptr = KeyTypeHandler::Write(kKeyFieldNumber, key, ptr, stream); + return ValueTypeHandler::Write(kValueFieldNumber, value, ptr, stream); + } + + static size_t ByteSizeLong(const Key& key, const Value& value) { + // Tags for key and value will both be one byte (field numbers 1 and 2). + size_t inner_length = + 2 + KeyTypeHandler::ByteSize(key) + ValueTypeHandler::ByteSize(value); + return inner_length + io::CodedOutputStream::VarintSize32( + static_cast(inner_length)); + } + + static int GetCachedSize(const Key& key, const Value& value) { + // Tags for key and value will both be one byte (field numbers 1 and 2). + return 2 + KeyTypeHandler::GetCachedSize(key) + + ValueTypeHandler::GetCachedSize(value); + } +}; + // MapEntryImpl is used to implement parsing and serialization of map entries. // It uses Curious Recursive Template Pattern (CRTP) to provide the type of // the eventual code to the template code. @@ -108,6 +146,9 @@ template class MapEntryImpl : public Base { + public: + typedef MapEntryFuncs Funcs; + protected: // Provide utilities to parse/serialize key/value. Provide utilities to // manipulate internal stored type. @@ -146,14 +187,14 @@ class MapEntryImpl : public Base { static const WireFormatLite::FieldType kEntryValueFieldType = kValueFieldType; static const int kEntryDefaultEnumValue = default_enum_value; - MapEntryImpl() : arena_(NULL) { + MapEntryImpl() { KeyTypeHandler::Initialize(&key_, NULL); ValueTypeHandler::InitializeMaybeByDefaultEnum(&value_, default_enum_value, NULL); _has_bits_[0] = 0; } - explicit MapEntryImpl(Arena* arena) : arena_(arena) { + explicit MapEntryImpl(Arena* arena) : Base(arena) { KeyTypeHandler::Initialize(&key_, arena); ValueTypeHandler::InitializeMaybeByDefaultEnum(&value_, default_enum_value, arena); @@ -161,7 +202,7 @@ class MapEntryImpl : public Base { } ~MapEntryImpl() { - if (GetArenaNoVirtual() != NULL) return; + if (Base::GetArena() != NULL) return; KeyTypeHandler::DeleteNoArena(key_); ValueTypeHandler::DeleteNoArena(value_); } @@ -177,11 +218,11 @@ class MapEntryImpl : public Base { } inline KeyMapEntryAccessorType* mutable_key() { set_has_key(); - return KeyTypeHandler::EnsureMutable(&key_, GetArenaNoVirtual()); + return KeyTypeHandler::EnsureMutable(&key_, Base::GetArena()); } inline ValueMapEntryAccessorType* mutable_value() { set_has_value(); - return ValueTypeHandler::EnsureMutable(&value_, GetArenaNoVirtual()); + return ValueTypeHandler::EnsureMutable(&value_, Base::GetArena()); } // implements MessageLite ========================================= @@ -194,7 +235,6 @@ class MapEntryImpl : public Base { MergeFromInternal(*::google::protobuf::internal::DownCast(&other)); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ParseContext* ctx) final { while (!ctx->Done(&ptr)) { uint32 tag; @@ -216,53 +256,13 @@ class MapEntryImpl : public Base { ctx->SetLastTag(tag); return ptr; } - ptr = UnknownFieldParse(tag, static_cast(nullptr), ptr, ctx); + ptr = UnknownFieldParse(tag, static_cast(nullptr), ptr, + ctx); } GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); } return ptr; } -#else - bool MergePartialFromCodedStream(io::CodedInputStream* input) override { - uint32 tag; - - for (;;) { - // 1) corrupted data: return false; - // 2) unknown field: skip without putting into unknown field set; - // 3) unknown enum value: keep it in parsing. In proto2, caller should - // check the value and put this entry into containing message's unknown - // field set if the value is an unknown enum. In proto3, caller doesn't - // need to care whether the value is unknown enum; - // 4) missing key/value: missed key/value will have default value. caller - // should take this entry as if key/value is set to default value. - tag = input->ReadTagNoLastTag(); - switch (tag) { - case kKeyTag: - if (!KeyTypeHandler::Read(input, mutable_key())) { - return false; - } - set_has_key(); - break; - - case kValueTag: - if (!ValueTypeHandler::Read(input, mutable_value())) { - return false; - } - set_has_value(); - if (input->ExpectAtEnd()) return true; - break; - - default: - if (tag == 0 || WireFormatLite::GetTagWireType(tag) == - WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - if (!WireFormatLite::SkipField(input, tag)) return false; - break; - } - } - } -#endif size_t ByteSizeLong() const override { size_t size = 0; @@ -276,16 +276,10 @@ class MapEntryImpl : public Base { return size; } - void SerializeWithCachedSizes(io::CodedOutputStream* output) const override { - KeyTypeHandler::Write(kKeyFieldNumber, key(), output); - ValueTypeHandler::Write(kValueFieldNumber, value(), output); - } - - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const override { - output = KeyTypeHandler::WriteToArray(kKeyFieldNumber, key(), output); - output = ValueTypeHandler::WriteToArray(kValueFieldNumber, value(), output); - return output; + ::google::protobuf::uint8* _InternalSerialize(::google::protobuf::uint8* ptr, + io::EpsCopyOutputStream* stream) const override { + ptr = KeyTypeHandler::Write(kKeyFieldNumber, key(), ptr, stream); + return ValueTypeHandler::Write(kValueFieldNumber, value(), ptr, stream); } // Don't override SerializeWithCachedSizesToArray. Use MessageLite's. @@ -321,13 +315,13 @@ class MapEntryImpl : public Base { void MergeFromInternal(const MapEntryImpl& from) { if (from._has_bits_[0]) { if (from.has_key()) { - KeyTypeHandler::EnsureMutable(&key_, GetArenaNoVirtual()); - KeyTypeHandler::Merge(from.key(), &key_, GetArenaNoVirtual()); + KeyTypeHandler::EnsureMutable(&key_, Base::GetArena()); + KeyTypeHandler::Merge(from.key(), &key_, Base::GetArena()); set_has_key(); } if (from.has_value()) { - ValueTypeHandler::EnsureMutable(&value_, GetArenaNoVirtual()); - ValueTypeHandler::Merge(from.value(), &value_, GetArenaNoVirtual()); + ValueTypeHandler::EnsureMutable(&value_, Base::GetArena()); + ValueTypeHandler::Merge(from.value(), &value_, Base::GetArena()); set_has_value(); } } @@ -335,8 +329,8 @@ class MapEntryImpl : public Base { public: void Clear() override { - KeyTypeHandler::Clear(&key_, GetArenaNoVirtual()); - ValueTypeHandler::ClearMaybeByDefaultEnum(&value_, GetArenaNoVirtual(), + KeyTypeHandler::Clear(&key_, Base::GetArena()); + ValueTypeHandler::ClearMaybeByDefaultEnum(&value_, Base::GetArena(), default_enum_value); clear_has_key(); clear_has_value(); @@ -348,22 +342,6 @@ class MapEntryImpl : public Base { ValueTypeHandler::AssignDefaultValue(&d->value_); } - Arena* GetArena() const override { return GetArenaNoVirtual(); } - - // Create a MapEntryImpl for given key and value from Map in - // serialization. This function is only called when value is enum. Enum is - // treated differently because its type in MapEntry is int and its type in - // Map is enum. We cannot create a reference to int from an enum. - static Derived* EnumWrap(const Key& key, const Value value, Arena* arena) { - return Arena::CreateMessage(arena, key, value); - } - - // Like above, but for all the other types. This avoids value copy to create - // MapEntryImpl from Map in serialization. - static Derived* Wrap(const Key& key, const Value& value, Arena* arena) { - return Arena::CreateMessage(arena, key, value); - } - // Parsing using MergePartialFromCodedStream, above, is not as // efficient as it could be. This helper class provides a speedier way. template @@ -460,10 +438,10 @@ class MapEntryImpl : public Base { return ptr; } - template + template const char* ParseWithEnumValidation(const char* ptr, ParseContext* ctx, bool (*is_valid)(int), uint32 field_num, - Metadata* metadata) { + InternalMetadata* metadata) { auto entry = NewEntry(); ptr = entry->_InternalParse(ptr, ctx); if (!ptr) return nullptr; @@ -471,7 +449,7 @@ class MapEntryImpl : public Base { UseKeyAndValueFromEntry(); } else { WriteLengthDelimited(field_num, entry->SerializeAsString(), - metadata->mutable_unknown_fields()); + metadata->mutable_unknown_fields()); } return ptr; } @@ -535,77 +513,11 @@ class MapEntryImpl : public Base { void clear_has_value() { _has_bits_[0] &= ~0x00000002u; } public: - // Serializing a generated message containing map field involves serializing - // key-value pairs from Map. The wire format of each key-value pair - // after serialization should be the same as that of a MapEntry message - // containing the same key and value inside it. However, Map doesn't - // store key and value as MapEntry message, which disables us to use existing - // code to serialize message. In order to use existing code to serialize - // message, we need to construct a MapEntry from key-value pair. But it - // involves copy of key and value to construct a MapEntry. In order to avoid - // this copy in constructing a MapEntry, we need the following class which - // only takes references of given key and value. - class MapEntryWrapper : public Derived { - typedef Derived BaseClass; - typedef typename BaseClass::KeyMapEntryAccessorType KeyMapEntryAccessorType; - typedef - typename BaseClass::ValueMapEntryAccessorType ValueMapEntryAccessorType; - - public: - MapEntryWrapper(Arena* arena, const Key& key, const Value& value) - : Derived(arena), key_(key), value_(value) { - BaseClass::set_has_key(); - BaseClass::set_has_value(); - } - inline const KeyMapEntryAccessorType& key() const override { return key_; } - inline const ValueMapEntryAccessorType& value() const override { - return value_; - } - - private: - const Key& key_; - const Value& value_; - - friend class ::PROTOBUF_NAMESPACE_ID::Arena; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - }; - - // Like above, but for enum value only, which stores value instead of - // reference of value field inside. This is needed because the type of value - // field in constructor is an enum, while we need to store it as an int. If we - // initialize a reference to int with a reference to enum, compiler will - // generate a temporary int from enum and initialize the reference to int with - // the temporary. - class MapEnumEntryWrapper : public Derived { - typedef Derived BaseClass; - typedef typename BaseClass::KeyMapEntryAccessorType KeyMapEntryAccessorType; - typedef - typename BaseClass::ValueMapEntryAccessorType ValueMapEntryAccessorType; - - public: - MapEnumEntryWrapper(Arena* arena, const Key& key, const Value& value) - : Derived(arena), key_(key), value_(value) { - BaseClass::set_has_key(); - BaseClass::set_has_value(); - } - inline const KeyMapEntryAccessorType& key() const { return key_; } - inline const ValueMapEntryAccessorType& value() const { return value_; } - - private: - const KeyMapEntryAccessorType& key_; - const ValueMapEntryAccessorType value_; - - friend class ::PROTOBUF_NAMESPACE_ID::Arena; - typedef void DestructorSkippable_; - }; - - inline Arena* GetArenaNoVirtual() const { return arena_; } + inline Arena* GetArena() const { return Base::GetArena(); } public: // Needed for constructing tables KeyOnMemory key_; ValueOnMemory value_; - Arena* arena_; uint32 _has_bits_[1]; private: @@ -634,6 +546,7 @@ class MapEntryLite SuperType; MapEntryLite() {} explicit MapEntryLite(Arena* arena) : SuperType(arena) {} + ~MapEntryLite() { MessageLite::_internal_metadata_.Delete(); } void MergeFrom(const MapEntryLite& other) { MergeFromInternal(other); } private: @@ -743,7 +656,7 @@ struct MapEntryHelper::From(map_pair.first)), value_(FromHelper::From(map_pair.second)) {} - // Purposely not folowing the style guide naming. These are the names + // Purposely not following the style guide naming. These are the names // the proto compiler would generate given the map entry descriptor. // The proto compiler generates the offsets in this struct as if this was // a regular message. This way the table driven code barely notices it's diff --git a/third_party/protobuf/src/google/protobuf/map_field.cc b/third_party/protobuf/src/google/protobuf/map_field.cc index 2a71b6b5..0949f581 100644 --- a/third_party/protobuf/src/google/protobuf/map_field.cc +++ b/third_party/protobuf/src/google/protobuf/map_field.cc @@ -93,8 +93,6 @@ void MapFieldBase::SetRepeatedDirty() { state_.store(STATE_MODIFIED_REPEATED, std::memory_order_relaxed); } -void* MapFieldBase::MutableRepeatedPtrField() const { return repeated_field_; } - void MapFieldBase::SyncRepeatedFieldWithMap() const { // acquire here matches with release below to ensure that we can only see a // value of CLEAN after all previous changes have been synced. @@ -174,10 +172,13 @@ int DynamicMapField::size() const { return GetMap().size(); } void DynamicMapField::Clear() { Map* map = &const_cast(this)->map_; - for (Map::iterator iter = map->begin(); - iter != map->end(); ++iter) { - iter->second.DeleteData(); + if (MapFieldBase::arena_ == nullptr) { + for (Map::iterator iter = map->begin(); + iter != map->end(); ++iter) { + iter->second.DeleteData(); + } } + map->clear(); if (MapFieldBase::repeated_field_ != nullptr) { @@ -195,17 +196,16 @@ bool DynamicMapField::ContainsMapKey(const MapKey& map_key) const { } void DynamicMapField::AllocateMapValue(MapValueRef* map_val) { - const FieldDescriptor* val_des = - default_entry_->GetDescriptor()->FindFieldByName("value"); + const FieldDescriptor* val_des = default_entry_->GetDescriptor()->map_value(); map_val->SetType(val_des->cpp_type()); // Allocate memory for the MapValueRef, and initialize to // default value. switch (val_des->cpp_type()) { -#define HANDLE_TYPE(CPPTYPE, TYPE) \ - case FieldDescriptor::CPPTYPE_##CPPTYPE: { \ - TYPE* value = new TYPE(); \ - map_val->SetValue(value); \ - break; \ +#define HANDLE_TYPE(CPPTYPE, TYPE) \ + case FieldDescriptor::CPPTYPE_##CPPTYPE: { \ + TYPE* value = Arena::Create(MapFieldBase::arena_); \ + map_val->SetValue(value); \ + break; \ } HANDLE_TYPE(INT32, int32); HANDLE_TYPE(INT64, int64); @@ -220,7 +220,7 @@ void DynamicMapField::AllocateMapValue(MapValueRef* map_val) { case FieldDescriptor::CPPTYPE_MESSAGE: { const Message& message = default_entry_->GetReflection()->GetMessage(*default_entry_, val_des); - Message* value = message.New(); + Message* value = message.New(MapFieldBase::arena_); map_val->SetValue(value); break; } @@ -253,7 +253,9 @@ bool DynamicMapField::DeleteMapValue(const MapKey& map_key) { } // Set map dirty only if the delete is successful. MapFieldBase::SetMapDirty(); - iter->second.DeleteData(); + if (MapFieldBase::arena_ == nullptr) { + iter->second.DeleteData(); + } map_.erase(iter); return true; } @@ -283,7 +285,7 @@ void DynamicMapField::MergeFrom(const MapFieldBase& other) { Map* map = MutableMap(); const DynamicMapField& other_field = reinterpret_cast(other); - for (typename Map::const_iterator other_it = + for (Map::const_iterator other_it = other_field.map_.begin(); other_it != other_field.map_.end(); ++other_it) { Map::iterator iter = map->find(other_it->first); @@ -297,7 +299,7 @@ void DynamicMapField::MergeFrom(const MapFieldBase& other) { // Copy map value const FieldDescriptor* field_descriptor = - default_entry_->GetDescriptor()->FindFieldByName("value"); + default_entry_->GetDescriptor()->map_value(); switch (field_descriptor->cpp_type()) { case FieldDescriptor::CPPTYPE_INT32: { map_val->SetInt32Value(other_it->second.GetInt32Value()); @@ -357,10 +359,8 @@ void DynamicMapField::Swap(MapFieldBase* other) { void DynamicMapField::SyncRepeatedFieldWithMapNoLock() const { const Reflection* reflection = default_entry_->GetReflection(); - const FieldDescriptor* key_des = - default_entry_->GetDescriptor()->FindFieldByName("key"); - const FieldDescriptor* val_des = - default_entry_->GetDescriptor()->FindFieldByName("value"); + const FieldDescriptor* key_des = default_entry_->GetDescriptor()->map_key(); + const FieldDescriptor* val_des = default_entry_->GetDescriptor()->map_value(); if (MapFieldBase::repeated_field_ == NULL) { if (MapFieldBase::arena_ == NULL) { MapFieldBase::repeated_field_ = new RepeatedPtrField(); @@ -375,7 +375,7 @@ void DynamicMapField::SyncRepeatedFieldWithMapNoLock() const { for (Map::const_iterator it = map_.begin(); it != map_.end(); ++it) { - Message* new_entry = default_entry_->New(); + Message* new_entry = default_entry_->New(MapFieldBase::arena_); MapFieldBase::repeated_field_->AddAllocated(new_entry); const MapKey& map_key = it->first; switch (key_des->cpp_type()) { @@ -445,20 +445,21 @@ void DynamicMapField::SyncRepeatedFieldWithMapNoLock() const { void DynamicMapField::SyncMapWithRepeatedFieldNoLock() const { Map* map = &const_cast(this)->map_; const Reflection* reflection = default_entry_->GetReflection(); - const FieldDescriptor* key_des = - default_entry_->GetDescriptor()->FindFieldByName("key"); - const FieldDescriptor* val_des = - default_entry_->GetDescriptor()->FindFieldByName("value"); + const FieldDescriptor* key_des = default_entry_->GetDescriptor()->map_key(); + const FieldDescriptor* val_des = default_entry_->GetDescriptor()->map_value(); // DynamicMapField owns map values. Need to delete them before clearing // the map. - for (Map::iterator iter = map->begin(); - iter != map->end(); ++iter) { - iter->second.DeleteData(); + if (MapFieldBase::arena_ == nullptr) { + for (Map::iterator iter = map->begin(); + iter != map->end(); ++iter) { + iter->second.DeleteData(); + } } map->clear(); for (RepeatedPtrField::iterator it = MapFieldBase::repeated_field_->begin(); it != MapFieldBase::repeated_field_->end(); ++it) { + // MapKey type will be set later. MapKey map_key; switch (key_des->cpp_type()) { case FieldDescriptor::CPPTYPE_STRING: @@ -487,21 +488,23 @@ void DynamicMapField::SyncMapWithRepeatedFieldNoLock() const { break; } - // Remove existing map value with same key. - Map::iterator iter = map->find(map_key); - if (iter != map->end()) { - iter->second.DeleteData(); + if (MapFieldBase::arena_ == nullptr) { + // Remove existing map value with same key. + Map::iterator iter = map->find(map_key); + if (iter != map->end()) { + iter->second.DeleteData(); + } } MapValueRef& map_val = (*map)[map_key]; map_val.SetType(val_des->cpp_type()); switch (val_des->cpp_type()) { -#define HANDLE_TYPE(CPPTYPE, TYPE, METHOD) \ - case FieldDescriptor::CPPTYPE_##CPPTYPE: { \ - TYPE* value = new TYPE; \ - *value = reflection->Get##METHOD(*it, val_des); \ - map_val.SetValue(value); \ - break; \ +#define HANDLE_TYPE(CPPTYPE, TYPE, METHOD) \ + case FieldDescriptor::CPPTYPE_##CPPTYPE: { \ + TYPE* value = Arena::Create(MapFieldBase::arena_); \ + *value = reflection->Get##METHOD(*it, val_des); \ + map_val.SetValue(value); \ + break; \ } HANDLE_TYPE(INT32, int32, Int32); HANDLE_TYPE(INT64, int64, Int64); @@ -515,7 +518,7 @@ void DynamicMapField::SyncMapWithRepeatedFieldNoLock() const { #undef HANDLE_TYPE case FieldDescriptor::CPPTYPE_MESSAGE: { const Message& message = reflection->GetMessage(*it, val_des); - Message* value = message.New(); + Message* value = message.New(MapFieldBase::arena_); value->CopyFrom(message); map_val.SetValue(value); break; diff --git a/third_party/protobuf/src/google/protobuf/map_field.h b/third_party/protobuf/src/google/protobuf/map_field.h index d804dee7..ea62f88f 100644 --- a/third_party/protobuf/src/google/protobuf/map_field.h +++ b/third_party/protobuf/src/google/protobuf/map_field.h @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -55,8 +56,213 @@ namespace google { namespace protobuf { class DynamicMessage; -class MapKey; class MapIterator; + +#define TYPE_CHECK(EXPECTEDTYPE, METHOD) \ + if (type() != EXPECTEDTYPE) { \ + GOOGLE_LOG(FATAL) << "Protocol Buffer map usage error:\n" \ + << METHOD << " type does not match\n" \ + << " Expected : " \ + << FieldDescriptor::CppTypeName(EXPECTEDTYPE) << "\n" \ + << " Actual : " << FieldDescriptor::CppTypeName(type()); \ + } + +// MapKey is an union type for representing any possible +// map key. +class PROTOBUF_EXPORT MapKey { + public: + MapKey() : type_(0) {} + MapKey(const MapKey& other) : type_(0) { CopyFrom(other); } + + MapKey& operator=(const MapKey& other) { + CopyFrom(other); + return *this; + } + + ~MapKey() { + if (type_ == FieldDescriptor::CPPTYPE_STRING) { + val_.string_value_.Destruct(); + } + } + + FieldDescriptor::CppType type() const { + if (type_ == 0) { + GOOGLE_LOG(FATAL) << "Protocol Buffer map usage error:\n" + << "MapKey::type MapKey is not initialized. " + << "Call set methods to initialize MapKey."; + } + return (FieldDescriptor::CppType)type_; + } + + void SetInt64Value(int64 value) { + SetType(FieldDescriptor::CPPTYPE_INT64); + val_.int64_value_ = value; + } + void SetUInt64Value(uint64 value) { + SetType(FieldDescriptor::CPPTYPE_UINT64); + val_.uint64_value_ = value; + } + void SetInt32Value(int32 value) { + SetType(FieldDescriptor::CPPTYPE_INT32); + val_.int32_value_ = value; + } + void SetUInt32Value(uint32 value) { + SetType(FieldDescriptor::CPPTYPE_UINT32); + val_.uint32_value_ = value; + } + void SetBoolValue(bool value) { + SetType(FieldDescriptor::CPPTYPE_BOOL); + val_.bool_value_ = value; + } + void SetStringValue(std::string val) { + SetType(FieldDescriptor::CPPTYPE_STRING); + *val_.string_value_.get_mutable() = std::move(val); + } + + int64 GetInt64Value() const { + TYPE_CHECK(FieldDescriptor::CPPTYPE_INT64, "MapKey::GetInt64Value"); + return val_.int64_value_; + } + uint64 GetUInt64Value() const { + TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT64, "MapKey::GetUInt64Value"); + return val_.uint64_value_; + } + int32 GetInt32Value() const { + TYPE_CHECK(FieldDescriptor::CPPTYPE_INT32, "MapKey::GetInt32Value"); + return val_.int32_value_; + } + uint32 GetUInt32Value() const { + TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT32, "MapKey::GetUInt32Value"); + return val_.uint32_value_; + } + bool GetBoolValue() const { + TYPE_CHECK(FieldDescriptor::CPPTYPE_BOOL, "MapKey::GetBoolValue"); + return val_.bool_value_; + } + const std::string& GetStringValue() const { + TYPE_CHECK(FieldDescriptor::CPPTYPE_STRING, "MapKey::GetStringValue"); + return val_.string_value_.get(); + } + + bool operator<(const MapKey& other) const { + if (type_ != other.type_) { + // We could define a total order that handles this case, but + // there currently no need. So, for now, fail. + GOOGLE_LOG(FATAL) << "Unsupported: type mismatch"; + } + switch (type()) { + case FieldDescriptor::CPPTYPE_DOUBLE: + case FieldDescriptor::CPPTYPE_FLOAT: + case FieldDescriptor::CPPTYPE_ENUM: + case FieldDescriptor::CPPTYPE_MESSAGE: + GOOGLE_LOG(FATAL) << "Unsupported"; + return false; + case FieldDescriptor::CPPTYPE_STRING: + return val_.string_value_.get() < other.val_.string_value_.get(); + case FieldDescriptor::CPPTYPE_INT64: + return val_.int64_value_ < other.val_.int64_value_; + case FieldDescriptor::CPPTYPE_INT32: + return val_.int32_value_ < other.val_.int32_value_; + case FieldDescriptor::CPPTYPE_UINT64: + return val_.uint64_value_ < other.val_.uint64_value_; + case FieldDescriptor::CPPTYPE_UINT32: + return val_.uint32_value_ < other.val_.uint32_value_; + case FieldDescriptor::CPPTYPE_BOOL: + return val_.bool_value_ < other.val_.bool_value_; + } + return false; + } + + bool operator==(const MapKey& other) const { + if (type_ != other.type_) { + // To be consistent with operator<, we don't allow this either. + GOOGLE_LOG(FATAL) << "Unsupported: type mismatch"; + } + switch (type()) { + case FieldDescriptor::CPPTYPE_DOUBLE: + case FieldDescriptor::CPPTYPE_FLOAT: + case FieldDescriptor::CPPTYPE_ENUM: + case FieldDescriptor::CPPTYPE_MESSAGE: + GOOGLE_LOG(FATAL) << "Unsupported"; + break; + case FieldDescriptor::CPPTYPE_STRING: + return val_.string_value_.get() == other.val_.string_value_.get(); + case FieldDescriptor::CPPTYPE_INT64: + return val_.int64_value_ == other.val_.int64_value_; + case FieldDescriptor::CPPTYPE_INT32: + return val_.int32_value_ == other.val_.int32_value_; + case FieldDescriptor::CPPTYPE_UINT64: + return val_.uint64_value_ == other.val_.uint64_value_; + case FieldDescriptor::CPPTYPE_UINT32: + return val_.uint32_value_ == other.val_.uint32_value_; + case FieldDescriptor::CPPTYPE_BOOL: + return val_.bool_value_ == other.val_.bool_value_; + } + GOOGLE_LOG(FATAL) << "Can't get here."; + return false; + } + + void CopyFrom(const MapKey& other) { + SetType(other.type()); + switch (type_) { + case FieldDescriptor::CPPTYPE_DOUBLE: + case FieldDescriptor::CPPTYPE_FLOAT: + case FieldDescriptor::CPPTYPE_ENUM: + case FieldDescriptor::CPPTYPE_MESSAGE: + GOOGLE_LOG(FATAL) << "Unsupported"; + break; + case FieldDescriptor::CPPTYPE_STRING: + *val_.string_value_.get_mutable() = other.val_.string_value_.get(); + break; + case FieldDescriptor::CPPTYPE_INT64: + val_.int64_value_ = other.val_.int64_value_; + break; + case FieldDescriptor::CPPTYPE_INT32: + val_.int32_value_ = other.val_.int32_value_; + break; + case FieldDescriptor::CPPTYPE_UINT64: + val_.uint64_value_ = other.val_.uint64_value_; + break; + case FieldDescriptor::CPPTYPE_UINT32: + val_.uint32_value_ = other.val_.uint32_value_; + break; + case FieldDescriptor::CPPTYPE_BOOL: + val_.bool_value_ = other.val_.bool_value_; + break; + } + } + + private: + template + friend class internal::TypeDefinedMapFieldBase; + friend class ::PROTOBUF_NAMESPACE_ID::MapIterator; + friend class internal::DynamicMapField; + + union KeyValue { + KeyValue() {} + internal::ExplicitlyConstructed string_value_; + int64 int64_value_; + int32 int32_value_; + uint64 uint64_value_; + uint32 uint32_value_; + bool bool_value_; + } val_; + + void SetType(FieldDescriptor::CppType type) { + if (type_ == type) return; + if (type_ == FieldDescriptor::CPPTYPE_STRING) { + val_.string_value_.Destruct(); + } + type_ = type; + if (type_ == FieldDescriptor::CPPTYPE_STRING) { + val_.string_value_.DefaultConstruct(); + } + } + + // type_ is 0 or a valid FieldDescriptor::CppType. + int type_; +}; + namespace internal { class ContendedMapCleanTest; @@ -74,7 +280,9 @@ class PROTOBUF_EXPORT MapFieldBase { : arena_(arena), repeated_field_(NULL), state_(STATE_MODIFIED_MAP) { // Mutex's destructor needs to be called explicitly to release resources // acquired in its constructor. - arena->OwnDestructor(&mutex_); + if (arena) { + arena->OwnDestructor(&mutex_); + } } virtual ~MapFieldBase(); @@ -156,7 +364,7 @@ class PROTOBUF_EXPORT MapFieldBase { friend class ContendedMapCleanTest; friend class GeneratedMessageReflection; friend class MapFieldAccessor; - friend class DynamicMessage; + friend class ::PROTOBUF_NAMESPACE_ID::DynamicMessage; // Virtual helper methods for MapIterator. MapIterator doesn't have the // type helper for key and value. Call these help methods to deal with @@ -225,9 +433,6 @@ class MapField : public TypeDefinedMapFieldBase { // Define message type for internal repeated field. typedef Derived EntryType; - typedef MapEntryLite - EntryLiteType; // Define abbreviation for parent MapFieldLite typedef MapFieldLite { // different exposed type in Map's api and repeated field's api. For // details see the comment in the implementation of // SyncMapWithRepeatedFieldNoLock. - static const bool kIsValueEnum = ValueTypeHandler::kIsEnum; + static constexpr bool kIsValueEnum = ValueTypeHandler::kIsEnum; typedef typename MapIf::type CastValueType; public: @@ -288,12 +493,12 @@ class MapField : public TypeDefinedMapFieldBase { const char* _InternalParse(const char* ptr, ParseContext* ctx) { return impl_._InternalParse(ptr, ctx); } - template + template const char* ParseWithEnumValidation(const char* ptr, ParseContext* ctx, bool (*is_valid)(int), uint32 field_num, - Metadata* metadata) { - return impl_.ParseWithEnumValidation(ptr, ctx, is_valid, field_num, - metadata); + InternalMetadata* metadata) { + return impl_.template ParseWithEnumValidation( + ptr, ctx, is_valid, field_num, metadata); } private: @@ -314,6 +519,20 @@ class MapField : public TypeDefinedMapFieldBase { GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapField); }; +template +bool AllAreInitialized( + const MapField& field) { + const auto& t = field.GetMap(); + for (typename Map::const_iterator it = t.begin(); it != t.end(); + ++it) { + if (!it->second.IsInitialized()) return false; + } + return true; +} + template @@ -360,210 +579,6 @@ class PROTOBUF_EXPORT DynamicMapField } // namespace internal -#define TYPE_CHECK(EXPECTEDTYPE, METHOD) \ - if (type() != EXPECTEDTYPE) { \ - GOOGLE_LOG(FATAL) << "Protocol Buffer map usage error:\n" \ - << METHOD << " type does not match\n" \ - << " Expected : " \ - << FieldDescriptor::CppTypeName(EXPECTEDTYPE) << "\n" \ - << " Actual : " << FieldDescriptor::CppTypeName(type()); \ - } - -// MapKey is an union type for representing any possible -// map key. -class PROTOBUF_EXPORT MapKey { - public: - MapKey() : type_(0) {} - MapKey(const MapKey& other) : type_(0) { CopyFrom(other); } - MapKey& operator=(const MapKey& other) { - CopyFrom(other); - return *this; - } - - ~MapKey() { - if (type_ == FieldDescriptor::CPPTYPE_STRING) { - delete val_.string_value_; - } - } - - FieldDescriptor::CppType type() const { - if (type_ == 0) { - GOOGLE_LOG(FATAL) << "Protocol Buffer map usage error:\n" - << "MapKey::type MapKey is not initialized. " - << "Call set methods to initialize MapKey."; - } - return (FieldDescriptor::CppType)type_; - } - - void SetInt64Value(int64 value) { - SetType(FieldDescriptor::CPPTYPE_INT64); - val_.int64_value_ = value; - } - void SetUInt64Value(uint64 value) { - SetType(FieldDescriptor::CPPTYPE_UINT64); - val_.uint64_value_ = value; - } - void SetInt32Value(int32 value) { - SetType(FieldDescriptor::CPPTYPE_INT32); - val_.int32_value_ = value; - } - void SetUInt32Value(uint32 value) { - SetType(FieldDescriptor::CPPTYPE_UINT32); - val_.uint32_value_ = value; - } - void SetBoolValue(bool value) { - SetType(FieldDescriptor::CPPTYPE_BOOL); - val_.bool_value_ = value; - } - void SetStringValue(const std::string& val) { - SetType(FieldDescriptor::CPPTYPE_STRING); - *val_.string_value_ = val; - } - - int64 GetInt64Value() const { - TYPE_CHECK(FieldDescriptor::CPPTYPE_INT64, "MapKey::GetInt64Value"); - return val_.int64_value_; - } - uint64 GetUInt64Value() const { - TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT64, "MapKey::GetUInt64Value"); - return val_.uint64_value_; - } - int32 GetInt32Value() const { - TYPE_CHECK(FieldDescriptor::CPPTYPE_INT32, "MapKey::GetInt32Value"); - return val_.int32_value_; - } - uint32 GetUInt32Value() const { - TYPE_CHECK(FieldDescriptor::CPPTYPE_UINT32, "MapKey::GetUInt32Value"); - return val_.uint32_value_; - } - bool GetBoolValue() const { - TYPE_CHECK(FieldDescriptor::CPPTYPE_BOOL, "MapKey::GetBoolValue"); - return val_.bool_value_; - } - const std::string& GetStringValue() const { - TYPE_CHECK(FieldDescriptor::CPPTYPE_STRING, "MapKey::GetStringValue"); - return *val_.string_value_; - } - - bool operator<(const MapKey& other) const { - if (type_ != other.type_) { - // We could define a total order that handles this case, but - // there currently no need. So, for now, fail. - GOOGLE_LOG(FATAL) << "Unsupported: type mismatch"; - } - switch (type()) { - case FieldDescriptor::CPPTYPE_DOUBLE: - case FieldDescriptor::CPPTYPE_FLOAT: - case FieldDescriptor::CPPTYPE_ENUM: - case FieldDescriptor::CPPTYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Unsupported"; - return false; - case FieldDescriptor::CPPTYPE_STRING: - return *val_.string_value_ < *other.val_.string_value_; - case FieldDescriptor::CPPTYPE_INT64: - return val_.int64_value_ < other.val_.int64_value_; - case FieldDescriptor::CPPTYPE_INT32: - return val_.int32_value_ < other.val_.int32_value_; - case FieldDescriptor::CPPTYPE_UINT64: - return val_.uint64_value_ < other.val_.uint64_value_; - case FieldDescriptor::CPPTYPE_UINT32: - return val_.uint32_value_ < other.val_.uint32_value_; - case FieldDescriptor::CPPTYPE_BOOL: - return val_.bool_value_ < other.val_.bool_value_; - } - return false; - } - - bool operator==(const MapKey& other) const { - if (type_ != other.type_) { - // To be consistent with operator<, we don't allow this either. - GOOGLE_LOG(FATAL) << "Unsupported: type mismatch"; - } - switch (type()) { - case FieldDescriptor::CPPTYPE_DOUBLE: - case FieldDescriptor::CPPTYPE_FLOAT: - case FieldDescriptor::CPPTYPE_ENUM: - case FieldDescriptor::CPPTYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Unsupported"; - break; - case FieldDescriptor::CPPTYPE_STRING: - return *val_.string_value_ == *other.val_.string_value_; - case FieldDescriptor::CPPTYPE_INT64: - return val_.int64_value_ == other.val_.int64_value_; - case FieldDescriptor::CPPTYPE_INT32: - return val_.int32_value_ == other.val_.int32_value_; - case FieldDescriptor::CPPTYPE_UINT64: - return val_.uint64_value_ == other.val_.uint64_value_; - case FieldDescriptor::CPPTYPE_UINT32: - return val_.uint32_value_ == other.val_.uint32_value_; - case FieldDescriptor::CPPTYPE_BOOL: - return val_.bool_value_ == other.val_.bool_value_; - } - GOOGLE_LOG(FATAL) << "Can't get here."; - return false; - } - - void CopyFrom(const MapKey& other) { - SetType(other.type()); - switch (type_) { - case FieldDescriptor::CPPTYPE_DOUBLE: - case FieldDescriptor::CPPTYPE_FLOAT: - case FieldDescriptor::CPPTYPE_ENUM: - case FieldDescriptor::CPPTYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Unsupported"; - break; - case FieldDescriptor::CPPTYPE_STRING: - *val_.string_value_ = *other.val_.string_value_; - break; - case FieldDescriptor::CPPTYPE_INT64: - val_.int64_value_ = other.val_.int64_value_; - break; - case FieldDescriptor::CPPTYPE_INT32: - val_.int32_value_ = other.val_.int32_value_; - break; - case FieldDescriptor::CPPTYPE_UINT64: - val_.uint64_value_ = other.val_.uint64_value_; - break; - case FieldDescriptor::CPPTYPE_UINT32: - val_.uint32_value_ = other.val_.uint32_value_; - break; - case FieldDescriptor::CPPTYPE_BOOL: - val_.bool_value_ = other.val_.bool_value_; - break; - } - } - - private: - template - friend class internal::TypeDefinedMapFieldBase; - friend class ::PROTOBUF_NAMESPACE_ID::MapIterator; - friend class internal::DynamicMapField; - - union KeyValue { - KeyValue() {} - std::string* string_value_; - int64 int64_value_; - int32 int32_value_; - uint64 uint64_value_; - uint32 uint32_value_; - bool bool_value_; - } val_; - - void SetType(FieldDescriptor::CppType type) { - if (type_ == type) return; - if (type_ == FieldDescriptor::CPPTYPE_STRING) { - delete val_.string_value_; - } - type_ = type; - if (type_ == FieldDescriptor::CPPTYPE_STRING) { - val_.string_value_ = new std::string; - } - } - - // type_ is 0 or a valid FieldDescriptor::CppType. - int type_; -}; - // MapValueRef points to a map value. class PROTOBUF_EXPORT MapValueRef { public: @@ -665,7 +680,7 @@ class PROTOBUF_EXPORT MapValueRef { template friend class internal::TypeDefinedMapFieldBase; friend class ::PROTOBUF_NAMESPACE_ID::MapIterator; - friend class internal::GeneratedMessageReflection; + friend class Reflection; friend class internal::DynamicMapField; void SetType(FieldDescriptor::CppType type) { type_ = type; } diff --git a/third_party/protobuf/src/google/protobuf/map_field_lite.h b/third_party/protobuf/src/google/protobuf/map_field_lite.h index 180a7884..d641d173 100644 --- a/third_party/protobuf/src/google/protobuf/map_field_lite.h +++ b/third_party/protobuf/src/google/protobuf/map_field_lite.h @@ -63,11 +63,9 @@ class MapFieldLite { typedef Map MapType; typedef EntryType EntryTypeTrait; - MapFieldLite() : arena_(NULL) { SetDefaultEnumValue(); } + MapFieldLite() { SetDefaultEnumValue(); } - explicit MapFieldLite(Arena* arena) : arena_(arena), map_(arena) { - SetDefaultEnumValue(); - } + explicit MapFieldLite(Arena* arena) : map_(arena) { SetDefaultEnumValue(); } // Accessors const Map& GetMap() const { return map_; } @@ -92,21 +90,17 @@ class MapFieldLite { // Used in the implementation of parsing. Caller should take the ownership iff // arena_ is NULL. EntryType* NewEntry() const { - if (arena_ == NULL) { - return new EntryType(); - } else { - return Arena::CreateMessage(arena_); - } + return Arena::CreateMessage(map_.arena_); } // Used in the implementation of serializing enum value type. Caller should // take the ownership iff arena_ is NULL. EntryType* NewEnumEntryWrapper(const Key& key, const T t) const { - return EntryType::EnumWrap(key, t, arena_); + return EntryType::EnumWrap(key, t, map_.arena_); } // Used in the implementation of serializing other value types. Caller should // take the ownership iff arena_ is NULL. EntryType* NewEntryWrapper(const Key& key, const T& t) const { - return EntryType::Wrap(key, t, arena_); + return EntryType::Wrap(key, t, map_.arena_); } const char* _InternalParse(const char* ptr, ParseContext* ctx) { @@ -114,54 +108,57 @@ class MapFieldLite { return parser._InternalParse(ptr, ctx); } - template + template const char* ParseWithEnumValidation(const char* ptr, ParseContext* ctx, bool (*is_valid)(int), uint32 field_num, - Metadata* metadata) { + InternalMetadata* metadata) { typename Derived::template Parser> parser(this); - return parser.ParseWithEnumValidation(ptr, ctx, is_valid, field_num, - metadata); + return parser.template ParseWithEnumValidation( + ptr, ctx, is_valid, field_num, metadata); } private: typedef void DestructorSkippable_; - Arena* arena_; Map map_; friend class ::PROTOBUF_NAMESPACE_ID::Arena; }; -template +template struct EnumParseWrapper { const char* _InternalParse(const char* ptr, ParseContext* ctx) { - return map_field->ParseWithEnumValidation(ptr, ctx, is_valid, field_num, - metadata); + return map_field->template ParseWithEnumValidation( + ptr, ctx, is_valid, field_num, metadata); } T* map_field; bool (*is_valid)(int); uint32 field_num; - Metadata* metadata; + InternalMetadata* metadata; }; // Helper function because the typenames of maps are horrendous to print. This // leverages compiler type deduction, to keep all type data out of the // generated code -template -EnumParseWrapper InitEnumParseWrapper(T* map_field, - bool (*is_valid)(int), - uint32 field_num, - Metadata* metadata) { - return EnumParseWrapper{map_field, is_valid, field_num, - metadata}; +template +EnumParseWrapper InitEnumParseWrapper( + T* map_field, bool (*is_valid)(int), uint32 field_num, + InternalMetadata* metadata) { + return EnumParseWrapper{map_field, is_valid, field_num, + metadata}; } // True if IsInitialized() is true for value field in all elements of t. T is // expected to be message. It's useful to have this helper here to keep the // protobuf compiler from ever having to emit loops in IsInitialized() methods. // We want the C++ compiler to inline this or not as it sees fit. -template -bool AllAreInitialized(const Map& t) { +template +bool AllAreInitialized( + const MapFieldLite& field) { + const auto& t = field.GetMap(); for (typename Map::const_iterator it = t.begin(); it != t.end(); ++it) { if (!it->second.IsInitialized()) return false; diff --git a/third_party/protobuf/src/google/protobuf/map_field_test.cc b/third_party/protobuf/src/google/protobuf/map_field_test.cc index dd22727d..5ccb7b0d 100644 --- a/third_party/protobuf/src/google/protobuf/map_field_test.cc +++ b/third_party/protobuf/src/google/protobuf/map_field_test.cc @@ -58,12 +58,6 @@ class MapFieldBaseStub : public MapFieldBase { typedef void DestructorSkippable_; MapFieldBaseStub() {} explicit MapFieldBaseStub(Arena* arena) : MapFieldBase(arena) {} - void SyncRepeatedFieldWithMap() const { - MapFieldBase::SyncRepeatedFieldWithMap(); - } - void SyncMapWithRepeatedField() const { - MapFieldBase::SyncMapWithRepeatedField(); - } // Get underlined repeated field without synchronizing map. RepeatedPtrField* InternalRepeatedField() { return repeated_field_; } bool IsMapClean() { @@ -99,8 +93,6 @@ class MapFieldBaseStub : public MapFieldBase { void CopyIterator(MapIterator* this_iterator, const MapIterator& other_iterator) const override {} void IncreaseIterator(MapIterator* map_iter) const override {} - void SetDefaultMessageEntry(const Message* message) const {} - const Message* GetDefaultMessageEntry() const { return NULL; } }; class MapFieldBasePrimitiveTest : public ::testing::Test { @@ -115,8 +107,8 @@ class MapFieldBasePrimitiveTest : public ::testing::Test { map_descriptor_ = unittest::TestMap::descriptor() ->FindFieldByName("map_int32_int32") ->message_type(); - key_descriptor_ = map_descriptor_->FindFieldByName("key"); - value_descriptor_ = map_descriptor_->FindFieldByName("value"); + key_descriptor_ = map_descriptor_->map_key(); + value_descriptor_ = map_descriptor_->map_value(); // Build map field map_field_.reset(new MapFieldType); diff --git a/third_party/protobuf/src/google/protobuf/map_test.cc b/third_party/protobuf/src/google/protobuf/map_test.cc index ec13b3c8..01512a06 100644 --- a/third_party/protobuf/src/google/protobuf/map_test.cc +++ b/third_party/protobuf/src/google/protobuf/map_test.cc @@ -39,9 +39,11 @@ #include #include #include +#include #include #include #include +#include #include #include @@ -71,11 +73,11 @@ #include #include #include -#include #include #include #include #include +#include #include @@ -94,6 +96,8 @@ void MapTestForceDeterministic() { io::CodedOutputStream::SetDefaultSerializationDeterministic(); } +namespace { + // Map API Test ===================================================== class MapImplTest : public ::testing::Test { @@ -621,10 +625,6 @@ TEST_F(MapImplTest, IteratorConstness) { } bool IsForwardIteratorHelper(std::forward_iterator_tag /*tag*/) { return true; } -template -bool IsForwardIteratorHelper(T /*t*/) { - return false; -} TEST_F(MapImplTest, IteratorCategory) { EXPECT_TRUE(IsForwardIteratorHelper( @@ -984,11 +984,7 @@ TEST_F(MapImplTest, CopyAssignMapIterator) { static int Func(int i, int j) { return i * j; } -static std::string StrFunc(int i, int j) { - std::string str; - SStringPrintf(&str, "%d", Func(i, j)); - return str; -} +static std::string StrFunc(int i, int j) { return StrCat(Func(i, j)); } static int Int(const std::string& value) { int result = 0; @@ -996,6 +992,9 @@ static int Int(const std::string& value) { return result; } +} // namespace + +// This class is a friend, so no anonymous namespace. class MapFieldReflectionTest : public testing::Test { protected: typedef FieldDescriptor FD; @@ -1006,6 +1005,8 @@ class MapFieldReflectionTest : public testing::Test { } }; +namespace { + TEST_F(MapFieldReflectionTest, RegularFields) { TestMap message; const Reflection* refl = message.GetReflection(); @@ -1836,6 +1837,16 @@ TEST_F(MapFieldReflectionTest, MapSizeWithDuplicatedKey) { } } +TEST_F(MapFieldReflectionTest, UninitializedEntry) { + unittest::TestRequiredMessageMap message; + const Reflection* reflection = message.GetReflection(); + const FieldDescriptor* field = + message.GetDescriptor()->FindFieldByName("map_field"); + auto entry = reflection->AddMessage(&message, field); + EXPECT_FALSE(entry->IsInitialized()); + EXPECT_FALSE(message.IsInitialized()); +} + // Generated Message Test =========================================== TEST(GeneratedMapFieldTest, Accessors) { @@ -2296,11 +2307,9 @@ TEST(GeneratedMapFieldTest, KeysValuesUnknownsWireFormat) { if (is_value) expected_value = static_cast(c); bool res = message.ParseFromString(wire_format); bool expect_success = true; -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER // Unfortunately the old map parser accepts malformed input, the new // parser accepts only correct input. if (j != items - 1) expect_success = false; -#endif if (expect_success) { ASSERT_TRUE(res); ASSERT_EQ(1, message.map_int32_int32().size()); @@ -3006,6 +3015,58 @@ TEST(WireFormatForMapFieldTest, SerializeMapDynamicMessage) { EXPECT_TRUE(dynamic_data.size() == generated_data.size()); } +TEST(WireFormatForMapFieldTest, MapByteSizeDynamicMessage) { + DynamicMessageFactory factory; + std::unique_ptr dynamic_message; + dynamic_message.reset( + factory.GetPrototype(unittest::TestMap::descriptor())->New()); + MapReflectionTester reflection_tester(unittest::TestMap::descriptor()); + reflection_tester.SetMapFieldsViaReflection(dynamic_message.get()); + reflection_tester.ExpectMapFieldsSetViaReflection(*dynamic_message); + std::string expected_serialized_data; + dynamic_message->SerializeToString(&expected_serialized_data); + int expected_size = expected_serialized_data.size(); + EXPECT_EQ(dynamic_message->ByteSize(), expected_size); + + std::unique_ptr message2; + message2.reset(factory.GetPrototype(unittest::TestMap::descriptor())->New()); + reflection_tester.SetMapFieldsViaMapReflection(message2.get()); + + const FieldDescriptor* field = + unittest::TestMap::descriptor()->FindFieldByName("map_int32_int32"); + const Reflection* reflection = dynamic_message->GetReflection(); + + // Force the map field to mark with STATE_MODIFIED_REPEATED + reflection->RemoveLast(dynamic_message.get(), field); + dynamic_message->MergeFrom(*message2); + dynamic_message->MergeFrom(*message2); + // The map field is marked as STATE_MODIFIED_REPEATED, ByteSize() will use + // repeated field which have duplicate keys to calculate. + int duplicate_size = dynamic_message->ByteSize(); + EXPECT_TRUE(duplicate_size > expected_size); + std::string duplicate_serialized_data; + dynamic_message->SerializeToString(&duplicate_serialized_data); + EXPECT_EQ(dynamic_message->ByteSize(), duplicate_serialized_data.size()); + + // Force the map field to mark with map CLEAN + EXPECT_EQ(reflection_tester.MapSize(*dynamic_message, "map_int32_int32"), 2); + // The map field is marked as CLEAN, ByteSize() will use map which do not + // have duplicate keys to calculate. + int size = dynamic_message->ByteSize(); + EXPECT_EQ(expected_size, size); + + // Protobuf used to have a bug for serialize when map it marked CLEAN. It used + // repeated field to calculate ByteSize but use map to serialize the real + // data, thus the ByteSize may bigger than real serialized size. A crash might + // be happen at SerializeToString(). Or an "unexpect end group" warning was + // raised at parse back if user use SerializeWithCachedSizes() which avoids + // size check at serialize. + std::string serialized_data; + dynamic_message->SerializeToString(&serialized_data); + EXPECT_EQ(serialized_data, expected_serialized_data); + dynamic_message->ParseFromString(serialized_data); +} + TEST(WireFormatForMapFieldTest, MapParseHelpers) { std::string data; @@ -3087,11 +3148,13 @@ static std::string DeterministicSerialization(const T& t) { const int size = t.ByteSize(); std::string result(size, '\0'); io::ArrayOutputStream array_stream(::google::protobuf::string_as_array(&result), size); - io::CodedOutputStream output_stream(&array_stream); - output_stream.SetSerializationDeterministic(true); - t.SerializeWithCachedSizes(&output_stream); - EXPECT_FALSE(output_stream.HadError()); - EXPECT_EQ(size, output_stream.ByteCount()); + { + io::CodedOutputStream output_stream(&array_stream); + output_stream.SetSerializationDeterministic(true); + t.SerializeWithCachedSizes(&output_stream); + EXPECT_FALSE(output_stream.HadError()); + EXPECT_EQ(size, output_stream.ByteCount()); + } EXPECT_EQ(result, DeterministicSerializationWithSerializeToCodedStream(t)); EXPECT_EQ(result, DeterministicSerializationWithSerializePartialToCodedStream(t)); @@ -3262,7 +3325,7 @@ TEST(TextFormatMapTest, NoDisableIterator) { TextFormat::Printer printer; printer.PrintToString(source, &output); - // Modify map via the iterator (invalidated in prvious implementation.). + // Modify map via the iterator (invalidated in previous implementation.). iter->second = 2; // In previous implementation, the new change won't be reflected in text @@ -3292,13 +3355,13 @@ TEST(TextFormatMapTest, NoDisableReflectionIterator) { reflection->MutableRepeatedPtrField(&source, field_desc); RepeatedPtrField::iterator iter = map_field->begin(); - // Serialize message to text format, which will invalidate the prvious + // Serialize message to text format, which will invalidate the previous // iterator previously. std::string output; TextFormat::Printer printer; printer.PrintToString(source, &output); - // Modify map via the iterator (invalidated in prvious implementation.). + // Modify map via the iterator (invalidated in previous implementation.). const Reflection* map_entry_reflection = iter->GetReflection(); const FieldDescriptor* value_field_desc = iter->GetDescriptor()->FindFieldByName("value"); @@ -3396,6 +3459,21 @@ TEST(ArenaTest, IsInitialized) { EXPECT_EQ(0, (*message->mutable_map_int32_int32())[0]); } +TEST(ArenaTest, DynamicMapFieldOnArena) { + Arena arena; + unittest::TestMap message2; + + DynamicMessageFactory factory; + Message* message1 = + factory.GetPrototype(unittest::TestMap::descriptor())->New(&arena); + MapReflectionTester reflection_tester(unittest::TestMap::descriptor()); + reflection_tester.SetMapFieldsViaReflection(message1); + reflection_tester.ExpectMapFieldsSetViaReflection(*message1); + reflection_tester.ExpectMapFieldsSetViaReflectionIterator(message1); + message2.CopyFrom(*message1); + MapTestUtil::ExpectMapFieldsSet(message2); +} + TEST(MoveTest, MoveConstructorWorks) { Map original_map; original_map[42].mutable_optional_nested_message()->set_bb(42); @@ -3432,6 +3510,8 @@ TEST(MoveTest, MoveAssignmentWorks) { EXPECT_EQ(nested_msg43_ptr, &moved_to_map[43].optional_nested_message()); } + +} // namespace } // namespace internal } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/map_test_util.cc b/third_party/protobuf/src/google/protobuf/map_test_util.cc deleted file mode 100644 index 51c73664..00000000 --- a/third_party/protobuf/src/google/protobuf/map_test_util.cc +++ /dev/null @@ -1,1804 +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 -#include -#include -#include - -namespace google { -namespace protobuf { - -void MapTestUtil::SetMapFields(unittest::TestMap* message) { - MapTestUtilImpl::SetMapFields(message); -} - -void MapTestUtil::SetArenaMapFields(unittest::TestArenaMap* message) { - MapTestUtilImpl::SetArenaMapFields(message); -} - -void MapTestUtil::SetMapFieldsInitialized(unittest::TestMap* message) { - MapTestUtilImpl::SetMapFieldsInitialized(message); -} - -void MapTestUtil::ModifyMapFields(unittest::TestMap* message) { - MapTestUtilImpl::ModifyMapFields( - message); -} - -void MapTestUtil::ExpectClear(const unittest::TestMap& message) { - MapTestUtilImpl::ExpectClear(message); -} - -void MapTestUtil::ExpectMapFieldsSet(const unittest::TestMap& message) { - MapTestUtilImpl::ExpectMapFieldsSet(message); -} - -void MapTestUtil::ExpectArenaMapFieldsSet( - const unittest::TestArenaMap& message) { - MapTestUtilImpl::ExpectArenaMapFieldsSet< - unittest::MapEnum, unittest::MAP_ENUM_BAR, unittest::MAP_ENUM_BAZ>( - message); -} - -void MapTestUtil::ExpectMapFieldsSetInitialized( - const unittest::TestMap& message) { - MapTestUtilImpl::ExpectMapFieldsSetInitialized( - message); -} - -void MapTestUtil::ExpectMapFieldsModified(const unittest::TestMap& message) { - MapTestUtilImpl::ExpectMapFieldsModified< - unittest::MapEnum, unittest::MAP_ENUM_BAR, unittest::MAP_ENUM_FOO>( - message); -} - -void MapTestUtil::ExpectMapsSize(const unittest::TestMap& message, int size) { - const Descriptor* descriptor = message.GetDescriptor(); - - EXPECT_EQ(size, message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_int32_int32"))); - EXPECT_EQ(size, message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_int64_int64"))); - EXPECT_EQ(size, - message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_uint32_uint32"))); - EXPECT_EQ(size, - message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_uint64_uint64"))); - EXPECT_EQ(size, - message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_sint32_sint32"))); - EXPECT_EQ(size, - message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_sint64_sint64"))); - EXPECT_EQ(size, - message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_fixed32_fixed32"))); - EXPECT_EQ(size, - message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_fixed64_fixed64"))); - EXPECT_EQ(size, - message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_sfixed32_sfixed32"))); - EXPECT_EQ(size, - message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_sfixed64_sfixed64"))); - EXPECT_EQ(size, message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_int32_float"))); - EXPECT_EQ(size, - message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_int32_double"))); - EXPECT_EQ(size, message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_bool_bool"))); - EXPECT_EQ(size, - message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_string_string"))); - EXPECT_EQ(size, message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_int32_bytes"))); - EXPECT_EQ( - size, - message.GetReflection()->FieldSize( - message, descriptor->FindFieldByName("map_int32_foreign_message"))); -} - -std::vector MapTestUtil::GetMapEntries( - const unittest::TestMap& message, int index) { - const Descriptor* descriptor = message.GetDescriptor(); - std::vector result; - - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_int32_int32"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_int64_int64"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_uint32_uint32"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_uint64_uint64"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_sint32_sint32"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_sint64_sint64"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_fixed32_fixed32"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_fixed64_fixed64"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_sfixed32_sfixed32"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_sfixed64_sfixed64"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_int32_float"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_int32_double"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_bool_bool"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_string_string"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_int32_bytes"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_int32_enum"), index)); - result.push_back(&message.GetReflection()->GetRepeatedMessage( - message, descriptor->FindFieldByName("map_int32_foreign_message"), - index)); - - return result; -} - -std::vector MapTestUtil::GetMapEntriesFromRelease( - unittest::TestMap* message) { - const Descriptor* descriptor = message->GetDescriptor(); - std::vector result; - - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_int32_int32"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_int64_int64"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_uint32_uint32"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_uint64_uint64"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_sint32_sint32"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_sint64_sint64"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_fixed32_fixed32"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_fixed64_fixed64"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_sfixed32_sfixed32"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_sfixed64_sfixed64"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_int32_float"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_int32_double"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_bool_bool"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_string_string"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_int32_bytes"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_int32_enum"))); - result.push_back(message->GetReflection()->ReleaseLast( - message, descriptor->FindFieldByName("map_int32_foreign_message"))); - - return result; -} - -MapReflectionTester::MapReflectionTester(const Descriptor* base_descriptor) - : base_descriptor_(base_descriptor) { - const DescriptorPool* pool = base_descriptor->file()->pool(); - - map_enum_foo_ = pool->FindEnumValueByName("protobuf_unittest.MAP_ENUM_FOO"); - map_enum_bar_ = pool->FindEnumValueByName("protobuf_unittest.MAP_ENUM_BAR"); - map_enum_baz_ = pool->FindEnumValueByName("protobuf_unittest.MAP_ENUM_BAZ"); - - foreign_c_ = pool->FindFieldByName("protobuf_unittest.ForeignMessage.c"); - map_int32_int32_key_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapInt32Int32Entry.key"); - map_int32_int32_val_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapInt32Int32Entry.value"); - map_int64_int64_key_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapInt64Int64Entry.key"); - map_int64_int64_val_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapInt64Int64Entry.value"); - map_uint32_uint32_key_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapUint32Uint32Entry.key"); - map_uint32_uint32_val_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapUint32Uint32Entry.value"); - map_uint64_uint64_key_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapUint64Uint64Entry.key"); - map_uint64_uint64_val_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapUint64Uint64Entry.value"); - map_sint32_sint32_key_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapSint32Sint32Entry.key"); - map_sint32_sint32_val_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapSint32Sint32Entry.value"); - map_sint64_sint64_key_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapSint64Sint64Entry.key"); - map_sint64_sint64_val_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapSint64Sint64Entry.value"); - map_fixed32_fixed32_key_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapFixed32Fixed32Entry.key"); - map_fixed32_fixed32_val_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapFixed32Fixed32Entry.value"); - map_fixed64_fixed64_key_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapFixed64Fixed64Entry.key"); - map_fixed64_fixed64_val_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapFixed64Fixed64Entry.value"); - map_sfixed32_sfixed32_key_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapSfixed32Sfixed32Entry.key"); - map_sfixed32_sfixed32_val_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapSfixed32Sfixed32Entry.value"); - map_sfixed64_sfixed64_key_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapSfixed64Sfixed64Entry.key"); - map_sfixed64_sfixed64_val_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapSfixed64Sfixed64Entry.value"); - map_int32_float_key_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapInt32FloatEntry.key"); - map_int32_float_val_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapInt32FloatEntry.value"); - map_int32_double_key_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapInt32DoubleEntry.key"); - map_int32_double_val_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapInt32DoubleEntry.value"); - map_bool_bool_key_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapBoolBoolEntry.key"); - map_bool_bool_val_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapBoolBoolEntry.value"); - map_string_string_key_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapStringStringEntry.key"); - map_string_string_val_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapStringStringEntry.value"); - map_int32_bytes_key_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapInt32BytesEntry.key"); - map_int32_bytes_val_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapInt32BytesEntry.value"); - map_int32_enum_key_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapInt32EnumEntry.key"); - map_int32_enum_val_ = - pool->FindFieldByName("protobuf_unittest.TestMap.MapInt32EnumEntry.value"); - map_int32_foreign_message_key_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapInt32ForeignMessageEntry.key"); - map_int32_foreign_message_val_ = pool->FindFieldByName( - "protobuf_unittest.TestMap.MapInt32ForeignMessageEntry.value"); - - EXPECT_FALSE(map_enum_foo_ == NULL); - EXPECT_FALSE(map_enum_bar_ == NULL); - EXPECT_FALSE(map_enum_baz_ == NULL); - EXPECT_FALSE(map_int32_int32_key_ == NULL); - EXPECT_FALSE(map_int32_int32_val_ == NULL); - EXPECT_FALSE(map_int64_int64_key_ == NULL); - EXPECT_FALSE(map_int64_int64_val_ == NULL); - EXPECT_FALSE(map_uint32_uint32_key_ == NULL); - EXPECT_FALSE(map_uint32_uint32_val_ == NULL); - EXPECT_FALSE(map_uint64_uint64_key_ == NULL); - EXPECT_FALSE(map_uint64_uint64_val_ == NULL); - EXPECT_FALSE(map_sint32_sint32_key_ == NULL); - EXPECT_FALSE(map_sint32_sint32_val_ == NULL); - EXPECT_FALSE(map_sint64_sint64_key_ == NULL); - EXPECT_FALSE(map_sint64_sint64_val_ == NULL); - EXPECT_FALSE(map_fixed32_fixed32_key_ == NULL); - EXPECT_FALSE(map_fixed32_fixed32_val_ == NULL); - EXPECT_FALSE(map_fixed64_fixed64_key_ == NULL); - EXPECT_FALSE(map_fixed64_fixed64_val_ == NULL); - EXPECT_FALSE(map_sfixed32_sfixed32_key_ == NULL); - EXPECT_FALSE(map_sfixed32_sfixed32_val_ == NULL); - EXPECT_FALSE(map_sfixed64_sfixed64_key_ == NULL); - EXPECT_FALSE(map_sfixed64_sfixed64_val_ == NULL); - EXPECT_FALSE(map_int32_float_key_ == NULL); - EXPECT_FALSE(map_int32_float_val_ == NULL); - EXPECT_FALSE(map_int32_double_key_ == NULL); - EXPECT_FALSE(map_int32_double_val_ == NULL); - EXPECT_FALSE(map_bool_bool_key_ == NULL); - EXPECT_FALSE(map_bool_bool_val_ == NULL); - EXPECT_FALSE(map_string_string_key_ == NULL); - EXPECT_FALSE(map_string_string_val_ == NULL); - EXPECT_FALSE(map_int32_bytes_key_ == NULL); - EXPECT_FALSE(map_int32_bytes_val_ == NULL); - EXPECT_FALSE(map_int32_enum_key_ == NULL); - EXPECT_FALSE(map_int32_enum_val_ == NULL); - EXPECT_FALSE(map_int32_foreign_message_key_ == NULL); - EXPECT_FALSE(map_int32_foreign_message_val_ == NULL); -} - -// Shorthand to get a FieldDescriptor for a field of unittest::TestMap. -const FieldDescriptor* MapReflectionTester::F(const std::string& name) { - const FieldDescriptor* result = NULL; - result = base_descriptor_->FindFieldByName(name); - GOOGLE_CHECK(result != NULL); - return result; -} - -void MapReflectionTester::SetMapFieldsViaReflection(Message* message) { - const Reflection* reflection = message->GetReflection(); - Message* sub_message = NULL; - Message* sub_foreign_message = NULL; - - // Add first element. - sub_message = reflection->AddMessage(message, F("map_int32_int32")); - sub_message->GetReflection()->SetInt32(sub_message, map_int32_int32_key_, 0); - sub_message->GetReflection()->SetInt32(sub_message, map_int32_int32_val_, 0); - - sub_message = reflection->AddMessage(message, F("map_int64_int64")); - sub_message->GetReflection()->SetInt64(sub_message, map_int64_int64_key_, 0); - sub_message->GetReflection()->SetInt64(sub_message, map_int64_int64_val_, 0); - - sub_message = reflection->AddMessage(message, F("map_uint32_uint32")); - sub_message->GetReflection()->SetUInt32(sub_message, map_uint32_uint32_key_, - 0); - sub_message->GetReflection()->SetUInt32(sub_message, map_uint32_uint32_val_, - 0); - - sub_message = reflection->AddMessage(message, F("map_uint64_uint64")); - sub_message->GetReflection()->SetUInt64(sub_message, map_uint64_uint64_key_, - 0); - sub_message->GetReflection()->SetUInt64(sub_message, map_uint64_uint64_val_, - 0); - - sub_message = reflection->AddMessage(message, F("map_sint32_sint32")); - sub_message->GetReflection()->SetInt32(sub_message, map_sint32_sint32_key_, - 0); - sub_message->GetReflection()->SetInt32(sub_message, map_sint32_sint32_val_, - 0); - - sub_message = reflection->AddMessage(message, F("map_sint64_sint64")); - sub_message->GetReflection()->SetInt64(sub_message, map_sint64_sint64_key_, - 0); - sub_message->GetReflection()->SetInt64(sub_message, map_sint64_sint64_val_, - 0); - - sub_message = reflection->AddMessage(message, F("map_fixed32_fixed32")); - sub_message->GetReflection()->SetUInt32(sub_message, map_fixed32_fixed32_key_, - 0); - sub_message->GetReflection()->SetUInt32(sub_message, map_fixed32_fixed32_val_, - 0); - - sub_message = reflection->AddMessage(message, F("map_fixed64_fixed64")); - sub_message->GetReflection()->SetUInt64(sub_message, map_fixed64_fixed64_key_, - 0); - sub_message->GetReflection()->SetUInt64(sub_message, map_fixed64_fixed64_val_, - 0); - - sub_message = reflection->AddMessage(message, F("map_sfixed32_sfixed32")); - sub_message->GetReflection()->SetInt32(sub_message, - map_sfixed32_sfixed32_key_, 0); - sub_message->GetReflection()->SetInt32(sub_message, - map_sfixed32_sfixed32_val_, 0); - - sub_message = reflection->AddMessage(message, F("map_sfixed64_sfixed64")); - sub_message->GetReflection()->SetInt64(sub_message, - map_sfixed64_sfixed64_key_, 0); - sub_message->GetReflection()->SetInt64(sub_message, - map_sfixed64_sfixed64_val_, 0); - - sub_message = reflection->AddMessage(message, F("map_int32_float")); - sub_message->GetReflection()->SetInt32(sub_message, map_int32_float_key_, 0); - sub_message->GetReflection()->SetFloat(sub_message, map_int32_float_val_, - 0.0); - - sub_message = reflection->AddMessage(message, F("map_int32_double")); - sub_message->GetReflection()->SetInt32(sub_message, map_int32_double_key_, 0); - sub_message->GetReflection()->SetDouble(sub_message, map_int32_double_val_, - 0.0); - - sub_message = reflection->AddMessage(message, F("map_bool_bool")); - sub_message->GetReflection()->SetBool(sub_message, map_bool_bool_key_, false); - sub_message->GetReflection()->SetBool(sub_message, map_bool_bool_val_, false); - - sub_message = reflection->AddMessage(message, F("map_string_string")); - sub_message->GetReflection()->SetString(sub_message, map_string_string_key_, - "0"); - sub_message->GetReflection()->SetString(sub_message, map_string_string_val_, - "0"); - - sub_message = reflection->AddMessage(message, F("map_int32_bytes")); - sub_message->GetReflection()->SetInt32(sub_message, map_int32_bytes_key_, 0); - sub_message->GetReflection()->SetString(sub_message, map_int32_bytes_val_, - "0"); - - sub_message = reflection->AddMessage(message, F("map_int32_enum")); - sub_message->GetReflection()->SetInt32(sub_message, map_int32_enum_key_, 0); - sub_message->GetReflection()->SetEnum(sub_message, map_int32_enum_val_, - map_enum_bar_); - - sub_message = reflection->AddMessage(message, F("map_int32_foreign_message")); - sub_message->GetReflection()->SetInt32(sub_message, - map_int32_foreign_message_key_, 0); - sub_foreign_message = sub_message->GetReflection()->MutableMessage( - sub_message, map_int32_foreign_message_val_, NULL); - sub_foreign_message->GetReflection()->SetInt32(sub_foreign_message, - foreign_c_, 0); - - // Add second element - sub_message = reflection->AddMessage(message, F("map_int32_int32")); - sub_message->GetReflection()->SetInt32(sub_message, map_int32_int32_key_, 1); - sub_message->GetReflection()->SetInt32(sub_message, map_int32_int32_val_, 1); - - sub_message = reflection->AddMessage(message, F("map_int64_int64")); - sub_message->GetReflection()->SetInt64(sub_message, map_int64_int64_key_, 1); - sub_message->GetReflection()->SetInt64(sub_message, map_int64_int64_val_, 1); - - sub_message = reflection->AddMessage(message, F("map_uint32_uint32")); - sub_message->GetReflection()->SetUInt32(sub_message, map_uint32_uint32_key_, - 1); - sub_message->GetReflection()->SetUInt32(sub_message, map_uint32_uint32_val_, - 1); - - sub_message = reflection->AddMessage(message, F("map_uint64_uint64")); - sub_message->GetReflection()->SetUInt64(sub_message, map_uint64_uint64_key_, - 1); - sub_message->GetReflection()->SetUInt64(sub_message, map_uint64_uint64_val_, - 1); - - sub_message = reflection->AddMessage(message, F("map_sint32_sint32")); - sub_message->GetReflection()->SetInt32(sub_message, map_sint32_sint32_key_, - 1); - sub_message->GetReflection()->SetInt32(sub_message, map_sint32_sint32_val_, - 1); - - sub_message = reflection->AddMessage(message, F("map_sint64_sint64")); - sub_message->GetReflection()->SetInt64(sub_message, map_sint64_sint64_key_, - 1); - sub_message->GetReflection()->SetInt64(sub_message, map_sint64_sint64_val_, - 1); - - sub_message = reflection->AddMessage(message, F("map_fixed32_fixed32")); - sub_message->GetReflection()->SetUInt32(sub_message, map_fixed32_fixed32_key_, - 1); - sub_message->GetReflection()->SetUInt32(sub_message, map_fixed32_fixed32_val_, - 1); - - sub_message = reflection->AddMessage(message, F("map_fixed64_fixed64")); - sub_message->GetReflection()->SetUInt64(sub_message, map_fixed64_fixed64_key_, - 1); - sub_message->GetReflection()->SetUInt64(sub_message, map_fixed64_fixed64_val_, - 1); - - sub_message = reflection->AddMessage(message, F("map_sfixed32_sfixed32")); - sub_message->GetReflection()->SetInt32(sub_message, - map_sfixed32_sfixed32_key_, 1); - sub_message->GetReflection()->SetInt32(sub_message, - map_sfixed32_sfixed32_val_, 1); - - sub_message = reflection->AddMessage(message, F("map_sfixed64_sfixed64")); - sub_message->GetReflection()->SetInt64(sub_message, - map_sfixed64_sfixed64_key_, 1); - sub_message->GetReflection()->SetInt64(sub_message, - map_sfixed64_sfixed64_val_, 1); - - sub_message = reflection->AddMessage(message, F("map_int32_float")); - sub_message->GetReflection()->SetInt32(sub_message, map_int32_float_key_, 1); - sub_message->GetReflection()->SetFloat(sub_message, map_int32_float_val_, - 1.0); - - sub_message = reflection->AddMessage(message, F("map_int32_double")); - sub_message->GetReflection()->SetInt32(sub_message, map_int32_double_key_, 1); - sub_message->GetReflection()->SetDouble(sub_message, map_int32_double_val_, - 1.0); - - sub_message = reflection->AddMessage(message, F("map_bool_bool")); - sub_message->GetReflection()->SetBool(sub_message, map_bool_bool_key_, true); - sub_message->GetReflection()->SetBool(sub_message, map_bool_bool_val_, true); - - sub_message = reflection->AddMessage(message, F("map_string_string")); - sub_message->GetReflection()->SetString(sub_message, map_string_string_key_, - "1"); - sub_message->GetReflection()->SetString(sub_message, map_string_string_val_, - "1"); - - sub_message = reflection->AddMessage(message, F("map_int32_bytes")); - sub_message->GetReflection()->SetInt32(sub_message, map_int32_bytes_key_, 1); - sub_message->GetReflection()->SetString(sub_message, map_int32_bytes_val_, - "1"); - - sub_message = reflection->AddMessage(message, F("map_int32_enum")); - sub_message->GetReflection()->SetInt32(sub_message, map_int32_enum_key_, 1); - sub_message->GetReflection()->SetEnum(sub_message, map_int32_enum_val_, - map_enum_baz_); - - sub_message = reflection->AddMessage(message, F("map_int32_foreign_message")); - sub_message->GetReflection()->SetInt32(sub_message, - map_int32_foreign_message_key_, 1); - sub_foreign_message = sub_message->GetReflection()->MutableMessage( - sub_message, map_int32_foreign_message_val_, NULL); - sub_foreign_message->GetReflection()->SetInt32(sub_foreign_message, - foreign_c_, 1); -} - -void MapReflectionTester::SetMapFieldsViaMapReflection(Message* message) { - const Reflection* reflection = message->GetReflection(); - - Message* sub_foreign_message = NULL; - MapValueRef map_val; - - // Add first element. - MapKey map_key; - map_key.SetInt32Value(0); - EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int32_int32"), - map_key, &map_val)); - map_val.SetInt32Value(0); - - map_key.SetInt64Value(0); - EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int64_int64"), - map_key, &map_val)); - map_val.SetInt64Value(0); - - map_key.SetUInt32Value(0); - EXPECT_TRUE(reflection->InsertOrLookupMapValue( - message, F("map_uint32_uint32"), map_key, &map_val)); - map_val.SetUInt32Value(0); - - map_key.SetUInt64Value(0); - EXPECT_TRUE(reflection->InsertOrLookupMapValue( - message, F("map_uint64_uint64"), map_key, &map_val)); - map_val.SetUInt64Value(0); - - map_key.SetInt32Value(0); - EXPECT_TRUE(reflection->InsertOrLookupMapValue( - message, F("map_sint32_sint32"), map_key, &map_val)); - map_val.SetInt32Value(0); - - map_key.SetInt64Value(0); - EXPECT_TRUE(reflection->InsertOrLookupMapValue( - message, F("map_sint64_sint64"), map_key, &map_val)); - map_val.SetInt64Value(0); - - map_key.SetUInt32Value(0); - EXPECT_TRUE(reflection->InsertOrLookupMapValue( - message, F("map_fixed32_fixed32"), map_key, &map_val)); - map_val.SetUInt32Value(0); - - map_key.SetUInt64Value(0); - EXPECT_TRUE(reflection->InsertOrLookupMapValue( - message, F("map_fixed64_fixed64"), map_key, &map_val)); - map_val.SetUInt64Value(0); - - map_key.SetInt32Value(0); - EXPECT_TRUE(reflection->InsertOrLookupMapValue( - message, F("map_sfixed32_sfixed32"), map_key, &map_val)); - map_val.SetInt32Value(0); - - map_key.SetInt64Value(0); - EXPECT_TRUE(reflection->InsertOrLookupMapValue( - message, F("map_sfixed64_sfixed64"), map_key, &map_val)); - map_val.SetInt64Value(0); - - map_key.SetInt32Value(0); - EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int32_float"), - map_key, &map_val)); - map_val.SetFloatValue(0.0); - - map_key.SetInt32Value(0); - EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int32_double"), - map_key, &map_val)); - map_val.SetDoubleValue(0.0); - - map_key.SetBoolValue(false); - EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_bool_bool"), - map_key, &map_val)); - map_val.SetBoolValue(false); - - map_key.SetStringValue("0"); - EXPECT_TRUE(reflection->InsertOrLookupMapValue( - message, F("map_string_string"), map_key, &map_val)); - map_val.SetStringValue("0"); - - map_key.SetInt32Value(0); - EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int32_bytes"), - map_key, &map_val)); - map_val.SetStringValue("0"); - - map_key.SetInt32Value(0); - EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int32_enum"), - map_key, &map_val)); - map_val.SetEnumValue(map_enum_bar_->number()); - - map_key.SetInt32Value(0); - EXPECT_TRUE(reflection->InsertOrLookupMapValue( - message, F("map_int32_foreign_message"), map_key, &map_val)); - sub_foreign_message = map_val.MutableMessageValue(); - sub_foreign_message->GetReflection()->SetInt32(sub_foreign_message, - foreign_c_, 0); - - // Add second element - map_key.SetInt32Value(1); - EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int32_int32"), - map_key, &map_val)); - map_val.SetInt32Value(1); - EXPECT_FALSE(reflection->InsertOrLookupMapValue(message, F("map_int32_int32"), - map_key, &map_val)); - - map_key.SetInt64Value(1); - EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int64_int64"), - map_key, &map_val)); - map_val.SetInt64Value(1); - EXPECT_FALSE(reflection->InsertOrLookupMapValue(message, F("map_int64_int64"), - map_key, &map_val)); - - map_key.SetUInt32Value(1); - reflection->InsertOrLookupMapValue(message, F("map_uint32_uint32"), map_key, - &map_val); - map_val.SetUInt32Value(1); - - map_key.SetUInt64Value(1); - reflection->InsertOrLookupMapValue(message, F("map_uint64_uint64"), map_key, - &map_val); - map_val.SetUInt64Value(1); - - map_key.SetInt32Value(1); - reflection->InsertOrLookupMapValue(message, F("map_sint32_sint32"), map_key, - &map_val); - map_val.SetInt32Value(1); - - map_key.SetInt64Value(1); - reflection->InsertOrLookupMapValue(message, F("map_sint64_sint64"), map_key, - &map_val); - map_val.SetInt64Value(1); - - map_key.SetUInt32Value(1); - reflection->InsertOrLookupMapValue(message, F("map_fixed32_fixed32"), map_key, - &map_val); - map_val.SetUInt32Value(1); - - map_key.SetUInt64Value(1); - reflection->InsertOrLookupMapValue(message, F("map_fixed64_fixed64"), map_key, - &map_val); - map_val.SetUInt64Value(1); - - map_key.SetInt32Value(1); - reflection->InsertOrLookupMapValue(message, F("map_sfixed32_sfixed32"), - map_key, &map_val); - map_val.SetInt32Value(1); - - map_key.SetInt64Value(1); - reflection->InsertOrLookupMapValue(message, F("map_sfixed64_sfixed64"), - map_key, &map_val); - map_val.SetInt64Value(1); - - map_key.SetInt32Value(1); - reflection->InsertOrLookupMapValue(message, F("map_int32_float"), map_key, - &map_val); - map_val.SetFloatValue(1.0); - - map_key.SetInt32Value(1); - reflection->InsertOrLookupMapValue(message, F("map_int32_double"), map_key, - &map_val); - map_val.SetDoubleValue(1.0); - - map_key.SetBoolValue(true); - reflection->InsertOrLookupMapValue(message, F("map_bool_bool"), map_key, - &map_val); - map_val.SetBoolValue(true); - - map_key.SetStringValue("1"); - reflection->InsertOrLookupMapValue(message, F("map_string_string"), map_key, - &map_val); - map_val.SetStringValue("1"); - - map_key.SetInt32Value(1); - reflection->InsertOrLookupMapValue(message, F("map_int32_bytes"), map_key, - &map_val); - map_val.SetStringValue("1"); - - map_key.SetInt32Value(1); - reflection->InsertOrLookupMapValue(message, F("map_int32_enum"), map_key, - &map_val); - map_val.SetEnumValue(map_enum_baz_->number()); - - map_key.SetInt32Value(1); - EXPECT_TRUE(reflection->InsertOrLookupMapValue( - message, F("map_int32_foreign_message"), map_key, &map_val)); - sub_foreign_message = map_val.MutableMessageValue(); - sub_foreign_message->GetReflection()->SetInt32(sub_foreign_message, - foreign_c_, 1); -} - -void MapReflectionTester::GetMapValueViaMapReflection( - Message* message, const std::string& field_name, const MapKey& map_key, - MapValueRef* map_val) { - const Reflection* reflection = message->GetReflection(); - EXPECT_FALSE(reflection->InsertOrLookupMapValue(message, F(field_name), - map_key, map_val)); -} - -Message* MapReflectionTester::GetMapEntryViaReflection( - Message* message, const std::string& field_name, int index) { - const Reflection* reflection = message->GetReflection(); - return reflection->MutableRepeatedMessage(message, F(field_name), index); -} - -MapIterator MapReflectionTester::MapBegin(Message* message, - const std::string& field_name) { - const Reflection* reflection = message->GetReflection(); - return reflection->MapBegin(message, F(field_name)); -} - -MapIterator MapReflectionTester::MapEnd(Message* message, - const std::string& field_name) { - const Reflection* reflection = message->GetReflection(); - return reflection->MapEnd(message, F(field_name)); -} - -void MapReflectionTester::ClearMapFieldsViaReflection(Message* message) { - const Reflection* reflection = message->GetReflection(); - - reflection->ClearField(message, F("map_int32_int32")); - reflection->ClearField(message, F("map_int64_int64")); - reflection->ClearField(message, F("map_uint32_uint32")); - reflection->ClearField(message, F("map_uint64_uint64")); - reflection->ClearField(message, F("map_sint32_sint32")); - reflection->ClearField(message, F("map_sint64_sint64")); - reflection->ClearField(message, F("map_fixed32_fixed32")); - reflection->ClearField(message, F("map_fixed64_fixed64")); - reflection->ClearField(message, F("map_sfixed32_sfixed32")); - reflection->ClearField(message, F("map_sfixed64_sfixed64")); - reflection->ClearField(message, F("map_int32_float")); - reflection->ClearField(message, F("map_int32_double")); - reflection->ClearField(message, F("map_bool_bool")); - reflection->ClearField(message, F("map_string_string")); - reflection->ClearField(message, F("map_int32_bytes")); - reflection->ClearField(message, F("map_int32_enum")); - reflection->ClearField(message, F("map_int32_foreign_message")); -} - -void MapReflectionTester::ModifyMapFieldsViaReflection(Message* message) { - const Reflection* reflection = message->GetReflection(); - MapValueRef map_val; - Message* sub_foreign_message; - - // Modify the second element - MapKey map_key; - map_key.SetInt32Value(1); - EXPECT_FALSE(reflection->InsertOrLookupMapValue(message, F("map_int32_int32"), - map_key, &map_val)); - map_val.SetInt32Value(2); - - map_key.SetInt64Value(1); - EXPECT_FALSE(reflection->InsertOrLookupMapValue(message, F("map_int64_int64"), - map_key, &map_val)); - map_val.SetInt64Value(2); - - map_key.SetUInt32Value(1); - EXPECT_FALSE(reflection->InsertOrLookupMapValue( - message, F("map_uint32_uint32"), map_key, &map_val)); - map_val.SetUInt32Value(2); - - map_key.SetUInt64Value(1); - reflection->InsertOrLookupMapValue(message, F("map_uint64_uint64"), map_key, - &map_val); - map_val.SetUInt64Value(2); - - map_key.SetInt32Value(1); - reflection->InsertOrLookupMapValue(message, F("map_sint32_sint32"), map_key, - &map_val); - map_val.SetInt32Value(2); - - map_key.SetInt64Value(1); - reflection->InsertOrLookupMapValue(message, F("map_sint64_sint64"), map_key, - &map_val); - map_val.SetInt64Value(2); - - map_key.SetUInt32Value(1); - reflection->InsertOrLookupMapValue(message, F("map_fixed32_fixed32"), map_key, - &map_val); - map_val.SetUInt32Value(2); - - map_key.SetUInt64Value(1); - reflection->InsertOrLookupMapValue(message, F("map_fixed64_fixed64"), map_key, - &map_val); - map_val.SetUInt64Value(2); - - map_key.SetInt32Value(1); - reflection->InsertOrLookupMapValue(message, F("map_sfixed32_sfixed32"), - map_key, &map_val); - map_val.SetInt32Value(2); - - map_key.SetInt64Value(1); - reflection->InsertOrLookupMapValue(message, F("map_sfixed64_sfixed64"), - map_key, &map_val); - map_val.SetInt64Value(2); - - map_key.SetInt32Value(1); - reflection->InsertOrLookupMapValue(message, F("map_int32_float"), map_key, - &map_val); - map_val.SetFloatValue(2.0); - - map_key.SetInt32Value(1); - reflection->InsertOrLookupMapValue(message, F("map_int32_double"), map_key, - &map_val); - map_val.SetDoubleValue(2.0); - - map_key.SetBoolValue(true); - reflection->InsertOrLookupMapValue(message, F("map_bool_bool"), map_key, - &map_val); - map_val.SetBoolValue(false); - - map_key.SetStringValue("1"); - reflection->InsertOrLookupMapValue(message, F("map_string_string"), map_key, - &map_val); - map_val.SetStringValue("2"); - - map_key.SetInt32Value(1); - reflection->InsertOrLookupMapValue(message, F("map_int32_bytes"), map_key, - &map_val); - map_val.SetStringValue("2"); - - map_key.SetInt32Value(1); - reflection->InsertOrLookupMapValue(message, F("map_int32_enum"), map_key, - &map_val); - map_val.SetEnumValue(map_enum_foo_->number()); - - map_key.SetInt32Value(1); - EXPECT_FALSE(reflection->InsertOrLookupMapValue( - message, F("map_int32_foreign_message"), map_key, &map_val)); - sub_foreign_message = map_val.MutableMessageValue(); - sub_foreign_message->GetReflection()->SetInt32(sub_foreign_message, - foreign_c_, 2); -} - -void MapReflectionTester::RemoveLastMapsViaReflection(Message* message) { - const Reflection* reflection = message->GetReflection(); - - std::vector output; - reflection->ListFields(*message, &output); - for (int i = 0; i < output.size(); ++i) { - const FieldDescriptor* field = output[i]; - if (!field->is_repeated()) continue; - reflection->RemoveLast(message, field); - } -} - -void MapReflectionTester::ReleaseLastMapsViaReflection(Message* message) { - const Reflection* reflection = message->GetReflection(); - - std::vector output; - reflection->ListFields(*message, &output); - for (int i = 0; i < output.size(); ++i) { - const FieldDescriptor* field = output[i]; - if (!field->is_repeated()) continue; - if (field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) continue; - - Message* released = reflection->ReleaseLast(message, field); - ASSERT_TRUE(released != NULL) - << "ReleaseLast returned NULL for: " << field->name(); - delete released; - } -} - -void MapReflectionTester::SwapMapsViaReflection(Message* message) { - const Reflection* reflection = message->GetReflection(); - std::vector output; - reflection->ListFields(*message, &output); - for (int i = 0; i < output.size(); ++i) { - const FieldDescriptor* field = output[i]; - if (!field->is_repeated()) continue; - reflection->SwapElements(message, field, 0, 1); - } -} - -void MapReflectionTester::MutableUnknownFieldsOfMapFieldsViaReflection( - Message* message) { - const Reflection* reflection = message->GetReflection(); - Message* sub_message = NULL; - - sub_message = reflection->AddMessage(message, F("map_int32_int32")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_int64_int64")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_uint32_uint32")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_uint64_uint64")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_sint32_sint32")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_sint64_sint64")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_fixed32_fixed32")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_fixed64_fixed64")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_sfixed32_sfixed32")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_sfixed64_sfixed64")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_int32_float")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_int32_double")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_bool_bool")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_string_string")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_int32_bytes")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_int32_enum")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); - sub_message = reflection->AddMessage(message, F("map_int32_foreign_message")); - EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != - NULL); -} - -void MapReflectionTester::ExpectMapFieldsSetViaReflection( - const Message& message) { - std::string scratch; - const Reflection* reflection = message.GetReflection(); - const Message* sub_message; - MapKey map_key; - - // ----------------------------------------------------------------- - - ASSERT_EQ(2, reflection->FieldSize(message, F("map_int32_int32"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_int64_int64"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_uint32_uint32"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_uint64_uint64"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_sint32_sint32"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_sint64_sint64"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_fixed32_fixed32"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_fixed64_fixed64"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_sfixed32_sfixed32"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_sfixed64_sfixed64"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_int32_float"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_int32_double"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_bool_bool"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_string_string"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_int32_bytes"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_int32_enum"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("map_int32_foreign_message"))); - - { - std::map map; - map[0] = 0; - map[1] = 1; - for (int i = 0; i < 2; i++) { - // Check with RepeatedField Reflection - sub_message = - &reflection->GetRepeatedMessage(message, F("map_int32_int32"), i); - int32 key = sub_message->GetReflection()->GetInt32(*sub_message, - map_int32_int32_key_); - int32 val = sub_message->GetReflection()->GetInt32(*sub_message, - map_int32_int32_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetInt32Value(key); - EXPECT_TRUE( - reflection->ContainsMapKey(message, F("map_int32_int32"), map_key)); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (int i = 0; i < 2; i++) { - // Check with RepeatedField Reflection - sub_message = - &reflection->GetRepeatedMessage(message, F("map_int64_int64"), i); - int64 key = sub_message->GetReflection()->GetInt64(*sub_message, - map_int64_int64_key_); - int64 val = sub_message->GetReflection()->GetInt64(*sub_message, - map_int64_int64_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetInt64Value(key); - EXPECT_TRUE( - reflection->ContainsMapKey(message, F("map_int64_int64"), map_key)); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (int i = 0; i < 2; i++) { - // Check with RepeatedField Reflection - sub_message = - &reflection->GetRepeatedMessage(message, F("map_uint32_uint32"), i); - uint32 key = sub_message->GetReflection()->GetUInt32( - *sub_message, map_uint32_uint32_key_); - uint32 val = sub_message->GetReflection()->GetUInt32( - *sub_message, map_uint32_uint32_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetUInt32Value(key); - EXPECT_TRUE( - reflection->ContainsMapKey(message, F("map_uint32_uint32"), map_key)); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (int i = 0; i < 2; i++) { - sub_message = - &reflection->GetRepeatedMessage(message, F("map_uint64_uint64"), i); - uint64 key = sub_message->GetReflection()->GetUInt64( - *sub_message, map_uint64_uint64_key_); - uint64 val = sub_message->GetReflection()->GetUInt64( - *sub_message, map_uint64_uint64_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetUInt64Value(key); - EXPECT_TRUE( - reflection->ContainsMapKey(message, F("map_uint64_uint64"), map_key)); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (int i = 0; i < 2; i++) { - sub_message = - &reflection->GetRepeatedMessage(message, F("map_sint32_sint32"), i); - int32 key = sub_message->GetReflection()->GetInt32( - *sub_message, map_sint32_sint32_key_); - int32 val = sub_message->GetReflection()->GetInt32( - *sub_message, map_sint32_sint32_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetInt32Value(key); - EXPECT_EQ(true, reflection->ContainsMapKey( - message, F("map_sint32_sint32"), map_key)); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (int i = 0; i < 2; i++) { - sub_message = - &reflection->GetRepeatedMessage(message, F("map_sint64_sint64"), i); - int64 key = sub_message->GetReflection()->GetInt64( - *sub_message, map_sint64_sint64_key_); - int64 val = sub_message->GetReflection()->GetInt64( - *sub_message, map_sint64_sint64_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetInt64Value(key); - EXPECT_EQ(true, reflection->ContainsMapKey( - message, F("map_sint64_sint64"), map_key)); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (int i = 0; i < 2; i++) { - sub_message = - &reflection->GetRepeatedMessage(message, F("map_fixed32_fixed32"), i); - uint32 key = sub_message->GetReflection()->GetUInt32( - *sub_message, map_fixed32_fixed32_key_); - uint32 val = sub_message->GetReflection()->GetUInt32( - *sub_message, map_fixed32_fixed32_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetUInt32Value(key); - EXPECT_EQ(true, reflection->ContainsMapKey( - message, F("map_fixed32_fixed32"), map_key)); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (int i = 0; i < 2; i++) { - sub_message = - &reflection->GetRepeatedMessage(message, F("map_fixed64_fixed64"), i); - uint64 key = sub_message->GetReflection()->GetUInt64( - *sub_message, map_fixed64_fixed64_key_); - uint64 val = sub_message->GetReflection()->GetUInt64( - *sub_message, map_fixed64_fixed64_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetUInt64Value(key); - EXPECT_EQ(true, reflection->ContainsMapKey( - message, F("map_fixed64_fixed64"), map_key)); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (int i = 0; i < 2; i++) { - sub_message = &reflection->GetRepeatedMessage( - message, F("map_sfixed32_sfixed32"), i); - int32 key = sub_message->GetReflection()->GetInt32( - *sub_message, map_sfixed32_sfixed32_key_); - int32 val = sub_message->GetReflection()->GetInt32( - *sub_message, map_sfixed32_sfixed32_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetInt32Value(key); - EXPECT_EQ(true, reflection->ContainsMapKey( - message, F("map_sfixed32_sfixed32"), map_key)); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (int i = 0; i < 2; i++) { - sub_message = &reflection->GetRepeatedMessage( - message, F("map_sfixed64_sfixed64"), i); - int64 key = sub_message->GetReflection()->GetInt64( - *sub_message, map_sfixed64_sfixed64_key_); - int64 val = sub_message->GetReflection()->GetInt64( - *sub_message, map_sfixed64_sfixed64_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetInt64Value(key); - EXPECT_EQ(true, reflection->ContainsMapKey( - message, F("map_sfixed64_sfixed64"), map_key)); - } - } - { - std::map map; - map[0] = 0.0; - map[1] = 1.0; - for (int i = 0; i < 2; i++) { - sub_message = - &reflection->GetRepeatedMessage(message, F("map_int32_float"), i); - int32 key = sub_message->GetReflection()->GetInt32(*sub_message, - map_int32_float_key_); - float val = sub_message->GetReflection()->GetFloat(*sub_message, - map_int32_float_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetInt32Value(key); - EXPECT_EQ(true, reflection->ContainsMapKey(message, F("map_int32_float"), - map_key)); - } - } - { - std::map map; - map[0] = 0.0; - map[1] = 1.0; - for (int i = 0; i < 2; i++) { - sub_message = - &reflection->GetRepeatedMessage(message, F("map_int32_double"), i); - int32 key = sub_message->GetReflection()->GetInt32(*sub_message, - map_int32_double_key_); - double val = sub_message->GetReflection()->GetDouble( - *sub_message, map_int32_double_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetInt32Value(key); - EXPECT_EQ(true, reflection->ContainsMapKey(message, F("map_int32_double"), - map_key)); - } - } - { - std::map map; - map[false] = false; - map[true] = true; - for (int i = 0; i < 2; i++) { - sub_message = - &reflection->GetRepeatedMessage(message, F("map_bool_bool"), i); - bool key = sub_message->GetReflection()->GetBool(*sub_message, - map_bool_bool_key_); - bool val = sub_message->GetReflection()->GetBool(*sub_message, - map_bool_bool_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetBoolValue(key); - EXPECT_EQ(true, reflection->ContainsMapKey(message, F("map_bool_bool"), - map_key)); - } - } - { - std::map map; - map["0"] = "0"; - map["1"] = "1"; - for (int i = 0; i < 2; i++) { - sub_message = - &reflection->GetRepeatedMessage(message, F("map_string_string"), i); - std::string key = sub_message->GetReflection()->GetString( - *sub_message, map_string_string_key_); - std::string val = sub_message->GetReflection()->GetString( - *sub_message, map_string_string_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetStringValue(key); - EXPECT_EQ(true, reflection->ContainsMapKey( - message, F("map_string_string"), map_key)); - } - } - { - std::map map; - map[0] = "0"; - map[1] = "1"; - for (int i = 0; i < 2; i++) { - sub_message = - &reflection->GetRepeatedMessage(message, F("map_int32_bytes"), i); - int32 key = sub_message->GetReflection()->GetInt32(*sub_message, - map_int32_bytes_key_); - std::string val = sub_message->GetReflection()->GetString( - *sub_message, map_int32_bytes_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetInt32Value(key); - EXPECT_EQ(true, reflection->ContainsMapKey(message, F("map_int32_bytes"), - map_key)); - } - } - { - std::map map; - map[0] = map_enum_bar_; - map[1] = map_enum_baz_; - for (int i = 0; i < 2; i++) { - sub_message = - &reflection->GetRepeatedMessage(message, F("map_int32_enum"), i); - int32 key = sub_message->GetReflection()->GetInt32(*sub_message, - map_int32_enum_key_); - const EnumValueDescriptor* val = sub_message->GetReflection()->GetEnum( - *sub_message, map_int32_enum_val_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetInt32Value(key); - EXPECT_EQ(true, reflection->ContainsMapKey(message, F("map_int32_enum"), - map_key)); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (int i = 0; i < 2; i++) { - sub_message = &reflection->GetRepeatedMessage( - message, F("map_int32_foreign_message"), i); - int32 key = sub_message->GetReflection()->GetInt32( - *sub_message, map_int32_foreign_message_key_); - const Message& foreign_message = sub_message->GetReflection()->GetMessage( - *sub_message, map_int32_foreign_message_val_); - int32 val = foreign_message.GetReflection()->GetInt32(foreign_message, - foreign_c_); - EXPECT_EQ(map[key], val); - // Check with Map Reflection - map_key.SetInt32Value(key); - EXPECT_EQ(true, reflection->ContainsMapKey( - message, F("map_int32_foreign_message"), map_key)); - } - } -} - -void MapReflectionTester::ExpectMapFieldsSetViaReflectionIterator( - Message* message) { - std::string scratch; - std::string serialized; - const Reflection* reflection = message->GetReflection(); - - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_int32_int32"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_int64_int64"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_uint32_uint32"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_uint64_uint64"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_sint32_sint32"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_sint64_sint64"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_fixed32_fixed32"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_fixed64_fixed64"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_sfixed32_sfixed32"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_sfixed64_sfixed64"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_int32_float"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_int32_double"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_bool_bool"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_string_string"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_int32_bytes"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_int32_enum"))); - ASSERT_EQ(2, reflection->FieldSize(*message, F("map_int32_foreign_message"))); - - { - std::map map; - map[0] = 0; - map[1] = 1; - int size = 0; - for (MapIterator iter = reflection->MapBegin(message, F("map_int32_int32")); - iter != reflection->MapEnd(message, F("map_int32_int32")); - ++iter, ++size) { - // Check const methods do not invalidate map. - message->DebugString(); - message->ShortDebugString(); - message->SerializeToString(&serialized); - message->SpaceUsed(); - message->ByteSize(); - EXPECT_EQ(map[iter.GetKey().GetInt32Value()], - iter.GetValueRef().GetInt32Value()); - } - EXPECT_EQ(size, 2); - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (MapIterator iter = reflection->MapBegin(message, F("map_int64_int64")); - iter != reflection->MapEnd(message, F("map_int64_int64")); ++iter) { - EXPECT_EQ(map[iter.GetKey().GetInt64Value()], - iter.GetValueRef().GetInt64Value()); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (MapIterator iter = - reflection->MapBegin(message, F("map_uint32_uint32")); - iter != reflection->MapEnd(message, F("map_uint32_uint32")); ++iter) { - EXPECT_EQ(map[iter.GetKey().GetUInt32Value()], - iter.GetValueRef().GetUInt32Value()); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (MapIterator iter = - reflection->MapBegin(message, F("map_uint64_uint64")); - iter != reflection->MapEnd(message, F("map_uint64_uint64")); ++iter) { - EXPECT_EQ(map[iter.GetKey().GetUInt64Value()], - iter.GetValueRef().GetUInt64Value()); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (MapIterator iter = - reflection->MapBegin(message, F("map_sint32_sint32")); - iter != reflection->MapEnd(message, F("map_sint32_sint32")); ++iter) { - EXPECT_EQ(map[iter.GetKey().GetInt32Value()], - iter.GetValueRef().GetInt32Value()); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (MapIterator iter = - reflection->MapBegin(message, F("map_sint64_sint64")); - iter != reflection->MapEnd(message, F("map_sint64_sint64")); ++iter) { - EXPECT_EQ(map[iter.GetKey().GetInt64Value()], - iter.GetValueRef().GetInt64Value()); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (MapIterator iter = - reflection->MapBegin(message, F("map_fixed32_fixed32")); - iter != reflection->MapEnd(message, F("map_fixed32_fixed32")); - ++iter) { - EXPECT_EQ(map[iter.GetKey().GetUInt32Value()], - iter.GetValueRef().GetUInt32Value()); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (MapIterator iter = - reflection->MapBegin(message, F("map_fixed64_fixed64")); - iter != reflection->MapEnd(message, F("map_fixed64_fixed64")); - ++iter) { - EXPECT_EQ(map[iter.GetKey().GetUInt64Value()], - iter.GetValueRef().GetUInt64Value()); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - for (MapIterator iter = - reflection->MapBegin(message, F("map_sfixed32_sfixed32")); - iter != reflection->MapEnd(message, F("map_sfixed32_sfixed32")); - ++iter) { - EXPECT_EQ(map[iter.GetKey().GetInt32Value()], - iter.GetValueRef().GetInt32Value()); - } - } - { - std::map map; - map[0] = 0.0; - map[1] = 1.0; - for (MapIterator iter = reflection->MapBegin(message, F("map_int32_float")); - iter != reflection->MapEnd(message, F("map_int32_float")); ++iter) { - EXPECT_EQ(map[iter.GetKey().GetInt32Value()], - iter.GetValueRef().GetFloatValue()); - } - } - { - std::map map; - map[0] = 0.0; - map[1] = 1.0; - for (MapIterator iter = - reflection->MapBegin(message, F("map_int32_double")); - iter != reflection->MapEnd(message, F("map_int32_double")); ++iter) { - EXPECT_EQ(map[iter.GetKey().GetInt32Value()], - iter.GetValueRef().GetDoubleValue()); - } - } - { - std::map map; - map[false] = false; - map[true] = true; - for (MapIterator iter = reflection->MapBegin(message, F("map_bool_bool")); - iter != reflection->MapEnd(message, F("map_bool_bool")); ++iter) { - EXPECT_EQ(map[iter.GetKey().GetBoolValue()], - iter.GetValueRef().GetBoolValue()); - } - } - { - std::map map; - map["0"] = "0"; - map["1"] = "1"; - int size = 0; - for (MapIterator iter = - reflection->MapBegin(message, F("map_string_string")); - iter != reflection->MapEnd(message, F("map_string_string")); - ++iter, ++size) { - // Check const methods do not invalidate map. - message->DebugString(); - message->ShortDebugString(); - message->SerializeToString(&serialized); - message->SpaceUsed(); - message->ByteSize(); - EXPECT_EQ(map[iter.GetKey().GetStringValue()], - iter.GetValueRef().GetStringValue()); - } - EXPECT_EQ(size, 2); - } - { - std::map map; - map[0] = "0"; - map[1] = "1"; - for (MapIterator iter = reflection->MapBegin(message, F("map_int32_bytes")); - iter != reflection->MapEnd(message, F("map_int32_bytes")); ++iter) { - EXPECT_EQ(map[iter.GetKey().GetInt32Value()], - iter.GetValueRef().GetStringValue()); - } - } - { - std::map map; - map[0] = map_enum_bar_; - map[1] = map_enum_baz_; - for (MapIterator iter = reflection->MapBegin(message, F("map_int32_enum")); - iter != reflection->MapEnd(message, F("map_int32_enum")); ++iter) { - EXPECT_EQ(map[iter.GetKey().GetInt32Value()]->number(), - iter.GetValueRef().GetEnumValue()); - } - } - { - std::map map; - map[0] = 0; - map[1] = 1; - int size = 0; - for (MapIterator iter = - reflection->MapBegin(message, F("map_int32_foreign_message")); - iter != reflection->MapEnd(message, F("map_int32_foreign_message")); - ++iter, ++size) { - // Check const methods do not invalidate map. - message->DebugString(); - message->ShortDebugString(); - message->SerializeToString(&serialized); - message->SpaceUsed(); - message->ByteSize(); - const Message& sub_message = iter.GetValueRef().GetMessageValue(); - EXPECT_EQ(map[iter.GetKey().GetInt32Value()], - sub_message.GetReflection()->GetInt32(sub_message, foreign_c_)); - } - EXPECT_EQ(size, 2); - } -} - -void MapReflectionTester::ExpectClearViaReflection(const Message& message) { - const Reflection* reflection = message.GetReflection(); - // Map fields are empty. - EXPECT_EQ(0, reflection->FieldSize(message, F("map_int32_int32"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_int64_int64"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_uint32_uint32"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_uint64_uint64"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_sint32_sint32"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_sint64_sint64"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_fixed32_fixed32"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_fixed64_fixed64"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_sfixed32_sfixed32"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_sfixed64_sfixed64"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_int32_float"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_int32_double"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_bool_bool"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_string_string"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_int32_bytes"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_int32_enum"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("map_int32_foreign_message"))); - EXPECT_TRUE(reflection->GetMapData(message, F("map_int32_foreign_message")) - ->IsMapValid()); -} - -void MapReflectionTester::ExpectClearViaReflectionIterator(Message* message) { - const Reflection* reflection = message->GetReflection(); - EXPECT_TRUE(reflection->MapBegin(message, F("map_int32_int32")) == - reflection->MapEnd(message, F("map_int32_int32"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_int64_int64")) == - reflection->MapEnd(message, F("map_int64_int64"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_uint32_uint32")) == - reflection->MapEnd(message, F("map_uint32_uint32"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_uint64_uint64")) == - reflection->MapEnd(message, F("map_uint64_uint64"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_sint32_sint32")) == - reflection->MapEnd(message, F("map_sint32_sint32"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_sint64_sint64")) == - reflection->MapEnd(message, F("map_sint64_sint64"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_fixed32_fixed32")) == - reflection->MapEnd(message, F("map_fixed32_fixed32"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_fixed64_fixed64")) == - reflection->MapEnd(message, F("map_fixed64_fixed64"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_sfixed32_sfixed32")) == - reflection->MapEnd(message, F("map_sfixed32_sfixed32"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_sfixed64_sfixed64")) == - reflection->MapEnd(message, F("map_sfixed64_sfixed64"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_int32_float")) == - reflection->MapEnd(message, F("map_int32_float"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_int32_double")) == - reflection->MapEnd(message, F("map_int32_double"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_bool_bool")) == - reflection->MapEnd(message, F("map_bool_bool"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_string_string")) == - reflection->MapEnd(message, F("map_string_string"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_int32_bytes")) == - reflection->MapEnd(message, F("map_int32_bytes"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_int32_enum")) == - reflection->MapEnd(message, F("map_int32_enum"))); - EXPECT_TRUE(reflection->MapBegin(message, F("map_int32_foreign_message")) == - reflection->MapEnd(message, F("map_int32_foreign_message"))); -} - -void MapReflectionTester::ExpectMapEntryClearViaReflection(Message* message) { - const Reflection* reflection = message->GetReflection(); - const Message* sub_message; - - { - const FieldDescriptor* descriptor = F("map_int32_int32"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_int32_int32")); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, - key_descriptor)); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, - value_descriptor)); - } - { - const FieldDescriptor* descriptor = F("map_int64_int64"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_int64_int64")); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt64(*sub_message, - key_descriptor)); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt64(*sub_message, - value_descriptor)); - } - { - const FieldDescriptor* descriptor = F("map_uint32_uint32"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_uint32_uint32")); - EXPECT_EQ(0, sub_message->GetReflection()->GetUInt32(*sub_message, - key_descriptor)); - EXPECT_EQ(0, sub_message->GetReflection()->GetUInt32(*sub_message, - value_descriptor)); - } - { - const FieldDescriptor* descriptor = F("map_uint64_uint64"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_uint64_uint64")); - EXPECT_EQ(0, sub_message->GetReflection()->GetUInt64(*sub_message, - key_descriptor)); - EXPECT_EQ(0, sub_message->GetReflection()->GetUInt64(*sub_message, - value_descriptor)); - } - { - const FieldDescriptor* descriptor = F("map_sint32_sint32"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_sint32_sint32")); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, - key_descriptor)); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, - value_descriptor)); - } - { - const FieldDescriptor* descriptor = F("map_sint64_sint64"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_sint64_sint64")); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt64(*sub_message, - key_descriptor)); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt64(*sub_message, - value_descriptor)); - } - { - const FieldDescriptor* descriptor = F("map_fixed32_fixed32"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_fixed32_fixed32")); - EXPECT_EQ(0, sub_message->GetReflection()->GetUInt32(*sub_message, - key_descriptor)); - EXPECT_EQ(0, sub_message->GetReflection()->GetUInt32(*sub_message, - value_descriptor)); - } - { - const FieldDescriptor* descriptor = F("map_fixed64_fixed64"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_fixed64_fixed64")); - EXPECT_EQ(0, sub_message->GetReflection()->GetUInt64(*sub_message, - key_descriptor)); - EXPECT_EQ(0, sub_message->GetReflection()->GetUInt64(*sub_message, - value_descriptor)); - } - { - const FieldDescriptor* descriptor = F("map_sfixed32_sfixed32"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_sfixed32_sfixed32")); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, - key_descriptor)); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, - value_descriptor)); - } - { - const FieldDescriptor* descriptor = F("map_sfixed64_sfixed64"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_sfixed64_sfixed64")); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt64(*sub_message, - key_descriptor)); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt64(*sub_message, - value_descriptor)); - } - { - const FieldDescriptor* descriptor = F("map_int32_float"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_int32_float")); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, - key_descriptor)); - EXPECT_EQ(0, sub_message->GetReflection()->GetFloat(*sub_message, - value_descriptor)); - } - { - const FieldDescriptor* descriptor = F("map_int32_double"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_int32_double")); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, - key_descriptor)); - EXPECT_EQ(0, sub_message->GetReflection()->GetDouble(*sub_message, - value_descriptor)); - } - { - const FieldDescriptor* descriptor = F("map_bool_bool"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_bool_bool")); - EXPECT_EQ(false, sub_message->GetReflection()->GetBool(*sub_message, - key_descriptor)); - EXPECT_EQ(false, sub_message->GetReflection()->GetBool(*sub_message, - value_descriptor)); - } - { - const FieldDescriptor* descriptor = F("map_string_string"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_string_string")); - EXPECT_EQ("", sub_message->GetReflection()->GetString(*sub_message, - key_descriptor)); - EXPECT_EQ("", sub_message->GetReflection()->GetString(*sub_message, - value_descriptor)); - } - { - const FieldDescriptor* descriptor = F("map_int32_bytes"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_int32_bytes")); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, - key_descriptor)); - EXPECT_EQ("", sub_message->GetReflection()->GetString(*sub_message, - value_descriptor)); - } - { - const FieldDescriptor* descriptor = F("map_int32_enum"); - const FieldDescriptor* key_descriptor = - descriptor->message_type()->FindFieldByName("key"); - const FieldDescriptor* value_descriptor = - descriptor->message_type()->FindFieldByName("value"); - sub_message = reflection->AddMessage(message, F("map_int32_enum")); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, - key_descriptor)); - EXPECT_EQ(0, sub_message->GetReflection() - ->GetEnum(*sub_message, value_descriptor) - ->number()); - } - // Map using message as value has been tested in other place. Thus, we don't - // test it here. -} - -} // namespace protobuf -} // namespace google diff --git a/third_party/protobuf/src/google/protobuf/map_test_util.h b/third_party/protobuf/src/google/protobuf/map_test_util.h index 00d2fa4d..8f0bdcfe 100644 --- a/third_party/protobuf/src/google/protobuf/map_test_util.h +++ b/third_party/protobuf/src/google/protobuf/map_test_util.h @@ -33,56 +33,18 @@ #include +#define UNITTEST ::protobuf_unittest +// Must define UNITTEST before including map_test_util.inc. +#include +#undef UNITTEST + +#include + namespace google { namespace protobuf { namespace unittest = ::protobuf_unittest; -class MapTestUtil { - public: - // Set every field in the TestMap message to a unique value. - static void SetMapFields(unittest::TestMap* message); - - // Set every field in the TestArenaMap message to a unique value. - static void SetArenaMapFields(unittest::TestArenaMap* message); - - // Set every field in the message to a default value. - static void SetMapFieldsInitialized(unittest::TestMap* message); - - // Modify all the map fields of the message (which should already have been - // initialized with SetMapFields()). - static void ModifyMapFields(unittest::TestMap* message); - - // Check that all fields have the values that they should have after - // SetMapFields() is called. - static void ExpectMapFieldsSet(const unittest::TestMap& message); - - // Check that all fields have the values that they should have after - // SetMapFields() is called for TestArenaMap. - static void ExpectArenaMapFieldsSet(const unittest::TestArenaMap& message); - - // Check that all fields have the values that they should have after - // SetMapFieldsInitialized() is called. - static void ExpectMapFieldsSetInitialized(const unittest::TestMap& message); - - // Expect that the message is modified as would be expected from - // ModifyMapFields(). - static void ExpectMapFieldsModified(const unittest::TestMap& message); - - // Check that all fields are empty. - static void ExpectClear(const unittest::TestMap& message); - - // Check that all map fields have the given size. - static void ExpectMapsSize(const unittest::TestMap& message, int size); - - // Get pointers of map entries at given index. - static std::vector GetMapEntries( - const unittest::TestMap& message, int index); - - // Get pointers of map entries from release. - static std::vector GetMapEntriesFromRelease( - unittest::TestMap* message); -}; // Like above, but use the reflection interface. class MapReflectionTester { @@ -104,7 +66,6 @@ class MapReflectionTester { void ExpectMapFieldsSetViaReflectionIterator(Message* message); void ExpectClearViaReflection(const Message& message); void ExpectClearViaReflectionIterator(Message* message); - void ExpectMapEntryClearViaReflection(Message* message); void GetMapValueViaMapReflection(Message* message, const std::string& field_name, const MapKey& map_key, MapValueRef* map_val); @@ -112,6 +73,7 @@ class MapReflectionTester { const std::string& field_name, int index); MapIterator MapBegin(Message* message, const std::string& field_name); MapIterator MapEnd(Message* message, const std::string& field_name); + int MapSize(const Message& message, const std::string& field_name); private: const FieldDescriptor* F(const std::string& name); @@ -159,7 +121,1446 @@ class MapReflectionTester { const FieldDescriptor* map_int32_foreign_message_val_; }; +inline MapReflectionTester::MapReflectionTester( + const Descriptor* base_descriptor) + : base_descriptor_(base_descriptor) { + const DescriptorPool* pool = base_descriptor->file()->pool(); + std::string package = base_descriptor->file()->package(); + + map_enum_foo_ = pool->FindEnumValueByName(package + ".MAP_ENUM_FOO"); + map_enum_bar_ = pool->FindEnumValueByName(package + ".MAP_ENUM_BAR"); + map_enum_baz_ = pool->FindEnumValueByName(package + ".MAP_ENUM_BAZ"); + + foreign_c_ = pool->FindFieldByName(package + ".ForeignMessage.c"); + map_int32_int32_key_ = + pool->FindFieldByName(package + ".TestMap.MapInt32Int32Entry.key"); + map_int32_int32_val_ = + pool->FindFieldByName(package + ".TestMap.MapInt32Int32Entry.value"); + map_int64_int64_key_ = + pool->FindFieldByName(package + ".TestMap.MapInt64Int64Entry.key"); + map_int64_int64_val_ = + pool->FindFieldByName(package + ".TestMap.MapInt64Int64Entry.value"); + map_uint32_uint32_key_ = + pool->FindFieldByName(package + ".TestMap.MapUint32Uint32Entry.key"); + map_uint32_uint32_val_ = + pool->FindFieldByName(package + ".TestMap.MapUint32Uint32Entry.value"); + map_uint64_uint64_key_ = + pool->FindFieldByName(package + ".TestMap.MapUint64Uint64Entry.key"); + map_uint64_uint64_val_ = + pool->FindFieldByName(package + ".TestMap.MapUint64Uint64Entry.value"); + map_sint32_sint32_key_ = + pool->FindFieldByName(package + ".TestMap.MapSint32Sint32Entry.key"); + map_sint32_sint32_val_ = + pool->FindFieldByName(package + ".TestMap.MapSint32Sint32Entry.value"); + map_sint64_sint64_key_ = + pool->FindFieldByName(package + ".TestMap.MapSint64Sint64Entry.key"); + map_sint64_sint64_val_ = + pool->FindFieldByName(package + ".TestMap.MapSint64Sint64Entry.value"); + map_fixed32_fixed32_key_ = + pool->FindFieldByName(package + ".TestMap.MapFixed32Fixed32Entry.key"); + map_fixed32_fixed32_val_ = + pool->FindFieldByName(package + ".TestMap.MapFixed32Fixed32Entry.value"); + map_fixed64_fixed64_key_ = + pool->FindFieldByName(package + ".TestMap.MapFixed64Fixed64Entry.key"); + map_fixed64_fixed64_val_ = + pool->FindFieldByName(package + ".TestMap.MapFixed64Fixed64Entry.value"); + map_sfixed32_sfixed32_key_ = + pool->FindFieldByName(package + ".TestMap.MapSfixed32Sfixed32Entry.key"); + map_sfixed32_sfixed32_val_ = pool->FindFieldByName( + package + ".TestMap.MapSfixed32Sfixed32Entry.value"); + map_sfixed64_sfixed64_key_ = + pool->FindFieldByName(package + ".TestMap.MapSfixed64Sfixed64Entry.key"); + map_sfixed64_sfixed64_val_ = pool->FindFieldByName( + package + ".TestMap.MapSfixed64Sfixed64Entry.value"); + map_int32_float_key_ = + pool->FindFieldByName(package + ".TestMap.MapInt32FloatEntry.key"); + map_int32_float_val_ = + pool->FindFieldByName(package + ".TestMap.MapInt32FloatEntry.value"); + map_int32_double_key_ = + pool->FindFieldByName(package + ".TestMap.MapInt32DoubleEntry.key"); + map_int32_double_val_ = + pool->FindFieldByName(package + ".TestMap.MapInt32DoubleEntry.value"); + map_bool_bool_key_ = + pool->FindFieldByName(package + ".TestMap.MapBoolBoolEntry.key"); + map_bool_bool_val_ = + pool->FindFieldByName(package + ".TestMap.MapBoolBoolEntry.value"); + map_string_string_key_ = + pool->FindFieldByName(package + ".TestMap.MapStringStringEntry.key"); + map_string_string_val_ = + pool->FindFieldByName(package + ".TestMap.MapStringStringEntry.value"); + map_int32_bytes_key_ = + pool->FindFieldByName(package + ".TestMap.MapInt32BytesEntry.key"); + map_int32_bytes_val_ = + pool->FindFieldByName(package + ".TestMap.MapInt32BytesEntry.value"); + map_int32_enum_key_ = + pool->FindFieldByName(package + ".TestMap.MapInt32EnumEntry.key"); + map_int32_enum_val_ = + pool->FindFieldByName(package + ".TestMap.MapInt32EnumEntry.value"); + map_int32_foreign_message_key_ = pool->FindFieldByName( + package + ".TestMap.MapInt32ForeignMessageEntry.key"); + map_int32_foreign_message_val_ = pool->FindFieldByName( + package + ".TestMap.MapInt32ForeignMessageEntry.value"); + + EXPECT_FALSE(map_enum_foo_ == nullptr); + EXPECT_FALSE(map_enum_bar_ == nullptr); + EXPECT_FALSE(map_enum_baz_ == nullptr); + EXPECT_FALSE(map_int32_int32_key_ == nullptr); + EXPECT_FALSE(map_int32_int32_val_ == nullptr); + EXPECT_FALSE(map_int64_int64_key_ == nullptr); + EXPECT_FALSE(map_int64_int64_val_ == nullptr); + EXPECT_FALSE(map_uint32_uint32_key_ == nullptr); + EXPECT_FALSE(map_uint32_uint32_val_ == nullptr); + EXPECT_FALSE(map_uint64_uint64_key_ == nullptr); + EXPECT_FALSE(map_uint64_uint64_val_ == nullptr); + EXPECT_FALSE(map_sint32_sint32_key_ == nullptr); + EXPECT_FALSE(map_sint32_sint32_val_ == nullptr); + EXPECT_FALSE(map_sint64_sint64_key_ == nullptr); + EXPECT_FALSE(map_sint64_sint64_val_ == nullptr); + EXPECT_FALSE(map_fixed32_fixed32_key_ == nullptr); + EXPECT_FALSE(map_fixed32_fixed32_val_ == nullptr); + EXPECT_FALSE(map_fixed64_fixed64_key_ == nullptr); + EXPECT_FALSE(map_fixed64_fixed64_val_ == nullptr); + EXPECT_FALSE(map_sfixed32_sfixed32_key_ == nullptr); + EXPECT_FALSE(map_sfixed32_sfixed32_val_ == nullptr); + EXPECT_FALSE(map_sfixed64_sfixed64_key_ == nullptr); + EXPECT_FALSE(map_sfixed64_sfixed64_val_ == nullptr); + EXPECT_FALSE(map_int32_float_key_ == nullptr); + EXPECT_FALSE(map_int32_float_val_ == nullptr); + EXPECT_FALSE(map_int32_double_key_ == nullptr); + EXPECT_FALSE(map_int32_double_val_ == nullptr); + EXPECT_FALSE(map_bool_bool_key_ == nullptr); + EXPECT_FALSE(map_bool_bool_val_ == nullptr); + EXPECT_FALSE(map_string_string_key_ == nullptr); + EXPECT_FALSE(map_string_string_val_ == nullptr); + EXPECT_FALSE(map_int32_bytes_key_ == nullptr); + EXPECT_FALSE(map_int32_bytes_val_ == nullptr); + EXPECT_FALSE(map_int32_enum_key_ == nullptr); + EXPECT_FALSE(map_int32_enum_val_ == nullptr); + EXPECT_FALSE(map_int32_foreign_message_key_ == nullptr); + EXPECT_FALSE(map_int32_foreign_message_val_ == nullptr); + + std::vector all_map_descriptors = { + map_int32_int32_key_, + map_int32_int32_val_, + map_int64_int64_key_, + map_int64_int64_val_, + map_uint32_uint32_key_, + map_uint32_uint32_val_, + map_uint64_uint64_key_, + map_uint64_uint64_val_, + map_sint32_sint32_key_, + map_sint32_sint32_val_, + map_sint64_sint64_key_, + map_sint64_sint64_val_, + map_fixed32_fixed32_key_, + map_fixed32_fixed32_val_, + map_fixed64_fixed64_key_, + map_fixed64_fixed64_val_, + map_sfixed32_sfixed32_key_, + map_sfixed32_sfixed32_val_, + map_sfixed64_sfixed64_key_, + map_sfixed64_sfixed64_val_, + map_int32_float_key_, + map_int32_float_val_, + map_int32_double_key_, + map_int32_double_val_, + map_bool_bool_key_, + map_bool_bool_val_, + map_string_string_key_, + map_string_string_val_, + map_int32_bytes_key_, + map_int32_bytes_val_, + map_int32_enum_key_, + map_int32_enum_val_, + map_int32_foreign_message_key_, + map_int32_foreign_message_val_}; + for (const FieldDescriptor* fdesc : all_map_descriptors) { + GOOGLE_CHECK(fdesc->containing_type() != nullptr) << fdesc->name(); + if (fdesc->name() == "key") { + EXPECT_EQ(fdesc->containing_type()->map_key(), fdesc); + } else { + EXPECT_EQ(fdesc->name(), "value"); + EXPECT_EQ(fdesc->containing_type()->map_value(), fdesc); + } + } +} + +// Shorthand to get a FieldDescriptor for a field of unittest::TestMap. +inline const FieldDescriptor* MapReflectionTester::F(const std::string& name) { + const FieldDescriptor* result = nullptr; + result = base_descriptor_->FindFieldByName(name); + GOOGLE_CHECK(result != nullptr); + return result; +} + +inline void MapReflectionTester::SetMapFieldsViaReflection(Message* message) { + const Reflection* reflection = message->GetReflection(); + Message* sub_message = nullptr; + Message* sub_foreign_message = nullptr; + + // Add first element. + sub_message = reflection->AddMessage(message, F("map_int32_int32")); + sub_message->GetReflection()->SetInt32(sub_message, map_int32_int32_key_, 0); + sub_message->GetReflection()->SetInt32(sub_message, map_int32_int32_val_, 0); + + sub_message = reflection->AddMessage(message, F("map_int64_int64")); + sub_message->GetReflection()->SetInt64(sub_message, map_int64_int64_key_, 0); + sub_message->GetReflection()->SetInt64(sub_message, map_int64_int64_val_, 0); + + sub_message = reflection->AddMessage(message, F("map_uint32_uint32")); + sub_message->GetReflection()->SetUInt32(sub_message, map_uint32_uint32_key_, + 0); + sub_message->GetReflection()->SetUInt32(sub_message, map_uint32_uint32_val_, + 0); + + sub_message = reflection->AddMessage(message, F("map_uint64_uint64")); + sub_message->GetReflection()->SetUInt64(sub_message, map_uint64_uint64_key_, + 0); + sub_message->GetReflection()->SetUInt64(sub_message, map_uint64_uint64_val_, + 0); + + sub_message = reflection->AddMessage(message, F("map_sint32_sint32")); + sub_message->GetReflection()->SetInt32(sub_message, map_sint32_sint32_key_, + 0); + sub_message->GetReflection()->SetInt32(sub_message, map_sint32_sint32_val_, + 0); + + sub_message = reflection->AddMessage(message, F("map_sint64_sint64")); + sub_message->GetReflection()->SetInt64(sub_message, map_sint64_sint64_key_, + 0); + sub_message->GetReflection()->SetInt64(sub_message, map_sint64_sint64_val_, + 0); + + sub_message = reflection->AddMessage(message, F("map_fixed32_fixed32")); + sub_message->GetReflection()->SetUInt32(sub_message, map_fixed32_fixed32_key_, + 0); + sub_message->GetReflection()->SetUInt32(sub_message, map_fixed32_fixed32_val_, + 0); + + sub_message = reflection->AddMessage(message, F("map_fixed64_fixed64")); + sub_message->GetReflection()->SetUInt64(sub_message, map_fixed64_fixed64_key_, + 0); + sub_message->GetReflection()->SetUInt64(sub_message, map_fixed64_fixed64_val_, + 0); + + sub_message = reflection->AddMessage(message, F("map_sfixed32_sfixed32")); + sub_message->GetReflection()->SetInt32(sub_message, + map_sfixed32_sfixed32_key_, 0); + sub_message->GetReflection()->SetInt32(sub_message, + map_sfixed32_sfixed32_val_, 0); + + sub_message = reflection->AddMessage(message, F("map_sfixed64_sfixed64")); + sub_message->GetReflection()->SetInt64(sub_message, + map_sfixed64_sfixed64_key_, 0); + sub_message->GetReflection()->SetInt64(sub_message, + map_sfixed64_sfixed64_val_, 0); + + sub_message = reflection->AddMessage(message, F("map_int32_float")); + sub_message->GetReflection()->SetInt32(sub_message, map_int32_float_key_, 0); + sub_message->GetReflection()->SetFloat(sub_message, map_int32_float_val_, + 0.0); + + sub_message = reflection->AddMessage(message, F("map_int32_double")); + sub_message->GetReflection()->SetInt32(sub_message, map_int32_double_key_, 0); + sub_message->GetReflection()->SetDouble(sub_message, map_int32_double_val_, + 0.0); + + sub_message = reflection->AddMessage(message, F("map_bool_bool")); + sub_message->GetReflection()->SetBool(sub_message, map_bool_bool_key_, false); + sub_message->GetReflection()->SetBool(sub_message, map_bool_bool_val_, false); + + sub_message = reflection->AddMessage(message, F("map_string_string")); + sub_message->GetReflection()->SetString(sub_message, map_string_string_key_, + "0"); + sub_message->GetReflection()->SetString(sub_message, map_string_string_val_, + "0"); + + sub_message = reflection->AddMessage(message, F("map_int32_bytes")); + sub_message->GetReflection()->SetInt32(sub_message, map_int32_bytes_key_, 0); + sub_message->GetReflection()->SetString(sub_message, map_int32_bytes_val_, + "0"); + + sub_message = reflection->AddMessage(message, F("map_int32_enum")); + sub_message->GetReflection()->SetInt32(sub_message, map_int32_enum_key_, 0); + sub_message->GetReflection()->SetEnum(sub_message, map_int32_enum_val_, + map_enum_bar_); + + sub_message = reflection->AddMessage(message, F("map_int32_foreign_message")); + sub_message->GetReflection()->SetInt32(sub_message, + map_int32_foreign_message_key_, 0); + sub_foreign_message = sub_message->GetReflection()->MutableMessage( + sub_message, map_int32_foreign_message_val_, nullptr); + sub_foreign_message->GetReflection()->SetInt32(sub_foreign_message, + foreign_c_, 0); + + // Add second element + sub_message = reflection->AddMessage(message, F("map_int32_int32")); + sub_message->GetReflection()->SetInt32(sub_message, map_int32_int32_key_, 1); + sub_message->GetReflection()->SetInt32(sub_message, map_int32_int32_val_, 1); + + sub_message = reflection->AddMessage(message, F("map_int64_int64")); + sub_message->GetReflection()->SetInt64(sub_message, map_int64_int64_key_, 1); + sub_message->GetReflection()->SetInt64(sub_message, map_int64_int64_val_, 1); + + sub_message = reflection->AddMessage(message, F("map_uint32_uint32")); + sub_message->GetReflection()->SetUInt32(sub_message, map_uint32_uint32_key_, + 1); + sub_message->GetReflection()->SetUInt32(sub_message, map_uint32_uint32_val_, + 1); + + sub_message = reflection->AddMessage(message, F("map_uint64_uint64")); + sub_message->GetReflection()->SetUInt64(sub_message, map_uint64_uint64_key_, + 1); + sub_message->GetReflection()->SetUInt64(sub_message, map_uint64_uint64_val_, + 1); + + sub_message = reflection->AddMessage(message, F("map_sint32_sint32")); + sub_message->GetReflection()->SetInt32(sub_message, map_sint32_sint32_key_, + 1); + sub_message->GetReflection()->SetInt32(sub_message, map_sint32_sint32_val_, + 1); + + sub_message = reflection->AddMessage(message, F("map_sint64_sint64")); + sub_message->GetReflection()->SetInt64(sub_message, map_sint64_sint64_key_, + 1); + sub_message->GetReflection()->SetInt64(sub_message, map_sint64_sint64_val_, + 1); + + sub_message = reflection->AddMessage(message, F("map_fixed32_fixed32")); + sub_message->GetReflection()->SetUInt32(sub_message, map_fixed32_fixed32_key_, + 1); + sub_message->GetReflection()->SetUInt32(sub_message, map_fixed32_fixed32_val_, + 1); + + sub_message = reflection->AddMessage(message, F("map_fixed64_fixed64")); + sub_message->GetReflection()->SetUInt64(sub_message, map_fixed64_fixed64_key_, + 1); + sub_message->GetReflection()->SetUInt64(sub_message, map_fixed64_fixed64_val_, + 1); + + sub_message = reflection->AddMessage(message, F("map_sfixed32_sfixed32")); + sub_message->GetReflection()->SetInt32(sub_message, + map_sfixed32_sfixed32_key_, 1); + sub_message->GetReflection()->SetInt32(sub_message, + map_sfixed32_sfixed32_val_, 1); + + sub_message = reflection->AddMessage(message, F("map_sfixed64_sfixed64")); + sub_message->GetReflection()->SetInt64(sub_message, + map_sfixed64_sfixed64_key_, 1); + sub_message->GetReflection()->SetInt64(sub_message, + map_sfixed64_sfixed64_val_, 1); + + sub_message = reflection->AddMessage(message, F("map_int32_float")); + sub_message->GetReflection()->SetInt32(sub_message, map_int32_float_key_, 1); + sub_message->GetReflection()->SetFloat(sub_message, map_int32_float_val_, + 1.0); + + sub_message = reflection->AddMessage(message, F("map_int32_double")); + sub_message->GetReflection()->SetInt32(sub_message, map_int32_double_key_, 1); + sub_message->GetReflection()->SetDouble(sub_message, map_int32_double_val_, + 1.0); + + sub_message = reflection->AddMessage(message, F("map_bool_bool")); + sub_message->GetReflection()->SetBool(sub_message, map_bool_bool_key_, true); + sub_message->GetReflection()->SetBool(sub_message, map_bool_bool_val_, true); + + sub_message = reflection->AddMessage(message, F("map_string_string")); + sub_message->GetReflection()->SetString(sub_message, map_string_string_key_, + "1"); + sub_message->GetReflection()->SetString(sub_message, map_string_string_val_, + "1"); + + sub_message = reflection->AddMessage(message, F("map_int32_bytes")); + sub_message->GetReflection()->SetInt32(sub_message, map_int32_bytes_key_, 1); + sub_message->GetReflection()->SetString(sub_message, map_int32_bytes_val_, + "1"); + + sub_message = reflection->AddMessage(message, F("map_int32_enum")); + sub_message->GetReflection()->SetInt32(sub_message, map_int32_enum_key_, 1); + sub_message->GetReflection()->SetEnum(sub_message, map_int32_enum_val_, + map_enum_baz_); + + sub_message = reflection->AddMessage(message, F("map_int32_foreign_message")); + sub_message->GetReflection()->SetInt32(sub_message, + map_int32_foreign_message_key_, 1); + sub_foreign_message = sub_message->GetReflection()->MutableMessage( + sub_message, map_int32_foreign_message_val_, nullptr); + sub_foreign_message->GetReflection()->SetInt32(sub_foreign_message, + foreign_c_, 1); +} + +inline void MapReflectionTester::SetMapFieldsViaMapReflection( + Message* message) { + const Reflection* reflection = message->GetReflection(); + + Message* sub_foreign_message = nullptr; + MapValueRef map_val; + + // Add first element. + MapKey map_key; + map_key.SetInt32Value(0); + EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int32_int32"), + map_key, &map_val)); + map_val.SetInt32Value(0); + + map_key.SetInt64Value(0); + EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int64_int64"), + map_key, &map_val)); + map_val.SetInt64Value(0); + + map_key.SetUInt32Value(0); + EXPECT_TRUE(reflection->InsertOrLookupMapValue( + message, F("map_uint32_uint32"), map_key, &map_val)); + map_val.SetUInt32Value(0); + + map_key.SetUInt64Value(0); + EXPECT_TRUE(reflection->InsertOrLookupMapValue( + message, F("map_uint64_uint64"), map_key, &map_val)); + map_val.SetUInt64Value(0); + + map_key.SetInt32Value(0); + EXPECT_TRUE(reflection->InsertOrLookupMapValue( + message, F("map_sint32_sint32"), map_key, &map_val)); + map_val.SetInt32Value(0); + + map_key.SetInt64Value(0); + EXPECT_TRUE(reflection->InsertOrLookupMapValue( + message, F("map_sint64_sint64"), map_key, &map_val)); + map_val.SetInt64Value(0); + + map_key.SetUInt32Value(0); + EXPECT_TRUE(reflection->InsertOrLookupMapValue( + message, F("map_fixed32_fixed32"), map_key, &map_val)); + map_val.SetUInt32Value(0); + + map_key.SetUInt64Value(0); + EXPECT_TRUE(reflection->InsertOrLookupMapValue( + message, F("map_fixed64_fixed64"), map_key, &map_val)); + map_val.SetUInt64Value(0); + + map_key.SetInt32Value(0); + EXPECT_TRUE(reflection->InsertOrLookupMapValue( + message, F("map_sfixed32_sfixed32"), map_key, &map_val)); + map_val.SetInt32Value(0); + + map_key.SetInt64Value(0); + EXPECT_TRUE(reflection->InsertOrLookupMapValue( + message, F("map_sfixed64_sfixed64"), map_key, &map_val)); + map_val.SetInt64Value(0); + + map_key.SetInt32Value(0); + EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int32_float"), + map_key, &map_val)); + map_val.SetFloatValue(0.0); + + map_key.SetInt32Value(0); + EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int32_double"), + map_key, &map_val)); + map_val.SetDoubleValue(0.0); + + map_key.SetBoolValue(false); + EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_bool_bool"), + map_key, &map_val)); + map_val.SetBoolValue(false); + + map_key.SetStringValue("0"); + EXPECT_TRUE(reflection->InsertOrLookupMapValue( + message, F("map_string_string"), map_key, &map_val)); + map_val.SetStringValue("0"); + + map_key.SetInt32Value(0); + EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int32_bytes"), + map_key, &map_val)); + map_val.SetStringValue("0"); + + map_key.SetInt32Value(0); + EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int32_enum"), + map_key, &map_val)); + map_val.SetEnumValue(map_enum_bar_->number()); + + map_key.SetInt32Value(0); + EXPECT_TRUE(reflection->InsertOrLookupMapValue( + message, F("map_int32_foreign_message"), map_key, &map_val)); + sub_foreign_message = map_val.MutableMessageValue(); + sub_foreign_message->GetReflection()->SetInt32(sub_foreign_message, + foreign_c_, 0); + + // Add second element + map_key.SetInt32Value(1); + EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int32_int32"), + map_key, &map_val)); + map_val.SetInt32Value(1); + EXPECT_FALSE(reflection->InsertOrLookupMapValue(message, F("map_int32_int32"), + map_key, &map_val)); + + map_key.SetInt64Value(1); + EXPECT_TRUE(reflection->InsertOrLookupMapValue(message, F("map_int64_int64"), + map_key, &map_val)); + map_val.SetInt64Value(1); + EXPECT_FALSE(reflection->InsertOrLookupMapValue(message, F("map_int64_int64"), + map_key, &map_val)); + + map_key.SetUInt32Value(1); + reflection->InsertOrLookupMapValue(message, F("map_uint32_uint32"), map_key, + &map_val); + map_val.SetUInt32Value(1); + + map_key.SetUInt64Value(1); + reflection->InsertOrLookupMapValue(message, F("map_uint64_uint64"), map_key, + &map_val); + map_val.SetUInt64Value(1); + + map_key.SetInt32Value(1); + reflection->InsertOrLookupMapValue(message, F("map_sint32_sint32"), map_key, + &map_val); + map_val.SetInt32Value(1); + + map_key.SetInt64Value(1); + reflection->InsertOrLookupMapValue(message, F("map_sint64_sint64"), map_key, + &map_val); + map_val.SetInt64Value(1); + + map_key.SetUInt32Value(1); + reflection->InsertOrLookupMapValue(message, F("map_fixed32_fixed32"), map_key, + &map_val); + map_val.SetUInt32Value(1); + + map_key.SetUInt64Value(1); + reflection->InsertOrLookupMapValue(message, F("map_fixed64_fixed64"), map_key, + &map_val); + map_val.SetUInt64Value(1); + + map_key.SetInt32Value(1); + reflection->InsertOrLookupMapValue(message, F("map_sfixed32_sfixed32"), + map_key, &map_val); + map_val.SetInt32Value(1); + + map_key.SetInt64Value(1); + reflection->InsertOrLookupMapValue(message, F("map_sfixed64_sfixed64"), + map_key, &map_val); + map_val.SetInt64Value(1); + + map_key.SetInt32Value(1); + reflection->InsertOrLookupMapValue(message, F("map_int32_float"), map_key, + &map_val); + map_val.SetFloatValue(1.0); + + map_key.SetInt32Value(1); + reflection->InsertOrLookupMapValue(message, F("map_int32_double"), map_key, + &map_val); + map_val.SetDoubleValue(1.0); + + map_key.SetBoolValue(true); + reflection->InsertOrLookupMapValue(message, F("map_bool_bool"), map_key, + &map_val); + map_val.SetBoolValue(true); + + map_key.SetStringValue("1"); + reflection->InsertOrLookupMapValue(message, F("map_string_string"), map_key, + &map_val); + map_val.SetStringValue("1"); + + map_key.SetInt32Value(1); + reflection->InsertOrLookupMapValue(message, F("map_int32_bytes"), map_key, + &map_val); + map_val.SetStringValue("1"); + + map_key.SetInt32Value(1); + reflection->InsertOrLookupMapValue(message, F("map_int32_enum"), map_key, + &map_val); + map_val.SetEnumValue(map_enum_baz_->number()); + + map_key.SetInt32Value(1); + EXPECT_TRUE(reflection->InsertOrLookupMapValue( + message, F("map_int32_foreign_message"), map_key, &map_val)); + sub_foreign_message = map_val.MutableMessageValue(); + sub_foreign_message->GetReflection()->SetInt32(sub_foreign_message, + foreign_c_, 1); +} + +inline void MapReflectionTester::GetMapValueViaMapReflection( + Message* message, const std::string& field_name, const MapKey& map_key, + MapValueRef* map_val) { + const Reflection* reflection = message->GetReflection(); + EXPECT_FALSE(reflection->InsertOrLookupMapValue(message, F(field_name), + map_key, map_val)); +} + +inline Message* MapReflectionTester::GetMapEntryViaReflection( + Message* message, const std::string& field_name, int index) { + const Reflection* reflection = message->GetReflection(); + return reflection->MutableRepeatedMessage(message, F(field_name), index); +} + +inline MapIterator MapReflectionTester::MapBegin( + Message* message, const std::string& field_name) { + const Reflection* reflection = message->GetReflection(); + return reflection->MapBegin(message, F(field_name)); +} + +inline MapIterator MapReflectionTester::MapEnd(Message* message, + const std::string& field_name) { + const Reflection* reflection = message->GetReflection(); + return reflection->MapEnd(message, F(field_name)); +} + +inline int MapReflectionTester::MapSize(const Message& message, + const std::string& field_name) { + const Reflection* reflection = message.GetReflection(); + return reflection->MapSize(message, F(field_name)); +} + +inline void MapReflectionTester::ClearMapFieldsViaReflection(Message* message) { + const Reflection* reflection = message->GetReflection(); + + reflection->ClearField(message, F("map_int32_int32")); + reflection->ClearField(message, F("map_int64_int64")); + reflection->ClearField(message, F("map_uint32_uint32")); + reflection->ClearField(message, F("map_uint64_uint64")); + reflection->ClearField(message, F("map_sint32_sint32")); + reflection->ClearField(message, F("map_sint64_sint64")); + reflection->ClearField(message, F("map_fixed32_fixed32")); + reflection->ClearField(message, F("map_fixed64_fixed64")); + reflection->ClearField(message, F("map_sfixed32_sfixed32")); + reflection->ClearField(message, F("map_sfixed64_sfixed64")); + reflection->ClearField(message, F("map_int32_float")); + reflection->ClearField(message, F("map_int32_double")); + reflection->ClearField(message, F("map_bool_bool")); + reflection->ClearField(message, F("map_string_string")); + reflection->ClearField(message, F("map_int32_bytes")); + reflection->ClearField(message, F("map_int32_enum")); + reflection->ClearField(message, F("map_int32_foreign_message")); +} + +inline void MapReflectionTester::ModifyMapFieldsViaReflection( + Message* message) { + const Reflection* reflection = message->GetReflection(); + MapValueRef map_val; + Message* sub_foreign_message; + + // Modify the second element + MapKey map_key; + map_key.SetInt32Value(1); + EXPECT_FALSE(reflection->InsertOrLookupMapValue(message, F("map_int32_int32"), + map_key, &map_val)); + map_val.SetInt32Value(2); + + map_key.SetInt64Value(1); + EXPECT_FALSE(reflection->InsertOrLookupMapValue(message, F("map_int64_int64"), + map_key, &map_val)); + map_val.SetInt64Value(2); + + map_key.SetUInt32Value(1); + EXPECT_FALSE(reflection->InsertOrLookupMapValue( + message, F("map_uint32_uint32"), map_key, &map_val)); + map_val.SetUInt32Value(2); + + map_key.SetUInt64Value(1); + reflection->InsertOrLookupMapValue(message, F("map_uint64_uint64"), map_key, + &map_val); + map_val.SetUInt64Value(2); + + map_key.SetInt32Value(1); + reflection->InsertOrLookupMapValue(message, F("map_sint32_sint32"), map_key, + &map_val); + map_val.SetInt32Value(2); + + map_key.SetInt64Value(1); + reflection->InsertOrLookupMapValue(message, F("map_sint64_sint64"), map_key, + &map_val); + map_val.SetInt64Value(2); + + map_key.SetUInt32Value(1); + reflection->InsertOrLookupMapValue(message, F("map_fixed32_fixed32"), map_key, + &map_val); + map_val.SetUInt32Value(2); + + map_key.SetUInt64Value(1); + reflection->InsertOrLookupMapValue(message, F("map_fixed64_fixed64"), map_key, + &map_val); + map_val.SetUInt64Value(2); + + map_key.SetInt32Value(1); + reflection->InsertOrLookupMapValue(message, F("map_sfixed32_sfixed32"), + map_key, &map_val); + map_val.SetInt32Value(2); + + map_key.SetInt64Value(1); + reflection->InsertOrLookupMapValue(message, F("map_sfixed64_sfixed64"), + map_key, &map_val); + map_val.SetInt64Value(2); + + map_key.SetInt32Value(1); + reflection->InsertOrLookupMapValue(message, F("map_int32_float"), map_key, + &map_val); + map_val.SetFloatValue(2.0); + + map_key.SetInt32Value(1); + reflection->InsertOrLookupMapValue(message, F("map_int32_double"), map_key, + &map_val); + map_val.SetDoubleValue(2.0); + + map_key.SetBoolValue(true); + reflection->InsertOrLookupMapValue(message, F("map_bool_bool"), map_key, + &map_val); + map_val.SetBoolValue(false); + + map_key.SetStringValue("1"); + reflection->InsertOrLookupMapValue(message, F("map_string_string"), map_key, + &map_val); + map_val.SetStringValue("2"); + + map_key.SetInt32Value(1); + reflection->InsertOrLookupMapValue(message, F("map_int32_bytes"), map_key, + &map_val); + map_val.SetStringValue("2"); + + map_key.SetInt32Value(1); + reflection->InsertOrLookupMapValue(message, F("map_int32_enum"), map_key, + &map_val); + map_val.SetEnumValue(map_enum_foo_->number()); + + map_key.SetInt32Value(1); + EXPECT_FALSE(reflection->InsertOrLookupMapValue( + message, F("map_int32_foreign_message"), map_key, &map_val)); + sub_foreign_message = map_val.MutableMessageValue(); + sub_foreign_message->GetReflection()->SetInt32(sub_foreign_message, + foreign_c_, 2); +} + +inline void MapReflectionTester::RemoveLastMapsViaReflection(Message* message) { + const Reflection* reflection = message->GetReflection(); + + std::vector output; + reflection->ListFields(*message, &output); + for (int i = 0; i < output.size(); ++i) { + const FieldDescriptor* field = output[i]; + if (!field->is_repeated()) continue; + reflection->RemoveLast(message, field); + } +} + +inline void MapReflectionTester::ReleaseLastMapsViaReflection( + Message* message) { + const Reflection* reflection = message->GetReflection(); + + std::vector output; + reflection->ListFields(*message, &output); + for (int i = 0; i < output.size(); ++i) { + const FieldDescriptor* field = output[i]; + if (!field->is_repeated()) continue; + if (field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) continue; + + Message* released = reflection->ReleaseLast(message, field); + ASSERT_TRUE(released != nullptr) + << "ReleaseLast returned nullptr for: " << field->name(); + delete released; + } +} + +inline void MapReflectionTester::SwapMapsViaReflection(Message* message) { + const Reflection* reflection = message->GetReflection(); + std::vector output; + reflection->ListFields(*message, &output); + for (int i = 0; i < output.size(); ++i) { + const FieldDescriptor* field = output[i]; + if (!field->is_repeated()) continue; + reflection->SwapElements(message, field, 0, 1); + } +} + +inline void MapReflectionTester::MutableUnknownFieldsOfMapFieldsViaReflection( + Message* message) { + const Reflection* reflection = message->GetReflection(); + Message* sub_message = nullptr; + + sub_message = reflection->AddMessage(message, F("map_int32_int32")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_int64_int64")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_uint32_uint32")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_uint64_uint64")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_sint32_sint32")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_sint64_sint64")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_fixed32_fixed32")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_fixed64_fixed64")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_sfixed32_sfixed32")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_sfixed64_sfixed64")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_int32_float")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_int32_double")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_bool_bool")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_string_string")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_int32_bytes")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_int32_enum")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); + sub_message = reflection->AddMessage(message, F("map_int32_foreign_message")); + EXPECT_TRUE(sub_message->GetReflection()->MutableUnknownFields(sub_message) != + nullptr); +} + +inline void MapReflectionTester::ExpectMapFieldsSetViaReflection( + const Message& message) { + std::string scratch; + const Reflection* reflection = message.GetReflection(); + const Message* sub_message; + MapKey map_key; + + // ----------------------------------------------------------------- + + ASSERT_EQ(2, reflection->FieldSize(message, F("map_int32_int32"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_int64_int64"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_uint32_uint32"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_uint64_uint64"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_sint32_sint32"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_sint64_sint64"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_fixed32_fixed32"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_fixed64_fixed64"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_sfixed32_sfixed32"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_sfixed64_sfixed64"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_int32_float"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_int32_double"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_bool_bool"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_string_string"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_int32_bytes"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_int32_enum"))); + ASSERT_EQ(2, reflection->FieldSize(message, F("map_int32_foreign_message"))); + + { + std::map map; + map[0] = 0; + map[1] = 1; + for (int i = 0; i < 2; i++) { + // Check with RepeatedField Reflection + sub_message = + &reflection->GetRepeatedMessage(message, F("map_int32_int32"), i); + int32 key = sub_message->GetReflection()->GetInt32(*sub_message, + map_int32_int32_key_); + int32 val = sub_message->GetReflection()->GetInt32(*sub_message, + map_int32_int32_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetInt32Value(key); + EXPECT_TRUE( + reflection->ContainsMapKey(message, F("map_int32_int32"), map_key)); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (int i = 0; i < 2; i++) { + // Check with RepeatedField Reflection + sub_message = + &reflection->GetRepeatedMessage(message, F("map_int64_int64"), i); + int64 key = sub_message->GetReflection()->GetInt64(*sub_message, + map_int64_int64_key_); + int64 val = sub_message->GetReflection()->GetInt64(*sub_message, + map_int64_int64_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetInt64Value(key); + EXPECT_TRUE( + reflection->ContainsMapKey(message, F("map_int64_int64"), map_key)); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (int i = 0; i < 2; i++) { + // Check with RepeatedField Reflection + sub_message = + &reflection->GetRepeatedMessage(message, F("map_uint32_uint32"), i); + uint32 key = sub_message->GetReflection()->GetUInt32( + *sub_message, map_uint32_uint32_key_); + uint32 val = sub_message->GetReflection()->GetUInt32( + *sub_message, map_uint32_uint32_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetUInt32Value(key); + EXPECT_TRUE( + reflection->ContainsMapKey(message, F("map_uint32_uint32"), map_key)); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (int i = 0; i < 2; i++) { + sub_message = + &reflection->GetRepeatedMessage(message, F("map_uint64_uint64"), i); + uint64 key = sub_message->GetReflection()->GetUInt64( + *sub_message, map_uint64_uint64_key_); + uint64 val = sub_message->GetReflection()->GetUInt64( + *sub_message, map_uint64_uint64_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetUInt64Value(key); + EXPECT_TRUE( + reflection->ContainsMapKey(message, F("map_uint64_uint64"), map_key)); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (int i = 0; i < 2; i++) { + sub_message = + &reflection->GetRepeatedMessage(message, F("map_sint32_sint32"), i); + int32 key = sub_message->GetReflection()->GetInt32( + *sub_message, map_sint32_sint32_key_); + int32 val = sub_message->GetReflection()->GetInt32( + *sub_message, map_sint32_sint32_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetInt32Value(key); + EXPECT_EQ(true, reflection->ContainsMapKey( + message, F("map_sint32_sint32"), map_key)); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (int i = 0; i < 2; i++) { + sub_message = + &reflection->GetRepeatedMessage(message, F("map_sint64_sint64"), i); + int64 key = sub_message->GetReflection()->GetInt64( + *sub_message, map_sint64_sint64_key_); + int64 val = sub_message->GetReflection()->GetInt64( + *sub_message, map_sint64_sint64_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetInt64Value(key); + EXPECT_EQ(true, reflection->ContainsMapKey( + message, F("map_sint64_sint64"), map_key)); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (int i = 0; i < 2; i++) { + sub_message = + &reflection->GetRepeatedMessage(message, F("map_fixed32_fixed32"), i); + uint32 key = sub_message->GetReflection()->GetUInt32( + *sub_message, map_fixed32_fixed32_key_); + uint32 val = sub_message->GetReflection()->GetUInt32( + *sub_message, map_fixed32_fixed32_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetUInt32Value(key); + EXPECT_EQ(true, reflection->ContainsMapKey( + message, F("map_fixed32_fixed32"), map_key)); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (int i = 0; i < 2; i++) { + sub_message = + &reflection->GetRepeatedMessage(message, F("map_fixed64_fixed64"), i); + uint64 key = sub_message->GetReflection()->GetUInt64( + *sub_message, map_fixed64_fixed64_key_); + uint64 val = sub_message->GetReflection()->GetUInt64( + *sub_message, map_fixed64_fixed64_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetUInt64Value(key); + EXPECT_EQ(true, reflection->ContainsMapKey( + message, F("map_fixed64_fixed64"), map_key)); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (int i = 0; i < 2; i++) { + sub_message = &reflection->GetRepeatedMessage( + message, F("map_sfixed32_sfixed32"), i); + int32 key = sub_message->GetReflection()->GetInt32( + *sub_message, map_sfixed32_sfixed32_key_); + int32 val = sub_message->GetReflection()->GetInt32( + *sub_message, map_sfixed32_sfixed32_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetInt32Value(key); + EXPECT_EQ(true, reflection->ContainsMapKey( + message, F("map_sfixed32_sfixed32"), map_key)); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (int i = 0; i < 2; i++) { + sub_message = &reflection->GetRepeatedMessage( + message, F("map_sfixed64_sfixed64"), i); + int64 key = sub_message->GetReflection()->GetInt64( + *sub_message, map_sfixed64_sfixed64_key_); + int64 val = sub_message->GetReflection()->GetInt64( + *sub_message, map_sfixed64_sfixed64_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetInt64Value(key); + EXPECT_EQ(true, reflection->ContainsMapKey( + message, F("map_sfixed64_sfixed64"), map_key)); + } + } + { + std::map map; + map[0] = 0.0; + map[1] = 1.0; + for (int i = 0; i < 2; i++) { + sub_message = + &reflection->GetRepeatedMessage(message, F("map_int32_float"), i); + int32 key = sub_message->GetReflection()->GetInt32(*sub_message, + map_int32_float_key_); + float val = sub_message->GetReflection()->GetFloat(*sub_message, + map_int32_float_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetInt32Value(key); + EXPECT_EQ(true, reflection->ContainsMapKey(message, F("map_int32_float"), + map_key)); + } + } + { + std::map map; + map[0] = 0.0; + map[1] = 1.0; + for (int i = 0; i < 2; i++) { + sub_message = + &reflection->GetRepeatedMessage(message, F("map_int32_double"), i); + int32 key = sub_message->GetReflection()->GetInt32(*sub_message, + map_int32_double_key_); + double val = sub_message->GetReflection()->GetDouble( + *sub_message, map_int32_double_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetInt32Value(key); + EXPECT_EQ(true, reflection->ContainsMapKey(message, F("map_int32_double"), + map_key)); + } + } + { + std::map map; + map[false] = false; + map[true] = true; + for (int i = 0; i < 2; i++) { + sub_message = + &reflection->GetRepeatedMessage(message, F("map_bool_bool"), i); + bool key = sub_message->GetReflection()->GetBool(*sub_message, + map_bool_bool_key_); + bool val = sub_message->GetReflection()->GetBool(*sub_message, + map_bool_bool_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetBoolValue(key); + EXPECT_EQ(true, reflection->ContainsMapKey(message, F("map_bool_bool"), + map_key)); + } + } + { + std::map map; + map["0"] = "0"; + map["1"] = "1"; + for (int i = 0; i < 2; i++) { + sub_message = + &reflection->GetRepeatedMessage(message, F("map_string_string"), i); + std::string key = sub_message->GetReflection()->GetString( + *sub_message, map_string_string_key_); + std::string val = sub_message->GetReflection()->GetString( + *sub_message, map_string_string_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetStringValue(key); + EXPECT_EQ(true, reflection->ContainsMapKey( + message, F("map_string_string"), map_key)); + } + } + { + std::map map; + map[0] = "0"; + map[1] = "1"; + for (int i = 0; i < 2; i++) { + sub_message = + &reflection->GetRepeatedMessage(message, F("map_int32_bytes"), i); + int32 key = sub_message->GetReflection()->GetInt32(*sub_message, + map_int32_bytes_key_); + std::string val = sub_message->GetReflection()->GetString( + *sub_message, map_int32_bytes_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetInt32Value(key); + EXPECT_EQ(true, reflection->ContainsMapKey(message, F("map_int32_bytes"), + map_key)); + } + } + { + std::map map; + map[0] = map_enum_bar_; + map[1] = map_enum_baz_; + for (int i = 0; i < 2; i++) { + sub_message = + &reflection->GetRepeatedMessage(message, F("map_int32_enum"), i); + int32 key = sub_message->GetReflection()->GetInt32(*sub_message, + map_int32_enum_key_); + const EnumValueDescriptor* val = sub_message->GetReflection()->GetEnum( + *sub_message, map_int32_enum_val_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetInt32Value(key); + EXPECT_EQ(true, reflection->ContainsMapKey(message, F("map_int32_enum"), + map_key)); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (int i = 0; i < 2; i++) { + sub_message = &reflection->GetRepeatedMessage( + message, F("map_int32_foreign_message"), i); + int32 key = sub_message->GetReflection()->GetInt32( + *sub_message, map_int32_foreign_message_key_); + const Message& foreign_message = sub_message->GetReflection()->GetMessage( + *sub_message, map_int32_foreign_message_val_); + int32 val = foreign_message.GetReflection()->GetInt32(foreign_message, + foreign_c_); + EXPECT_EQ(map[key], val); + // Check with Map Reflection + map_key.SetInt32Value(key); + EXPECT_EQ(true, reflection->ContainsMapKey( + message, F("map_int32_foreign_message"), map_key)); + } + } +} + +inline void MapReflectionTester::ExpectMapFieldsSetViaReflectionIterator( + Message* message) { + std::string scratch; + std::string serialized; + const Reflection* reflection = message->GetReflection(); + + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_int32_int32"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_int64_int64"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_uint32_uint32"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_uint64_uint64"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_sint32_sint32"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_sint64_sint64"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_fixed32_fixed32"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_fixed64_fixed64"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_sfixed32_sfixed32"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_sfixed64_sfixed64"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_int32_float"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_int32_double"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_bool_bool"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_string_string"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_int32_bytes"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_int32_enum"))); + ASSERT_EQ(2, reflection->FieldSize(*message, F("map_int32_foreign_message"))); + + { + std::map map; + map[0] = 0; + map[1] = 1; + int size = 0; + for (MapIterator iter = reflection->MapBegin(message, F("map_int32_int32")); + iter != reflection->MapEnd(message, F("map_int32_int32")); + ++iter, ++size) { + // Check const methods do not invalidate map. + message->DebugString(); + message->ShortDebugString(); + message->SerializeToString(&serialized); + message->SpaceUsedLong(); + message->ByteSizeLong(); + EXPECT_EQ(map[iter.GetKey().GetInt32Value()], + iter.GetValueRef().GetInt32Value()); + } + EXPECT_EQ(size, 2); + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (MapIterator iter = reflection->MapBegin(message, F("map_int64_int64")); + iter != reflection->MapEnd(message, F("map_int64_int64")); ++iter) { + EXPECT_EQ(map[iter.GetKey().GetInt64Value()], + iter.GetValueRef().GetInt64Value()); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (MapIterator iter = + reflection->MapBegin(message, F("map_uint32_uint32")); + iter != reflection->MapEnd(message, F("map_uint32_uint32")); ++iter) { + EXPECT_EQ(map[iter.GetKey().GetUInt32Value()], + iter.GetValueRef().GetUInt32Value()); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (MapIterator iter = + reflection->MapBegin(message, F("map_uint64_uint64")); + iter != reflection->MapEnd(message, F("map_uint64_uint64")); ++iter) { + EXPECT_EQ(map[iter.GetKey().GetUInt64Value()], + iter.GetValueRef().GetUInt64Value()); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (MapIterator iter = + reflection->MapBegin(message, F("map_sint32_sint32")); + iter != reflection->MapEnd(message, F("map_sint32_sint32")); ++iter) { + EXPECT_EQ(map[iter.GetKey().GetInt32Value()], + iter.GetValueRef().GetInt32Value()); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (MapIterator iter = + reflection->MapBegin(message, F("map_sint64_sint64")); + iter != reflection->MapEnd(message, F("map_sint64_sint64")); ++iter) { + EXPECT_EQ(map[iter.GetKey().GetInt64Value()], + iter.GetValueRef().GetInt64Value()); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (MapIterator iter = + reflection->MapBegin(message, F("map_fixed32_fixed32")); + iter != reflection->MapEnd(message, F("map_fixed32_fixed32")); + ++iter) { + EXPECT_EQ(map[iter.GetKey().GetUInt32Value()], + iter.GetValueRef().GetUInt32Value()); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (MapIterator iter = + reflection->MapBegin(message, F("map_fixed64_fixed64")); + iter != reflection->MapEnd(message, F("map_fixed64_fixed64")); + ++iter) { + EXPECT_EQ(map[iter.GetKey().GetUInt64Value()], + iter.GetValueRef().GetUInt64Value()); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + for (MapIterator iter = + reflection->MapBegin(message, F("map_sfixed32_sfixed32")); + iter != reflection->MapEnd(message, F("map_sfixed32_sfixed32")); + ++iter) { + EXPECT_EQ(map[iter.GetKey().GetInt32Value()], + iter.GetValueRef().GetInt32Value()); + } + } + { + std::map map; + map[0] = 0.0; + map[1] = 1.0; + for (MapIterator iter = reflection->MapBegin(message, F("map_int32_float")); + iter != reflection->MapEnd(message, F("map_int32_float")); ++iter) { + EXPECT_EQ(map[iter.GetKey().GetInt32Value()], + iter.GetValueRef().GetFloatValue()); + } + } + { + std::map map; + map[0] = 0.0; + map[1] = 1.0; + for (MapIterator iter = + reflection->MapBegin(message, F("map_int32_double")); + iter != reflection->MapEnd(message, F("map_int32_double")); ++iter) { + EXPECT_EQ(map[iter.GetKey().GetInt32Value()], + iter.GetValueRef().GetDoubleValue()); + } + } + { + std::map map; + map[false] = false; + map[true] = true; + for (MapIterator iter = reflection->MapBegin(message, F("map_bool_bool")); + iter != reflection->MapEnd(message, F("map_bool_bool")); ++iter) { + EXPECT_EQ(map[iter.GetKey().GetBoolValue()], + iter.GetValueRef().GetBoolValue()); + } + } + { + std::map map; + map["0"] = "0"; + map["1"] = "1"; + int size = 0; + for (MapIterator iter = + reflection->MapBegin(message, F("map_string_string")); + iter != reflection->MapEnd(message, F("map_string_string")); + ++iter, ++size) { + // Check const methods do not invalidate map. + message->DebugString(); + message->ShortDebugString(); + message->SerializeToString(&serialized); + message->SpaceUsedLong(); + message->ByteSizeLong(); + EXPECT_EQ(map[iter.GetKey().GetStringValue()], + iter.GetValueRef().GetStringValue()); + } + EXPECT_EQ(size, 2); + } + { + std::map map; + map[0] = "0"; + map[1] = "1"; + for (MapIterator iter = reflection->MapBegin(message, F("map_int32_bytes")); + iter != reflection->MapEnd(message, F("map_int32_bytes")); ++iter) { + EXPECT_EQ(map[iter.GetKey().GetInt32Value()], + iter.GetValueRef().GetStringValue()); + } + } + { + std::map map; + map[0] = map_enum_bar_; + map[1] = map_enum_baz_; + for (MapIterator iter = reflection->MapBegin(message, F("map_int32_enum")); + iter != reflection->MapEnd(message, F("map_int32_enum")); ++iter) { + EXPECT_EQ(map[iter.GetKey().GetInt32Value()]->number(), + iter.GetValueRef().GetEnumValue()); + } + } + { + std::map map; + map[0] = 0; + map[1] = 1; + int size = 0; + for (MapIterator iter = + reflection->MapBegin(message, F("map_int32_foreign_message")); + iter != reflection->MapEnd(message, F("map_int32_foreign_message")); + ++iter, ++size) { + // Check const methods do not invalidate map. + message->DebugString(); + message->ShortDebugString(); + message->SerializeToString(&serialized); + message->SpaceUsedLong(); + message->ByteSizeLong(); + const Message& sub_message = iter.GetValueRef().GetMessageValue(); + EXPECT_EQ(map[iter.GetKey().GetInt32Value()], + sub_message.GetReflection()->GetInt32(sub_message, foreign_c_)); + } + EXPECT_EQ(size, 2); + } +} + +inline void MapReflectionTester::ExpectClearViaReflection( + const Message& message) { + const Reflection* reflection = message.GetReflection(); + // Map fields are empty. + EXPECT_EQ(0, reflection->FieldSize(message, F("map_int32_int32"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_int64_int64"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_uint32_uint32"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_uint64_uint64"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_sint32_sint32"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_sint64_sint64"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_fixed32_fixed32"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_fixed64_fixed64"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_sfixed32_sfixed32"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_sfixed64_sfixed64"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_int32_float"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_int32_double"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_bool_bool"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_string_string"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_int32_bytes"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_int32_enum"))); + EXPECT_EQ(0, reflection->FieldSize(message, F("map_int32_foreign_message"))); + EXPECT_TRUE(reflection->GetMapData(message, F("map_int32_foreign_message")) + ->IsMapValid()); +} + +inline void MapReflectionTester::ExpectClearViaReflectionIterator( + Message* message) { + const Reflection* reflection = message->GetReflection(); + EXPECT_TRUE(reflection->MapBegin(message, F("map_int32_int32")) == + reflection->MapEnd(message, F("map_int32_int32"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_int64_int64")) == + reflection->MapEnd(message, F("map_int64_int64"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_uint32_uint32")) == + reflection->MapEnd(message, F("map_uint32_uint32"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_uint64_uint64")) == + reflection->MapEnd(message, F("map_uint64_uint64"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_sint32_sint32")) == + reflection->MapEnd(message, F("map_sint32_sint32"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_sint64_sint64")) == + reflection->MapEnd(message, F("map_sint64_sint64"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_fixed32_fixed32")) == + reflection->MapEnd(message, F("map_fixed32_fixed32"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_fixed64_fixed64")) == + reflection->MapEnd(message, F("map_fixed64_fixed64"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_sfixed32_sfixed32")) == + reflection->MapEnd(message, F("map_sfixed32_sfixed32"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_sfixed64_sfixed64")) == + reflection->MapEnd(message, F("map_sfixed64_sfixed64"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_int32_float")) == + reflection->MapEnd(message, F("map_int32_float"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_int32_double")) == + reflection->MapEnd(message, F("map_int32_double"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_bool_bool")) == + reflection->MapEnd(message, F("map_bool_bool"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_string_string")) == + reflection->MapEnd(message, F("map_string_string"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_int32_bytes")) == + reflection->MapEnd(message, F("map_int32_bytes"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_int32_enum")) == + reflection->MapEnd(message, F("map_int32_enum"))); + EXPECT_TRUE(reflection->MapBegin(message, F("map_int32_foreign_message")) == + reflection->MapEnd(message, F("map_int32_foreign_message"))); +} + } // namespace protobuf } // namespace google +#include + #endif // GOOGLE_PROTOBUF_MAP_TEST_UTIL_H__ diff --git a/third_party/protobuf/src/google/protobuf/map_test_util.inc b/third_party/protobuf/src/google/protobuf/map_test_util.inc new file mode 100644 index 00000000..600fdc36 --- /dev/null +++ b/third_party/protobuf/src/google/protobuf/map_test_util.inc @@ -0,0 +1,271 @@ +// 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 +#include +#include + +namespace google { +namespace protobuf { + +class MapTestUtil { + public: + // Set every field in the TestMap message to a unique value. + static void SetMapFields(UNITTEST::TestMap* message); + + // Set every field in the TestArenaMap message to a unique value. + static void SetArenaMapFields(UNITTEST::TestArenaMap* message); + + // Set every field in the message to a default value. + static void SetMapFieldsInitialized(UNITTEST::TestMap* message); + + // Modify all the map fields of the message (which should already have been + // initialized with SetMapFields()). + static void ModifyMapFields(UNITTEST::TestMap* message); + + // Check that all fields have the values that they should have after + // SetMapFields() is called. + static void ExpectMapFieldsSet(const UNITTEST::TestMap& message); + + // Check that all fields have the values that they should have after + // SetMapFields() is called for TestArenaMap. + static void ExpectArenaMapFieldsSet(const UNITTEST::TestArenaMap& message); + + // Check that all fields have the values that they should have after + // SetMapFieldsInitialized() is called. + static void ExpectMapFieldsSetInitialized(const UNITTEST::TestMap& message); + + // Expect that the message is modified as would be expected from + // ModifyMapFields(). + static void ExpectMapFieldsModified(const UNITTEST::TestMap& message); + + // Check that all fields are empty. + static void ExpectClear(const UNITTEST::TestMap& message); + + // Check that all map fields have the given size. + static void ExpectMapsSize(const UNITTEST::TestMap& message, int size); + + // Get pointers of map entries at given index. + static std::vector GetMapEntries( + const UNITTEST::TestMap& message, int index); + + // Get pointers of map entries from release. + static std::vector GetMapEntriesFromRelease( + UNITTEST::TestMap* message); +}; + +inline void MapTestUtil::SetMapFields(UNITTEST::TestMap* message) { + MapTestUtilImpl::SetMapFields(message); +} + +inline void MapTestUtil::SetArenaMapFields(UNITTEST::TestArenaMap* message) { + MapTestUtilImpl::SetArenaMapFields(message); +} + +inline void MapTestUtil::SetMapFieldsInitialized(UNITTEST::TestMap* message) { + MapTestUtilImpl::SetMapFieldsInitialized(message); +} + +inline void MapTestUtil::ModifyMapFields(UNITTEST::TestMap* message) { + MapTestUtilImpl::ModifyMapFields( + message); +} + +inline void MapTestUtil::ExpectClear(const UNITTEST::TestMap& message) { + MapTestUtilImpl::ExpectClear(message); +} + +inline void MapTestUtil::ExpectMapFieldsSet(const UNITTEST::TestMap& message) { + MapTestUtilImpl::ExpectMapFieldsSet(message); +} + +inline void MapTestUtil::ExpectArenaMapFieldsSet( + const UNITTEST::TestArenaMap& message) { + MapTestUtilImpl::ExpectArenaMapFieldsSet< + UNITTEST::MapEnum, UNITTEST::MAP_ENUM_BAR, UNITTEST::MAP_ENUM_BAZ>( + message); +} + +inline void MapTestUtil::ExpectMapFieldsSetInitialized( + const UNITTEST::TestMap& message) { + MapTestUtilImpl::ExpectMapFieldsSetInitialized( + message); +} + +inline void MapTestUtil::ExpectMapFieldsModified( + const UNITTEST::TestMap& message) { + MapTestUtilImpl::ExpectMapFieldsModified< + UNITTEST::MapEnum, UNITTEST::MAP_ENUM_BAR, UNITTEST::MAP_ENUM_FOO>( + message); +} + +inline void MapTestUtil::ExpectMapsSize(const UNITTEST::TestMap& message, + int size) { + const Descriptor* descriptor = message.GetDescriptor(); + + EXPECT_EQ(size, message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_int32_int32"))); + EXPECT_EQ(size, message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_int64_int64"))); + EXPECT_EQ(size, + message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_uint32_uint32"))); + EXPECT_EQ(size, + message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_uint64_uint64"))); + EXPECT_EQ(size, + message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_sint32_sint32"))); + EXPECT_EQ(size, + message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_sint64_sint64"))); + EXPECT_EQ(size, + message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_fixed32_fixed32"))); + EXPECT_EQ(size, + message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_fixed64_fixed64"))); + EXPECT_EQ(size, + message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_sfixed32_sfixed32"))); + EXPECT_EQ(size, + message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_sfixed64_sfixed64"))); + EXPECT_EQ(size, message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_int32_float"))); + EXPECT_EQ(size, + message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_int32_double"))); + EXPECT_EQ(size, message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_bool_bool"))); + EXPECT_EQ(size, + message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_string_string"))); + EXPECT_EQ(size, message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_int32_bytes"))); + EXPECT_EQ( + size, + message.GetReflection()->FieldSize( + message, descriptor->FindFieldByName("map_int32_foreign_message"))); +} + +inline std::vector MapTestUtil::GetMapEntries( + const UNITTEST::TestMap& message, int index) { + const Descriptor* descriptor = message.GetDescriptor(); + std::vector result; + + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_int32_int32"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_int64_int64"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_uint32_uint32"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_uint64_uint64"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_sint32_sint32"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_sint64_sint64"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_fixed32_fixed32"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_fixed64_fixed64"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_sfixed32_sfixed32"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_sfixed64_sfixed64"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_int32_float"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_int32_double"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_bool_bool"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_string_string"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_int32_bytes"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_int32_enum"), index)); + result.push_back(&message.GetReflection()->GetRepeatedMessage( + message, descriptor->FindFieldByName("map_int32_foreign_message"), + index)); + + return result; +} + +inline std::vector MapTestUtil::GetMapEntriesFromRelease( + UNITTEST::TestMap* message) { + const Descriptor* descriptor = message->GetDescriptor(); + std::vector result; + + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_int32_int32"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_int64_int64"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_uint32_uint32"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_uint64_uint64"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_sint32_sint32"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_sint64_sint64"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_fixed32_fixed32"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_fixed64_fixed64"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_sfixed32_sfixed32"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_sfixed64_sfixed64"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_int32_float"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_int32_double"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_bool_bool"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_string_string"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_int32_bytes"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_int32_enum"))); + result.push_back(message->GetReflection()->ReleaseLast( + message, descriptor->FindFieldByName("map_int32_foreign_message"))); + + return result; +} + +} // namespace protobuf +} // namespace google diff --git a/third_party/protobuf/src/google/protobuf/map_type_handler.h b/third_party/protobuf/src/google/protobuf/map_type_handler.h index 7964a97a..5efc6fb6 100644 --- a/third_party/protobuf/src/google/protobuf/map_type_handler.h +++ b/third_party/protobuf/src/google/protobuf/map_type_handler.h @@ -155,13 +155,13 @@ class MapTypeHandler { typedef typename MapWireFieldTypeTraits::TypeOnMemory TypeOnMemory; // Corresponding wire type for field type. - static const WireFormatLite::WireType kWireType = + static constexpr WireFormatLite::WireType kWireType = MapWireFieldTypeTraits::kWireType; // Whether wire type is for message. - static const bool kIsMessage = + static constexpr bool kIsMessage = MapWireFieldTypeTraits::kIsMessage; // Whether wire type is for enum. - static const bool kIsEnum = + static constexpr bool kIsEnum = MapWireFieldTypeTraits::kIsEnum; // Functions used in parsing and serialization. =================== @@ -172,11 +172,8 @@ class MapTypeHandler { static inline const char* Read(const char* ptr, ParseContext* ctx, MapEntryAccessorType* value); - static inline void Write(int field, const MapEntryAccessorType& value, - io::CodedOutputStream* output); - static inline uint8* WriteToArray(int field, - const MapEntryAccessorType& value, - uint8* target); + static inline uint8* Write(int field, const MapEntryAccessorType& value, + uint8* ptr, io::EpsCopyOutputStream* stream); // Functions to manipulate data on memory. ======================== static inline const Type& GetExternalReference(const Type* value); @@ -230,11 +227,8 @@ class MapTypeHandler { MapEntryAccessorType* value); \ static inline const char* Read(const char* begin, ParseContext* ctx, \ MapEntryAccessorType* value); \ - static inline void Write(int field, const MapEntryAccessorType& value, \ - io::CodedOutputStream* output); \ - static inline uint8* WriteToArray(int field, \ - const MapEntryAccessorType& value, \ - uint8* target); \ + static inline uint8* Write(int field, const MapEntryAccessorType& value, \ + uint8* ptr, io::EpsCopyOutputStream* stream); \ static inline const MapEntryAccessorType& GetExternalReference( \ const TypeOnMemory& value); \ static inline void DeleteNoArena(const TypeOnMemory& x); \ @@ -365,34 +359,35 @@ GET_FIXED_CACHED_SIZE(BOOL, Bool) #undef GET_FIXED_CACHED_SIZE template -inline void MapTypeHandler::Write( - int field, const MapEntryAccessorType& value, - io::CodedOutputStream* output) { - WireFormatLite::WriteMessageMaybeToArray(field, value, output); -} - -template -inline uint8* MapTypeHandler::WriteToArray( - int field, const MapEntryAccessorType& value, uint8* target) { - return WireFormatLite::InternalWriteMessageToArray(field, value, target); +inline uint8* MapTypeHandler::Write( + int field, const MapEntryAccessorType& value, uint8* ptr, + io::EpsCopyOutputStream* stream) { + ptr = stream->EnsureSpace(ptr); + return WireFormatLite::InternalWriteMessage(field, value, ptr, stream); } #define WRITE_METHOD(FieldType, DeclaredType) \ template \ - inline void MapTypeHandler::Write( \ - int field, const MapEntryAccessorType& value, \ - io::CodedOutputStream* output) { \ - return WireFormatLite::Write##DeclaredType(field, value, output); \ - } \ - template \ - inline uint8* \ - MapTypeHandler::WriteToArray( \ - int field, const MapEntryAccessorType& value, uint8* target) { \ - return WireFormatLite::Write##DeclaredType##ToArray(field, value, target); \ + inline uint8* MapTypeHandler::Write( \ + int field, const MapEntryAccessorType& value, uint8* ptr, \ + io::EpsCopyOutputStream* stream) { \ + ptr = stream->EnsureSpace(ptr); \ + return stream->Write##DeclaredType(field, value, ptr); \ } WRITE_METHOD(STRING, String) WRITE_METHOD(BYTES, Bytes) + +#undef WRITE_METHOD +#define WRITE_METHOD(FieldType, DeclaredType) \ + template \ + inline uint8* MapTypeHandler::Write( \ + int field, const MapEntryAccessorType& value, uint8* ptr, \ + io::EpsCopyOutputStream* stream) { \ + ptr = stream->EnsureSpace(ptr); \ + return WireFormatLite::Write##DeclaredType##ToArray(field, value, ptr); \ + } + WRITE_METHOD(INT64, Int64) WRITE_METHOD(UINT64, UInt64) WRITE_METHOD(INT32, Int32) @@ -451,47 +446,33 @@ const char* MapTypeHandler::Read( } inline const char* ReadINT64(const char* ptr, int64* value) { - return ParseVarint64(ptr, reinterpret_cast(value)); + return VarintParse(ptr, reinterpret_cast(value)); } inline const char* ReadUINT64(const char* ptr, uint64* value) { - return ParseVarint64(ptr, value); + return VarintParse(ptr, value); } inline const char* ReadINT32(const char* ptr, int32* value) { - uint64 tmp; - auto res = ParseVarint64(ptr, &tmp); - *value = static_cast(tmp); - return res; + return VarintParse(ptr, reinterpret_cast(value)); } inline const char* ReadUINT32(const char* ptr, uint32* value) { - uint64 tmp; - auto res = ParseVarint64(ptr, &tmp); - *value = static_cast(tmp); - return res; + return VarintParse(ptr, value); } inline const char* ReadSINT64(const char* ptr, int64* value) { - uint64 tmp; - auto res = ParseVarint64(ptr, &tmp); - *value = WireFormatLite::ZigZagDecode64(tmp); - return res; + *value = ReadVarintZigZag64(&ptr); + return ptr; } inline const char* ReadSINT32(const char* ptr, int32* value) { - uint64 tmp; - auto res = ParseVarint64(ptr, &tmp); - *value = WireFormatLite::ZigZagDecode32(static_cast(tmp)); - return res; + *value = ReadVarintZigZag32(&ptr); + return ptr; } template inline const char* ReadENUM(const char* ptr, E* value) { - uint64 tmp; - auto res = ParseVarint64(ptr, &tmp); - *value = static_cast(tmp); - return res; + *value = static_cast(ReadVarint32(&ptr)); + return ptr; } inline const char* ReadBOOL(const char* ptr, bool* value) { - uint64 tmp; - auto res = ParseVarint64(ptr, &tmp); - *value = static_cast(tmp); - return res; + *value = static_cast(ReadVarint32(&ptr)); + return ptr; } template @@ -529,6 +510,7 @@ inline const char* ReadSFIXED32(const char* ptr, int32* value) { template \ const char* MapTypeHandler::Read( \ const char* begin, ParseContext* ctx, MapEntryAccessorType* value) { \ + (void)ctx; \ return Read##FieldType(begin, value); \ } @@ -633,7 +615,7 @@ MapTypeHandler::DefaultIfNotInitialized( template inline bool MapTypeHandler::IsInitialized( Type* value) { - return value->IsInitialized(); + return value ? value->IsInitialized() : false; } // Definition for string/bytes handler diff --git a/third_party/protobuf/src/google/protobuf/message.cc b/third_party/protobuf/src/google/protobuf/message.cc index 09b087f6..d35dfffa 100644 --- a/third_party/protobuf/src/google/protobuf/message.cc +++ b/third_party/protobuf/src/google/protobuf/message.cc @@ -32,13 +32,12 @@ // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. +#include + #include #include #include -#include -#include - #include #include #include @@ -48,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -56,7 +56,6 @@ #include #include #include - #include #include #include @@ -137,435 +136,14 @@ void Message::DiscardUnknownFields() { return ReflectionOps::DiscardUnknownFields(this); } -#if !GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Message::MergePartialFromCodedStream(io::CodedInputStream* input) { - return WireFormat::ParseAndMergePartial(input, this); -} -#endif - -bool Message::ParseFromFileDescriptor(int file_descriptor) { - io::FileInputStream input(file_descriptor); - return ParseFromZeroCopyStream(&input) && input.GetErrno() == 0; -} - -bool Message::ParsePartialFromFileDescriptor(int file_descriptor) { - io::FileInputStream input(file_descriptor); - return ParsePartialFromZeroCopyStream(&input) && input.GetErrno() == 0; -} - -bool Message::ParseFromIstream(std::istream* input) { - io::IstreamInputStream zero_copy_input(input); - return ParseFromZeroCopyStream(&zero_copy_input) && input->eof(); -} - -bool Message::ParsePartialFromIstream(std::istream* input) { - io::IstreamInputStream zero_copy_input(input); - return ParsePartialFromZeroCopyStream(&zero_copy_input) && input->eof(); -} - -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -namespace internal { - -class ReflectionAccessor { - public: - static void* GetOffset(void* msg, const google::protobuf::FieldDescriptor* f, - const google::protobuf::Reflection* r) { - return static_cast(msg) + CheckedCast(r)->schema_.GetFieldOffset(f); - } - - static ExtensionSet* GetExtensionSet(void* msg, const google::protobuf::Reflection* r) { - return reinterpret_cast( - static_cast(msg) + - CheckedCast(r)->schema_.GetExtensionSetOffset()); - } - static InternalMetadataWithArena* GetMetadata(void* msg, - const google::protobuf::Reflection* r) { - return reinterpret_cast( - static_cast(msg) + CheckedCast(r)->schema_.GetMetadataOffset()); - } - static void* GetRepeatedEnum(const Reflection* reflection, - const FieldDescriptor* field, Message* msg) { - return reflection->MutableRawRepeatedField( - msg, field, FieldDescriptor::CPPTYPE_ENUM, 0, nullptr); - } - - private: - static const GeneratedMessageReflection* CheckedCast(const Reflection* r) { - auto gr = dynamic_cast(r); - GOOGLE_CHECK(gr != nullptr); - return gr; - } -}; - -} // namespace internal - -void SetField(uint64 val, const FieldDescriptor* field, Message* msg, - const Reflection* reflection) { -#define STORE_TYPE(CPPTYPE_METHOD) \ - do \ - if (field->is_repeated()) { \ - reflection->Add##CPPTYPE_METHOD(msg, field, value); \ - } else { \ - reflection->Set##CPPTYPE_METHOD(msg, field, value); \ - } \ - while (0) - - switch (field->type()) { -#define HANDLE_TYPE(TYPE, CPPTYPE, CPPTYPE_METHOD) \ - case FieldDescriptor::TYPE_##TYPE: { \ - CPPTYPE value = val; \ - STORE_TYPE(CPPTYPE_METHOD); \ - break; \ - } - - // Varints - HANDLE_TYPE(INT32, int32, Int32) - HANDLE_TYPE(INT64, int64, Int64) - HANDLE_TYPE(UINT32, uint32, UInt32) - HANDLE_TYPE(UINT64, uint64, UInt64) - case FieldDescriptor::TYPE_SINT32: { - int32 value = WireFormatLite::ZigZagDecode32(val); - STORE_TYPE(Int32); - break; - } - case FieldDescriptor::TYPE_SINT64: { - int64 value = WireFormatLite::ZigZagDecode64(val); - STORE_TYPE(Int64); - break; - } - HANDLE_TYPE(BOOL, bool, Bool) - - // Fixed - HANDLE_TYPE(FIXED32, uint32, UInt32) - HANDLE_TYPE(FIXED64, uint64, UInt64) - HANDLE_TYPE(SFIXED32, int32, Int32) - HANDLE_TYPE(SFIXED64, int64, Int64) - - case FieldDescriptor::TYPE_FLOAT: { - float value; - uint32 bit_rep = val; - std::memcpy(&value, &bit_rep, sizeof(value)); - STORE_TYPE(Float); - break; - } - case FieldDescriptor::TYPE_DOUBLE: { - double value; - uint64 bit_rep = val; - std::memcpy(&value, &bit_rep, sizeof(value)); - STORE_TYPE(Double); - break; - } - case FieldDescriptor::TYPE_ENUM: { - int value = val; - if (field->is_repeated()) { - reflection->AddEnumValue(msg, field, value); - } else { - reflection->SetEnumValue(msg, field, value); - } - break; - } - default: - GOOGLE_LOG(FATAL) << "Error in descriptors, primitve field with field type " - << field->type(); - } -#undef STORE_TYPE -#undef HANDLE_TYPE -} - -bool ReflectiveValidator(const void* arg, int val) { - auto d = static_cast(arg); - return d->FindValueByNumber(val) != nullptr; -} - -const char* ParsePackedField(const FieldDescriptor* field, Message* msg, - const Reflection* reflection, const char* ptr, - internal::ParseContext* ctx) { - switch (field->type()) { -#define HANDLE_PACKED_TYPE(TYPE, CPPTYPE, METHOD_NAME) \ - case FieldDescriptor::TYPE_##TYPE: \ - return internal::Packed##METHOD_NAME##Parser( \ - reflection->MutableRepeatedField(msg, field), ptr, ctx) - HANDLE_PACKED_TYPE(INT32, int32, Int32); - HANDLE_PACKED_TYPE(INT64, int64, Int64); - HANDLE_PACKED_TYPE(SINT32, int32, SInt32); - HANDLE_PACKED_TYPE(SINT64, int64, SInt64); - HANDLE_PACKED_TYPE(UINT32, uint32, UInt32); - HANDLE_PACKED_TYPE(UINT64, uint64, UInt64); - HANDLE_PACKED_TYPE(BOOL, bool, Bool); - case FieldDescriptor::TYPE_ENUM: { - auto object = - internal::ReflectionAccessor::GetRepeatedEnum(reflection, field, msg); - if (field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3) { - return internal::PackedEnumParser(object, ptr, ctx); - } else { - return internal::PackedEnumParserArg( - object, ptr, ctx, ReflectiveValidator, field->enum_type(), - reflection->MutableUnknownFields(msg), field->number()); - } - } - HANDLE_PACKED_TYPE(FIXED32, uint32, Fixed32); - HANDLE_PACKED_TYPE(FIXED64, uint64, Fixed64); - HANDLE_PACKED_TYPE(SFIXED32, int32, SFixed32); - HANDLE_PACKED_TYPE(SFIXED64, int64, SFixed64); - HANDLE_PACKED_TYPE(FLOAT, float, Float); - HANDLE_PACKED_TYPE(DOUBLE, double, Double); -#undef HANDLE_PACKED_TYPE - - default: - GOOGLE_LOG(FATAL) << "Type is not packable " << field->type(); - return nullptr; // Make compiler happy - } -} - -const char* ParseLenDelim(int field_number, const FieldDescriptor* field, - Message* msg, const Reflection* reflection, - const char* ptr, internal::ParseContext* ctx) { - if (WireFormat::WireTypeForFieldType(field->type()) != - WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - GOOGLE_DCHECK(field->is_packable()); - return ParsePackedField(field, msg, reflection, ptr, ctx); - } - enum { kNone = 0, kVerify, kStrict } utf8_level = kNone; - const char* field_name = nullptr; - auto parse_string = [ptr, ctx, &utf8_level, &field_name](std::string* s) { - switch (utf8_level) { - case kNone: - return internal::InlineGreedyStringParser(s, ptr, ctx); - case kVerify: - return internal::InlineGreedyStringParserUTF8Verify(s, ptr, ctx, - field_name); - case kStrict: - return internal::InlineGreedyStringParserUTF8(s, ptr, ctx, field_name); - } - }; - switch (field->type()) { - case FieldDescriptor::TYPE_STRING: { - bool enforce_utf8 = true; - bool utf8_verification = true; - if (enforce_utf8 && - field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3) { - utf8_level = kStrict; - } else if (utf8_verification) { - utf8_level = kVerify; - } - field_name = field->full_name().c_str(); - PROTOBUF_FALLTHROUGH_INTENDED; - } - case FieldDescriptor::TYPE_BYTES: { - if (field->is_repeated()) { - int index = reflection->FieldSize(*msg, field); - // Add new empty value. - reflection->AddString(msg, field, ""); - if (field->options().ctype() == FieldOptions::STRING || - field->is_extension()) { - auto object = - reflection->MutableRepeatedPtrField(msg, field) - ->Mutable(index); - return parse_string(object); - } else { - auto object = - reflection->MutableRepeatedPtrField(msg, field) - ->Mutable(index); - return parse_string(object); - } - } else { - // Clear value and make sure it's set. - reflection->SetString(msg, field, ""); - if (field->options().ctype() == FieldOptions::STRING || - field->is_extension()) { - // HACK around inability to get mutable_string in reflection - std::string* object = &const_cast( - reflection->GetStringReference(*msg, field, nullptr)); - return parse_string(object); - } else { - // HACK around inability to get mutable_string in reflection - std::string* object = &const_cast( - reflection->GetStringReference(*msg, field, nullptr)); - return parse_string(object); - } - } - GOOGLE_LOG(FATAL) << "No other type than string supported"; - } - case FieldDescriptor::TYPE_MESSAGE: { - Message* object; - if (field->is_repeated()) { - object = reflection->AddMessage(msg, field, ctx->data().factory); - } else { - object = reflection->MutableMessage(msg, field, ctx->data().factory); - } - return ctx->ParseMessage(object, ptr); - } - default: - GOOGLE_LOG(FATAL) << "Wrong type for length delim " << field->type(); - } - return nullptr; // Make compiler happy. -} - -Message* GetGroup(int field_number, const FieldDescriptor* field, Message* msg, - const Reflection* reflection) { - if (field->is_repeated()) { - return reflection->AddMessage(msg, field, nullptr); - } else { - return reflection->MutableMessage(msg, field, nullptr); - } -} - const char* Message::_InternalParse(const char* ptr, internal::ParseContext* ctx) { - class ReflectiveFieldParser { - public: - ReflectiveFieldParser(Message* msg, internal::ParseContext* ctx) - : ReflectiveFieldParser(msg, ctx, false) {} - - void AddVarint(uint32 num, uint64 value) { - if (is_item_ && num == 2) { - if (!payload_.empty()) { - auto field = Field(value, 2); - if (field && field->message_type()) { - auto child = reflection_->MutableMessage(msg_, field); - // TODO(gerbens) signal error - child->ParsePartialFromString(payload_); - } else { - MutableUnknown()->AddLengthDelimited(value)->swap(payload_); - } - return; - } - type_id_ = value; - return; - } - auto field = Field(num, 0); - if (field) { - SetField(value, field, msg_, reflection_); - } else { - MutableUnknown()->AddVarint(num, value); - } - } - void AddFixed64(uint32 num, uint64 value) { - auto field = Field(num, 1); - if (field) { - SetField(value, field, msg_, reflection_); - } else { - MutableUnknown()->AddFixed64(num, value); - } - } - const char* ParseLengthDelimited(uint32 num, const char* ptr, - internal::ParseContext* ctx) { - if (is_item_ && num == 3) { - if (type_id_ == 0) { - return InlineGreedyStringParser(&payload_, ptr, ctx); - } - num = type_id_; - type_id_ = 0; - } - auto field = Field(num, 2); - if (field) { - return ParseLenDelim(num, field, msg_, reflection_, ptr, ctx); - } else { - return InlineGreedyStringParser( - MutableUnknown()->AddLengthDelimited(num), ptr, ctx); - } - } - const char* ParseGroup(uint32 num, const char* ptr, - internal::ParseContext* ctx) { - if (!is_item_ && descriptor_->options().message_set_wire_format() && - num == 1) { - is_item_ = true; - ptr = ctx->ParseGroup(this, ptr, num * 8 + 3); - is_item_ = false; - type_id_ = 0; - return ptr; - } - auto field = Field(num, 3); - if (field) { - auto msg = GetGroup(num, field, msg_, reflection_); - return ctx->ParseGroup(msg, ptr, num * 8 + 3); - } else { - return UnknownFieldParse(num * 8 + 3, MutableUnknown(), ptr, ctx); - } - } - void AddFixed32(uint32 num, uint32 value) { - auto field = Field(num, 5); - if (field) { - SetField(value, field, msg_, reflection_); - } else { - MutableUnknown()->AddFixed32(num, value); - } - } - - const char* _InternalParse(const char* ptr, internal::ParseContext* ctx) { - // We're parsing the a MessageSetItem - GOOGLE_DCHECK(is_item_); - return internal::WireFormatParser(*this, ptr, ctx); - } - - private: - Message* msg_; - const Descriptor* descriptor_; - const Reflection* reflection_; - internal::ParseContext* ctx_; - UnknownFieldSet* unknown_ = nullptr; - bool is_item_ = false; - uint32 type_id_ = 0; - std::string payload_; - - ReflectiveFieldParser(Message* msg, internal::ParseContext* ctx, - bool is_item) - : msg_(msg), - descriptor_(msg->GetDescriptor()), - reflection_(msg->GetReflection()), - ctx_(ctx), - is_item_(is_item) { - GOOGLE_CHECK(descriptor_) << msg->GetTypeName(); - GOOGLE_CHECK(reflection_) << msg->GetTypeName(); - } - - const FieldDescriptor* Field(int num, int wire_type) { - auto field = descriptor_->FindFieldByNumber(num); - - // If that failed, check if the field is an extension. - if (field == nullptr && descriptor_->IsExtensionNumber(num)) { - const DescriptorPool* pool = ctx_->data().pool; - if (pool == NULL) { - field = reflection_->FindKnownExtensionByNumber(num); - } else { - field = pool->FindExtensionByNumber(descriptor_, num); - } - } - if (field == nullptr) return nullptr; - - if (internal::WireFormat::WireTypeForFieldType(field->type()) != - wire_type) { - if (field->is_packable()) { - if (wire_type == - internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - return field; - } - } - return nullptr; - } - return field; - } - - UnknownFieldSet* MutableUnknown() { - if (unknown_) return unknown_; - return unknown_ = reflection_->MutableUnknownFields(msg_); - } - }; - - ReflectiveFieldParser field_parser(this, ctx); - return internal::WireFormatParser(field_parser, ptr, ctx); + return WireFormat::_InternalParse(this, ptr, ctx); } -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Message::SerializeWithCachedSizes(io::CodedOutputStream* output) const { - const internal::SerializationTable* table = - static_cast(InternalGetTable()); - if (table == 0) { - WireFormat::SerializeWithCachedSizes(*this, GetCachedSize(), output); - } else { - internal::TableSerialize(*this, table, output); - } +uint8* Message::_InternalSerialize(uint8* target, + io::EpsCopyOutputStream* stream) const { + return WireFormat::_InternalSerialize(*this, target, stream); } size_t Message::ByteSizeLong() const { @@ -584,88 +162,6 @@ size_t Message::SpaceUsedLong() const { return GetReflection()->SpaceUsedLong(*this); } -bool Message::SerializeToFileDescriptor(int file_descriptor) const { - io::FileOutputStream output(file_descriptor); - return SerializeToZeroCopyStream(&output) && output.Flush(); -} - -bool Message::SerializePartialToFileDescriptor(int file_descriptor) const { - io::FileOutputStream output(file_descriptor); - return SerializePartialToZeroCopyStream(&output) && output.Flush(); -} - -bool Message::SerializeToOstream(std::ostream* output) const { - { - io::OstreamOutputStream zero_copy_output(output); - if (!SerializeToZeroCopyStream(&zero_copy_output)) return false; - } - return output->good(); -} - -bool Message::SerializePartialToOstream(std::ostream* output) const { - io::OstreamOutputStream zero_copy_output(output); - return SerializePartialToZeroCopyStream(&zero_copy_output); -} - - -// ============================================================================= -// Reflection and associated Template Specializations - -Reflection::~Reflection() {} - -void Reflection::AddAllocatedMessage(Message* /* message */, - const FieldDescriptor* /*field */, - Message* /* new_entry */) const {} - -#define HANDLE_TYPE(TYPE, CPPTYPE, CTYPE) \ - template <> \ - const RepeatedField& Reflection::GetRepeatedField( \ - const Message& message, const FieldDescriptor* field) const { \ - return *static_cast*>(MutableRawRepeatedField( \ - const_cast(&message), field, CPPTYPE, CTYPE, NULL)); \ - } \ - \ - template <> \ - RepeatedField* Reflection::MutableRepeatedField( \ - Message * message, const FieldDescriptor* field) const { \ - return static_cast*>( \ - MutableRawRepeatedField(message, field, CPPTYPE, CTYPE, NULL)); \ - } - -HANDLE_TYPE(int32, FieldDescriptor::CPPTYPE_INT32, -1); -HANDLE_TYPE(int64, FieldDescriptor::CPPTYPE_INT64, -1); -HANDLE_TYPE(uint32, FieldDescriptor::CPPTYPE_UINT32, -1); -HANDLE_TYPE(uint64, FieldDescriptor::CPPTYPE_UINT64, -1); -HANDLE_TYPE(float, FieldDescriptor::CPPTYPE_FLOAT, -1); -HANDLE_TYPE(double, FieldDescriptor::CPPTYPE_DOUBLE, -1); -HANDLE_TYPE(bool, FieldDescriptor::CPPTYPE_BOOL, -1); - - -#undef HANDLE_TYPE - -void* Reflection::MutableRawRepeatedString(Message* message, - const FieldDescriptor* field, - bool is_string) const { - return MutableRawRepeatedField(message, field, - FieldDescriptor::CPPTYPE_STRING, - FieldOptions::STRING, NULL); -} - - -MapIterator Reflection::MapBegin(Message* message, - const FieldDescriptor* field) const { - GOOGLE_LOG(FATAL) << "Unimplemented Map Reflection API."; - MapIterator iter(message, field); - return iter; -} - -MapIterator Reflection::MapEnd(Message* message, - const FieldDescriptor* field) const { - GOOGLE_LOG(FATAL) << "Unimplemented Map Reflection API."; - MapIterator iter(message, field); - return iter; -} - // ============================================================================= // MessageFactory @@ -673,15 +169,15 @@ MessageFactory::~MessageFactory() {} namespace { + +#define HASH_MAP std::unordered_map +#define HASH_FXN hash + + class GeneratedMessageFactory : public MessageFactory { public: static GeneratedMessageFactory* singleton(); - struct RegistrationData { - const Metadata* file_level_metadata; - int size; - }; - void RegisterFile(const google::protobuf::internal::DescriptorTable* table); void RegisterType(const Descriptor* descriptor, const Message* prototype); @@ -690,8 +186,8 @@ class GeneratedMessageFactory : public MessageFactory { private: // Only written at static init time, so does not require locking. - std::unordered_map, streq> + HASH_MAP, streq> file_map_; internal::WrappedMutex mutex_; @@ -785,19 +281,6 @@ void MessageFactory::InternalRegisterGeneratedMessage( } -MessageFactory* Reflection::GetMessageFactory() const { - GOOGLE_LOG(FATAL) << "Not implemented."; - return NULL; -} - -void* Reflection::RepeatedFieldData(Message* message, - const FieldDescriptor* field, - FieldDescriptor::CppType cpp_type, - const Descriptor* message_type) const { - GOOGLE_LOG(FATAL) << "Not implemented."; - return NULL; -} - namespace { template T* GetSingleton() { diff --git a/third_party/protobuf/src/google/protobuf/message.h b/third_party/protobuf/src/google/protobuf/message.h index 925c2494..3b752df9 100644 --- a/third_party/protobuf/src/google/protobuf/message.h +++ b/third_party/protobuf/src/google/protobuf/message.h @@ -84,12 +84,12 @@ // // Get the descriptors for the fields we're interested in and verify // // their types. // const FieldDescriptor* text_field = descriptor->FindFieldByName("text"); -// assert(text_field != NULL); +// assert(text_field != nullptr); // assert(text_field->type() == FieldDescriptor::TYPE_STRING); // assert(text_field->label() == FieldDescriptor::LABEL_OPTIONAL); // const FieldDescriptor* numbers_field = descriptor-> // FindFieldByName("numbers"); -// assert(numbers_field != NULL); +// assert(numbers_field != nullptr); // assert(numbers_field->type() == FieldDescriptor::TYPE_INT32); // assert(numbers_field->label() == FieldDescriptor::LABEL_REPEATED); // @@ -119,6 +119,7 @@ #include #include #include +#include #include #include @@ -141,6 +142,8 @@ class Reflection; class MessageFactory; // Defined in other files. +class AssignDescriptorsHelper; +class DynamicMessageFactory; class MapKey; class MapValueRef; class MapIterator; @@ -189,6 +192,26 @@ struct Metadata { const Reflection* reflection; }; +namespace internal { +template +inline To* GetPointerAtOffset(Message* message, uint32 offset) { + return reinterpret_cast(reinterpret_cast(message) + offset); +} + +template +const To* GetConstPointerAtOffset(const Message* message, uint32 offset) { + return reinterpret_cast(reinterpret_cast(message) + + offset); +} + +template +const To& GetConstRefAtOffset(const Message& message, uint32 offset) { + return *GetConstPointerAtOffset(&message, offset); +} + +bool CreateUnknownEnumValues(const FieldDescriptor* field); +} // namespace internal + // Abstract interface for protocol messages. // // See also MessageLite, which contains most every-day operations. Message @@ -199,10 +222,12 @@ struct Metadata { // optimized for speed will want to override these with faster implementations, // but classes optimized for code size may be happy with keeping them. See // the optimize_for option in descriptor.proto. +// +// Users must not derive from this class. Only the protocol compiler and +// the internal library are allowed to create subclasses. class PROTOBUF_EXPORT Message : public MessageLite { public: inline Message() {} - ~Message() override {} // Basic Operations ------------------------------------------------ @@ -212,11 +237,11 @@ class PROTOBUF_EXPORT Message : public MessageLite { Message* New() const override = 0; // Construct a new instance on the arena. Ownership is passed to the caller - // if arena is a NULL. Default implementation allows for API compatibility + // if arena is a nullptr. Default implementation allows for API compatibility // during the Arena transition. Message* New(Arena* arena) const override { Message* message = New(); - if (arena != NULL) { + if (arena != nullptr) { arena->Own(message); } return message; @@ -285,52 +310,24 @@ class PROTOBUF_EXPORT Message : public MessageLite { // Convenience function useful in GDB. Prints DebugString() to stdout. void PrintDebugString() const; - // Heavy I/O ------------------------------------------------------- - // Additional parsing and serialization methods not implemented by - // MessageLite because they are not supported by the lite library. - - // Parse a protocol buffer from a file descriptor. If successful, the entire - // input will be consumed. - bool ParseFromFileDescriptor(int file_descriptor); - // Like ParseFromFileDescriptor(), but accepts messages that are missing - // required fields. - bool ParsePartialFromFileDescriptor(int file_descriptor); - // Parse a protocol buffer from a C++ istream. If successful, the entire - // input will be consumed. - bool ParseFromIstream(std::istream* input); - // Like ParseFromIstream(), but accepts messages that are missing - // required fields. - bool ParsePartialFromIstream(std::istream* input); - - // Serialize the message and write it to the given file descriptor. All - // required fields must be set. - bool SerializeToFileDescriptor(int file_descriptor) const; - // Like SerializeToFileDescriptor(), but allows missing required fields. - bool SerializePartialToFileDescriptor(int file_descriptor) const; - // Serialize the message and write it to the given C++ ostream. All - // required fields must be set. - bool SerializeToOstream(std::ostream* output) const; - // Like SerializeToOstream(), but allows missing required fields. - bool SerializePartialToOstream(std::ostream* output) const; - - // Reflection-based methods ---------------------------------------- // These methods are pure-virtual in MessageLite, but Message provides // reflection-based default implementations. std::string GetTypeName() const override; void Clear() override; + + // Returns whether all required fields have been set. Note that required + // fields no longer exist starting in proto3. bool IsInitialized() const override; + void CheckTypeAndMergeFrom(const MessageLite& other) override; -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER // Reflective parser const char* _InternalParse(const char* ptr, internal::ParseContext* ctx) override; -#else - bool MergePartialFromCodedStream(io::CodedInputStream* input) override; -#endif size_t ByteSizeLong() const override; - void SerializeWithCachedSizes(io::CodedOutputStream* output) const override; + uint8* _InternalSerialize(uint8* target, + io::EpsCopyOutputStream* stream) const override; private: // This is called only by the default implementation of ByteSize(), to @@ -355,17 +352,15 @@ class PROTOBUF_EXPORT Message : public MessageLite { // which can be used to read and modify the fields of the Message dynamically // (in other words, without knowing the message type at compile time). This // object remains property of the Message. - // - // This method remains virtual in case a subclass does not implement - // reflection and wants to override the default behavior. const Reflection* GetReflection() const { return GetMetadata().reflection; } protected: - // Get a struct containing the metadata for the Message. Most subclasses only - // need to implement this method, rather than the GetDescriptor() and - // GetReflection() wrappers. + // Get a struct containing the metadata for the Message, which is used in turn + // to implement GetDescriptor() and GetReflection() above. virtual Metadata GetMetadata() const = 0; + inline explicit Message(Arena* arena) : MessageLite(arena) {} + private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Message); @@ -423,23 +418,19 @@ class MutableRepeatedFieldRef; // double the message's memory footprint, probably worse. Allocating the // objects on-demand, on the other hand, would be expensive and prone to // memory leaks. So, instead we ended up with this flat interface. -class PROTOBUF_EXPORT Reflection { +class PROTOBUF_EXPORT Reflection final { public: - inline Reflection() {} - virtual ~Reflection(); - // Get the UnknownFieldSet for the message. This contains fields which // were seen when the Message was parsed but were not recognized according // to the Message's definition. - virtual const UnknownFieldSet& GetUnknownFields( - const Message& message) const = 0; + const UnknownFieldSet& GetUnknownFields(const Message& message) const; // Get a mutable pointer to the UnknownFieldSet for the message. This // contains fields which were seen when the Message was parsed but were not // recognized according to the Message's definition. - virtual UnknownFieldSet* MutableUnknownFields(Message* message) const = 0; + UnknownFieldSet* MutableUnknownFields(Message* message) const; // Estimate the amount of memory used by the message object. - virtual size_t SpaceUsedLong(const Message& message) const = 0; + size_t SpaceUsedLong(const Message& message) const; PROTOBUF_DEPRECATED_MSG("Please use SpaceUsedLong() instead") int SpaceUsed(const Message& message) const { @@ -447,37 +438,26 @@ class PROTOBUF_EXPORT Reflection { } // Check if the given non-repeated field is set. - virtual bool HasField(const Message& message, - const FieldDescriptor* field) const = 0; + bool HasField(const Message& message, const FieldDescriptor* field) const; // Get the number of elements of a repeated field. - virtual int FieldSize(const Message& message, - const FieldDescriptor* field) const = 0; + int FieldSize(const Message& message, const FieldDescriptor* field) const; // Clear the value of a field, so that HasField() returns false or // FieldSize() returns zero. - virtual void ClearField(Message* message, - const FieldDescriptor* field) const = 0; + void ClearField(Message* message, const FieldDescriptor* field) const; // Check if the oneof is set. Returns true if any field in oneof // is set, false otherwise. - // TODO(jieluo) - make it pure virtual after updating all - // the subclasses. - virtual bool HasOneof(const Message& /*message*/, - const OneofDescriptor* /*oneof_descriptor*/) const { - return false; - } + bool HasOneof(const Message& message, + const OneofDescriptor* oneof_descriptor) const; - virtual void ClearOneof(Message* /*message*/, - const OneofDescriptor* /*oneof_descriptor*/) const {} + void ClearOneof(Message* message, + const OneofDescriptor* oneof_descriptor) const; - // Returns the field descriptor if the oneof is set. NULL otherwise. - // TODO(jieluo) - make it pure virtual. - virtual const FieldDescriptor* GetOneofFieldDescriptor( - const Message& /*message*/, - const OneofDescriptor* /*oneof_descriptor*/) const { - return NULL; - } + // Returns the field descriptor if the oneof is set. nullptr otherwise. + const FieldDescriptor* GetOneofFieldDescriptor( + const Message& message, const OneofDescriptor* oneof_descriptor) const; // Removes the last element of a repeated field. // We don't provide a way to remove any element other than the last @@ -486,24 +466,21 @@ class PROTOBUF_EXPORT Reflection { // than the last, the best way to do it is to re-arrange the elements // (using Swap()) so that the one you want removed is at the end, then // call RemoveLast(). - virtual void RemoveLast(Message* message, - const FieldDescriptor* field) const = 0; + void RemoveLast(Message* message, const FieldDescriptor* field) const; // Removes the last element of a repeated message field, and returns the // pointer to the caller. Caller takes ownership of the returned pointer. - virtual Message* ReleaseLast(Message* message, - const FieldDescriptor* field) const = 0; + Message* ReleaseLast(Message* message, const FieldDescriptor* field) const; // Swap the complete contents of two messages. - virtual void Swap(Message* message1, Message* message2) const = 0; + void Swap(Message* message1, Message* message2) const; // Swap fields listed in fields vector of two messages. - virtual void SwapFields( - Message* message1, Message* message2, - const std::vector& fields) const = 0; + void SwapFields(Message* message1, Message* message2, + const std::vector& fields) const; // Swap two elements of a repeated field. - virtual void SwapElements(Message* message, const FieldDescriptor* field, - int index1, int index2) const = 0; + void SwapElements(Message* message, const FieldDescriptor* field, int index1, + int index2) const; // List all fields of the message which are currently set, except for unknown // fields, but including extension known to the parser (i.e. compiled in). @@ -513,45 +490,36 @@ class PROTOBUF_EXPORT Reflection { // ordered by field number. // Use Reflection::GetUnknownFields() or message.unknown_fields() to also get // access to fields/extensions unknown to the parser. - virtual void ListFields( - const Message& message, - std::vector* output) const = 0; + void ListFields(const Message& message, + std::vector* output) const; // Singular field getters ------------------------------------------ // These get the value of a non-repeated field. They return the default // value for fields that aren't set. - virtual int32 GetInt32(const Message& message, - const FieldDescriptor* field) const = 0; - virtual int64 GetInt64(const Message& message, - const FieldDescriptor* field) const = 0; - virtual uint32 GetUInt32(const Message& message, - const FieldDescriptor* field) const = 0; - virtual uint64 GetUInt64(const Message& message, - const FieldDescriptor* field) const = 0; - virtual float GetFloat(const Message& message, - const FieldDescriptor* field) const = 0; - virtual double GetDouble(const Message& message, - const FieldDescriptor* field) const = 0; - virtual bool GetBool(const Message& message, - const FieldDescriptor* field) const = 0; - virtual std::string GetString(const Message& message, - const FieldDescriptor* field) const = 0; - virtual const EnumValueDescriptor* GetEnum( - const Message& message, const FieldDescriptor* field) const = 0; + int32 GetInt32(const Message& message, const FieldDescriptor* field) const; + int64 GetInt64(const Message& message, const FieldDescriptor* field) const; + uint32 GetUInt32(const Message& message, const FieldDescriptor* field) const; + uint64 GetUInt64(const Message& message, const FieldDescriptor* field) const; + float GetFloat(const Message& message, const FieldDescriptor* field) const; + double GetDouble(const Message& message, const FieldDescriptor* field) const; + bool GetBool(const Message& message, const FieldDescriptor* field) const; + std::string GetString(const Message& message, + const FieldDescriptor* field) const; + const EnumValueDescriptor* GetEnum(const Message& message, + const FieldDescriptor* field) const; // GetEnumValue() returns an enum field's value as an integer rather than // an EnumValueDescriptor*. If the integer value does not correspond to a // known value descriptor, a new value descriptor is created. (Such a value // will only be present when the new unknown-enum-value semantics are enabled // for a message.) - virtual int GetEnumValue(const Message& message, - const FieldDescriptor* field) const = 0; + int GetEnumValue(const Message& message, const FieldDescriptor* field) const; // See MutableMessage() for the meaning of the "factory" parameter. - virtual const Message& GetMessage(const Message& message, - const FieldDescriptor* field, - MessageFactory* factory = NULL) const = 0; + const Message& GetMessage(const Message& message, + const FieldDescriptor* field, + MessageFactory* factory = nullptr) const; // Get a string value without copying, if possible. // @@ -568,32 +536,32 @@ class PROTOBUF_EXPORT Reflection { // a newly-constructed string, though, it's just as fast and more // readable to use code like: // std::string str = reflection->GetString(message, field); - virtual const std::string& GetStringReference(const Message& message, - const FieldDescriptor* field, - std::string* scratch) const = 0; + const std::string& GetStringReference(const Message& message, + const FieldDescriptor* field, + std::string* scratch) const; // Singular field mutators ----------------------------------------- // These mutate the value of a non-repeated field. - virtual void SetInt32(Message* message, const FieldDescriptor* field, - int32 value) const = 0; - virtual void SetInt64(Message* message, const FieldDescriptor* field, - int64 value) const = 0; - virtual void SetUInt32(Message* message, const FieldDescriptor* field, - uint32 value) const = 0; - virtual void SetUInt64(Message* message, const FieldDescriptor* field, - uint64 value) const = 0; - virtual void SetFloat(Message* message, const FieldDescriptor* field, - float value) const = 0; - virtual void SetDouble(Message* message, const FieldDescriptor* field, - double value) const = 0; - virtual void SetBool(Message* message, const FieldDescriptor* field, - bool value) const = 0; - virtual void SetString(Message* message, const FieldDescriptor* field, - const std::string& value) const = 0; - virtual void SetEnum(Message* message, const FieldDescriptor* field, - const EnumValueDescriptor* value) const = 0; + void SetInt32(Message* message, const FieldDescriptor* field, + int32 value) const; + void SetInt64(Message* message, const FieldDescriptor* field, + int64 value) const; + void SetUInt32(Message* message, const FieldDescriptor* field, + uint32 value) const; + void SetUInt64(Message* message, const FieldDescriptor* field, + uint64 value) const; + void SetFloat(Message* message, const FieldDescriptor* field, + float value) const; + void SetDouble(Message* message, const FieldDescriptor* field, + double value) const; + void SetBool(Message* message, const FieldDescriptor* field, + bool value) const; + void SetString(Message* message, const FieldDescriptor* field, + std::string value) const; + void SetEnum(Message* message, const FieldDescriptor* field, + const EnumValueDescriptor* value) const; // Set an enum field's value with an integer rather than EnumValueDescriptor. // For proto3 this is just setting the enum field to the value specified, for // proto2 it's more complicated. If value is a known enum value the field is @@ -601,8 +569,8 @@ class PROTOBUF_EXPORT Reflection { // set. Note this matches the behavior of parsing unknown enum values. // If multiple calls with unknown values happen than they are all added to the // unknown field set in order of the calls. - virtual void SetEnumValue(Message* message, const FieldDescriptor* field, - int value) const = 0; + void SetEnumValue(Message* message, const FieldDescriptor* field, + int value) const; // Get a mutable pointer to a field with a message type. If a MessageFactory // is provided, it will be used to construct instances of the sub-message; @@ -614,97 +582,86 @@ class PROTOBUF_EXPORT Reflection { // FieldDescriptor is for a compiled-in extension, then // factory->GetPrototype(field->message_type()) MUST return an instance of // the compiled-in class for this type, NOT DynamicMessage. - virtual Message* MutableMessage(Message* message, - const FieldDescriptor* field, - MessageFactory* factory = NULL) const = 0; + Message* MutableMessage(Message* message, const FieldDescriptor* field, + MessageFactory* factory = nullptr) const; // Replaces the message specified by 'field' with the already-allocated object // sub_message, passing ownership to the message. If the field contained a - // message, that message is deleted. If sub_message is NULL, the field is + // message, that message is deleted. If sub_message is nullptr, the field is // cleared. - virtual void SetAllocatedMessage(Message* message, Message* sub_message, - const FieldDescriptor* field) const = 0; + void SetAllocatedMessage(Message* message, Message* sub_message, + const FieldDescriptor* field) const; // Releases the message specified by 'field' and returns the pointer, // ReleaseMessage() will return the message the message object if it exists. - // Otherwise, it may or may not return NULL. In any case, if the return value - // is non-NULL, the caller takes ownership of the pointer. + // Otherwise, it may or may not return nullptr. In any case, if the return + // value is non-null, the caller takes ownership of the pointer. // If the field existed (HasField() is true), then the returned pointer will // be the same as the pointer returned by MutableMessage(). // This function has the same effect as ClearField(). - virtual Message* ReleaseMessage(Message* message, - const FieldDescriptor* field, - MessageFactory* factory = NULL) const = 0; + Message* ReleaseMessage(Message* message, const FieldDescriptor* field, + MessageFactory* factory = nullptr) const; // Repeated field getters ------------------------------------------ // These get the value of one element of a repeated field. - virtual int32 GetRepeatedInt32(const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual int64 GetRepeatedInt64(const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual uint32 GetRepeatedUInt32(const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual uint64 GetRepeatedUInt64(const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual float GetRepeatedFloat(const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual double GetRepeatedDouble(const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual bool GetRepeatedBool(const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual std::string GetRepeatedString(const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual const EnumValueDescriptor* GetRepeatedEnum( - const Message& message, const FieldDescriptor* field, - int index) const = 0; + int32 GetRepeatedInt32(const Message& message, const FieldDescriptor* field, + int index) const; + int64 GetRepeatedInt64(const Message& message, const FieldDescriptor* field, + int index) const; + uint32 GetRepeatedUInt32(const Message& message, const FieldDescriptor* field, + int index) const; + uint64 GetRepeatedUInt64(const Message& message, const FieldDescriptor* field, + int index) const; + float GetRepeatedFloat(const Message& message, const FieldDescriptor* field, + int index) const; + double GetRepeatedDouble(const Message& message, const FieldDescriptor* field, + int index) const; + bool GetRepeatedBool(const Message& message, const FieldDescriptor* field, + int index) const; + std::string GetRepeatedString(const Message& message, + const FieldDescriptor* field, int index) const; + const EnumValueDescriptor* GetRepeatedEnum(const Message& message, + const FieldDescriptor* field, + int index) const; // GetRepeatedEnumValue() returns an enum field's value as an integer rather // than an EnumValueDescriptor*. If the integer value does not correspond to a // known value descriptor, a new value descriptor is created. (Such a value // will only be present when the new unknown-enum-value semantics are enabled // for a message.) - virtual int GetRepeatedEnumValue(const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual const Message& GetRepeatedMessage(const Message& message, - const FieldDescriptor* field, - int index) const = 0; + int GetRepeatedEnumValue(const Message& message, const FieldDescriptor* field, + int index) const; + const Message& GetRepeatedMessage(const Message& message, + const FieldDescriptor* field, + int index) const; // See GetStringReference(), above. - virtual const std::string& GetRepeatedStringReference( - const Message& message, const FieldDescriptor* field, int index, - std::string* scratch) const = 0; + const std::string& GetRepeatedStringReference(const Message& message, + const FieldDescriptor* field, + int index, + std::string* scratch) const; // Repeated field mutators ----------------------------------------- // These mutate the value of one element of a repeated field. - virtual void SetRepeatedInt32(Message* message, const FieldDescriptor* field, - int index, int32 value) const = 0; - virtual void SetRepeatedInt64(Message* message, const FieldDescriptor* field, - int index, int64 value) const = 0; - virtual void SetRepeatedUInt32(Message* message, const FieldDescriptor* field, - int index, uint32 value) const = 0; - virtual void SetRepeatedUInt64(Message* message, const FieldDescriptor* field, - int index, uint64 value) const = 0; - virtual void SetRepeatedFloat(Message* message, const FieldDescriptor* field, - int index, float value) const = 0; - virtual void SetRepeatedDouble(Message* message, const FieldDescriptor* field, - int index, double value) const = 0; - virtual void SetRepeatedBool(Message* message, const FieldDescriptor* field, - int index, bool value) const = 0; - virtual void SetRepeatedString(Message* message, const FieldDescriptor* field, - int index, const std::string& value) const = 0; - virtual void SetRepeatedEnum(Message* message, const FieldDescriptor* field, - int index, - const EnumValueDescriptor* value) const = 0; + void SetRepeatedInt32(Message* message, const FieldDescriptor* field, + int index, int32 value) const; + void SetRepeatedInt64(Message* message, const FieldDescriptor* field, + int index, int64 value) const; + void SetRepeatedUInt32(Message* message, const FieldDescriptor* field, + int index, uint32 value) const; + void SetRepeatedUInt64(Message* message, const FieldDescriptor* field, + int index, uint64 value) const; + void SetRepeatedFloat(Message* message, const FieldDescriptor* field, + int index, float value) const; + void SetRepeatedDouble(Message* message, const FieldDescriptor* field, + int index, double value) const; + void SetRepeatedBool(Message* message, const FieldDescriptor* field, + int index, bool value) const; + void SetRepeatedString(Message* message, const FieldDescriptor* field, + int index, std::string value) const; + void SetRepeatedEnum(Message* message, const FieldDescriptor* field, + int index, const EnumValueDescriptor* value) const; // Set an enum field's value with an integer rather than EnumValueDescriptor. // For proto3 this is just setting the enum field to the value specified, for // proto2 it's more complicated. If value is a known enum value the field is @@ -712,37 +669,36 @@ class PROTOBUF_EXPORT Reflection { // set. Note this matches the behavior of parsing unknown enum values. // If multiple calls with unknown values happen than they are all added to the // unknown field set in order of the calls. - virtual void SetRepeatedEnumValue(Message* message, - const FieldDescriptor* field, int index, - int value) const = 0; + void SetRepeatedEnumValue(Message* message, const FieldDescriptor* field, + int index, int value) const; // Get a mutable pointer to an element of a repeated field with a message // type. - virtual Message* MutableRepeatedMessage(Message* message, - const FieldDescriptor* field, - int index) const = 0; + Message* MutableRepeatedMessage(Message* message, + const FieldDescriptor* field, + int index) const; // Repeated field adders ------------------------------------------- // These add an element to a repeated field. - virtual void AddInt32(Message* message, const FieldDescriptor* field, - int32 value) const = 0; - virtual void AddInt64(Message* message, const FieldDescriptor* field, - int64 value) const = 0; - virtual void AddUInt32(Message* message, const FieldDescriptor* field, - uint32 value) const = 0; - virtual void AddUInt64(Message* message, const FieldDescriptor* field, - uint64 value) const = 0; - virtual void AddFloat(Message* message, const FieldDescriptor* field, - float value) const = 0; - virtual void AddDouble(Message* message, const FieldDescriptor* field, - double value) const = 0; - virtual void AddBool(Message* message, const FieldDescriptor* field, - bool value) const = 0; - virtual void AddString(Message* message, const FieldDescriptor* field, - const std::string& value) const = 0; - virtual void AddEnum(Message* message, const FieldDescriptor* field, - const EnumValueDescriptor* value) const = 0; + void AddInt32(Message* message, const FieldDescriptor* field, + int32 value) const; + void AddInt64(Message* message, const FieldDescriptor* field, + int64 value) const; + void AddUInt32(Message* message, const FieldDescriptor* field, + uint32 value) const; + void AddUInt64(Message* message, const FieldDescriptor* field, + uint64 value) const; + void AddFloat(Message* message, const FieldDescriptor* field, + float value) const; + void AddDouble(Message* message, const FieldDescriptor* field, + double value) const; + void AddBool(Message* message, const FieldDescriptor* field, + bool value) const; + void AddString(Message* message, const FieldDescriptor* field, + std::string value) const; + void AddEnum(Message* message, const FieldDescriptor* field, + const EnumValueDescriptor* value) const; // Add an integer value to a repeated enum field rather than // EnumValueDescriptor. For proto3 this is just setting the enum field to the // value specified, for proto2 it's more complicated. If value is a known enum @@ -750,19 +706,16 @@ class PROTOBUF_EXPORT Reflection { // to the unknown field set. Note this matches the behavior of parsing unknown // enum values. If multiple calls with unknown values happen than they are all // added to the unknown field set in order of the calls. - virtual void AddEnumValue(Message* message, const FieldDescriptor* field, - int value) const = 0; + void AddEnumValue(Message* message, const FieldDescriptor* field, + int value) const; // See MutableMessage() for comments on the "factory" parameter. - virtual Message* AddMessage(Message* message, const FieldDescriptor* field, - MessageFactory* factory = NULL) const = 0; + Message* AddMessage(Message* message, const FieldDescriptor* field, + MessageFactory* factory = nullptr) const; // Appends an already-allocated object 'new_entry' to the repeated field // specified by 'field' passing ownership to the message. - // TODO(tmarek): Make virtual after all subclasses have been - // updated. - virtual void AddAllocatedMessage(Message* message, - const FieldDescriptor* field, - Message* new_entry) const; + void AddAllocatedMessage(Message* message, const FieldDescriptor* field, + Message* new_entry) const; // Get a RepeatedFieldRef object that can be used to read the underlying @@ -818,16 +771,20 @@ class PROTOBUF_EXPORT Reflection { // for T = Cord and all protobuf scalar types except enums. template PROTOBUF_DEPRECATED_MSG("Please use GetRepeatedFieldRef() instead") - const RepeatedField& GetRepeatedField(const Message&, - const FieldDescriptor*) const; + const RepeatedField& GetRepeatedField(const Message& msg, + const FieldDescriptor* d) const { + return GetRepeatedFieldInternal(msg, d); + } // DEPRECATED. Please use GetMutableRepeatedFieldRef(). // // for T = Cord and all protobuf scalar types except enums. template PROTOBUF_DEPRECATED_MSG("Please use GetMutableRepeatedFieldRef() instead") - RepeatedField* MutableRepeatedField(Message*, - const FieldDescriptor*) const; + RepeatedField* MutableRepeatedField(Message* msg, + const FieldDescriptor* d) const { + return MutableRepeatedFieldInternal(msg, d); + } // DEPRECATED. Please use GetRepeatedFieldRef(). // @@ -835,8 +792,10 @@ class PROTOBUF_EXPORT Reflection { // google::protobuf::Message & descendants. template PROTOBUF_DEPRECATED_MSG("Please use GetRepeatedFieldRef() instead") - const RepeatedPtrField& GetRepeatedPtrField(const Message&, - const FieldDescriptor*) const; + const RepeatedPtrField& GetRepeatedPtrField( + const Message& msg, const FieldDescriptor* d) const { + return GetRepeatedPtrFieldInternal(msg, d); + } // DEPRECATED. Please use GetMutableRepeatedFieldRef(). // @@ -844,20 +803,21 @@ class PROTOBUF_EXPORT Reflection { // google::protobuf::Message & descendants. template PROTOBUF_DEPRECATED_MSG("Please use GetMutableRepeatedFieldRef() instead") - RepeatedPtrField* MutableRepeatedPtrField(Message*, - const FieldDescriptor*) const; + RepeatedPtrField* MutableRepeatedPtrField(Message* msg, + const FieldDescriptor* d) const { + return MutableRepeatedPtrFieldInternal(msg, d); + } // Extensions ---------------------------------------------------------------- // Try to find an extension of this message type by fully-qualified field - // name. Returns NULL if no extension is known for this name or number. - virtual const FieldDescriptor* FindKnownExtensionByName( - const std::string& name) const = 0; + // name. Returns nullptr if no extension is known for this name or number. + const FieldDescriptor* FindKnownExtensionByName( + const std::string& name) const; // Try to find an extension of this message type by field number. - // Returns NULL if no extension is known for this name or number. - virtual const FieldDescriptor* FindKnownExtensionByNumber( - int number) const = 0; + // Returns nullptr if no extension is known for this name or number. + const FieldDescriptor* FindKnownExtensionByNumber(int number) const; // Feature Flags ------------------------------------------------------------- @@ -878,7 +838,7 @@ class PROTOBUF_EXPORT Reflection { // reflection->SetEnumValue(message, field, new_value); // } else { // if (field_descriptor->enum_type()-> - // FindValueByNumber(new_value) != NULL) { + // FindValueByNumber(new_value) != nullptr) { // reflection->SetEnumValue(message, field, new_value); // } else if (emit_unknown_enum_values) { // reflection->MutableUnknownFields(message)->AddVarint( @@ -889,7 +849,7 @@ class PROTOBUF_EXPORT Reflection { // reflection->SetEnumValue(message, field, new_value); // } // } - virtual bool SupportsUnknownEnumValues() const { return false; } + bool SupportsUnknownEnumValues() const; // Returns the MessageFactory associated with this message. This can be // useful for determining if a message is a generated message or not, for @@ -900,60 +860,75 @@ class PROTOBUF_EXPORT Reflection { // } // It can also be used to create more messages of this type, though // Message::New() is an easier way to accomplish this. - virtual MessageFactory* GetMessageFactory() const; + MessageFactory* GetMessageFactory() const; - // --------------------------------------------------------------------------- - - protected: + private: + template + const RepeatedField& GetRepeatedFieldInternal( + const Message& message, const FieldDescriptor* field) const; + template + RepeatedField* MutableRepeatedFieldInternal( + Message* message, const FieldDescriptor* field) const; + template + const RepeatedPtrField& GetRepeatedPtrFieldInternal( + const Message& message, const FieldDescriptor* field) const; + template + RepeatedPtrField* MutableRepeatedPtrFieldInternal( + Message* message, const FieldDescriptor* field) const; // Obtain a pointer to a Repeated Field Structure and do some type checking: // on field->cpp_type(), // on field->field_option().ctype() (if ctype >= 0) - // of field->message_type() (if message_type != NULL). + // of field->message_type() (if message_type != nullptr). // We use 2 routine rather than 4 (const vs mutable) x (scalar vs pointer). - virtual void* MutableRawRepeatedField( - Message* message, const FieldDescriptor* field, FieldDescriptor::CppType, - int ctype, const Descriptor* message_type) const = 0; + void* MutableRawRepeatedField(Message* message, const FieldDescriptor* field, + FieldDescriptor::CppType, int ctype, + const Descriptor* message_type) const; - // TODO(jieluo) - make it pure virtual after updating all the subclasses. - virtual const void* GetRawRepeatedField( - const Message& message, const FieldDescriptor* field, - FieldDescriptor::CppType cpptype, int ctype, - const Descriptor* message_type) const { - return MutableRawRepeatedField(const_cast(&message), field, - cpptype, ctype, message_type); - } + const void* GetRawRepeatedField(const Message& message, + const FieldDescriptor* field, + FieldDescriptor::CppType cpptype, int ctype, + const Descriptor* message_type) const; // The following methods are used to implement (Mutable)RepeatedFieldRef. // A Ref object will store a raw pointer to the repeated field data (obtained // from RepeatedFieldData()) and a pointer to a Accessor (obtained from // RepeatedFieldAccessor) which will be used to access the raw data. - // - // TODO(xiaofeng): Make these methods pure-virtual. // Returns a raw pointer to the repeated field // // "cpp_type" and "message_type" are deduced from the type parameter T passed // to Get(Mutable)RepeatedFieldRef. If T is a generated message type, // "message_type" should be set to its descriptor. Otherwise "message_type" - // should be set to NULL. Implementations of this method should check whether - // "cpp_type"/"message_type" is consistent with the actual type of the field. - // We use 1 routine rather than 2 (const vs mutable) because it is protected - // and it doesn't change the message. - virtual void* RepeatedFieldData(Message* message, - const FieldDescriptor* field, - FieldDescriptor::CppType cpp_type, - const Descriptor* message_type) const; + // should be set to nullptr. Implementations of this method should check + // whether "cpp_type"/"message_type" is consistent with the actual type of the + // field. We use 1 routine rather than 2 (const vs mutable) because it is + // protected and it doesn't change the message. + void* RepeatedFieldData(Message* message, const FieldDescriptor* field, + FieldDescriptor::CppType cpp_type, + const Descriptor* message_type) const; // The returned pointer should point to a singleton instance which implements // the RepeatedFieldAccessor interface. - virtual const internal::RepeatedFieldAccessor* RepeatedFieldAccessor( + const internal::RepeatedFieldAccessor* RepeatedFieldAccessor( const FieldDescriptor* field) const; - private: + const Descriptor* const descriptor_; + const internal::ReflectionSchema schema_; + const DescriptorPool* const descriptor_pool_; + MessageFactory* const message_factory_; + + // Last non weak field index. This is an optimization when most weak fields + // are at the end of the containing message. If a message proto doesn't + // contain weak fields, then this field equals descriptor_->field_count(). + int last_non_weak_field_index_; + template friend class RepeatedFieldRef; template friend class MutableRepeatedFieldRef; + friend class ::PROTOBUF_NAMESPACE_ID::MessageLayoutInspector; + friend class ::PROTOBUF_NAMESPACE_ID::AssignDescriptorsHelper; + friend class DynamicMessageFactory; friend class python::MapReflectionFriend; #define GOOGLE_PROTOBUF_HAS_CEL_MAP_REFLECTION_FRIEND friend class expr::CelMapReflectionFriend; @@ -963,7 +938,10 @@ class PROTOBUF_EXPORT Reflection { friend class internal::ReflectionOps; // Needed for implementing text format for map. friend class internal::MapFieldPrinterHelper; - friend class internal::ReflectionAccessor; + + Reflection(const Descriptor* descriptor, + const internal::ReflectionSchema& schema, + const DescriptorPool* pool, MessageFactory* factory); // Special version for specialized implementations of string. We can't // call MutableRawRepeatedField directly here because we don't have access to @@ -975,63 +953,161 @@ class PROTOBUF_EXPORT Reflection { bool is_string) const; friend class MapReflectionTester; - // TODO(jieluo) - make the map APIs pure virtual after updating - // all the subclasses. // Returns true if key is in map. Returns false if key is not in map field. - virtual bool ContainsMapKey(const Message& /* message */, - const FieldDescriptor* /* field */, - const MapKey& /* key */) const { - return false; - } + bool ContainsMapKey(const Message& message, const FieldDescriptor* field, + const MapKey& key) const; // If key is in map field: Saves the value pointer to val and returns // false. If key in not in map field: Insert the key into map, saves - // value pointer to val and retuns true. - virtual bool InsertOrLookupMapValue(Message* /* message */, - const FieldDescriptor* /* field */, - const MapKey& /* key */, - MapValueRef* /* val */) const { - return false; - } + // value pointer to val and returns true. + bool InsertOrLookupMapValue(Message* message, const FieldDescriptor* field, + const MapKey& key, MapValueRef* val) const; // Delete and returns true if key is in the map field. Returns false // otherwise. - virtual bool DeleteMapValue(Message* /* message */, - const FieldDescriptor* /* field */, - const MapKey& /* key */) const { - return false; - } + bool DeleteMapValue(Message* message, const FieldDescriptor* field, + const MapKey& key) const; // Returns a MapIterator referring to the first element in the map field. // If the map field is empty, this function returns the same as // reflection::MapEnd. Mutation to the field may invalidate the iterator. - virtual MapIterator MapBegin(Message* message, - const FieldDescriptor* field) const; + MapIterator MapBegin(Message* message, const FieldDescriptor* field) const; // Returns a MapIterator referring to the theoretical element that would // follow the last element in the map field. It does not point to any // real element. Mutation to the field may invalidate the iterator. - virtual MapIterator MapEnd(Message* message, - const FieldDescriptor* field) const; + MapIterator MapEnd(Message* message, const FieldDescriptor* field) const; // Get the number of pair of a map field. The result may be // different from FieldSize which can have duplicate keys. - virtual int MapSize(const Message& /* message */, - const FieldDescriptor* /* field */) const { - return 0; - } + int MapSize(const Message& message, const FieldDescriptor* field) const; // Help method for MapIterator. friend class MapIterator; - virtual internal::MapFieldBase* MutableMapData( - Message* /* message */, const FieldDescriptor* /* field */) const { - return NULL; - } + friend class WireFormatForMapFieldTest; + internal::MapFieldBase* MutableMapData(Message* message, + const FieldDescriptor* field) const; - virtual const internal::MapFieldBase* GetMapData( - const Message& /* message */, const FieldDescriptor* /* field */) const { - return NULL; - } + const internal::MapFieldBase* GetMapData(const Message& message, + const FieldDescriptor* field) const; + + template + const T& GetRawNonOneof(const Message& message, + const FieldDescriptor* field) const; + template + T* MutableRawNonOneof(Message* message, const FieldDescriptor* field) const; + + template + const Type& GetRaw(const Message& message, + const FieldDescriptor* field) const; + template + inline Type* MutableRaw(Message* message, const FieldDescriptor* field) const; + template + const Type& DefaultRaw(const FieldDescriptor* field) const; + + inline const uint32* GetHasBits(const Message& message) const; + inline uint32* MutableHasBits(Message* message) const; + inline uint32 GetOneofCase(const Message& message, + const OneofDescriptor* oneof_descriptor) const; + inline uint32* MutableOneofCase( + Message* message, const OneofDescriptor* oneof_descriptor) const; + inline const internal::ExtensionSet& GetExtensionSet( + const Message& message) const; + internal::ExtensionSet* MutableExtensionSet(Message* message) const; + inline Arena* GetArena(Message* message) const; + + inline const internal::InternalMetadata& GetInternalMetadata( + const Message& message) const; + + internal::InternalMetadata* MutableInternalMetadata(Message* message) const; + + inline bool IsInlined(const FieldDescriptor* field) const; + + inline bool HasBit(const Message& message, + const FieldDescriptor* field) const; + inline void SetBit(Message* message, const FieldDescriptor* field) const; + inline void ClearBit(Message* message, const FieldDescriptor* field) const; + inline void SwapBit(Message* message1, Message* message2, + const FieldDescriptor* field) const; + + // This function only swaps the field. Should swap corresponding has_bit + // before or after using this function. + void SwapField(Message* message1, Message* message2, + const FieldDescriptor* field) const; + + void SwapOneofField(Message* message1, Message* message2, + const OneofDescriptor* oneof_descriptor) const; + + inline bool HasOneofField(const Message& message, + const FieldDescriptor* field) const; + inline void SetOneofCase(Message* message, + const FieldDescriptor* field) const; + inline void ClearOneofField(Message* message, + const FieldDescriptor* field) const; + + template + inline const Type& GetField(const Message& message, + const FieldDescriptor* field) const; + template + inline void SetField(Message* message, const FieldDescriptor* field, + const Type& value) const; + template + inline Type* MutableField(Message* message, + const FieldDescriptor* field) const; + template + inline const Type& GetRepeatedField(const Message& message, + const FieldDescriptor* field, + int index) const; + template + inline const Type& GetRepeatedPtrField(const Message& message, + const FieldDescriptor* field, + int index) const; + template + inline void SetRepeatedField(Message* message, const FieldDescriptor* field, + int index, Type value) const; + template + inline Type* MutableRepeatedField(Message* message, + const FieldDescriptor* field, + int index) const; + template + inline void AddField(Message* message, const FieldDescriptor* field, + const Type& value) const; + template + inline Type* AddField(Message* message, const FieldDescriptor* field) const; + + int GetExtensionNumberOrDie(const Descriptor* type) const; + + // Internal versions of EnumValue API perform no checking. Called after checks + // by public methods. + void SetEnumValueInternal(Message* message, const FieldDescriptor* field, + int value) const; + void SetRepeatedEnumValueInternal(Message* message, + const FieldDescriptor* field, int index, + int value) const; + void AddEnumValueInternal(Message* message, const FieldDescriptor* field, + int value) const; + + Message* UnsafeArenaReleaseMessage(Message* message, + const FieldDescriptor* field, + MessageFactory* factory = nullptr) const; + + void UnsafeArenaSetAllocatedMessage(Message* message, Message* sub_message, + const FieldDescriptor* field) const; + + friend inline // inline so nobody can call this function. + void + RegisterAllTypesInternal(const Metadata* file_level_metadata, int size); + friend inline const char* ParseLenDelim(int field_number, + const FieldDescriptor* field, + Message* msg, + const Reflection* reflection, + const char* ptr, + internal::ParseContext* ctx); + friend inline const char* ParsePackedField(const FieldDescriptor* field, + Message* msg, + const Reflection* reflection, + const char* ptr, + internal::ParseContext* ctx); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Reflection); }; @@ -1056,7 +1132,7 @@ class PROTOBUF_EXPORT MessageFactory { // outlive the MessageFactory. // // Some implementations do not support all types. GetPrototype() will - // return NULL if the descriptor passed in is not supported. + // return nullptr if the descriptor passed in is not supported. // // This method may or may not be thread-safe depending on the implementation. // Each implementation should document its own degree thread-safety. @@ -1068,7 +1144,7 @@ class PROTOBUF_EXPORT MessageFactory { // FooMessage::descriptor()) == FooMessage::default_instance() // This factory supports all types which are found in // DescriptorPool::generated_pool(). If given a descriptor from any other - // pool, GetPrototype() will return NULL. (You can also check if a + // pool, GetPrototype() will return nullptr. (You can also check if a // descriptor is for a generated message by checking if // descriptor->file()->pool() == DescriptorPool::generated_pool().) // @@ -1100,14 +1176,15 @@ class PROTOBUF_EXPORT MessageFactory { GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFactory); }; -#define DECLARE_GET_REPEATED_FIELD(TYPE) \ - template <> \ - PROTOBUF_EXPORT const RepeatedField& \ - Reflection::GetRepeatedField(const Message& message, \ - const FieldDescriptor* field) const; \ - \ - template <> \ - PROTOBUF_EXPORT RepeatedField* Reflection::MutableRepeatedField( \ +#define DECLARE_GET_REPEATED_FIELD(TYPE) \ + template <> \ + PROTOBUF_EXPORT const RepeatedField& \ + Reflection::GetRepeatedFieldInternal( \ + const Message& message, const FieldDescriptor* field) const; \ + \ + template <> \ + PROTOBUF_EXPORT RepeatedField* \ + Reflection::MutableRepeatedFieldInternal( \ Message * message, const FieldDescriptor* field) const; DECLARE_GET_REPEATED_FIELD(int32) @@ -1120,8 +1197,8 @@ DECLARE_GET_REPEATED_FIELD(bool) #undef DECLARE_GET_REPEATED_FIELD -// Tries to downcast this message to a generated message type. Returns NULL if -// this class is not an instance of T. This works even if RTTI is disabled. +// Tries to downcast this message to a generated message type. Returns nullptr +// if this class is not an instance of T. This works even if RTTI is disabled. // // This also has the effect of creating a strong reference to T that will // prevent the linker from stripping it out at link time. This can be important @@ -1138,11 +1215,11 @@ const T* DynamicCastToGenerated(const Message* from) { const Message* unused = static_cast(nullptr); (void)unused; -#ifdef GOOGLE_PROTOBUF_NO_RTTI +#if PROTOBUF_RTTI + return dynamic_cast(from); +#else bool ok = T::default_instance().GetReflection() == from->GetReflection(); return ok ? down_cast(from) : nullptr; -#else - return dynamic_cast(from); #endif } @@ -1174,9 +1251,7 @@ T* DynamicCastToGenerated(Message* from) { // of loops (on x86-64 it compiles into two "mov" instructions). template void LinkMessageReflection() { - typedef const T& GetDefaultInstanceFunction(); - GetDefaultInstanceFunction* volatile unused = &T::default_instance; - (void)&unused; // Use address to avoid an extra load of volatile variable. + internal::StrongReference(T::default_instance); } // ============================================================================= @@ -1188,7 +1263,7 @@ void LinkMessageReflection() { template <> inline const RepeatedPtrField& -Reflection::GetRepeatedPtrField( +Reflection::GetRepeatedPtrFieldInternal( const Message& message, const FieldDescriptor* field) const { return *static_cast*>( MutableRawRepeatedString(const_cast(&message), field, true)); @@ -1196,7 +1271,7 @@ Reflection::GetRepeatedPtrField( template <> inline RepeatedPtrField* -Reflection::MutableRepeatedPtrField( +Reflection::MutableRepeatedPtrFieldInternal( Message* message, const FieldDescriptor* field) const { return static_cast*>( MutableRawRepeatedString(message, field, true)); @@ -1206,21 +1281,21 @@ Reflection::MutableRepeatedPtrField( // ----- template <> -inline const RepeatedPtrField& Reflection::GetRepeatedPtrField( +inline const RepeatedPtrField& Reflection::GetRepeatedPtrFieldInternal( const Message& message, const FieldDescriptor* field) const { return *static_cast*>(GetRawRepeatedField( - message, field, FieldDescriptor::CPPTYPE_MESSAGE, -1, NULL)); + message, field, FieldDescriptor::CPPTYPE_MESSAGE, -1, nullptr)); } template <> -inline RepeatedPtrField* Reflection::MutableRepeatedPtrField( +inline RepeatedPtrField* Reflection::MutableRepeatedPtrFieldInternal( Message* message, const FieldDescriptor* field) const { return static_cast*>(MutableRawRepeatedField( - message, field, FieldDescriptor::CPPTYPE_MESSAGE, -1, NULL)); + message, field, FieldDescriptor::CPPTYPE_MESSAGE, -1, nullptr)); } template -inline const RepeatedPtrField& Reflection::GetRepeatedPtrField( +inline const RepeatedPtrField& Reflection::GetRepeatedPtrFieldInternal( const Message& message, const FieldDescriptor* field) const { return *static_cast*>( GetRawRepeatedField(message, field, FieldDescriptor::CPPTYPE_MESSAGE, -1, @@ -1228,12 +1303,17 @@ inline const RepeatedPtrField& Reflection::GetRepeatedPtrField( } template -inline RepeatedPtrField* Reflection::MutableRepeatedPtrField( +inline RepeatedPtrField* Reflection::MutableRepeatedPtrFieldInternal( Message* message, const FieldDescriptor* field) const { return static_cast*>( MutableRawRepeatedField(message, field, FieldDescriptor::CPPTYPE_MESSAGE, -1, PB::default_instance().GetDescriptor())); } + +template +const Type& Reflection::DefaultRaw(const FieldDescriptor* field) const { + return *reinterpret_cast(schema_.GetFieldDefault(field)); +} } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/message_lite.cc b/third_party/protobuf/src/google/protobuf/message_lite.cc index e8f13440..5b1db7b9 100644 --- a/third_party/protobuf/src/google/protobuf/message_lite.cc +++ b/third_party/protobuf/src/google/protobuf/message_lite.cc @@ -33,6 +33,8 @@ // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. +#include + #include #include #include @@ -43,15 +45,15 @@ #include #include #include +#include #include #include #include #include -#include #include - #include #include +#include #include @@ -115,6 +117,16 @@ inline StringPiece as_string_view(const void* data, int size) { return StringPiece(static_cast(data), size); } +// Returns true of all required fields are present / have values. +inline bool CheckFieldPresence(const internal::ParseContext& ctx, + const MessageLite& msg, + MessageLite::ParseFlags parse_flags) { + if (PROTOBUF_PREDICT_FALSE((parse_flags & MessageLite::kMergePartial) != 0)) { + return true; + } + return msg.IsInitializedWithErrors(); +} + } // namespace void MessageLite::LogInitializationErrorMessage() const { @@ -123,81 +135,63 @@ void MessageLite::LogInitializationErrorMessage() const { namespace internal { -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - template -bool MergePartialFromImpl(StringPiece input, MessageLite* msg) { +bool MergeFromImpl(StringPiece input, MessageLite* msg, + MessageLite::ParseFlags parse_flags) { const char* ptr; internal::ParseContext ctx(io::CodedInputStream::GetDefaultRecursionLimit(), aliasing, &ptr, input); ptr = msg->_InternalParse(ptr, &ctx); // ctx has an explicit limit set (length of string_view). - return ptr && ctx.EndedAtLimit(); + if (PROTOBUF_PREDICT_TRUE(ptr && ctx.EndedAtLimit())) { + return CheckFieldPresence(ctx, *msg, parse_flags); + } + return false; } template -bool MergePartialFromImpl(io::ZeroCopyInputStream* input, MessageLite* msg) { +bool MergeFromImpl(io::ZeroCopyInputStream* input, MessageLite* msg, + MessageLite::ParseFlags parse_flags) { const char* ptr; internal::ParseContext ctx(io::CodedInputStream::GetDefaultRecursionLimit(), aliasing, &ptr, input); ptr = msg->_InternalParse(ptr, &ctx); // ctx has no explicit limit (hence we end on end of stream) - return ptr && ctx.EndedAtEndOfStream(); + if (PROTOBUF_PREDICT_TRUE(ptr && ctx.EndedAtEndOfStream())) { + return CheckFieldPresence(ctx, *msg, parse_flags); + } + return false; } template -bool MergePartialFromImpl(BoundedZCIS input, MessageLite* msg) { +bool MergeFromImpl(BoundedZCIS input, MessageLite* msg, + MessageLite::ParseFlags parse_flags) { const char* ptr; internal::ParseContext ctx(io::CodedInputStream::GetDefaultRecursionLimit(), aliasing, &ptr, input.zcis, input.limit); ptr = msg->_InternalParse(ptr, &ctx); if (PROTOBUF_PREDICT_FALSE(!ptr)) return false; ctx.BackUp(ptr); - return ctx.EndedAtLimit(); + if (PROTOBUF_PREDICT_TRUE(ctx.EndedAtLimit())) { + return CheckFieldPresence(ctx, *msg, parse_flags); + } + return false; } -#else // !GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -inline bool InlineMergePartialEntireStream(io::CodedInputStream* cis, - MessageLite* message, - bool aliasing) { - return message->MergePartialFromCodedStream(cis) && - cis->ConsumedEntireMessage(); -} - -template -bool MergePartialFromImpl(StringPiece input, MessageLite* msg) { - io::CodedInputStream decoder(reinterpret_cast(input.data()), - input.size()); - return InlineMergePartialEntireStream(&decoder, msg, aliasing); -} - -template -bool MergePartialFromImpl(BoundedZCIS input, MessageLite* msg) { - io::CodedInputStream decoder(input.zcis); - decoder.PushLimit(input.limit); - return InlineMergePartialEntireStream(&decoder, msg, aliasing) && - decoder.BytesUntilLimit() == 0; -} - -template -bool MergePartialFromImpl(io::ZeroCopyInputStream* input, MessageLite* msg) { - io::CodedInputStream decoder(input); - return InlineMergePartialEntireStream(&decoder, msg, aliasing); -} - -#endif // !GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -template bool MergePartialFromImpl(StringPiece input, - MessageLite* msg); -template bool MergePartialFromImpl(StringPiece input, - MessageLite* msg); -template bool MergePartialFromImpl(io::ZeroCopyInputStream* input, - MessageLite* msg); -template bool MergePartialFromImpl(io::ZeroCopyInputStream* input, - MessageLite* msg); -template bool MergePartialFromImpl(BoundedZCIS input, MessageLite* msg); -template bool MergePartialFromImpl(BoundedZCIS input, MessageLite* msg); +template bool MergeFromImpl(StringPiece input, MessageLite* msg, + MessageLite::ParseFlags parse_flags); +template bool MergeFromImpl(StringPiece input, MessageLite* msg, + MessageLite::ParseFlags parse_flags); +template bool MergeFromImpl(io::ZeroCopyInputStream* input, + MessageLite* msg, + MessageLite::ParseFlags parse_flags); +template bool MergeFromImpl(io::ZeroCopyInputStream* input, + MessageLite* msg, + MessageLite::ParseFlags parse_flags); +template bool MergeFromImpl(BoundedZCIS input, MessageLite* msg, + MessageLite::ParseFlags parse_flags); +template bool MergeFromImpl(BoundedZCIS input, MessageLite* msg, + MessageLite::ParseFlags parse_flags); } // namespace internal @@ -209,7 +203,6 @@ MessageLite* MessageLite::New(Arena* arena) const { return message; } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER class ZeroCopyCodedInputStream : public io::ZeroCopyInputStream { public: ZeroCopyCodedInputStream(io::CodedInputStream* cis) : cis_(cis) {} @@ -220,7 +213,7 @@ class ZeroCopyCodedInputStream : public io::ZeroCopyInputStream { } void BackUp(int count) final { cis_->Advance(-count); } bool Skip(int count) final { return cis_->Skip(count); } - int64 ByteCount() const final { return 0; } + int64_t ByteCount() const final { return 0; } bool aliasing_enabled() { return cis_->aliasing_enabled_; } @@ -228,7 +221,8 @@ class ZeroCopyCodedInputStream : public io::ZeroCopyInputStream { io::CodedInputStream* cis_; }; -bool MessageLite::MergePartialFromCodedStream(io::CodedInputStream* input) { +bool MessageLite::MergeFromImpl(io::CodedInputStream* input, + MessageLite::ParseFlags parse_flags) { ZeroCopyCodedInputStream zcis(input); const char* ptr; internal::ParseContext ctx(input->RecursionBudget(), zcis.aliasing_enabled(), @@ -246,25 +240,28 @@ bool MessageLite::MergePartialFromCodedStream(io::CodedInputStream* input) { GOOGLE_DCHECK(ctx.LastTag() != 1); // We can't end on a pushed limit. if (ctx.IsExceedingLimit(ptr)) return false; input->SetLastTag(ctx.LastTag()); - return true; + } else { + input->SetConsumed(); } - input->SetConsumed(); - return true; + return CheckFieldPresence(ctx, *this, parse_flags); +} + +bool MessageLite::MergePartialFromCodedStream(io::CodedInputStream* input) { + return MergeFromImpl(input, kMergePartial); } -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool MessageLite::MergeFromCodedStream(io::CodedInputStream* input) { - return MergePartialFromCodedStream(input) && IsInitializedWithErrors(); + return MergeFromImpl(input, kMerge); } bool MessageLite::ParseFromCodedStream(io::CodedInputStream* input) { Clear(); - return MergeFromCodedStream(input); + return MergeFromImpl(input, kParse); } bool MessageLite::ParsePartialFromCodedStream(io::CodedInputStream* input) { Clear(); - return MergePartialFromCodedStream(input); + return MergeFromImpl(input, kParsePartial); } bool MessageLite::ParseFromZeroCopyStream(io::ZeroCopyInputStream* input) { @@ -276,6 +273,26 @@ bool MessageLite::ParsePartialFromZeroCopyStream( return ParseFrom(input); } +bool MessageLite::ParseFromFileDescriptor(int file_descriptor) { + io::FileInputStream input(file_descriptor); + return ParseFromZeroCopyStream(&input) && input.GetErrno() == 0; +} + +bool MessageLite::ParsePartialFromFileDescriptor(int file_descriptor) { + io::FileInputStream input(file_descriptor); + return ParsePartialFromZeroCopyStream(&input) && input.GetErrno() == 0; +} + +bool MessageLite::ParseFromIstream(std::istream* input) { + io::IstreamInputStream zero_copy_input(input); + return ParseFromZeroCopyStream(&zero_copy_input) && input->eof(); +} + +bool MessageLite::ParsePartialFromIstream(std::istream* input) { + io::IstreamInputStream zero_copy_input(input); + return ParsePartialFromZeroCopyStream(&zero_copy_input) && input->eof(); +} + bool MessageLite::MergePartialFromBoundedZeroCopyStream( io::ZeroCopyInputStream* input, int size) { return ParseFrom(internal::BoundedZCIS{input, size}); @@ -319,30 +336,38 @@ bool MessageLite::MergeFromString(const std::string& data) { // =================================================================== -uint8* MessageLite::SerializeWithCachedSizesToArray(uint8* target) const { - const internal::SerializationTable* table = - static_cast(InternalGetTable()); - auto deterministic = - io::CodedOutputStream::IsDefaultSerializationDeterministic(); - if (table) { - return internal::TableSerializeToArray(*this, table, deterministic, target); +inline uint8* SerializeToArrayImpl(const MessageLite& msg, uint8* target, + int size) { + constexpr bool debug = false; + if (debug) { + // Force serialization to a stream with a block size of 1, which forces + // all writes to the stream to cross buffers triggering all fallback paths + // in the unittests when serializing to string / array. + io::ArrayOutputStream stream(target, size, 1); + uint8* ptr; + io::EpsCopyOutputStream out( + &stream, io::CodedOutputStream::IsDefaultSerializationDeterministic(), + &ptr); + ptr = msg._InternalSerialize(ptr, &out); + out.Trim(ptr); + GOOGLE_DCHECK(!out.HadError() && stream.ByteCount() == size); + return target + size; } else { - if (deterministic) { - // We only optimize this when using optimize_for = SPEED. In other cases - // we just use the CodedOutputStream path. - int size = GetCachedSize(); - io::ArrayOutputStream out(target, size); - io::CodedOutputStream coded_out(&out); - coded_out.SetSerializationDeterministic(true); - SerializeWithCachedSizes(&coded_out); - GOOGLE_CHECK(!coded_out.HadError()); - return target + size; - } else { - return InternalSerializeWithCachedSizesToArray(target); - } + io::EpsCopyOutputStream out( + target, size, + io::CodedOutputStream::IsDefaultSerializationDeterministic()); + auto res = msg._InternalSerialize(target, &out); + GOOGLE_DCHECK(target + size == res); + return res; } } +uint8* MessageLite::SerializeWithCachedSizesToArray(uint8* target) const { + // We only optimize this when using optimize_for = SPEED. In other cases + // we just use the CodedOutputStream path. + return SerializeToArrayImpl(*this, target, GetCachedSize()); +} + bool MessageLite::SerializeToCodedStream(io::CodedOutputStream* output) const { GOOGLE_DCHECK(IsInitialized()) << InitializationErrorMessage("serialize", *this); return SerializePartialToCodedStream(output); @@ -357,16 +382,6 @@ bool MessageLite::SerializePartialToCodedStream( return false; } - if (!output->IsSerializationDeterministic()) { - uint8* buffer = output->GetDirectBufferForNBytesAndAdvance(size); - if (buffer != nullptr) { - uint8* end = InternalSerializeWithCachedSizesToArray(buffer); - if (end - buffer != size) { - ByteSizeConsistencyError(size, ByteSizeLong(), end - buffer, *this); - } - return true; - } - } int original_byte_count = output->ByteCount(); SerializeWithCachedSizes(output); if (output->HadError()) { @@ -384,14 +399,50 @@ bool MessageLite::SerializePartialToCodedStream( bool MessageLite::SerializeToZeroCopyStream( io::ZeroCopyOutputStream* output) const { - io::CodedOutputStream encoder(output); - return SerializeToCodedStream(&encoder); + GOOGLE_DCHECK(IsInitialized()) << InitializationErrorMessage("serialize", *this); + return SerializePartialToZeroCopyStream(output); } bool MessageLite::SerializePartialToZeroCopyStream( io::ZeroCopyOutputStream* output) const { - io::CodedOutputStream encoder(output); - return SerializePartialToCodedStream(&encoder); + const size_t size = ByteSizeLong(); // Force size to be cached. + if (size > INT_MAX) { + GOOGLE_LOG(ERROR) << GetTypeName() + << " exceeded maximum protobuf size of 2GB: " << size; + return false; + } + + uint8* target; + io::EpsCopyOutputStream stream( + output, io::CodedOutputStream::IsDefaultSerializationDeterministic(), + &target); + target = _InternalSerialize(target, &stream); + stream.Trim(target); + if (stream.HadError()) return false; + return true; +} + +bool MessageLite::SerializeToFileDescriptor(int file_descriptor) const { + io::FileOutputStream output(file_descriptor); + return SerializeToZeroCopyStream(&output) && output.Flush(); +} + +bool MessageLite::SerializePartialToFileDescriptor(int file_descriptor) const { + io::FileOutputStream output(file_descriptor); + return SerializePartialToZeroCopyStream(&output) && output.Flush(); +} + +bool MessageLite::SerializeToOstream(std::ostream* output) const { + { + io::OstreamOutputStream zero_copy_output(output); + if (!SerializeToZeroCopyStream(&zero_copy_output)) return false; + } + return output->good(); +} + +bool MessageLite::SerializePartialToOstream(std::ostream* output) const { + io::OstreamOutputStream zero_copy_output(output); + return SerializePartialToZeroCopyStream(&zero_copy_output); } bool MessageLite::AppendToString(std::string* output) const { @@ -411,10 +462,7 @@ bool MessageLite::AppendPartialToString(std::string* output) const { STLStringResizeUninitialized(output, old_size + byte_size); uint8* start = reinterpret_cast(io::mutable_string_data(output) + old_size); - uint8* end = SerializeWithCachedSizesToArray(start); - if (end - start != byte_size) { - ByteSizeConsistencyError(byte_size, ByteSizeLong(), end - start, *this); - } + SerializeToArrayImpl(*this, start, byte_size); return true; } @@ -442,10 +490,7 @@ bool MessageLite::SerializePartialToArray(void* data, int size) const { } if (size < byte_size) return false; uint8* start = reinterpret_cast(data); - uint8* end = SerializeWithCachedSizesToArray(start); - if (end - start != byte_size) { - ByteSizeConsistencyError(byte_size, ByteSizeLong(), end - start, *this); - } + SerializeToArrayImpl(*this, start, byte_size); return true; } @@ -465,37 +510,6 @@ std::string MessageLite::SerializePartialAsString() const { return output; } -void MessageLite::SerializeWithCachedSizes( - io::CodedOutputStream* output) const { - GOOGLE_DCHECK(InternalGetTable()); - internal::TableSerialize( - *this, - static_cast(InternalGetTable()), - output); -} - -// The table driven code optimizes the case that the CodedOutputStream buffer -// is large enough to serialize into it directly. -// If the proto is optimized for speed, this method will be overridden by -// generated code for maximum speed. If the proto is optimized for size or -// is lite, then we need to specialize this to avoid infinite recursion. -uint8* MessageLite::InternalSerializeWithCachedSizesToArray( - uint8* target) const { - const internal::SerializationTable* table = - static_cast(InternalGetTable()); - if (table == NULL) { - // We only optimize this when using optimize_for = SPEED. In other cases - // we just use the CodedOutputStream path. - int size = GetCachedSize(); - io::ArrayOutputStream out(target, size); - io::CodedOutputStream coded_out(&out); - SerializeWithCachedSizes(&coded_out); - GOOGLE_CHECK(!coded_out.HadError()); - return target + size; - } else { - return internal::TableSerializeToArray(*this, table, false, target); - } -} namespace internal { @@ -517,5 +531,53 @@ void GenericTypeHandler::Merge(const std::string& from, } // namespace internal + +// =================================================================== +// Shutdown support. + +namespace internal { + +struct ShutdownData { + ~ShutdownData() { + std::reverse(functions.begin(), functions.end()); + for (auto pair : functions) pair.first(pair.second); + } + + static ShutdownData* get() { + static auto* data = new ShutdownData; + return data; + } + + std::vector> functions; + Mutex mutex; +}; + +static void RunZeroArgFunc(const void* arg) { + void (*func)() = reinterpret_cast(const_cast(arg)); + func(); +} + +void OnShutdown(void (*func)()) { + OnShutdownRun(RunZeroArgFunc, reinterpret_cast(func)); +} + +void OnShutdownRun(void (*f)(const void*), const void* arg) { + auto shutdown_data = ShutdownData::get(); + MutexLock lock(&shutdown_data->mutex); + shutdown_data->functions.push_back(std::make_pair(f, arg)); +} + +} // namespace internal + +void ShutdownProtobufLibrary() { + // This function should be called only once, but accepts multiple calls. + static bool is_shutdown = false; + if (!is_shutdown) { + delete internal::ShutdownData::get(); + is_shutdown = true; + } +} + + } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/message_lite.h b/third_party/protobuf/src/google/protobuf/message_lite.h index bc5d4c7a..32a79bdb 100644 --- a/third_party/protobuf/src/google/protobuf/message_lite.h +++ b/third_party/protobuf/src/google/protobuf/message_lite.h @@ -44,7 +44,9 @@ #include #include +#include #include +#include #include #include #include @@ -114,8 +116,8 @@ inline int ToIntSize(size_t size) { // // Pay special attention to the initialization state of the object. // 1. The object is "uninitialized" to begin with. -// 2. Call DefaultConstruct() only if the object is uninitialized. -// After the call, the object becomes "initialized". +// 2. Call Construct() or DefaultConstruct() only if the object is +// uninitialized. After the call, the object becomes "initialized". // 3. Call get() and get_mutable() only if the object is initialized. // 4. Call Destruct() only if the object is initialized. // After the call, the object becomes uninitialized. @@ -124,6 +126,11 @@ class ExplicitlyConstructed { public: void DefaultConstruct() { new (&union_) T(); } + template + void Construct(Args&&... args) { + new (&union_) T(std::forward(args)...); + } + void Destruct() { get_mutable()->~T(); } constexpr const T& get() const { return reinterpret_cast(union_); } @@ -175,10 +182,13 @@ PROTOBUF_EXPORT size_t StringSpaceUsedExcludingSelfLong(const std::string& str); // is best when you only have a small number of message types linked // into your binary, in which case the size of the protocol buffers // runtime itself is the biggest problem. +// +// Users must not derive from this class. Only the protocol compiler and +// the internal library are allowed to create subclasses. class PROTOBUF_EXPORT MessageLite { public: inline MessageLite() {} - virtual ~MessageLite() {} + virtual ~MessageLite() = default; // Basic Operations ------------------------------------------------ @@ -195,10 +205,10 @@ class PROTOBUF_EXPORT MessageLite { // Get the arena, if any, associated with this message. Virtual method // required for generic operations but most arena-related operations should - // use the GetArenaNoVirtual() generated-code method. Default implementation + // use the GetArena() generated-code method. Default implementation // to reduce code size by avoiding the need for per-type implementations // when types do not implement arena support. - virtual Arena* GetArena() const { return NULL; } + Arena* GetArena() const { return _internal_metadata_.arena(); } // Get a pointer that may be equal to this message's arena, or may not be. // If the value returned by this method is equal to some arena pointer, then @@ -209,7 +219,9 @@ class PROTOBUF_EXPORT MessageLite { // store the arena pointer directly, and sometimes in a more indirect way, // and allow a fastpath comparison against the arena pointer when it's easy // to obtain. - virtual void* GetMaybeArenaPointer() const { return GetArena(); } + void* GetMaybeArenaPointer() const { + return _internal_metadata_.raw_arena_ptr(); + } // Clear all fields of the message and set them to their default values. // Clear() avoids freeing memory, assuming that any memory allocated @@ -241,6 +253,9 @@ class PROTOBUF_EXPORT MessageLite { // assume it will remain stable over time. std::string DebugString() const; std::string ShortDebugString() const { return DebugString(); } + // MessageLite::DebugString is already Utf8 Safe. This is to add compatibility + // with Message. + std::string Utf8DebugString() const { return DebugString(); } // Parsing --------------------------------------------------------- // Methods for parsing in protocol buffer format. Most of these are @@ -262,6 +277,18 @@ class PROTOBUF_EXPORT MessageLite { // Like ParseFromZeroCopyStream(), but accepts messages that are missing // required fields. bool ParsePartialFromZeroCopyStream(io::ZeroCopyInputStream* input); + // Parse a protocol buffer from a file descriptor. If successful, the entire + // input will be consumed. + bool ParseFromFileDescriptor(int file_descriptor); + // Like ParseFromFileDescriptor(), but accepts messages that are missing + // required fields. + bool ParsePartialFromFileDescriptor(int file_descriptor); + // Parse a protocol buffer from a C++ istream. If successful, the entire + // input will be consumed. + bool ParseFromIstream(std::istream* input); + // Like ParseFromIstream(), but accepts messages that are missing + // required fields. + bool ParsePartialFromIstream(std::istream* input); // Read a protocol buffer from the given zero-copy input stream, expecting // the message to be exactly "size" bytes long. If successful, exactly // this many bytes will have been consumed from the input. @@ -300,7 +327,7 @@ class PROTOBUF_EXPORT MessageLite { // (for groups) or input->ConsumedEntireMessage() (for non-groups) after // this returns to verify that the message's end was delimited correctly. // - // ParsefromCodedStream() is implemented as Clear() followed by + // ParseFromCodedStream() is implemented as Clear() followed by // MergeFromCodedStream(). bool MergeFromCodedStream(io::CodedInputStream* input); @@ -309,11 +336,7 @@ class PROTOBUF_EXPORT MessageLite { // // MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() // followed by IsInitialized(). -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool MergePartialFromCodedStream(io::CodedInputStream* input); -#else - virtual bool MergePartialFromCodedStream(io::CodedInputStream* input) = 0; -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER // Merge a protocol buffer contained in a string. bool MergeFromString(const std::string& data); @@ -355,12 +378,24 @@ class PROTOBUF_EXPORT MessageLite { // Like SerializeAsString(), but allows missing required fields. std::string SerializePartialAsString() const; + // Serialize the message and write it to the given file descriptor. All + // required fields must be set. + bool SerializeToFileDescriptor(int file_descriptor) const; + // Like SerializeToFileDescriptor(), but allows missing required fields. + bool SerializePartialToFileDescriptor(int file_descriptor) const; + // Serialize the message and write it to the given C++ ostream. All + // required fields must be set. + bool SerializeToOstream(std::ostream* output) const; + // Like SerializeToOstream(), but allows missing required fields. + bool SerializePartialToOstream(std::ostream* output) const; + // Like SerializeToString(), but appends to the data to the string's // existing contents. All required fields must be set. bool AppendToString(std::string* output) const; // Like AppendToString(), but allows missing required fields. bool AppendPartialToString(std::string* output) const; + // Computes the serialized size of the message. This recursively calls // ByteSizeLong() on all embedded messages. // @@ -375,7 +410,9 @@ class PROTOBUF_EXPORT MessageLite { // Serializes the message without recomputing the size. The message must not // have changed since the last call to ByteSize(), and the value returned by // ByteSize must be non-negative. Otherwise the results are undefined. - virtual void SerializeWithCachedSizes(io::CodedOutputStream* output) const; + void SerializeWithCachedSizes(io::CodedOutputStream* output) const { + output->SetCur(_InternalSerialize(output->Cur(), output->EpsCopy())); + } // Functions below here are not part of the public interface. It isn't // enforced, but they should be treated as private, and will be private @@ -387,7 +424,7 @@ class PROTOBUF_EXPORT MessageLite { // must point at a byte array of at least ByteSize() bytes. Whether to use // deterministic serialization, e.g., maps in sorted order, is determined by // CodedOutputStream::IsDefaultSerializationDeterministic(). - virtual uint8* SerializeWithCachedSizesToArray(uint8* target) const; + uint8* SerializeWithCachedSizesToArray(uint8* target) const; // Returns the result of the last call to ByteSize(). An embedded message's // size is needed both to serialize it (because embedded messages are @@ -402,34 +439,21 @@ class PROTOBUF_EXPORT MessageLite { // method.) virtual int GetCachedSize() const = 0; -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - virtual const char* _InternalParse(const char* ptr, - internal::ParseContext* ctx) { + virtual const char* _InternalParse(const char* /*ptr*/, + internal::ParseContext* /*ctx*/) { return nullptr; } -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER protected: - // CastToBase allows generated code to cast a RepeatedPtrField to - // RepeatedPtrFieldBase. We try to restrict access to RepeatedPtrFieldBase - // because it is an implementation detail that user code should not access - // directly. - template - static internal::RepeatedPtrFieldBase* CastToBase( - RepeatedPtrField* repeated) { - return repeated; - } - template - static const internal::RepeatedPtrFieldBase& CastToBase( - const RepeatedPtrField& repeated) { - return repeated; - } - template static T* CreateMaybeMessage(Arena* arena) { return Arena::CreateMaybeMessage(arena); } + inline explicit MessageLite(Arena* arena) : _internal_metadata_(arena) {} + + internal::InternalMetadata _internal_metadata_; + public: enum ParseFlags { kMerge = 0, @@ -445,45 +469,54 @@ class PROTOBUF_EXPORT MessageLite { template bool ParseFrom(const T& input); - private: - // TODO(gerbens) make this a pure abstract function - virtual const void* InternalGetTable() const { return NULL; } - // Fast path when conditions match (ie. non-deterministic) - public: - virtual uint8* InternalSerializeWithCachedSizesToArray(uint8* target) const; - - private: - friend class internal::WireFormatLite; - friend class Message; - friend class internal::WeakFieldMap; + // uint8* _InternalSerialize(uint8* ptr) const; + virtual uint8* _InternalSerialize(uint8* ptr, + io::EpsCopyOutputStream* stream) const = 0; + // Identical to IsInitialized() except that it logs an error message. bool IsInitializedWithErrors() const { if (IsInitialized()) return true; LogInitializationErrorMessage(); return false; } + private: + // TODO(gerbens) make this a pure abstract function + virtual const void* InternalGetTable() const { return NULL; } + + friend class internal::WireFormatLite; + friend class Message; + friend class internal::WeakFieldMap; + void LogInitializationErrorMessage() const; + bool MergeFromImpl(io::CodedInputStream* input, ParseFlags parse_flags); + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageLite); }; namespace internal { template -bool MergePartialFromImpl(StringPiece input, MessageLite* msg); -extern template bool MergePartialFromImpl(StringPiece input, - MessageLite* msg); -extern template bool MergePartialFromImpl(StringPiece input, - MessageLite* msg); +bool MergeFromImpl(StringPiece input, MessageLite* msg, + MessageLite::ParseFlags parse_flags); +extern template bool MergeFromImpl(StringPiece input, + MessageLite* msg, + MessageLite::ParseFlags parse_flags); +extern template bool MergeFromImpl(StringPiece input, + MessageLite* msg, + MessageLite::ParseFlags parse_flags); template -bool MergePartialFromImpl(io::ZeroCopyInputStream* input, MessageLite* msg); -extern template bool MergePartialFromImpl(io::ZeroCopyInputStream* input, - MessageLite* msg); -extern template bool MergePartialFromImpl(io::ZeroCopyInputStream* input, - MessageLite* msg); +bool MergeFromImpl(io::ZeroCopyInputStream* input, MessageLite* msg, + MessageLite::ParseFlags parse_flags); +extern template bool MergeFromImpl(io::ZeroCopyInputStream* input, + MessageLite* msg, + MessageLite::ParseFlags parse_flags); +extern template bool MergeFromImpl(io::ZeroCopyInputStream* input, + MessageLite* msg, + MessageLite::ParseFlags parse_flags); struct BoundedZCIS { io::ZeroCopyInputStream* zcis; @@ -491,18 +524,20 @@ struct BoundedZCIS { }; template -bool MergePartialFromImpl(BoundedZCIS input, MessageLite* msg); -extern template bool MergePartialFromImpl(BoundedZCIS input, - MessageLite* msg); -extern template bool MergePartialFromImpl(BoundedZCIS input, - MessageLite* msg); +bool MergeFromImpl(BoundedZCIS input, MessageLite* msg, + MessageLite::ParseFlags parse_flags); +extern template bool MergeFromImpl(BoundedZCIS input, MessageLite* msg, + MessageLite::ParseFlags parse_flags); +extern template bool MergeFromImpl(BoundedZCIS input, MessageLite* msg, + MessageLite::ParseFlags parse_flags); template struct SourceWrapper; template -bool MergePartialFromImpl(const SourceWrapper& input, MessageLite* msg) { - return input.template MergePartialInto(msg); +bool MergeFromImpl(const SourceWrapper& input, MessageLite* msg, + MessageLite::ParseFlags parse_flags) { + return input.template MergeInto(msg, parse_flags); } } // namespace internal @@ -510,11 +545,44 @@ bool MergePartialFromImpl(const SourceWrapper& input, MessageLite* msg) { template bool MessageLite::ParseFrom(const T& input) { if (flags & kParse) Clear(); - constexpr bool alias = flags & kMergeWithAliasing; - bool res = internal::MergePartialFromImpl(input, this); - return res && ((flags & kMergePartial) || IsInitializedWithErrors()); + constexpr bool alias = (flags & kMergeWithAliasing) != 0; + return internal::MergeFromImpl(input, this, flags); } +// =================================================================== +// Shutdown support. + + +// Shut down the entire protocol buffers library, deleting all static-duration +// objects allocated by the library or by generated .pb.cc files. +// +// There are two reasons you might want to call this: +// * You use a draconian definition of "memory leak" in which you expect +// every single malloc() to have a corresponding free(), even for objects +// which live until program exit. +// * You are writing a dynamically-loaded library which needs to clean up +// after itself when the library is unloaded. +// +// It is safe to call this multiple times. However, it is not safe to use +// any other part of the protocol buffers library after +// ShutdownProtobufLibrary() has been called. Furthermore this call is not +// thread safe, user needs to synchronize multiple calls. +PROTOBUF_EXPORT void ShutdownProtobufLibrary(); + +namespace internal { + +// Register a function to be called when ShutdownProtocolBuffers() is called. +PROTOBUF_EXPORT void OnShutdown(void (*func)()); +// Run an arbitrary function on an arg +PROTOBUF_EXPORT void OnShutdownRun(void (*f)(const void*), const void* arg); + +template +T* OnShutdownDelete(T* p) { + OnShutdownRun([](const void* pp) { delete static_cast(pp); }, p); + return p; +} + +} // namespace internal } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/message_unittest.inc b/third_party/protobuf/src/google/protobuf/message_unittest.inc index 0cd46d4c..46ae35d2 100644 --- a/third_party/protobuf/src/google/protobuf/message_unittest.inc +++ b/third_party/protobuf/src/google/protobuf/message_unittest.inc @@ -46,6 +46,9 @@ #include #include +#include +#include +#include #include #include #include @@ -54,15 +57,11 @@ #include #include #include - -#include -#include -#include #include #include - #include + namespace google { namespace protobuf { @@ -270,7 +269,7 @@ class RepeatedInputStream : public io::ZeroCopyInputStream { RepeatedInputStream(const std::string& data, size_t count) : data_(data), count_(count), position_(0), total_byte_count_(0) {} - virtual bool Next(const void** data, int* size) { + bool Next(const void** data, int* size) override { if (position_ == data_.size()) { if (--count_ == 0) { return false; @@ -284,12 +283,12 @@ class RepeatedInputStream : public io::ZeroCopyInputStream { return true; } - virtual void BackUp(int count) { + void BackUp(int count) override { position_ -= static_cast(count); total_byte_count_ -= count; } - virtual bool Skip(int count) { + bool Skip(int count) override { while (count > 0) { const void* data; int size; @@ -306,11 +305,11 @@ class RepeatedInputStream : public io::ZeroCopyInputStream { return false; } - virtual int64 ByteCount() const { return total_byte_count_; } + int64_t ByteCount() const override { return total_byte_count_; } private: std::string data_; - size_t count_; // The number of strings that haven't been consuemd. + size_t count_; // The number of strings that haven't been consumed. size_t position_; // Position in the std::string for the next read. int64 total_byte_count_; }; @@ -332,7 +331,7 @@ TEST(MESSAGE_TEST_NAME, TestParseMessagesCloseTo2G) { UNITTEST::TestAllTypes result; EXPECT_TRUE(result.ParseFromZeroCopyStream(&input)); - // When there are multiple occurences of a singulr field, the last one + // When there are multiple occurrences of a singular field, the last one // should win. EXPECT_EQ(value, result.optional_string()); } @@ -630,6 +629,5 @@ TEST(MESSAGE_TEST_NAME, MOMIParserEdgeCases) { } - } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/metadata.h b/third_party/protobuf/src/google/protobuf/metadata.h index 009a7e93..4e89648e 100644 --- a/third_party/protobuf/src/google/protobuf/metadata.h +++ b/third_party/protobuf/src/google/protobuf/metadata.h @@ -28,51 +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. -// This header file defines an internal class that encapsulates internal message -// metadata (Unknown-field set, Arena pointer, ...) and allows its -// representation to be made more space-efficient via various optimizations. -// -// Note that this is distinct from google::protobuf::Metadata, which encapsulates -// Descriptor and Reflection pointers. - #ifndef GOOGLE_PROTOBUF_METADATA_H__ #define GOOGLE_PROTOBUF_METADATA_H__ -#include -#include - -#ifdef SWIG -#error "You cannot SWIG proto headers" -#endif - -namespace google { -namespace protobuf { -namespace internal { - -class InternalMetadataWithArena - : public InternalMetadataWithArenaBase { - public: - InternalMetadataWithArena() {} - explicit InternalMetadataWithArena(Arena* arena) - : InternalMetadataWithArenaBase(arena) {} - - void DoSwap(UnknownFieldSet* other) { mutable_unknown_fields()->Swap(other); } - - void DoMergeFrom(const UnknownFieldSet& other) { - mutable_unknown_fields()->MergeFrom(other); - } - - void DoClear() { mutable_unknown_fields()->Clear(); } - - static const UnknownFieldSet& default_instance() { - return *UnknownFieldSet::default_instance(); - } -}; - -} // namespace internal -} // namespace protobuf -} // namespace google +// TODO(b/151117630): Remove this file and all instances where it gets imported. #endif // GOOGLE_PROTOBUF_METADATA_H__ diff --git a/third_party/protobuf/src/google/protobuf/metadata_lite.h b/third_party/protobuf/src/google/protobuf/metadata_lite.h index 40c7ea78..781a1f54 100644 --- a/third_party/protobuf/src/google/protobuf/metadata_lite.h +++ b/third_party/protobuf/src/google/protobuf/metadata_lite.h @@ -34,8 +34,6 @@ #include #include #include -#include -#include #include #include @@ -58,38 +56,22 @@ namespace internal { // The tagged pointer uses the LSB to disambiguate cases, and uses bit 0 == 0 to // indicate an arena pointer and bit 0 == 1 to indicate a UFS+Arena-container // pointer. -template -class InternalMetadataWithArenaBase { +class InternalMetadata { public: - InternalMetadataWithArenaBase() : ptr_(NULL) {} - explicit InternalMetadataWithArenaBase(Arena* arena) : ptr_(arena) {} + InternalMetadata() : ptr_(nullptr) {} + explicit InternalMetadata(Arena* arena) : ptr_(arena) {} - ~InternalMetadataWithArenaBase() { + template + void Delete() { + // Note that Delete<> should be called not more than once. if (have_unknown_fields() && arena() == NULL) { - delete PtrValue(); - } - ptr_ = NULL; - } - - PROTOBUF_ALWAYS_INLINE const T& unknown_fields() const { - if (PROTOBUF_PREDICT_FALSE(have_unknown_fields())) { - return PtrValue()->unknown_fields; - } else { - return Derived::default_instance(); - } - } - - PROTOBUF_ALWAYS_INLINE T* mutable_unknown_fields() { - if (PROTOBUF_PREDICT_TRUE(have_unknown_fields())) { - return &PtrValue()->unknown_fields; - } else { - return mutable_unknown_fields_slow(); + delete PtrValue>(); } } PROTOBUF_ALWAYS_INLINE Arena* arena() const { if (PROTOBUF_PREDICT_FALSE(have_unknown_fields())) { - return PtrValue()->arena; + return PtrValue()->arena; } else { return PtrValue(); } @@ -99,7 +81,29 @@ class InternalMetadataWithArenaBase { return PtrTag() == kTagContainer; } - PROTOBUF_ALWAYS_INLINE void Swap(Derived* other) { + PROTOBUF_ALWAYS_INLINE void* raw_arena_ptr() const { return ptr_; } + + template + PROTOBUF_ALWAYS_INLINE const T& unknown_fields( + const T& (*default_instance)()) const { + if (PROTOBUF_PREDICT_FALSE(have_unknown_fields())) { + return PtrValue>()->unknown_fields; + } else { + return default_instance(); + } + } + + template + PROTOBUF_ALWAYS_INLINE T* mutable_unknown_fields() { + if (PROTOBUF_PREDICT_TRUE(have_unknown_fields())) { + return &PtrValue>()->unknown_fields; + } else { + return mutable_unknown_fields_slow(); + } + } + + template + PROTOBUF_ALWAYS_INLINE void Swap(InternalMetadata* other) { // Semantics here are that we swap only the unknown fields, not the arena // pointer. We cannot simply swap ptr_ with other->ptr_ because we need to // maintain our own arena ptr. Also, our ptr_ and other's ptr_ may be in @@ -107,24 +111,24 @@ class InternalMetadataWithArenaBase { // cannot simply swap ptr_ and then restore the arena pointers. We reuse // UFS's swap implementation instead. if (have_unknown_fields() || other->have_unknown_fields()) { - static_cast(this)->DoSwap(other->mutable_unknown_fields()); + DoSwap(other->mutable_unknown_fields()); } } - PROTOBUF_ALWAYS_INLINE void MergeFrom(const Derived& other) { + template + PROTOBUF_ALWAYS_INLINE void MergeFrom(const InternalMetadata& other) { if (other.have_unknown_fields()) { - static_cast(this)->DoMergeFrom(other.unknown_fields()); + DoMergeFrom(other.unknown_fields(nullptr)); } } + template PROTOBUF_ALWAYS_INLINE void Clear() { if (have_unknown_fields()) { - static_cast(this)->DoClear(); + DoClear(); } } - PROTOBUF_ALWAYS_INLINE void* raw_arena_ptr() const { return ptr_; } - private: void* ptr_; @@ -135,8 +139,8 @@ class InternalMetadataWithArenaBase { // ptr_ is a Container*. kTagContainer = 1, }; - static const intptr_t kPtrTagMask = 1; - static const intptr_t kPtrValueMask = ~kPtrTagMask; + static constexpr intptr_t kPtrTagMask = 1; + static constexpr intptr_t kPtrValueMask = ~kPtrTagMask; // Accessors for pointer tag and pointer value. PROTOBUF_ALWAYS_INLINE int PtrTag() const { @@ -150,14 +154,19 @@ class InternalMetadataWithArenaBase { } // If ptr_'s tag is kTagContainer, it points to an instance of this struct. - struct Container { - T unknown_fields; + struct ContainerBase { Arena* arena; }; + template + struct Container : public ContainerBase { + T unknown_fields; + }; + + template PROTOBUF_NOINLINE T* mutable_unknown_fields_slow() { Arena* my_arena = arena(); - Container* container = Arena::Create(my_arena); + Container* container = Arena::Create>(my_arena); // Two-step assignment works around a bug in clang's static analyzer: // https://bugs.llvm.org/show_bug.cgi?id=34198. ptr_ = container; @@ -166,40 +175,43 @@ class InternalMetadataWithArenaBase { container->arena = my_arena; return &(container->unknown_fields); } -}; -// We store unknown fields as a std::string right now, because there is -// currently no good interface for reading unknown fields into an ArenaString. -// We may want to revisit this to allow unknown fields to be parsed onto the -// Arena. -class InternalMetadataWithArenaLite - : public InternalMetadataWithArenaBase { - public: - InternalMetadataWithArenaLite() {} + // Templated functions. - explicit InternalMetadataWithArenaLite(Arena* arena) - : InternalMetadataWithArenaBase(arena) {} - - void DoSwap(std::string* other) { mutable_unknown_fields()->swap(*other); } - - void DoMergeFrom(const std::string& other) { - mutable_unknown_fields()->append(other); + template + void DoClear() { + mutable_unknown_fields()->Clear(); } - void DoClear() { mutable_unknown_fields()->clear(); } + template + void DoMergeFrom(const T& other) { + mutable_unknown_fields()->MergeFrom(other); + } - static const std::string& default_instance() { - // Can't use GetEmptyStringAlreadyInited() here because empty string - // may not have been initalized yet. This happens when protocol compiler - // statically determines the user can't access defaults and omits init code - // from proto constructors. However unknown fields are always part of a - // proto so it needs to be lazily initailzed. See b/112613846. - return GetEmptyString(); + template + void DoSwap(T* other) { + mutable_unknown_fields()->Swap(other); } }; +// String Template specializations. + +template <> +inline void InternalMetadata::DoClear() { + mutable_unknown_fields()->clear(); +} + +template <> +inline void InternalMetadata::DoMergeFrom( + const std::string& other) { + mutable_unknown_fields()->append(other); +} + +template <> +inline void InternalMetadata::DoSwap(std::string* other) { + mutable_unknown_fields()->swap(*other); +} + // This helper RAII class is needed to efficiently parse unknown fields. We // should only call mutable_unknown_fields if there are actual unknown fields. // The obvious thing to just use a stack string and swap it at the end of @@ -210,19 +222,20 @@ class InternalMetadataWithArenaLite // guarantees that the string is only swapped after stream is destroyed. class PROTOBUF_EXPORT LiteUnknownFieldSetter { public: - explicit LiteUnknownFieldSetter(InternalMetadataWithArenaLite* metadata) + explicit LiteUnknownFieldSetter(InternalMetadata* metadata) : metadata_(metadata) { if (metadata->have_unknown_fields()) { - buffer_.swap(*metadata->mutable_unknown_fields()); + buffer_.swap(*metadata->mutable_unknown_fields()); } } ~LiteUnknownFieldSetter() { - if (!buffer_.empty()) metadata_->mutable_unknown_fields()->swap(buffer_); + if (!buffer_.empty()) + metadata_->mutable_unknown_fields()->swap(buffer_); } std::string* buffer() { return &buffer_; } private: - InternalMetadataWithArenaLite* metadata_; + InternalMetadata* metadata_; std::string buffer_; }; diff --git a/third_party/protobuf/src/google/protobuf/no_field_presence_test.cc b/third_party/protobuf/src/google/protobuf/no_field_presence_test.cc index 8b05277f..ea23d28d 100644 --- a/third_party/protobuf/src/google/protobuf/no_field_presence_test.cc +++ b/third_party/protobuf/src/google/protobuf/no_field_presence_test.cc @@ -68,7 +68,7 @@ void CheckDefaultValues( // default instance. EXPECT_EQ(41, m.optional_proto2_message().default_int32()); EXPECT_EQ(false, m.has_optional_foreign_message()); - EXPECT_EQ(proto2_nofieldpresence_unittest::TestAllTypes_NestedEnum_FOO, + EXPECT_EQ(proto2_nofieldpresence_unittest::TestAllTypes::FOO, m.optional_nested_enum()); EXPECT_EQ(proto2_nofieldpresence_unittest::FOREIGN_FOO, m.optional_foreign_enum()); @@ -119,7 +119,7 @@ void FillValues(proto2_nofieldpresence_unittest::TestAllTypes* m) { m->mutable_optional_foreign_message()->set_c(43); m->mutable_optional_proto2_message()->set_optional_int32(44); m->set_optional_nested_enum( - proto2_nofieldpresence_unittest::TestAllTypes_NestedEnum_BAZ); + proto2_nofieldpresence_unittest::TestAllTypes::BAZ); m->set_optional_foreign_enum(proto2_nofieldpresence_unittest::FOREIGN_BAZ); m->mutable_optional_lazy_message()->set_bb(45); m->add_repeated_int32(100); @@ -141,7 +141,7 @@ void FillValues(proto2_nofieldpresence_unittest::TestAllTypes* m) { m->add_repeated_foreign_message()->set_c(47); m->add_repeated_proto2_message()->set_optional_int32(48); m->add_repeated_nested_enum( - proto2_nofieldpresence_unittest::TestAllTypes_NestedEnum_BAZ); + proto2_nofieldpresence_unittest::TestAllTypes::BAZ); m->add_repeated_foreign_enum(proto2_nofieldpresence_unittest::FOREIGN_BAZ); m->add_repeated_lazy_message()->set_bb(49); @@ -173,7 +173,7 @@ void CheckNonDefaultValues( EXPECT_EQ(43, m.optional_foreign_message().c()); EXPECT_EQ(true, m.has_optional_proto2_message()); EXPECT_EQ(44, m.optional_proto2_message().optional_int32()); - EXPECT_EQ(proto2_nofieldpresence_unittest::TestAllTypes_NestedEnum_BAZ, + EXPECT_EQ(proto2_nofieldpresence_unittest::TestAllTypes::BAZ, m.optional_nested_enum()); EXPECT_EQ(proto2_nofieldpresence_unittest::FOREIGN_BAZ, m.optional_foreign_enum()); @@ -217,7 +217,7 @@ void CheckNonDefaultValues( EXPECT_EQ(1, m.repeated_proto2_message_size()); EXPECT_EQ(48, m.repeated_proto2_message(0).optional_int32()); EXPECT_EQ(1, m.repeated_nested_enum_size()); - EXPECT_EQ(proto2_nofieldpresence_unittest::TestAllTypes_NestedEnum_BAZ, + EXPECT_EQ(proto2_nofieldpresence_unittest::TestAllTypes::BAZ, m.repeated_nested_enum(0)); EXPECT_EQ(1, m.repeated_foreign_enum_size()); EXPECT_EQ(proto2_nofieldpresence_unittest::FOREIGN_BAZ, @@ -442,8 +442,7 @@ TEST(NoFieldPresenceTest, DontSerializeDefaultValuesTest) { message.set_optional_string(""); message.set_optional_bytes(""); message.set_optional_nested_enum( - proto2_nofieldpresence_unittest:: - TestAllTypes_NestedEnum_FOO); // first enum entry + proto2_nofieldpresence_unittest::TestAllTypes::FOO); // first enum entry message.set_optional_foreign_enum( proto2_nofieldpresence_unittest::FOREIGN_FOO); // first enum entry @@ -557,8 +556,8 @@ TEST(NoFieldPresenceTest, OneofPresence) { message.Clear(); message.set_oneof_enum( - proto2_nofieldpresence_unittest::TestAllTypes_NestedEnum_FOO); // default - // value. + proto2_nofieldpresence_unittest::TestAllTypes::FOO); // default + // value. message.SerializeToString(&serialized); EXPECT_EQ(3, serialized.size()); EXPECT_TRUE(message.ParseFromString(serialized)); diff --git a/third_party/protobuf/src/google/protobuf/parse_context.cc b/third_party/protobuf/src/google/protobuf/parse_context.cc index 9efa521e..ea4ed196 100644 --- a/third_party/protobuf/src/google/protobuf/parse_context.cc +++ b/third_party/protobuf/src/google/protobuf/parse_context.cc @@ -64,7 +64,7 @@ bool ParseEndsInSlopRegion(const char* begin, int overrun, int d) { switch (tag & 7) { case 0: { // Varint uint64 val; - ptr = ParseVarint64(ptr, &val); + ptr = VarintParse(ptr, &val); if (ptr == nullptr) return false; break; } @@ -119,8 +119,7 @@ const char* EpsCopyInputStream::Next(int overrun, int d) { const void* data; // ZeroCopyInputStream indicates Next may return 0 size buffers. Hence // we loop. - while (zcis_->Next(&data, &size_)) { - overall_limit_ -= size_; + while (StreamNext(&data)) { if (size_ > kSlopBytes) { // We got a large chunk std::memcpy(buffer_ + kSlopBytes, data, kSlopBytes); @@ -198,22 +197,25 @@ const char* EpsCopyInputStream::SkipFallback(const char* ptr, int size) { } const char* EpsCopyInputStream::ReadStringFallback(const char* ptr, int size, - std::string* s) { - s->clear(); - // TODO(gerbens) assess security. At the moment its parity with - // CodedInputStream but it allows a payload to reserve large memory. + std::string* str) { + str->clear(); if (PROTOBUF_PREDICT_TRUE(size <= buffer_end_ - ptr + limit_)) { - s->reserve(size); + // Reserve the string up to a static safe size. If strings are bigger than + // this we proceed by growing the string as needed. This protects against + // malicious payloads making protobuf hold on to a lot of memory. + str->reserve(str->size() + std::min(size, kSafeStringSize)); } - return AppendStringFallback(ptr, size, s); + return AppendSize(ptr, size, + [str](const char* p, int s) { str->append(p, s); }); } const char* EpsCopyInputStream::AppendStringFallback(const char* ptr, int size, std::string* str) { - // TODO(gerbens) assess security. At the moment its parity with - // CodedInputStream but it allows a payload to reserve large memory. if (PROTOBUF_PREDICT_TRUE(size <= buffer_end_ - ptr + limit_)) { - str->reserve(size); + // Reserve the string up to a static safe size. If strings are bigger than + // this we proceed by growing the string as needed. This protects against + // malicious payloads making protobuf hold on to a lot of memory. + str->reserve(str->size() + std::min(size, kSafeStringSize)); } return AppendSize(ptr, size, [str](const char* p, int s) { str->append(p, s); }); @@ -232,6 +234,19 @@ const char* EpsCopyInputStream::ReadRepeatedFixed(const char* ptr, return ptr; } +template +void byteswap(void* p); +template <> +void byteswap<1>(void* p) {} +template <> +void byteswap<4>(void* p) { + *static_cast(p) = bswap_32(*static_cast(p)); +} +template <> +void byteswap<8>(void* p) { + *static_cast(p) = bswap_64(*static_cast(p)); +} + template const char* EpsCopyInputStream::ReadPackedFixed(const char* ptr, int size, RepeatedField* out) { @@ -241,7 +256,13 @@ const char* EpsCopyInputStream::ReadPackedFixed(const char* ptr, int size, int old_entries = out->size(); out->Reserve(old_entries + num); int block_size = num * sizeof(T); - std::memcpy(out->AddNAlreadyReserved(num), ptr, block_size); + auto dst = out->AddNAlreadyReserved(num); +#ifdef PROTOBUF_LITTLE_ENDIAN + std::memcpy(dst, ptr, block_size); +#else + for (int i = 0; i < num; i++) + dst[i] = UnalignedLoad(ptr + i * sizeof(T)); +#endif ptr += block_size; size -= block_size; if (DoneWithCheck(&ptr, -1)) return nullptr; @@ -251,7 +272,12 @@ const char* EpsCopyInputStream::ReadPackedFixed(const char* ptr, int size, int old_entries = out->size(); out->Reserve(old_entries + num); int block_size = num * sizeof(T); - std::memcpy(out->AddNAlreadyReserved(num), ptr, block_size); + auto dst = out->AddNAlreadyReserved(num); +#ifdef PROTOBUF_LITTLE_ENDIAN + std::memcpy(dst, ptr, block_size); +#else + for (int i = 0; i < num; i++) dst[i] = UnalignedLoad(ptr + i * sizeof(T)); +#endif ptr += block_size; if (size != block_size) return nullptr; return ptr; @@ -286,7 +312,6 @@ const char* EpsCopyInputStream::InitFrom(io::ZeroCopyInputStream* zcis) { return buffer_; } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* ParseContext::ParseMessage(MessageLite* msg, const char* ptr) { return ParseMessage(msg, ptr); } @@ -294,7 +319,6 @@ const char* ParseContext::ParseMessage(Message* msg, const char* ptr) { // Use reinterptret case to prevent inclusion of non lite header return ParseMessage(reinterpret_cast(msg), ptr); } -#endif inline void WriteVarint(uint64 val, std::string* s) { while (val >= 128) { @@ -316,10 +340,17 @@ void WriteLengthDelimited(uint32 num, StringPiece val, std::string* s) { s->append(val.data(), val.size()); } -std::pair ReadTagFallback(const char* p, uint32 res) { - for (std::uint32_t i = 0; i < 3; i++) { - std::uint32_t byte = static_cast(p[i]); - res += (byte - 1) << (7 * (i + 2)); +std::pair VarintParseSlow32(const char* p, uint32 res) { + for (std::uint32_t i = 2; i < 5; i++) { + uint32 byte = static_cast(p[i]); + res += (byte - 1) << (7 * i); + if (PROTOBUF_PREDICT_TRUE(byte < 128)) { + return {p + i + 1, res}; + } + } + // Accept >5 bytes + for (std::uint32_t i = 5; i < 10; i++) { + uint32 byte = static_cast(p[i]); if (PROTOBUF_PREDICT_TRUE(byte < 128)) { return {p + i + 1, res}; } @@ -327,16 +358,47 @@ std::pair ReadTagFallback(const char* p, uint32 res) { return {nullptr, 0}; } -std::pair ParseVarint64Fallback(const char* p, - uint64 res) { - return ParseVarint64FallbackInline(p, res); +std::pair VarintParseSlow64(const char* p, uint32 res32) { + uint64 res = res32; + for (std::uint32_t i = 2; i < 10; i++) { + uint64 byte = static_cast(p[i]); + res += (byte - 1) << (7 * i); + if (PROTOBUF_PREDICT_TRUE(byte < 128)) { + return {p + i + 1, res}; + } + } + return {nullptr, 0}; } -std::pair ReadSizeFallback(const char* p, uint32 first) { - uint32 tmp; - auto res = VarintParse<4>(p + 1, &tmp); - if (tmp >= (1 << 24) - ParseContext::kSlopBytes) return {nullptr, 0}; - return {res, (tmp << 7) + first - 0x80}; +std::pair ReadTagFallback(const char* p, uint32 res) { + for (std::uint32_t i = 2; i < 5; i++) { + uint32 byte = static_cast(p[i]); + res += (byte - 1) << (7 * i); + if (PROTOBUF_PREDICT_TRUE(byte < 128)) { + return {p + i + 1, res}; + } + } + return {nullptr, 0}; +} + +std::pair ReadSizeFallback(const char* p, uint32 res) { + for (std::uint32_t i = 1; i < 4; i++) { + uint32 byte = static_cast(p[i]); + res += (byte - 1) << (7 * i); + if (PROTOBUF_PREDICT_TRUE(byte < 128)) { + return {p + i + 1, res}; + } + } + std::uint32_t byte = static_cast(p[4]); + if (PROTOBUF_PREDICT_FALSE(byte >= 8)) return {nullptr, 0}; // size >= 2gb + res += (byte - 1) << 28; + // Protect against sign integer overflow in PushLimit. Limits are relative + // to buffer ends and ptr could potential be kSlopBytes beyond a buffer end. + // To protect against overflow we reject limits absurdly close to INT_MAX. + if (PROTOBUF_PREDICT_FALSE(res > INT_MAX - ParseContext::kSlopBytes)) { + return {nullptr, 0}; + } + return {p + 5, res}; } const char* StringParser(const char* begin, const char* end, void* object, @@ -365,14 +427,6 @@ const char* InlineGreedyStringParser(std::string* s, const char* ptr, return ctx->ReadString(ptr, size, s); } -const char* InlineGreedyStringParserUTF8(std::string* s, const char* ptr, - ParseContext* ctx, - const char* field_name) { - auto p = InlineGreedyStringParser(s, ptr, ctx); - GOOGLE_PROTOBUF_PARSER_ASSERT(VerifyUTF8(*s, field_name)); - return p; -} - template const char* VarintParser(void* object, const char* ptr, ParseContext* ctx) { @@ -420,34 +474,6 @@ const char* PackedEnumParser(void* object, const char* ptr, ParseContext* ctx) { return VarintParser(object, ptr, ctx); } -const char* PackedEnumParser(void* object, const char* ptr, ParseContext* ctx, - bool (*is_valid)(int), std::string* unknown, - int field_num) { - return ctx->ReadPackedVarint( - ptr, [object, is_valid, unknown, field_num](uint64 val) { - if (is_valid(val)) { - static_cast*>(object)->Add(val); - } else { - WriteVarint(field_num, val, unknown); - } - }); -} - -const char* PackedEnumParserArg(void* object, const char* ptr, - ParseContext* ctx, - bool (*is_valid)(const void*, int), - const void* data, std::string* unknown, - int field_num) { - return ctx->ReadPackedVarint( - ptr, [object, is_valid, data, unknown, field_num](uint64 val) { - if (is_valid(data, val)) { - static_cast*>(object)->Add(val); - } else { - WriteVarint(field_num, val, unknown); - } - }); -} - const char* PackedBoolParser(void* object, const char* ptr, ParseContext* ctx) { return VarintParser(object, ptr, ctx); } @@ -499,7 +525,8 @@ class UnknownFieldLiteParserHelper { if (unknown_ == nullptr) return; WriteVarint(num * 8 + 1, unknown_); char buffer[8]; - std::memcpy(buffer, &value, 8); + io::CodedOutputStream::WriteLittleEndian64ToArray( + value, reinterpret_cast(buffer)); unknown_->append(buffer, 8); } const char* ParseLengthDelimited(uint32 num, const char* ptr, @@ -522,7 +549,8 @@ class UnknownFieldLiteParserHelper { if (unknown_ == nullptr) return; WriteVarint(num * 8 + 5, unknown_); char buffer[4]; - std::memcpy(buffer, &value, 4); + io::CodedOutputStream::WriteLittleEndian32ToArray( + value, reinterpret_cast(buffer)); unknown_->append(buffer, 4); } @@ -546,12 +574,6 @@ const char* UnknownFieldParse(uint32 tag, std::string* unknown, const char* ptr, return FieldParser(tag, field_parser, ptr, ctx); } -const char* UnknownFieldParse(uint32 tag, - InternalMetadataWithArenaLite* metadata, - const char* ptr, ParseContext* ctx) { - return UnknownFieldParse(tag, metadata->mutable_unknown_fields(), ptr, ctx); -} - } // namespace internal } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/parse_context.h b/third_party/protobuf/src/google/protobuf/parse_context.h index 81b9406a..c0427bc5 100644 --- a/third_party/protobuf/src/google/protobuf/parse_context.h +++ b/third_party/protobuf/src/google/protobuf/parse_context.h @@ -31,11 +31,13 @@ #ifndef GOOGLE_PROTOBUF_PARSE_CONTEXT_H__ #define GOOGLE_PROTOBUF_PARSE_CONTEXT_H__ +#include #include #include #include #include +#include #include #include #include @@ -77,7 +79,7 @@ inline void WriteLengthDelimited(uint32 num, StringPiece val, // // Where the '-' represent the bytes which are vertically lined up with the // bytes of the stream. The proto parser requires its input to be presented -// similarily with the extra +// similarly with the extra // property that each chunk has kSlopBytes past its end that overlaps with the // first kSlopBytes of the next chunk, or if there is no next chunk at least its // still valid to read those bytes. Again, pictorially, we now have @@ -118,13 +120,15 @@ class PROTOBUF_EXPORT EpsCopyInputStream { } else { count = size_ + static_cast(buffer_end_ - ptr); } - if (count > 0) zcis_->BackUp(count); + if (count > 0) StreamBackUp(count); } // If return value is negative it's an error PROTOBUF_MUST_USE_RESULT int PushLimit(const char* ptr, int limit) { - GOOGLE_DCHECK(limit >= 0); - limit += ptr - buffer_end_; + GOOGLE_DCHECK(limit >= 0 && limit <= INT_MAX - kSlopBytes); + // This add is safe due to the invariant above, because + // ptr - buffer_end_ <= kSlopBytes. + limit += static_cast(ptr - buffer_end_); limit_end_ = buffer_end_ + (std::min)(0, limit); auto old_limit = limit_; limit_ = limit; @@ -190,6 +194,9 @@ class PROTOBUF_EXPORT EpsCopyInputStream { return ptr > limit_end_ && (next_chunk_ == nullptr || ptr - buffer_end_ > limit_); } + int BytesUntilLimit(const char* ptr) const { + return limit_ + static_cast(buffer_end_ - ptr); + } // Returns true if more data is available, if false is returned one has to // call Done for further checks. bool DataAvailable(const char* ptr) { return ptr < limit_end_; } @@ -212,12 +219,12 @@ class PROTOBUF_EXPORT EpsCopyInputStream { overall_limit_ = 0; if (flat.size() > kSlopBytes) { limit_ = kSlopBytes; - limit_end_ = buffer_end_ = flat.end() - kSlopBytes; + limit_end_ = buffer_end_ = flat.data() + flat.size() - kSlopBytes; next_chunk_ = buffer_; if (aliasing_ == kOnPatch) aliasing_ = kNoDelta; - return flat.begin(); + return flat.data(); } else { - std::memcpy(buffer_, flat.begin(), flat.size()); + std::memcpy(buffer_, flat.data(), flat.size()); limit_ = 0; limit_end_ = buffer_end_ = buffer_ + flat.size(); next_chunk_ = nullptr; @@ -232,6 +239,7 @@ class PROTOBUF_EXPORT EpsCopyInputStream { const char* InitFrom(io::ZeroCopyInputStream* zcis); const char* InitFrom(io::ZeroCopyInputStream* zcis, int limit) { + if (limit == -1) return InitFrom(zcis); overall_limit_ = limit; auto res = InitFrom(zcis); limit_ = limit - static_cast(buffer_end_ - res); @@ -264,12 +272,24 @@ class PROTOBUF_EXPORT EpsCopyInputStream { // DoneFallback. uint32 last_tag_minus_1_ = 0; int overall_limit_ = INT_MAX; // Overall limit independent of pushed limits. + // Pretty random large number that seems like a safe allocation on most + // systems. TODO(gerbens) do we need to set this as build flag? + enum { kSafeStringSize = 50000000 }; std::pair DoneFallback(const char* ptr, int d); const char* Next(int overrun, int d); const char* SkipFallback(const char* ptr, int size); const char* AppendStringFallback(const char* ptr, int size, std::string* str); const char* ReadStringFallback(const char* ptr, int size, std::string* str); + bool StreamNext(const void** data) { + bool res = zcis_->Next(data, &size_); + if (res) overall_limit_ -= size_; + return res; + } + void StreamBackUp(int count) { + zcis_->BackUp(count); + overall_limit_ += count; + } template const char* AppendSize(const char* ptr, int size, const A& append) { @@ -342,8 +362,7 @@ class PROTOBUF_EXPORT ParseContext : public EpsCopyInputStream { const Data& data() const { return data_; } template - PROTOBUF_MUST_USE_RESULT PROTOBUF_ALWAYS_INLINE const char* ParseMessage( - T* msg, const char* ptr); + PROTOBUF_MUST_USE_RESULT const char* ParseMessage(T* msg, const char* ptr); // We outline when the type is generic and we go through a virtual const char* ParseMessage(MessageLite* msg, const char* ptr); const char* ParseMessage(Message* msg, const char* ptr); @@ -373,32 +392,125 @@ class PROTOBUF_EXPORT ParseContext : public EpsCopyInputStream { Data data_; }; +template +bool ExpectTag(const char* ptr) { + if (tag < 128) { + return *ptr == tag; + } else { + static_assert(tag < 128 * 128, "We only expect tags for 1 or 2 bytes"); + char buf[2] = {static_cast(tag | 0x80), static_cast(tag >> 7)}; + return std::memcmp(ptr, buf, 2) == 0; + } +} + +template +struct EndianHelper; + +template <> +struct EndianHelper<1> { + static uint8 Load(const void* p) { return *static_cast(p); } +}; + +template <> +struct EndianHelper<2> { + static uint16 Load(const void* p) { + uint16 tmp; + std::memcpy(&tmp, p, 2); +#ifndef PROTOBUF_LITTLE_ENDIAN + tmp = bswap_16(tmp); +#endif + return tmp; + } +}; + +template <> +struct EndianHelper<4> { + static uint32 Load(const void* p) { + uint32 tmp; + std::memcpy(&tmp, p, 4); +#ifndef PROTOBUF_LITTLE_ENDIAN + tmp = bswap_32(tmp); +#endif + return tmp; + } +}; + +template <> +struct EndianHelper<8> { + static uint64 Load(const void* p) { + uint64 tmp; + std::memcpy(&tmp, p, 8); +#ifndef PROTOBUF_LITTLE_ENDIAN + tmp = bswap_64(tmp); +#endif + return tmp; + } +}; + template -T UnalignedLoad(const void* p) { +T UnalignedLoad(const char* p) { + auto tmp = EndianHelper::Load(p); T res; - memcpy(&res, p, sizeof(T)); + memcpy(&res, &tmp, sizeof(T)); return res; } -// TODO(gerbens) Experiment with best implementation. -// Clang unrolls loop and generating pretty good code on O2, gcc doesn't. -// Unclear if we want 64 bit parse loop unrolled, inlined or opaque function -// call. Hence experimentation is needed. -// Important guarantee is that it doesn't read more than size bytes from p. -template +PROTOBUF_EXPORT +std::pair VarintParseSlow32(const char* p, uint32 res); +PROTOBUF_EXPORT +std::pair VarintParseSlow64(const char* p, uint32 res); + +inline const char* VarintParseSlow(const char* p, uint32 res, uint32* out) { + auto tmp = VarintParseSlow32(p, res); + *out = tmp.second; + return tmp.first; +} + +inline const char* VarintParseSlow(const char* p, uint32 res, uint64* out) { + auto tmp = VarintParseSlow64(p, res); + *out = tmp.second; + return tmp.first; +} + +template PROTOBUF_MUST_USE_RESULT const char* VarintParse(const char* p, T* out) { - T res = 1; - for (int i = 0; i < size; i++) { - T byte = static_cast(p[i]); - res += (byte - 1) << (i * 7); - int j = i + 1; - if (PROTOBUF_PREDICT_TRUE(byte < 128)) { - *out = res; - return p + j; - } + auto ptr = reinterpret_cast(p); + uint32 res = ptr[0]; + if (!(res & 0x80)) { + *out = res; + return p + 1; } - *out = 0; - return nullptr; + uint32 byte = ptr[1]; + res += (byte - 1) << 7; + if (!(byte & 0x80)) { + *out = res; + return p + 2; + } + return VarintParseSlow(p, res, out); +} + +// Used for tags, could read up to 5 bytes which must be available. +// Caller must ensure its safe to call. + +PROTOBUF_EXPORT +std::pair ReadTagFallback(const char* p, uint32 res); + +// Same as ParseVarint but only accept 5 bytes at most. +inline const char* ReadTag(const char* p, uint32* out, uint32 /*max_tag*/ = 0) { + uint32 res = static_cast(p[0]); + if (res < 128) { + *out = res; + return p + 1; + } + uint32 second = static_cast(p[1]); + res += (second - 1) << 7; + if (second < 128) { + *out = res; + return p + 2; + } + auto tmp = ReadTagFallback(p, res); + *out = tmp.second; + return tmp.first; } // Decode 2 consecutive bytes of a varint and returns the value, shifted left @@ -411,7 +523,8 @@ PROTOBUF_MUST_USE_RESULT const char* VarintParse(const char* p, T* out) { // adc [rsi], 1 // add eax, eax // and eax, edi -inline uint32 DecodeTwoBytes(uint32 value, const char** ptr) { +inline uint32 DecodeTwoBytes(const char** ptr) { + uint32 value = UnalignedLoad(*ptr); // Sign extend the low byte continuation bit uint32_t x = static_cast(value); // This add is an amazing operation, it cancels the low byte continuation bit @@ -424,92 +537,28 @@ inline uint32 DecodeTwoBytes(uint32 value, const char** ptr) { return value & (x + x); // Mask out the high byte iff no continuation } -// Used for tags, could read up to 5 bytes which must be available. -// Caller must ensure its safe to call. - -std::pair ReadTagFallback(const char* p, uint32 res); - -inline const char* ReadTag(const char* p, uint32* out) { - uint32 res = static_cast(p[0]); - if (res < 128) { +// More efficient varint parsing for big varints +inline const char* ParseBigVarint(const char* p, uint64* out) { + auto pnew = p; + auto tmp = DecodeTwoBytes(&pnew); + uint64 res = tmp >> 1; + if (PROTOBUF_PREDICT_TRUE(std::int16_t(tmp) >= 0)) { *out = res; - return p + 1; + return pnew; } - uint32 second = static_cast(p[1]); - res += (second - 1) << 7; - if (second < 128) { - *out = res; - return p + 2; - } - auto tmp = ReadTagFallback(p + 2, res); - *out = tmp.second; - return tmp.first; -} - -// Will preload the next 2 bytes -inline const char* ReadTag(const char* p, uint32* out, uint32* preload) { - uint32 res = static_cast(p[0]); - if (res < 128) { - *out = res; - *preload = UnalignedLoad(p + 1); - return p + 1; - } - uint32 second = static_cast(p[1]); - res += (second - 1) << 7; - if (second < 128) { - *out = res; - *preload = UnalignedLoad(p + 2); - return p + 2; - } - auto tmp = ReadTagFallback(p + 2, res); - *out = tmp.second; - return tmp.first; -} - -inline std::pair ParseVarint64FallbackInline(const char* p, - uint64 res) { - res >>= 1; - for (std::uint32_t i = 0; i < 4; i++) { - auto pnew = p + 2 * i; - auto tmp = DecodeTwoBytes(UnalignedLoad(pnew), &pnew); - res += (static_cast(tmp) - 2) << (14 * (i + 1) - 1); + for (std::uint32_t i = 1; i < 5; i++) { + pnew = p + 2 * i; + tmp = DecodeTwoBytes(&pnew); + res += (static_cast(tmp) - 2) << (14 * i - 1); if (PROTOBUF_PREDICT_TRUE(std::int16_t(tmp) >= 0)) { - return {pnew, res}; + *out = res; + return pnew; } } - return {nullptr, res}; -} - -inline const char* ParseVarint64Inline(const char* p, uint64* out) { - auto tmp = DecodeTwoBytes(UnalignedLoad(p), &p); - if (PROTOBUF_PREDICT_TRUE(static_cast(tmp) >= 0)) { - *out = tmp >> 1; - return p; - } - auto x = ParseVarint64FallbackInline(p, tmp); - *out = x.second; - return x.first; -} - -std::pair ParseVarint64Fallback(const char* p, uint64 res); - -inline const char* ParseVarint64(const char* p, uint32 preload, uint64* out) { - auto tmp = DecodeTwoBytes(preload, &p); - if (PROTOBUF_PREDICT_TRUE(static_cast(tmp) >= 0)) { - *out = tmp >> 1; - return p; - } - auto x = ParseVarint64Fallback(p, tmp); - *out = x.second; - return x.first; -} - -// Used for reading varint wiretype values, could read up to 10 bytes. -// Caller must ensure its safe to call. -inline const char* ParseVarint64(const char* p, uint64* out) { - return ParseVarint64(p, UnalignedLoad(p), out); + return nullptr; } +PROTOBUF_EXPORT std::pair ReadSizeFallback(const char* p, uint32 first); // Used for tags, could read up to 5 bytes which must be available. Additionally // it makes sure the unsigned value fits a int32, otherwise returns nullptr. @@ -531,39 +580,27 @@ inline uint32 ReadSize(const char** pp) { // function composition. We rely on the compiler to inline this. // Also in debug compiles having local scoped variables tend to generated // stack frames that scale as O(num fields). -inline uint64 ReadVarint(const char** p) { +inline uint64 ReadVarint64(const char** p) { uint64 tmp; - *p = ParseVarint64(*p, &tmp); + *p = VarintParse(*p, &tmp); + return tmp; +} + +inline uint32 ReadVarint32(const char** p) { + uint32 tmp; + *p = VarintParse(*p, &tmp); return tmp; } inline int64 ReadVarintZigZag64(const char** p) { uint64 tmp; - *p = ParseVarint64(*p, &tmp); + *p = VarintParse(*p, &tmp); return WireFormatLite::ZigZagDecode64(tmp); } inline int32 ReadVarintZigZag32(const char** p) { uint64 tmp; - *p = ParseVarint64(*p, &tmp); - return WireFormatLite::ZigZagDecode32(static_cast(tmp)); -} - -inline uint64 ReadVarint(const char** p, uint32 preload) { - uint64 tmp; - *p = ParseVarint64(*p, preload, &tmp); - return tmp; -} - -inline int64 ReadVarintZigZag64(const char** p, uint32 preload) { - uint64 tmp; - *p = ParseVarint64(*p, preload, &tmp); - return WireFormatLite::ZigZagDecode64(tmp); -} - -inline int32 ReadVarintZigZag32(const char** p, uint32 preload) { - uint64 tmp; - *p = ParseVarint64(*p, preload, &tmp); + *p = VarintParse(*p, &tmp); return WireFormatLite::ZigZagDecode32(static_cast(tmp)); } @@ -589,7 +626,7 @@ const char* EpsCopyInputStream::ReadPackedVarint(const char* ptr, Add add) { if (old < 0) return nullptr; while (!DoneWithCheck(&ptr, -1)) { uint64 varint; - ptr = ParseVarint64(ptr, &varint); + ptr = VarintParse(ptr, &varint); if (!ptr) return nullptr; add(varint); } @@ -601,24 +638,14 @@ const char* EpsCopyInputStream::ReadPackedVarint(const char* ptr, Add add) { PROTOBUF_EXPORT bool VerifyUTF8(StringPiece s, const char* field_name); +inline bool VerifyUTF8(const std::string* s, const char* field_name) { + return VerifyUTF8(*s, field_name); +} + // All the string parsers with or without UTF checking and for all CTypes. PROTOBUF_EXPORT PROTOBUF_MUST_USE_RESULT const char* InlineGreedyStringParser( std::string* s, const char* ptr, ParseContext* ctx); -PROTOBUF_EXPORT PROTOBUF_MUST_USE_RESULT const char* -InlineGreedyStringParserUTF8(std::string* s, const char* ptr, ParseContext* ctx, - const char* field_name); -// Inline because we don't want to pay the price of field_name in opt mode. -inline PROTOBUF_MUST_USE_RESULT const char* InlineGreedyStringParserUTF8Verify( - std::string* s, const char* ptr, ParseContext* ctx, - const char* field_name) { - auto p = InlineGreedyStringParser(s, ptr, ctx); -#ifndef NDEBUG - VerifyUTF8(*s, field_name); -#endif // !NDEBUG - return p; -} - // Add any of the following lines to debug which parse function is failing. @@ -642,7 +669,7 @@ PROTOBUF_MUST_USE_RESULT const char* FieldParser(uint64 tag, T& field_parser, switch (tag & 7) { case WireType::WIRETYPE_VARINT: { uint64 value; - ptr = ParseVarint64(ptr, &value); + ptr = VarintParse(ptr, &value); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); field_parser.AddVarint(number, value); break; @@ -715,13 +742,39 @@ PROTOBUF_EXPORT PROTOBUF_MUST_USE_RESULT const char* PackedSInt64Parser( void* object, const char* ptr, ParseContext* ctx); PROTOBUF_EXPORT PROTOBUF_MUST_USE_RESULT const char* PackedEnumParser( void* object, const char* ptr, ParseContext* ctx); -PROTOBUF_EXPORT PROTOBUF_MUST_USE_RESULT const char* PackedEnumParser( - void* object, const char* ptr, ParseContext* ctx, bool (*is_valid)(int), - std::string* unknown, int field_num); -PROTOBUF_EXPORT PROTOBUF_MUST_USE_RESULT const char* PackedEnumParserArg( - void* object, const char* ptr, ParseContext* ctx, - bool (*is_valid)(const void*, int), const void* data, std::string* unknown, - int field_num); + +template +PROTOBUF_EXPORT_TEMPLATE_DEFINE +PROTOBUF_MUST_USE_RESULT const + char* PackedEnumParser(void* object, const char* ptr, ParseContext* ctx, + bool (*is_valid)(int), InternalMetadata* metadata, + int field_num) { + return ctx->ReadPackedVarint( + ptr, [object, is_valid, metadata, field_num](uint64 val) { + if (is_valid(val)) { + static_cast*>(object)->Add(val); + } else { + WriteVarint(field_num, val, metadata->mutable_unknown_fields()); + } + }); +} + +template +PROTOBUF_EXPORT_TEMPLATE_DEFINE +PROTOBUF_MUST_USE_RESULT const + char* PackedEnumParserArg(void* object, const char* ptr, ParseContext* ctx, + bool (*is_valid)(const void*, int), + const void* data, InternalMetadata* metadata, + int field_num) { + return ctx->ReadPackedVarint( + ptr, [object, is_valid, data, metadata, field_num](uint64 val) { + if (is_valid(data, val)) { + static_cast*>(object)->Add(val); + } else { + WriteVarint(field_num, val, metadata->mutable_unknown_fields()); + } + }); +} PROTOBUF_EXPORT PROTOBUF_MUST_USE_RESULT const char* PackedBoolParser( void* object, const char* ptr, ParseContext* ctx); @@ -746,9 +799,6 @@ PROTOBUF_EXPORT PROTOBUF_MUST_USE_RESULT const char* UnknownGroupLiteParse( // UnknownFieldSet* to make the generated code isomorphic between full and lite. PROTOBUF_EXPORT PROTOBUF_MUST_USE_RESULT const char* UnknownFieldParse( uint32 tag, std::string* unknown, const char* ptr, ParseContext* ctx); -PROTOBUF_EXPORT PROTOBUF_MUST_USE_RESULT const char* UnknownFieldParse( - uint32 tag, InternalMetadataWithArenaLite* metadata, const char* ptr, - ParseContext* ctx); } // namespace internal } // namespace protobuf diff --git a/third_party/protobuf/src/google/protobuf/port.h b/third_party/protobuf/src/google/protobuf/port.h index 63452265..555fd4eb 100644 --- a/third_party/protobuf/src/google/protobuf/port.h +++ b/third_party/protobuf/src/google/protobuf/port.h @@ -1,6 +1,43 @@ -#ifndef THIRD_PARTY_PROTOBUF_TESTING_PROTOBUF_SRC_GOOGLE_PROTOBUF_PORT_H_ -#define THIRD_PARTY_PROTOBUF_TESTING_PROTOBUF_SRC_GOOGLE_PROTOBUF_PORT_H_ +// 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. + +// A common header that is included across all protobuf headers. We do our best +// to avoid #defining any macros here; instead we generally put macros in +// port_def.inc and port_undef.inc so they are not visible from outside of +// protobuf. + +#ifndef GOOGLE_PROTOBUF_PORT_H__ +#define GOOGLE_PROTOBUF_PORT_H__ + #include -#endif // THIRD_PARTY_PROTOBUF_TESTING_PROTOBUF_SRC_GOOGLE_PROTOBUF_PORT_H_ + +#endif // GOOGLE_PROTOBUF_PORT_H__ diff --git a/third_party/protobuf/src/google/protobuf/port_def.inc b/third_party/protobuf/src/google/protobuf/port_def.inc index 15064fbf..25794cc4 100644 --- a/third_party/protobuf/src/google/protobuf/port_def.inc +++ b/third_party/protobuf/src/google/protobuf/port_def.inc @@ -136,6 +136,9 @@ #ifdef PROTOBUF_UNUSED #error PROTOBUF_UNUSED was previously defined #endif +#ifdef PROTOBUF_FINAL +#error PROTOBUF_FINAL was previously defined +#endif #define PROTOBUF_NAMESPACE "google::protobuf" @@ -146,8 +149,17 @@ #define PROTOBUF_NAMESPACE_CLOSE \ } /* namespace protobuf */ \ } /* namespace google */ -#define PROTOBUF_DEPRECATED -#define PROTOBUF_DEPRECATED_MSG(x) + +#if defined(__GNUC__) || defined(__clang__) +#define PROTOBUF_DEPRECATED __attribute__((deprecated)) +#define PROTOBUF_DEPRECATED_ENUM __attribute__((deprecated)) +#define PROTOBUF_DEPRECATED_MSG(msg) __attribute__((deprecated(msg))) +#elif defined(_MSC_VER) +#define PROTOBUF_DEPRECATED __declspec(deprecated) +#define PROTOBUF_DEPRECATED_ENUM +#define PROTOBUF_DEPRECATED_MSG(msg) __declspec(deprecated(msg)) +#endif + #define PROTOBUF_SECTION_VARIABLE(x) #define PROTOBUF_MUST_USE_RESULT @@ -160,10 +172,11 @@ #ifdef GOOGLE_ATTRIBUTE_ALWAYS_INLINE #define PROTOBUF_ALWAYS_INLINE GOOGLE_ATTRIBUTE_ALWAYS_INLINE #else -#if defined(__GNUC__) && (__GNUC__ > 3 ||(__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) +#if defined(__GNUC__) && \ + (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) // For functions we want to force inline. // Introduced in gcc 3.1. -#define PROTOBUF_ALWAYS_INLINE __attribute__ ((always_inline)) +#define PROTOBUF_ALWAYS_INLINE __attribute__((always_inline)) #else // Other compilers will have to figure it out for themselves. #define PROTOBUF_ALWAYS_INLINE @@ -173,10 +186,11 @@ #ifdef GOOGLE_ATTRIBUTE_NOINLINE #define PROTOBUF_NOINLINE GOOGLE_ATTRIBUTE_NOINLINE #else -#if defined(__GNUC__) && (__GNUC__ > 3 ||(__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) +#if defined(__GNUC__) && \ + (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) // For functions we want to force not inline. // Introduced in gcc 3.1. -#define PROTOBUF_NOINLINE __attribute__ ((noinline)) +#define PROTOBUF_NOINLINE __attribute__((noinline)) #elif defined(_MSC_VER) && (_MSC_VER >= 1400) // Seems to have been around since at least Visual Studio 2005 #define PROTOBUF_NOINLINE __declspec(noinline) @@ -190,9 +204,10 @@ #define PROTOBUF_FUNC_ALIGN GOOGLE_ATTRIBUTE_FUNC_ALIGN #else #if defined(__clang__) || \ - defined(__GNUC__) && (__GNUC__ > 4 ||(__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + defined(__GNUC__) && \ + (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) // Function alignment attribute introduced in gcc 4.3 -#define PROTOBUF_FUNC_ALIGN(bytes) __attribute__ ((aligned(bytes))) +#define PROTOBUF_FUNC_ALIGN(bytes) __attribute__((aligned(bytes))) #else #define PROTOBUF_FUNC_ALIGN(bytes) #endif @@ -285,17 +300,26 @@ // Shared google3/opensource definitions. ////////////////////////////////////// -#define PROTOBUF_VERSION 3008000 -#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC 3008000 -#define PROTOBUF_MIN_PROTOC_VERSION 3008000 +#define PROTOBUF_VERSION 3012004 +#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC 3012000 +#define PROTOBUF_MIN_PROTOC_VERSION 3012000 #define PROTOBUF_VERSION_SUFFIX "" // The minimum library version which works with the current version of the // headers. -#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3008000 +#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3012000 #if defined(GOOGLE_PROTOBUF_NO_RTTI) && GOOGLE_PROTOBUF_NO_RTTI #define PROTOBUF_RTTI 0 +#elif defined(__has_feature) +// https://clang.llvm.org/docs/LanguageExtensions.html#has-feature-and-has-extension +#define PROTOBUF_RTTI __has_feature(cxx_rtti) +#elif !defined(__cxx_rtti) +// https://en.cppreference.com/w/User:D41D8CD98F/feature_testing_macros#C.2B.2B98 +#define PROTOBUF_RTTI 0 +#elif defined(__GNUC__) && !defined(__GXX_RTTI) +#https: // gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html +#define PROTOBUF_RTTI 0 #else #define PROTOBUF_RTTI 1 #endif @@ -312,12 +336,15 @@ // For Clang we use __builtin_offsetof() and suppress the warning, // to avoid Control Flow Integrity and UBSan vptr sanitizers from // crashing while trying to validate the invalid reinterpet_casts. -#define PROTOBUF_FIELD_OFFSET(TYPE, FIELD) \ - _Pragma("clang diagnostic push") \ - _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \ - __builtin_offsetof(TYPE, FIELD) \ +#define PROTOBUF_FIELD_OFFSET(TYPE, FIELD) \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \ + __builtin_offsetof(TYPE, FIELD) \ _Pragma("clang diagnostic pop") -#else +#elif defined(__GNUC__) && \ + (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) +#define PROTOBUF_FIELD_OFFSET(TYPE, FIELD) __builtin_offsetof(TYPE, FIELD) +#else // defined(__clang__) // Note that we calculate relative to the pointer value 16 here since if we // just use zero, GCC complains about dereferencing a NULL pointer. We // choose 16 rather than some other number just in case the compiler would @@ -328,33 +355,132 @@ reinterpret_cast(16)) #endif - -#if defined(_MSC_VER) && defined(PROTOBUF_USE_DLLS) -#ifdef LIBPROTOBUF_EXPORTS -#define PROTOBUF_EXPORT __declspec(dllexport) -#else -#define PROTOBUF_EXPORT __declspec(dllimport) -#endif -#ifdef LIBPROTOC_EXPORTS -#define PROTOC_EXPORT __declspec(dllexport) -#else -#define PROTOC_EXPORT __declspec(dllimport) -#endif -#else -#define PROTOBUF_EXPORT -#define PROTOC_EXPORT +#if defined(PROTOBUF_USE_DLLS) + #if defined(_MSC_VER) + #ifdef LIBPROTOBUF_EXPORTS + #define PROTOBUF_EXPORT __declspec(dllexport) + #define PROTOBUF_EXPORT_TEMPLATE_DECLARE + #define PROTOBUF_EXPORT_TEMPLATE_DEFINE __declspec(dllexport) + #else + #define PROTOBUF_EXPORT __declspec(dllimport) + #define PROTOBUF_EXPORT_TEMPLATE_DECLARE + #define PROTOBUF_EXPORT_TEMPLATE_DEFINE __declspec(dllimport) + #endif + #ifdef LIBPROTOC_EXPORTS + #define PROTOC_EXPORT __declspec(dllexport) + #else + #define PROTOC_EXPORT __declspec(dllimport) + #endif + #else // defined(_MSC_VER) + #ifdef LIBPROTOBUF_EXPORTS + #define PROTOBUF_EXPORT __attribute__((visibility("default"))) + #define PROTOBUF_EXPORT_TEMPLATE_DECLARE __attribute__((visibility("default"))) + #define PROTOBUF_EXPORT_TEMPLATE_DEFINE + #else + #define PROTOBUF_EXPORT + #define PROTOBUF_EXPORT_TEMPLATE_DECLARE + #define PROTOBUF_EXPORT_TEMPLATE_DEFINE + #endif + #ifdef LIBPROTOC_EXPORTS + #define PROTOC_EXPORT __attribute__((visibility("default"))) + #else + #define PROTOC_EXPORT + #endif + #endif +#else // defined(PROTOBUF_USE_DLLS) + #define PROTOBUF_EXPORT + #define PROTOC_EXPORT + #define PROTOBUF_EXPORT_TEMPLATE_DECLARE + #define PROTOBUF_EXPORT_TEMPLATE_DEFINE #endif // Windows declares several inconvenient macro names. We #undef them and then // restore them in port_undef.inc. #ifdef _MSC_VER +#pragma push_macro("ERROR") +#undef ERROR #pragma push_macro("GetMessage") #undef GetMessage -#endif +#pragma push_macro("IGNORE") +#undef IGNORE +#pragma push_macro("IN") +#undef IN +#pragma push_macro("OUT") +#undef OUT +#pragma push_macro("OPTIONAL") +#undef OPTIONAL +#pragma push_macro("min") +#undef min +#pragma push_macro("max") +#undef max +#endif // _MSC_VER + +#if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) +// Don't let the YES/NO Objective-C Macros interfere with proto identifiers with +// the same name. +#pragma push_macro("YES") +#undef YES +#pragma push_macro("NO") +#undef NO +#endif // defined(__clang__) || defined(__GNUC__) || 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" +#elif defined(__GNUC__) +// 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" #endif + +// PROTOBUF_ASSUME(pred) tells the compiler that it can assume pred is true. To +// be safe, we also validate the assumption with a GOOGLE_DCHECK in unoptimized +// builds. The macro does not do anything useful if the compiler does not +// support __builtin_assume. +#ifdef __has_builtin +#if __has_builtin(__builtin_assume) +#define PROTOBUF_ASSUME(pred) \ + GOOGLE_DCHECK(pred); \ + __builtin_assume(pred) +#else +#define PROTOBUF_ASSUME(pred) GOOGLE_DCHECK(pred) +#endif +#else +#define PROTOBUF_ASSUME(pred) GOOGLE_DCHECK(pred) +#endif + +// Specify memory alignment for structs, classes, etc. +// Use like: +// class PROTOBUF_ALIGNAS(16) MyClass { ... } +// PROTOBUF_ALIGNAS(16) int array[4]; +// +// In most places you can use the C++11 keyword "alignas", which is preferred. +// +// But compilers have trouble mixing __attribute__((...)) syntax with +// alignas(...) syntax. +// +// Doesn't work in clang or gcc: +// struct alignas(16) __attribute__((packed)) S { char c; }; +// Works in clang but not gcc: +// struct __attribute__((packed)) alignas(16) S2 { char c; }; +// Works in clang and gcc: +// struct alignas(16) S3 { char c; } __attribute__((packed)); +// +// There are also some attributes that must be specified *before* a class +// definition: visibility (used for exporting functions/classes) is one of +// these attributes. This means that it is not possible to use alignas() with a +// class that is marked as exported. +#if defined(_MSC_VER) +#define PROTOBUF_ALIGNAS(byte_alignment) __declspec(align(byte_alignment)) +#elif defined(__GNUC__) +#define PROTOBUF_ALIGNAS(byte_alignment) \ + __attribute__((aligned(byte_alignment))) +#else +#define PROTOBUF_ALIGNAS(byte_alignment) alignas(byte_alignment) +#endif + +#define PROTOBUF_FINAL final diff --git a/third_party/protobuf/src/google/protobuf/port_undef.inc b/third_party/protobuf/src/google/protobuf/port_undef.inc index 3395e263..b35e8568 100644 --- a/third_party/protobuf/src/google/protobuf/port_undef.inc +++ b/third_party/protobuf/src/google/protobuf/port_undef.inc @@ -41,6 +41,7 @@ #undef PROTOBUF_NOINLINE #undef PROTOBUF_SECTION_VARIABLE #undef PROTOBUF_DEPRECATED +#undef PROTOBUF_DEPRECATED_ENUM #undef PROTOBUF_DEPRECATED_MSG #undef PROTOBUF_FUNC_ALIGN #undef PROTOBUF_RETURNS_NONNULL @@ -64,12 +65,31 @@ #undef PROTOBUF_NAMESPACE_OPEN #undef PROTOBUF_NAMESPACE_CLOSE #undef PROTOBUF_UNUSED +#undef PROTOBUF_ASSUME +#undef PROTOBUF_EXPORT_TEMPLATE_DECLARE +#undef PROTOBUF_EXPORT_TEMPLATE_DEFINE +#undef PROTOBUF_ALIGNAS +#undef PROTOBUF_FINAL // Restore macro that may have been #undef'd in port_def.inc. #ifdef _MSC_VER +#pragma pop_macro("ERROR") #pragma pop_macro("GetMessage") +#pragma pop_macro("IGNORE") +#pragma pop_macro("IN") +#pragma pop_macro("OUT") +#pragma pop_macro("OPTIONAL") +#pragma pop_macro("min") +#pragma pop_macro("max") #endif +#if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) +#pragma pop_macro("YES") +#pragma pop_macro("NO") +#endif // defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) + #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/third_party/protobuf/src/google/protobuf/proto3_arena_lite_unittest.cc b/third_party/protobuf/src/google/protobuf/proto3_arena_lite_unittest.cc index e2693708..06b8d08c 100644 --- a/third_party/protobuf/src/google/protobuf/proto3_arena_lite_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/proto3_arena_lite_unittest.cc @@ -50,8 +50,7 @@ void SetAllFields(TestAllTypes* m) { m->set_optional_bytes("jkl;"); m->mutable_optional_nested_message()->set_bb(42); m->mutable_optional_foreign_message()->set_c(43); - m->set_optional_nested_enum( - proto3_arena_unittest::TestAllTypes_NestedEnum_BAZ); + m->set_optional_nested_enum(proto3_arena_unittest::TestAllTypes::BAZ); m->set_optional_foreign_enum(proto3_arena_unittest::FOREIGN_BAZ); m->mutable_optional_lazy_message()->set_bb(45); m->add_repeated_int32(100); @@ -59,8 +58,7 @@ void SetAllFields(TestAllTypes* m) { m->add_repeated_bytes("jkl;"); m->add_repeated_nested_message()->set_bb(46); m->add_repeated_foreign_message()->set_c(47); - m->add_repeated_nested_enum( - proto3_arena_unittest::TestAllTypes_NestedEnum_BAZ); + m->add_repeated_nested_enum(proto3_arena_unittest::TestAllTypes::BAZ); m->add_repeated_foreign_enum(proto3_arena_unittest::FOREIGN_BAZ); m->add_repeated_lazy_message()->set_bb(49); @@ -77,8 +75,7 @@ void ExpectAllFieldsSet(const TestAllTypes& m) { EXPECT_EQ(42, m.optional_nested_message().bb()); EXPECT_EQ(true, m.has_optional_foreign_message()); EXPECT_EQ(43, m.optional_foreign_message().c()); - EXPECT_EQ(proto3_arena_unittest::TestAllTypes_NestedEnum_BAZ, - m.optional_nested_enum()); + EXPECT_EQ(proto3_arena_unittest::TestAllTypes::BAZ, m.optional_nested_enum()); EXPECT_EQ(proto3_arena_unittest::FOREIGN_BAZ, m.optional_foreign_enum()); EXPECT_EQ(true, m.has_optional_lazy_message()); EXPECT_EQ(45, m.optional_lazy_message().bb()); @@ -94,7 +91,7 @@ void ExpectAllFieldsSet(const TestAllTypes& m) { EXPECT_EQ(1, m.repeated_foreign_message_size()); EXPECT_EQ(47, m.repeated_foreign_message(0).c()); EXPECT_EQ(1, m.repeated_nested_enum_size()); - EXPECT_EQ(proto3_arena_unittest::TestAllTypes_NestedEnum_BAZ, + EXPECT_EQ(proto3_arena_unittest::TestAllTypes::BAZ, m.repeated_nested_enum(0)); EXPECT_EQ(1, m.repeated_foreign_enum_size()); EXPECT_EQ(proto3_arena_unittest::FOREIGN_BAZ, m.repeated_foreign_enum(0)); diff --git a/third_party/protobuf/src/google/protobuf/proto3_arena_unittest.cc b/third_party/protobuf/src/google/protobuf/proto3_arena_unittest.cc index d4b0135a..72fd8257 100644 --- a/third_party/protobuf/src/google/protobuf/proto3_arena_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/proto3_arena_unittest.cc @@ -35,7 +35,9 @@ #include #include #include +#include #include +#include #include #include @@ -52,8 +54,7 @@ void SetAllFields(TestAllTypes* m) { m->set_optional_bytes("jkl;"); m->mutable_optional_nested_message()->set_bb(42); m->mutable_optional_foreign_message()->set_c(43); - m->set_optional_nested_enum( - proto3_arena_unittest::TestAllTypes_NestedEnum_BAZ); + m->set_optional_nested_enum(proto3_arena_unittest::TestAllTypes::BAZ); m->set_optional_foreign_enum(proto3_arena_unittest::FOREIGN_BAZ); m->mutable_optional_lazy_message()->set_bb(45); m->add_repeated_int32(100); @@ -61,8 +62,7 @@ void SetAllFields(TestAllTypes* m) { m->add_repeated_bytes("jkl;"); m->add_repeated_nested_message()->set_bb(46); m->add_repeated_foreign_message()->set_c(47); - m->add_repeated_nested_enum( - proto3_arena_unittest::TestAllTypes_NestedEnum_BAZ); + m->add_repeated_nested_enum(proto3_arena_unittest::TestAllTypes::BAZ); m->add_repeated_foreign_enum(proto3_arena_unittest::FOREIGN_BAZ); m->add_repeated_lazy_message()->set_bb(49); @@ -79,8 +79,7 @@ void ExpectAllFieldsSet(const TestAllTypes& m) { EXPECT_EQ(42, m.optional_nested_message().bb()); EXPECT_EQ(true, m.has_optional_foreign_message()); EXPECT_EQ(43, m.optional_foreign_message().c()); - EXPECT_EQ(proto3_arena_unittest::TestAllTypes_NestedEnum_BAZ, - m.optional_nested_enum()); + EXPECT_EQ(proto3_arena_unittest::TestAllTypes::BAZ, m.optional_nested_enum()); EXPECT_EQ(proto3_arena_unittest::FOREIGN_BAZ, m.optional_foreign_enum()); EXPECT_EQ(true, m.has_optional_lazy_message()); EXPECT_EQ(45, m.optional_lazy_message().bb()); @@ -96,7 +95,7 @@ void ExpectAllFieldsSet(const TestAllTypes& m) { EXPECT_EQ(1, m.repeated_foreign_message_size()); EXPECT_EQ(47, m.repeated_foreign_message(0).c()); EXPECT_EQ(1, m.repeated_nested_enum_size()); - EXPECT_EQ(proto3_arena_unittest::TestAllTypes_NestedEnum_BAZ, + EXPECT_EQ(proto3_arena_unittest::TestAllTypes::BAZ, m.repeated_nested_enum(0)); EXPECT_EQ(1, m.repeated_foreign_enum_size()); EXPECT_EQ(proto3_arena_unittest::FOREIGN_BAZ, m.repeated_foreign_enum(0)); @@ -197,6 +196,290 @@ TEST(Proto3ArenaTest, MessageFieldClearViaReflection) { EXPECT_EQ(0, message->optional_nested_message().bb()); } +TEST(Proto3OptionalTest, OptionalFields) { + protobuf_unittest::TestProto3Optional msg; + EXPECT_FALSE(msg.has_optional_int32()); + msg.set_optional_int32(0); + EXPECT_TRUE(msg.has_optional_int32()); + + string serialized; + msg.SerializeToString(&serialized); + EXPECT_GT(serialized.size(), 0); + + msg.clear_optional_int32(); + EXPECT_FALSE(msg.has_optional_int32()); + msg.SerializeToString(&serialized); + EXPECT_EQ(serialized.size(), 0); +} + +TEST(Proto3OptionalTest, OptionalFieldDescriptor) { + const Descriptor* d = protobuf_unittest::TestProto3Optional::descriptor(); + + for (int i = 0; i < d->field_count(); i++) { + const FieldDescriptor* f = d->field(i); + if (HasPrefixString(f->name(), "singular")) { + EXPECT_FALSE(f->has_optional_keyword()) << f->full_name(); + EXPECT_FALSE(f->has_presence()) << f->full_name(); + EXPECT_FALSE(f->containing_oneof()) << f->full_name(); + } else { + EXPECT_TRUE(f->has_optional_keyword()) << f->full_name(); + EXPECT_TRUE(f->has_presence()) << f->full_name(); + EXPECT_TRUE(f->containing_oneof()) << f->full_name(); + } + } +} + +TEST(Proto3OptionalTest, OptionalField) { + protobuf_unittest::TestProto3Optional msg; + EXPECT_FALSE(msg.has_optional_int32()); + msg.set_optional_int32(0); + EXPECT_TRUE(msg.has_optional_int32()); + + string serialized; + msg.SerializeToString(&serialized); + EXPECT_GT(serialized.size(), 0); + + msg.clear_optional_int32(); + EXPECT_FALSE(msg.has_optional_int32()); + msg.SerializeToString(&serialized); + EXPECT_EQ(serialized.size(), 0); +} + +TEST(Proto3OptionalTest, OptionalFieldReflection) { + // Tests that oneof reflection works on synthetic oneofs. + // + // We test this more deeply elsewhere by parsing/serializing TextFormat (which + // doesn't treat synthetic oneofs specially, so reflects over them normally). + protobuf_unittest::TestProto3Optional msg; + const google::protobuf::Descriptor* d = msg.GetDescriptor(); + const google::protobuf::Reflection* r = msg.GetReflection(); + const google::protobuf::FieldDescriptor* f = d->FindFieldByName("optional_int32"); + const google::protobuf::OneofDescriptor* o = d->FindOneofByName("_optional_int32"); + GOOGLE_CHECK(f); + GOOGLE_CHECK(o); + EXPECT_TRUE(o->is_synthetic()); + + EXPECT_FALSE(r->HasField(msg, f)); + EXPECT_FALSE(r->HasOneof(msg, o)); + EXPECT_TRUE(r->GetOneofFieldDescriptor(msg, o) == nullptr); + + r->SetInt32(&msg, f, 123); + EXPECT_EQ(123, msg.optional_int32()); + EXPECT_EQ(123, r->GetInt32(msg, f)); + EXPECT_TRUE(r->HasField(msg, f)); + EXPECT_TRUE(r->HasOneof(msg, o)); + EXPECT_EQ(f, r->GetOneofFieldDescriptor(msg, o)); + + std::vector fields; + r->ListFields(msg, &fields); + EXPECT_EQ(1, fields.size()); + EXPECT_EQ(f, fields[0]); + + r->ClearOneof(&msg, o); + EXPECT_FALSE(r->HasField(msg, f)); + EXPECT_FALSE(r->HasOneof(msg, o)); + EXPECT_TRUE(r->GetOneofFieldDescriptor(msg, o) == nullptr); + + msg.set_optional_int32(123); + EXPECT_EQ(123, r->GetInt32(msg, f)); + EXPECT_TRUE(r->HasField(msg, f)); + EXPECT_TRUE(r->HasOneof(msg, o)); + EXPECT_EQ(f, r->GetOneofFieldDescriptor(msg, o)); + + r->ClearOneof(&msg, o); + EXPECT_FALSE(r->HasField(msg, f)); + EXPECT_FALSE(r->HasOneof(msg, o)); + EXPECT_TRUE(r->GetOneofFieldDescriptor(msg, o) == nullptr); +} + +void SetAllFieldsZero(protobuf_unittest::TestProto3Optional* msg) { + msg->set_optional_int32(0); + msg->set_optional_int64(0); + msg->set_optional_uint32(0); + msg->set_optional_uint64(0); + msg->set_optional_sint32(0); + msg->set_optional_sint64(0); + msg->set_optional_fixed32(0); + msg->set_optional_fixed64(0); + msg->set_optional_sfixed32(0); + msg->set_optional_sfixed64(0); + msg->set_optional_float(0); + msg->set_optional_double(0); + msg->set_optional_bool(false); + msg->set_optional_string(""); + msg->set_optional_bytes(""); + msg->mutable_optional_nested_message(); + msg->mutable_lazy_nested_message(); + msg->set_optional_nested_enum( + protobuf_unittest::TestProto3Optional::UNSPECIFIED); +} + +void SetAllFieldsNonZero(protobuf_unittest::TestProto3Optional* msg) { + msg->set_optional_int32(101); + msg->set_optional_int64(102); + msg->set_optional_uint32(103); + msg->set_optional_uint64(104); + msg->set_optional_sint32(105); + msg->set_optional_sint64(106); + msg->set_optional_fixed32(107); + msg->set_optional_fixed64(108); + msg->set_optional_sfixed32(109); + msg->set_optional_sfixed64(110); + msg->set_optional_float(111); + msg->set_optional_double(112); + msg->set_optional_bool(true); + msg->set_optional_string("abc"); + msg->set_optional_bytes("def"); + msg->mutable_optional_nested_message(); + msg->mutable_lazy_nested_message(); + msg->set_optional_nested_enum(protobuf_unittest::TestProto3Optional::BAZ); +} + +void TestAllFieldsZero(const protobuf_unittest::TestProto3Optional& msg) { + EXPECT_EQ(0, msg.optional_int32()); + EXPECT_EQ(0, msg.optional_int64()); + EXPECT_EQ(0, msg.optional_uint32()); + EXPECT_EQ(0, msg.optional_uint64()); + EXPECT_EQ(0, msg.optional_sint32()); + EXPECT_EQ(0, msg.optional_sint64()); + EXPECT_EQ(0, msg.optional_fixed32()); + EXPECT_EQ(0, msg.optional_fixed64()); + EXPECT_EQ(0, msg.optional_sfixed32()); + EXPECT_EQ(0, msg.optional_sfixed64()); + EXPECT_EQ(0, msg.optional_float()); + EXPECT_EQ(0, msg.optional_double()); + EXPECT_EQ(0, msg.optional_bool()); + EXPECT_EQ("", msg.optional_string()); + EXPECT_EQ("", msg.optional_bytes()); + EXPECT_EQ(protobuf_unittest::TestProto3Optional::UNSPECIFIED, + msg.optional_nested_enum()); + + const Reflection* r = msg.GetReflection(); + const Descriptor* d = msg.GetDescriptor(); + EXPECT_EQ("", r->GetString(msg, d->FindFieldByName("optional_string"))); +} + +void TestAllFieldsNonZero(const protobuf_unittest::TestProto3Optional& msg) { + EXPECT_EQ(101, msg.optional_int32()); + EXPECT_EQ(102, msg.optional_int64()); + EXPECT_EQ(103, msg.optional_uint32()); + EXPECT_EQ(104, msg.optional_uint64()); + EXPECT_EQ(105, msg.optional_sint32()); + EXPECT_EQ(106, msg.optional_sint64()); + EXPECT_EQ(107, msg.optional_fixed32()); + EXPECT_EQ(108, msg.optional_fixed64()); + EXPECT_EQ(109, msg.optional_sfixed32()); + EXPECT_EQ(110, msg.optional_sfixed64()); + EXPECT_EQ(111, msg.optional_float()); + EXPECT_EQ(112, msg.optional_double()); + EXPECT_EQ(true, msg.optional_bool()); + EXPECT_EQ("abc", msg.optional_string()); + EXPECT_EQ("def", msg.optional_bytes()); + EXPECT_EQ(protobuf_unittest::TestProto3Optional::BAZ, + msg.optional_nested_enum()); +} + +void TestAllFieldsSet(const protobuf_unittest::TestProto3Optional& msg, + bool set) { + EXPECT_EQ(set, msg.has_optional_int32()); + EXPECT_EQ(set, msg.has_optional_int64()); + EXPECT_EQ(set, msg.has_optional_uint32()); + EXPECT_EQ(set, msg.has_optional_uint64()); + EXPECT_EQ(set, msg.has_optional_sint32()); + EXPECT_EQ(set, msg.has_optional_sint64()); + EXPECT_EQ(set, msg.has_optional_fixed32()); + EXPECT_EQ(set, msg.has_optional_fixed64()); + EXPECT_EQ(set, msg.has_optional_sfixed32()); + EXPECT_EQ(set, msg.has_optional_sfixed64()); + EXPECT_EQ(set, msg.has_optional_float()); + EXPECT_EQ(set, msg.has_optional_double()); + EXPECT_EQ(set, msg.has_optional_bool()); + EXPECT_EQ(set, msg.has_optional_string()); + EXPECT_EQ(set, msg.has_optional_bytes()); + EXPECT_EQ(set, msg.has_optional_nested_message()); + EXPECT_EQ(set, msg.has_lazy_nested_message()); + EXPECT_EQ(set, msg.has_optional_nested_enum()); +} + +TEST(Proto3OptionalTest, BinaryRoundTrip) { + protobuf_unittest::TestProto3Optional msg; + TestAllFieldsSet(msg, false); + SetAllFieldsZero(&msg); + TestAllFieldsZero(msg); + TestAllFieldsSet(msg, true); + + protobuf_unittest::TestProto3Optional msg2; + std::string serialized; + msg.SerializeToString(&serialized); + EXPECT_TRUE(msg2.ParseFromString(serialized)); + TestAllFieldsZero(msg2); + TestAllFieldsSet(msg2, true); +} + +TEST(Proto3OptionalTest, TextFormatRoundTripZeros) { + protobuf_unittest::TestProto3Optional msg; + SetAllFieldsZero(&msg); + + protobuf_unittest::TestProto3Optional msg2; + std::string text; + EXPECT_TRUE(TextFormat::PrintToString(msg, &text)); + EXPECT_TRUE(TextFormat::ParseFromString(text, &msg2)); + TestAllFieldsSet(msg2, true); + TestAllFieldsZero(msg2); +} + +TEST(Proto3OptionalTest, TextFormatRoundTripNonZeros) { + protobuf_unittest::TestProto3Optional msg; + SetAllFieldsNonZero(&msg); + + protobuf_unittest::TestProto3Optional msg2; + std::string text; + EXPECT_TRUE(TextFormat::PrintToString(msg, &text)); + EXPECT_TRUE(TextFormat::ParseFromString(text, &msg2)); + TestAllFieldsSet(msg2, true); + TestAllFieldsNonZero(msg2); +} + +TEST(Proto3OptionalTest, SwapRoundTripZero) { + protobuf_unittest::TestProto3Optional msg; + SetAllFieldsZero(&msg); + TestAllFieldsSet(msg, true); + + protobuf_unittest::TestProto3Optional msg2; + msg.Swap(&msg2); + TestAllFieldsSet(msg2, true); + TestAllFieldsZero(msg2); +} + +TEST(Proto3OptionalTest, SwapRoundTripNonZero) { + protobuf_unittest::TestProto3Optional msg; + SetAllFieldsNonZero(&msg); + TestAllFieldsSet(msg, true); + + protobuf_unittest::TestProto3Optional msg2; + msg.Swap(&msg2); + TestAllFieldsSet(msg2, true); + TestAllFieldsNonZero(msg2); +} + +TEST(Proto3OptionalTest, ReflectiveSwapRoundTrip) { + protobuf_unittest::TestProto3Optional msg; + SetAllFieldsZero(&msg); + TestAllFieldsSet(msg, true); + + protobuf_unittest::TestProto3Optional msg2; + msg2.GetReflection()->Swap(&msg, &msg2); + TestAllFieldsSet(msg2, true); + TestAllFieldsZero(msg2); +} + +TEST(Proto3OptionalTest, PlainFields) { + const Descriptor* d = TestAllTypes::descriptor(); + + EXPECT_FALSE(d->FindFieldByName("optional_int32")->has_presence()); + EXPECT_TRUE(d->FindFieldByName("oneof_nested_message")->has_presence()); +} + } // namespace } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/proto3_lite_unittest.inc b/third_party/protobuf/src/google/protobuf/proto3_lite_unittest.inc index 636691b4..4cf9cf8f 100644 --- a/third_party/protobuf/src/google/protobuf/proto3_lite_unittest.inc +++ b/third_party/protobuf/src/google/protobuf/proto3_lite_unittest.inc @@ -49,8 +49,7 @@ void SetAllFields(TestAllTypes* m) { m->set_optional_bytes("jkl;"); m->mutable_optional_nested_message()->set_bb(42); m->mutable_optional_foreign_message()->set_c(43); - m->set_optional_nested_enum( - UNITTEST::TestAllTypes_NestedEnum_BAZ); + m->set_optional_nested_enum(UNITTEST::TestAllTypes::BAZ); m->set_optional_foreign_enum( UNITTEST::FOREIGN_BAZ); m->mutable_optional_lazy_message()->set_bb(45); @@ -59,8 +58,7 @@ void SetAllFields(TestAllTypes* m) { m->add_repeated_bytes("jkl;"); m->add_repeated_nested_message()->set_bb(46); m->add_repeated_foreign_message()->set_c(47); - m->add_repeated_nested_enum( - UNITTEST::TestAllTypes_NestedEnum_BAZ); + m->add_repeated_nested_enum(UNITTEST::TestAllTypes::BAZ); m->add_repeated_foreign_enum( UNITTEST::FOREIGN_BAZ); m->add_repeated_lazy_message()->set_bb(49); @@ -78,8 +76,7 @@ void ExpectAllFieldsSet(const TestAllTypes& m) { EXPECT_EQ(42, m.optional_nested_message().bb()); EXPECT_EQ(true, m.has_optional_foreign_message()); EXPECT_EQ(43, m.optional_foreign_message().c()); - EXPECT_EQ(UNITTEST::TestAllTypes_NestedEnum_BAZ, - m.optional_nested_enum()); + EXPECT_EQ(UNITTEST::TestAllTypes::BAZ, m.optional_nested_enum()); EXPECT_EQ(UNITTEST::FOREIGN_BAZ, m.optional_foreign_enum()); EXPECT_EQ(true, m.has_optional_lazy_message()); @@ -96,8 +93,7 @@ void ExpectAllFieldsSet(const TestAllTypes& m) { EXPECT_EQ(1, m.repeated_foreign_message_size()); EXPECT_EQ(47, m.repeated_foreign_message(0).c()); EXPECT_EQ(1, m.repeated_nested_enum_size()); - EXPECT_EQ(UNITTEST::TestAllTypes_NestedEnum_BAZ, - m.repeated_nested_enum(0)); + EXPECT_EQ(UNITTEST::TestAllTypes::BAZ, m.repeated_nested_enum(0)); EXPECT_EQ(1, m.repeated_foreign_enum_size()); EXPECT_EQ(UNITTEST::FOREIGN_BAZ, m.repeated_foreign_enum(0)); diff --git a/third_party/protobuf/src/google/protobuf/reflection.h b/third_party/protobuf/src/google/protobuf/reflection.h index 6b1e5f2e..af8eb00e 100644 --- a/third_party/protobuf/src/google/protobuf/reflection.h +++ b/third_party/protobuf/src/google/protobuf/reflection.h @@ -471,7 +471,7 @@ class RepeatedFieldRefIterator // RepeatedFieldAccessor type, etc. template struct PrimitiveTraits { - static const bool is_primitive = false; + static constexpr bool is_primitive = false; }; #define DEFINE_PRIMITIVE(TYPE, type) \ template <> \ @@ -497,7 +497,8 @@ struct RefTypeTraits< typedef T AccessorValueType; typedef T IteratorValueType; typedef T* IteratorPointerType; - static const FieldDescriptor::CppType cpp_type = PrimitiveTraits::cpp_type; + static constexpr FieldDescriptor::CppType cpp_type = + PrimitiveTraits::cpp_type; static const Descriptor* GetMessageFieldDescriptor() { return NULL; } }; @@ -510,7 +511,7 @@ struct RefTypeTraits< typedef int32 AccessorValueType; typedef T IteratorValueType; typedef int32* IteratorPointerType; - static const FieldDescriptor::CppType cpp_type = + static constexpr FieldDescriptor::CppType cpp_type = FieldDescriptor::CPPTYPE_ENUM; static const Descriptor* GetMessageFieldDescriptor() { return NULL; } }; @@ -523,7 +524,7 @@ struct RefTypeTraits< typedef std::string AccessorValueType; typedef const std::string IteratorValueType; typedef const std::string* IteratorPointerType; - static const FieldDescriptor::CppType cpp_type = + static constexpr FieldDescriptor::CppType cpp_type = FieldDescriptor::CPPTYPE_STRING; static const Descriptor* GetMessageFieldDescriptor() { return NULL; } }; @@ -547,7 +548,7 @@ struct RefTypeTraits< typedef Message AccessorValueType; typedef const T& IteratorValueType; typedef const T* IteratorPointerType; - static const FieldDescriptor::CppType cpp_type = + static constexpr FieldDescriptor::CppType cpp_type = FieldDescriptor::CPPTYPE_MESSAGE; static const Descriptor* GetMessageFieldDescriptor() { return MessageDescriptorGetter::get(); diff --git a/third_party/protobuf/src/google/protobuf/reflection_internal.h b/third_party/protobuf/src/google/protobuf/reflection_internal.h index 40c070fc..3ccf4a06 100644 --- a/third_party/protobuf/src/google/protobuf/reflection_internal.h +++ b/third_party/protobuf/src/google/protobuf/reflection_internal.h @@ -122,7 +122,7 @@ class RepeatedFieldWrapper : public RandomAccessRepeatedFieldAccessor { return reinterpret_cast(data); } - // Convert an object recevied by this accessor to an object to be stored in + // Convert an object received by this accessor to an object to be stored in // the underlying RepeatedField. virtual T ConvertToT(const Value* value) const = 0; diff --git a/third_party/protobuf/src/google/protobuf/reflection_ops.cc b/third_party/protobuf/src/google/protobuf/reflection_ops.cc index 3ced1419..5eee1ddc 100644 --- a/third_party/protobuf/src/google/protobuf/reflection_ops.cc +++ b/third_party/protobuf/src/google/protobuf/reflection_ops.cc @@ -45,7 +45,6 @@ #include #include - #include namespace google { @@ -126,8 +125,16 @@ void ReflectionOps::Merge(const Message& from, Message* to) { #undef HANDLE_TYPE case FieldDescriptor::CPPTYPE_MESSAGE: - to_reflection->AddMessage(to, field)->MergeFrom( - from_reflection->GetRepeatedMessage(from, field, j)); + const Message& from_child = + from_reflection->GetRepeatedMessage(from, field, j); + if (from_reflection == to_reflection) { + to_reflection + ->AddMessage(to, field, + from_child.GetReflection()->GetMessageFactory()) + ->MergeFrom(from_child); + } else { + to_reflection->AddMessage(to, field)->MergeFrom(from_child); + } break; } } @@ -151,8 +158,15 @@ void ReflectionOps::Merge(const Message& from, Message* to) { #undef HANDLE_TYPE case FieldDescriptor::CPPTYPE_MESSAGE: - to_reflection->MutableMessage(to, field)->MergeFrom( - from_reflection->GetMessage(from, field)); + const Message& from_child = from_reflection->GetMessage(from, field); + if (from_reflection == to_reflection) { + to_reflection + ->MutableMessage( + to, field, from_child.GetReflection()->GetMessageFactory()) + ->MergeFrom(from_child); + } else { + to_reflection->MutableMessage(to, field)->MergeFrom(from_child); + } break; } } @@ -179,10 +193,13 @@ bool ReflectionOps::IsInitialized(const Message& message) { const Reflection* reflection = GetReflectionOrDie(message); // Check required fields of this message. - for (int i = 0; i < descriptor->field_count(); i++) { - if (descriptor->field(i)->is_required()) { - if (!reflection->HasField(message, descriptor->field(i))) { - return false; + { + const int field_count = descriptor->field_count(); + for (int i = 0; i < field_count; i++) { + if (descriptor->field(i)->is_required()) { + if (!reflection->HasField(message, descriptor->field(i))) { + return false; + } } } } @@ -235,45 +252,48 @@ bool ReflectionOps::IsInitialized(const Message& message) { return true; } +static bool IsMapValueMessageTyped(const FieldDescriptor* map_field) { + return map_field->message_type()->field(1)->cpp_type() == + FieldDescriptor::CPPTYPE_MESSAGE; +} + void ReflectionOps::DiscardUnknownFields(Message* message) { const Reflection* reflection = GetReflectionOrDie(*message); reflection->MutableUnknownFields(message)->Clear(); + // Walk through the fields of this message and DiscardUnknownFields on any + // messages present. std::vector fields; reflection->ListFields(*message, &fields); for (int i = 0; i < fields.size(); i++) { const FieldDescriptor* field = fields[i]; - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - if (field->is_repeated()) { - if (field->is_map()) { - const FieldDescriptor* value_field = field->message_type()->field(1); - if (value_field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - const MapFieldBase* map_field = - reflection->MutableMapData(message, field); - if (map_field->IsMapValid()) { - MapIterator iter(message, field); - MapIterator end(message, field); - for (map_field->MapBegin(&iter), map_field->MapEnd(&end); - iter != end; ++iter) { - iter.MutableValueRef() - ->MutableMessageValue() - ->DiscardUnknownFields(); - } - continue; - } - } else { - continue; - } + // Skip over non-message fields. + if (field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) { + continue; + } + // Discard the unknown fields in maps that contain message values. + if (field->is_map() && IsMapValueMessageTyped(field)) { + const MapFieldBase* map_field = + reflection->MutableMapData(message, field); + if (map_field->IsMapValid()) { + MapIterator iter(message, field); + MapIterator end(message, field); + for (map_field->MapBegin(&iter), map_field->MapEnd(&end); iter != end; + ++iter) { + iter.MutableValueRef()->MutableMessageValue()->DiscardUnknownFields(); } - int size = reflection->FieldSize(*message, field); - for (int j = 0; j < size; j++) { - reflection->MutableRepeatedMessage(message, field, j) - ->DiscardUnknownFields(); - } - } else { - reflection->MutableMessage(message, field)->DiscardUnknownFields(); } + // Discard every unknown field inside messages in a repeated field. + } else if (field->is_repeated()) { + int size = reflection->FieldSize(*message, field); + for (int j = 0; j < size; j++) { + reflection->MutableRepeatedMessage(message, field, j) + ->DiscardUnknownFields(); + } + // Discard the unknown fields inside an optional message. + } else { + reflection->MutableMessage(message, field)->DiscardUnknownFields(); } } } @@ -304,10 +324,13 @@ void ReflectionOps::FindInitializationErrors(const Message& message, const Reflection* reflection = GetReflectionOrDie(message); // Check required fields of this message. - for (int i = 0; i < descriptor->field_count(); i++) { - if (descriptor->field(i)->is_required()) { - if (!reflection->HasField(message, descriptor->field(i))) { - errors->push_back(prefix + descriptor->field(i)->name()); + { + const int field_count = descriptor->field_count(); + for (int i = 0; i < field_count; i++) { + if (descriptor->field(i)->is_required()) { + if (!reflection->HasField(message, descriptor->field(i))) { + errors->push_back(prefix + descriptor->field(i)->name()); + } } } } @@ -337,6 +360,21 @@ void ReflectionOps::FindInitializationErrors(const Message& message, } } +void GenericSwap(Message* m1, Message* m2) { + Arena* m2_arena = m2->GetArena(); + GOOGLE_DCHECK(m1->GetArena() != m2_arena); + + // Copy semantics in this case. We try to improve efficiency by placing the + // temporary on |m2|'s arena so that messages are copied twice rather than + // three times. + Message* tmp = m2->New(m2_arena); + std::unique_ptr tmp_deleter(m2_arena == nullptr ? tmp : nullptr); + tmp->CheckTypeAndMergeFrom(*m1); + m1->Clear(); + m1->CheckTypeAndMergeFrom(*m2); + m2->GetReflection()->Swap(tmp, m2); +} + } // namespace internal } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/reflection_ops_unittest.cc b/third_party/protobuf/src/google/protobuf/reflection_ops_unittest.cc index bd141933..be2073db 100644 --- a/third_party/protobuf/src/google/protobuf/reflection_ops_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/reflection_ops_unittest.cc @@ -473,6 +473,36 @@ TEST(ReflectionOpsTest, FindOneofInitializationErrors) { EXPECT_EQ("foo_message.required_double", FindInitializationErrors(message)); } +TEST(ReflectionOpsTest, GenericSwap) { + Arena arena; + { + unittest::TestAllTypes message; + auto* arena_message = Arena::CreateMessage(&arena); + TestUtil::SetAllFields(arena_message); + const uint64 initial_arena_size = arena.SpaceUsed(); + + GenericSwap(&message, arena_message); + + TestUtil::ExpectAllFieldsSet(message); + TestUtil::ExpectClear(*arena_message); + // The temp should be allocated on the arena in this case. + EXPECT_GT(arena.SpaceUsed(), initial_arena_size); + } + { + unittest::TestAllTypes message; + auto* arena_message = Arena::CreateMessage(&arena); + TestUtil::SetAllFields(arena_message); + const uint64 initial_arena_size = arena.SpaceUsed(); + + GenericSwap(arena_message, &message); + + TestUtil::ExpectAllFieldsSet(message); + TestUtil::ExpectClear(*arena_message); + // The temp shouldn't be allocated on the arena in this case. + EXPECT_EQ(arena.SpaceUsed(), initial_arena_size); + } +} + } // namespace } // namespace internal } // namespace protobuf diff --git a/third_party/protobuf/src/google/protobuf/repeated_field.cc b/third_party/protobuf/src/google/protobuf/repeated_field.cc index e5dbe025..64506791 100644 --- a/third_party/protobuf/src/google/protobuf/repeated_field.cc +++ b/third_party/protobuf/src/google/protobuf/repeated_field.cc @@ -32,11 +32,13 @@ // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. +#include + #include #include #include -#include +#include #include @@ -53,8 +55,8 @@ void** RepeatedPtrFieldBase::InternalExtend(int extend_amount) { return &rep_->elements[current_size_]; } Rep* old_rep = rep_; - Arena* arena = GetArenaNoVirtual(); - new_size = std::max(kMinRepeatedFieldAllocationSize, + Arena* arena = GetArena(); + new_size = std::max(internal::kRepeatedFieldLowerClampLimit, std::max(total_size_ * 2, new_size)); GOOGLE_CHECK_LE(new_size, (std::numeric_limits::max() - kRepHeaderSize) / sizeof(old_rep->elements[0])) @@ -121,14 +123,14 @@ MessageLite* RepeatedPtrFieldBase::AddWeak(const MessageLite* prototype) { } // namespace internal -template class PROTOBUF_EXPORT RepeatedField; -template class PROTOBUF_EXPORT RepeatedField; -template class PROTOBUF_EXPORT RepeatedField; -template class PROTOBUF_EXPORT RepeatedField; -template class PROTOBUF_EXPORT RepeatedField; -template class PROTOBUF_EXPORT RepeatedField; -template class PROTOBUF_EXPORT RepeatedField; -template class PROTOBUF_EXPORT RepeatedPtrField; +template class PROTOBUF_EXPORT_TEMPLATE_DEFINE RepeatedField; +template class PROTOBUF_EXPORT_TEMPLATE_DEFINE RepeatedField; +template class PROTOBUF_EXPORT_TEMPLATE_DEFINE RepeatedField; +template class PROTOBUF_EXPORT_TEMPLATE_DEFINE RepeatedField; +template class PROTOBUF_EXPORT_TEMPLATE_DEFINE RepeatedField; +template class PROTOBUF_EXPORT_TEMPLATE_DEFINE RepeatedField; +template class PROTOBUF_EXPORT_TEMPLATE_DEFINE RepeatedField; +template class PROTOBUF_EXPORT_TEMPLATE_DEFINE RepeatedPtrField; } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/repeated_field.h b/third_party/protobuf/src/google/protobuf/repeated_field.h index 4c631f05..fd01a667 100644 --- a/third_party/protobuf/src/google/protobuf/repeated_field.h +++ b/third_party/protobuf/src/google/protobuf/repeated_field.h @@ -56,39 +56,46 @@ #include #include #include + #include #include #include -#include #include #include #include #include +// Must be included last. #include #ifdef SWIG #error "You cannot SWIG proto headers" #endif -// Forward-declare these so that we can make them friends. -namespace upb { -namespace google_opensource { -class GMR_Handlers; -} // namespace google_opensource -} // namespace upb - namespace google { namespace protobuf { class Message; +class Reflection; + +template +struct WeakRepeatedPtrField; namespace internal { class MergePartialFromCodedStreamHelper; -static const int kMinRepeatedFieldAllocationSize = 4; +// kRepeatedFieldLowerClampLimit is the smallest size that will be allocated +// when growing a repeated field. +constexpr int kRepeatedFieldLowerClampLimit = 4; + +// kRepeatedFieldUpperClampLimit is the lowest signed integer value that +// overflows when multiplied by 2 (which is undefined behavior). Sizes above +// this will clamp to the maximum int value instead of following exponential +// growth when growing a repeated field. +constexpr int kRepeatedFieldUpperClampLimit = + (std::numeric_limits::max() / 2) + 1; // A utility function for logging that doesn't need any template types. void LogIndexOutOfBounds(int index, int size); @@ -109,6 +116,46 @@ inline int CalculateReserve(Iter begin, Iter end) { typedef typename std::iterator_traits::iterator_category Category; return CalculateReserve(begin, end, Category()); } + +// Swaps two blocks of memory of size sizeof(T). +template +inline void SwapBlock(char* p, char* q) { + T tmp; + memcpy(&tmp, p, sizeof(T)); + memcpy(p, q, sizeof(T)); + memcpy(q, &tmp, sizeof(T)); +} + +// Swaps two blocks of memory of size kSize: +// template void memswap(char* p, char* q); + +template +inline typename std::enable_if<(kSize == 0), void>::type memswap(char*, char*) { +} + +#define PROTO_MEMSWAP_DEF_SIZE(reg_type, max_size) \ + template \ + typename std::enable_if<(kSize >= sizeof(reg_type) && kSize < (max_size)), \ + void>::type \ + memswap(char* p, char* q) { \ + SwapBlock(p, q); \ + memswap(p + sizeof(reg_type), \ + q + sizeof(reg_type)); \ + } + +PROTO_MEMSWAP_DEF_SIZE(uint8, 2) +PROTO_MEMSWAP_DEF_SIZE(uint16, 4) +PROTO_MEMSWAP_DEF_SIZE(uint32, 8) + +#ifdef __SIZEOF_INT128__ +PROTO_MEMSWAP_DEF_SIZE(uint64, 16) +PROTO_MEMSWAP_DEF_SIZE(__uint128_t, (1u << 31)) +#else +PROTO_MEMSWAP_DEF_SIZE(uint64, (1u << 31)) +#endif + +#undef PROTO_MEMSWAP_DEF_SIZE + } // namespace internal // RepeatedField is used to represent repeated fields of a primitive type (in @@ -117,6 +164,10 @@ inline int CalculateReserve(Iter begin, Iter end) { // set-by-index, and add accessors that are generated for all repeated fields. template class RepeatedField final { + static_assert( + alignof(Arena) >= alignof(Element), + "We only support types that have an alignment smaller than Arena"); + public: RepeatedField(); explicit RepeatedField(Arena* arena); @@ -147,6 +198,11 @@ class RepeatedField final { // Appends a new element and return a pointer to it. // The new element is uninitialized if |Element| is a POD type. Element* Add(); + // Append elements in the range [begin, end) after reserving + // the appropriate number of elements. + template + void Add(Iter begin, Iter end); + // Remove the last element in the array. void RemoveLast(); @@ -252,7 +308,10 @@ class RepeatedField final { iterator erase(const_iterator first, const_iterator last); // Get the Arena on which this RepeatedField stores its elements. - Arena* GetArena() const { return GetArenaNoVirtual(); } + inline Arena* GetArena() const { + return (total_size_ == 0) ? static_cast(arena_or_elements_) + : rep()->arena; + } // For internal use only. // @@ -260,7 +319,7 @@ class RepeatedField final { inline void InternalSwap(RepeatedField* other); private: - static const int kInitialSize = 0; + static constexpr int kInitialSize = 0; // A note on the representation here (see also comment below for // RepeatedPtrFieldBase's struct Rep): // @@ -283,30 +342,36 @@ class RepeatedField final { // Element is double and pointer is 32bit). static const size_t kRepHeaderSize; - // We reuse the Rep* for an Arena* when total_size == 0, to avoid having to do - // an allocation in the constructor when we have an Arena. - union Pointer { - Pointer(Arena* a) : arena(a) {} - Arena* arena; // When total_size_ == 0. - Element* elements; // When total_size_ != 0, this is Rep->elements of Rep. - } ptr_; + // If total_size_ == 0 this points to an Arena otherwise it points to the + // elements member of a Rep struct. Using this invariant allows the storage of + // the arena pointer without an extra allocation in the constructor. + void* arena_or_elements_; + // Return pointer to elements array. + // pre-condition: the array must have been allocated. Element* elements() const { GOOGLE_DCHECK_GT(total_size_, 0); - return ptr_.elements; + // Because of above pre-condition this cast is safe. + return unsafe_elements(); } + // Return pointer to elements array if it exists otherwise either null or + // a invalid pointer is returned. This only happens for empty repeated fields, + // where you can't dereference this pointer anyway (it's empty). + Element* unsafe_elements() const { + return static_cast(arena_or_elements_); + } + + // Return pointer to the Rep struct. + // pre-condition: the Rep must have been allocated, ie elements() is safe. Rep* rep() const { - GOOGLE_DCHECK_GT(total_size_, 0); - char* addr = - reinterpret_cast(ptr_.elements) - offsetof(Rep, elements); + char* addr = reinterpret_cast(elements()) - offsetof(Rep, elements); return reinterpret_cast(addr); } friend class Arena; typedef void InternalArenaConstructable_; - // Move the contents of |from| into |to|, possibly clobbering |from| in the // process. For primitive types this is just a memcpy(), but it could be // specialized for non-primitive types to, say, swap each element instead. @@ -315,11 +380,6 @@ class RepeatedField final { // Copy the elements of |from| into |to|. void CopyArray(Element* to, const Element* from, int size); - // Internal helper expected by Arena methods. - inline Arena* GetArenaNoVirtual() const { - return (total_size_ == 0) ? ptr_.arena : rep()->arena; - } - // Internal helper to delete all elements and deallocate the storage. // If Element has a trivial destructor (for example, if it's a fundamental // type, like int32), the loop will be removed by the optimizer. @@ -341,8 +401,83 @@ class RepeatedField final { } } - friend class internal::WireFormatLite; - const Element* unsafe_data() const; + // This class is a performance wrapper around RepeatedField::Add(const T&) + // function. In general unless a RepeatedField is a local stack variable LLVM + // has a hard time optimizing Add. The machine code tends to be + // loop: + // mov %size, dword ptr [%repeated_field] // load + // cmp %size, dword ptr [%repeated_field + 4] + // jae fallback + // mov %buffer, qword ptr [%repeated_field + 8] + // mov dword [%buffer + %size * 4], %value + // inc %size // increment + // mov dword ptr [%repeated_field], %size // store + // jmp loop + // + // This puts a load/store in each iteration of the important loop variable + // size. It's a pretty bad compile that happens even in simple cases, but + // largely the presence of the fallback path disturbs the compilers mem-to-reg + // analysis. + // + // This class takes ownership of a repeated field for the duration of it's + // lifetime. The repeated field should not be accessed during this time, ie. + // only access through this class is allowed. This class should always be a + // function local stack variable. Intended use + // + // void AddSequence(const int* begin, const int* end, RepeatedField* out) + // { + // RepeatedFieldAdder adder(out); // Take ownership of out + // for (auto it = begin; it != end; ++it) { + // adder.Add(*it); + // } + // } + // + // Typically due to the fact adder is a local stack variable. The compiler + // will be successful in mem-to-reg transformation and the machine code will + // be loop: cmp %size, %capacity jae fallback mov dword ptr [%buffer + %size * + // 4], %val inc %size jmp loop + // + // The first version executes at 7 cycles per iteration while the second + // version near 1 or 2 cycles. + class FastAdder { + public: + explicit FastAdder(RepeatedField* rf) : repeated_field_(rf) { + if (kIsPod) { + index_ = repeated_field_->current_size_; + capacity_ = repeated_field_->total_size_; + buffer_ = repeated_field_->unsafe_elements(); + } + } + ~FastAdder() { + if (kIsPod) repeated_field_->current_size_ = index_; + } + + void Add(const Element& val) { + if (kIsPod) { + if (index_ == capacity_) { + repeated_field_->current_size_ = index_; + repeated_field_->Reserve(index_ + 1); + capacity_ = repeated_field_->total_size_; + buffer_ = repeated_field_->unsafe_elements(); + } + buffer_[index_++] = val; + } else { + repeated_field_->Add(val); + } + } + + private: + constexpr static bool kIsPod = std::is_pod::value; + RepeatedField* repeated_field_; + int index_; + int capacity_; + Element* buffer_; + + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FastAdder); + }; + + friend class TestRepeatedFieldHelper; + friend class ::google::protobuf::internal::ParseContext; }; template @@ -428,11 +563,8 @@ struct IsMovable // class TypeHandler { // public: // typedef MyType Type; -// // WeakType is almost always the same as MyType, but we use it in -// // ImplicitWeakTypeHandler. -// typedef MyType WeakType; // static Type* New(); -// static WeakType* NewFromPrototype(const WeakType* prototype, +// static Type* NewFromPrototype(const Type* prototype, // Arena* arena); // static void Delete(Type*); // static void Clear(Type*); @@ -445,12 +577,20 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { protected: RepeatedPtrFieldBase(); explicit RepeatedPtrFieldBase(Arena* arena); - ~RepeatedPtrFieldBase() {} + ~RepeatedPtrFieldBase() { +#ifndef NDEBUG + // Try to trigger segfault / asan failure in non-opt builds. If arena_ + // lifetime has ended before the destructor. + if (arena_) (void)arena_->SpaceAllocated(); +#endif + } + public: // Must be called from destructor. template void Destroy(); + protected: bool empty() const; int size() const; @@ -472,7 +612,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { // application code. template - const typename TypeHandler::WeakType& Get(int index) const; + const typename TypeHandler::Type& Get(int index) const; // Creates and adds an element using the given prototype, without introducing // a link-time dependency on the concrete message type. This method is used to @@ -574,10 +714,10 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { template PROTOBUF_NOINLINE void SwapFallback(RepeatedPtrFieldBase* other); - inline Arena* GetArenaNoVirtual() const { return arena_; } + inline Arena* GetArena() const { return arena_; } private: - static const int kInitialSize = 0; + static constexpr int kInitialSize = 0; // A few notes on internal representation: // // We use an indirected approach, with struct Rep, to keep @@ -596,9 +736,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { int allocated_size; void* elements[1]; }; - static const size_t kRepHeaderSize = sizeof(Rep) - sizeof(void*); - // Contains arena ptr and the elements array. We also keep the invariant that - // if rep_ is NULL, then arena is NULL. + static constexpr size_t kRepHeaderSize = sizeof(Rep) - sizeof(void*); Rep* rep_; template @@ -630,7 +768,7 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { // The reflection implementation needs to call protected methods directly, // reinterpreting pointers as being to Message instead of a specific Message // subclass. - friend class GeneratedMessageReflection; + friend class ::PROTOBUF_NAMESPACE_ID::Reflection; // ExtensionSet stores repeated message extensions as // RepeatedPtrField, but non-lite ExtensionSets need to implement @@ -647,12 +785,9 @@ class PROTOBUF_EXPORT RepeatedPtrFieldBase { // The table-driven MergePartialFromCodedStream implementation needs to // operate on RepeatedPtrField. friend class MergePartialFromCodedStreamHelper; - - // To parse directly into a proto2 generated class, the upb class GMR_Handlers - // needs to be able to modify a RepeatedPtrFieldBase directly. - friend class upb::google_opensource::GMR_Handlers; - friend class AccessorHelper; + template + friend struct google::protobuf::WeakRepeatedPtrField; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedPtrFieldBase); }; @@ -661,7 +796,6 @@ template class GenericTypeHandler { public: typedef GenericType Type; - typedef GenericType WeakType; using Movable = IsMovable; static inline GenericType* New(Arena* arena) { @@ -729,31 +863,21 @@ template <> void GenericTypeHandler::Merge(const std::string& from, std::string* to); -// Declarations of the specialization as we cannot define them here, as the -// header that defines ProtocolMessage depends on types defined in this header. -#define DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES(TypeName) \ - template <> \ - PROTOBUF_EXPORT TypeName* GenericTypeHandler::NewFromPrototype( \ - const TypeName* prototype, Arena* arena); \ - template <> \ - PROTOBUF_EXPORT Arena* GenericTypeHandler::GetArena( \ - TypeName* value); \ - template <> \ - PROTOBUF_EXPORT void* GenericTypeHandler::GetMaybeArenaPointer( \ - TypeName* value); - // Message specialization bodies defined in message.cc. This split is necessary // to allow proto2-lite (which includes this header) to be independent of // Message. -DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES(Message) - - -#undef DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES +template <> +PROTOBUF_EXPORT Message* GenericTypeHandler::NewFromPrototype( + const Message* prototype, Arena* arena); +template <> +PROTOBUF_EXPORT Arena* GenericTypeHandler::GetArena(Message* value); +template <> +PROTOBUF_EXPORT void* GenericTypeHandler::GetMaybeArenaPointer( + Message* value); class StringTypeHandler { public: typedef std::string Type; - typedef std::string WeakType; using Movable = IsMovable; static inline std::string* New(Arena* arena) { @@ -1017,20 +1141,19 @@ class RepeatedPtrField final : private internal::RepeatedPtrFieldBase { iterator erase(const_iterator first, const_iterator last); // Gets the arena on which this RepeatedPtrField stores its elements. - Arena* GetArena() const { return GetArenaNoVirtual(); } + inline Arena* GetArena() const; // For internal use only. // // This is public due to it being called by generated code. - using RepeatedPtrFieldBase::InternalSwap; + void InternalSwap(RepeatedPtrField* other) { + internal::RepeatedPtrFieldBase::InternalSwap(other); + } private: // Note: RepeatedPtrField SHOULD NOT be subclassed by users. class TypeHandler; - // Internal arena accessor expected by helpers in Arena. - inline Arena* GetArenaNoVirtual() 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() @@ -1041,7 +1164,9 @@ class RepeatedPtrField final : private internal::RepeatedPtrFieldBase { std::false_type); friend class Arena; - friend class MessageLite; + + template + friend struct WeakRepeatedPtrField; typedef void InternalArenaConstructable_; @@ -1051,15 +1176,15 @@ class RepeatedPtrField final : private internal::RepeatedPtrFieldBase { template inline RepeatedField::RepeatedField() - : current_size_(0), total_size_(0), ptr_(NULL) {} + : current_size_(0), total_size_(0), arena_or_elements_(nullptr) {} template inline RepeatedField::RepeatedField(Arena* arena) - : current_size_(0), total_size_(0), ptr_(arena) {} + : current_size_(0), total_size_(0), arena_or_elements_(arena) {} template inline RepeatedField::RepeatedField(const RepeatedField& other) - : current_size_(0), total_size_(0), ptr_(NULL) { + : current_size_(0), total_size_(0), arena_or_elements_(nullptr) { if (other.current_size_ != 0) { Reserve(other.size()); AddNAlreadyReserved(other.size()); @@ -1070,27 +1195,8 @@ inline RepeatedField::RepeatedField(const RepeatedField& other) template template RepeatedField::RepeatedField(Iter begin, const Iter& end) - : current_size_(0), total_size_(0), ptr_(NULL) { - int reserve = internal::CalculateReserve(begin, end); - if (reserve != -1) { - if (reserve == 0) { - return; - } - - Reserve(reserve); - // TODO(ckennelly): The compiler loses track of the buffer freshly - // allocated by Reserve() by the time we call elements, so it cannot - // guarantee that elements does not alias [begin(), end()). - // - // If restrict is available, annotating the pointer obtained from elements() - // causes this to lower to memcpy instead of memmove. - std::copy(begin, end, elements()); - current_size_ = reserve; - } else { - for (; begin != end; ++begin) { - Add(*begin); - } - } + : current_size_(0), total_size_(0), arena_or_elements_(nullptr) { + Add(begin, end); } template @@ -1113,7 +1219,7 @@ inline RepeatedField::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.GetArenaNoVirtual()) { + if (other.GetArena()) { CopyFrom(other); } else { InternalSwap(&other); @@ -1126,7 +1232,7 @@ inline RepeatedField& RepeatedField::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 (this->GetArenaNoVirtual() != other.GetArenaNoVirtual()) { + if (this->GetArena() != other.GetArena()) { CopyFrom(other); } else { InternalSwap(&other); @@ -1166,13 +1272,11 @@ template inline Element* RepeatedField::AddNAlreadyReserved(int n) { GOOGLE_DCHECK_GE(total_size_ - current_size_, n) << total_size_ << ", " << current_size_; - // Warning: sometimes people call this when n==0 and total_size_==0. This - // forces us to add this branch, to avoid reading the non-active union member - // (which is UB). Luckily the compiler is smart enough to optimize the branch - // away. - Element* ret = - total_size_ == 0 ? reinterpret_cast(ptr_.arena) : ptr_.elements; - ret += current_size_; + // Warning: sometimes people call this when n == 0 and total_size_ == 0. In + // this case the return pointer points to a zero size array (n == 0). Hence + // we can just use unsafe_elements(), because the user cannot dereference the + // pointer anyway. + Element* ret = unsafe_elements() + current_size_; current_size_ += n; return ret; } @@ -1224,14 +1328,43 @@ inline void RepeatedField::Set(int index, const Element& value) { template inline void RepeatedField::Add(const Element& value) { - if (current_size_ == total_size_) Reserve(total_size_ + 1); - elements()[current_size_++] = value; + uint32 size = current_size_; + if (static_cast(size) == total_size_) Reserve(total_size_ + 1); + elements()[size] = value; + current_size_ = size + 1; } template inline Element* RepeatedField::Add() { - if (current_size_ == total_size_) Reserve(total_size_ + 1); - return &elements()[current_size_++]; + uint32 size = current_size_; + if (static_cast(size) == total_size_) Reserve(total_size_ + 1); + auto ptr = &elements()[size]; + current_size_ = size + 1; + return ptr; +} + +template +template +inline void RepeatedField::Add(Iter begin, Iter end) { + int reserve = internal::CalculateReserve(begin, end); + if (reserve != -1) { + if (reserve == 0) { + return; + } + + Reserve(reserve + size()); + // TODO(ckennelly): The compiler loses track of the buffer freshly + // allocated by Reserve() by the time we call elements, so it cannot + // guarantee that elements does not alias [begin(), end()). + // + // If restrict is available, annotating the pointer obtained from elements() + // causes this to lower to memcpy instead of memmove. + std::copy(begin, end, elements() + size()); + current_size_ = reserve + size(); + } else { + FastAdder fast_adder(this); + for (; begin != end; ++begin) fast_adder.Add(*begin); + } } template @@ -1301,36 +1434,36 @@ inline typename RepeatedField::iterator RepeatedField::erase( template inline Element* RepeatedField::mutable_data() { - return total_size_ > 0 ? elements() : NULL; + return unsafe_elements(); } template inline const Element* RepeatedField::data() const { - return total_size_ > 0 ? elements() : NULL; -} - -template -inline const Element* RepeatedField::unsafe_data() const { - return elements(); + return unsafe_elements(); } template inline void RepeatedField::InternalSwap(RepeatedField* other) { GOOGLE_DCHECK(this != other); - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + GOOGLE_DCHECK(GetArena() == other->GetArena()); - std::swap(ptr_, other->ptr_); - std::swap(current_size_, other->current_size_); - std::swap(total_size_, other->total_size_); + // Swap all fields at once. + static_assert(std::is_standard_layout>::value, + "offsetof() requires standard layout before c++17"); + internal::memswaparena_or_elements_) - + offsetof(RepeatedField, current_size_)>( + reinterpret_cast(this) + offsetof(RepeatedField, current_size_), + reinterpret_cast(other) + offsetof(RepeatedField, current_size_)); } template void RepeatedField::Swap(RepeatedField* other) { if (this == other) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + if (GetArena() == other->GetArena()) { InternalSwap(other); } else { - RepeatedField temp(other->GetArenaNoVirtual()); + RepeatedField temp(other->GetArena()); temp.MergeFrom(*this); CopyFrom(*other); other->UnsafeArenaSwap(&temp); @@ -1352,31 +1485,31 @@ void RepeatedField::SwapElements(int index1, int index2) { template inline typename RepeatedField::iterator RepeatedField::begin() { - return total_size_ > 0 ? elements() : NULL; + return unsafe_elements(); } template inline typename RepeatedField::const_iterator RepeatedField::begin() const { - return total_size_ > 0 ? elements() : NULL; + return unsafe_elements(); } template inline typename RepeatedField::const_iterator RepeatedField::cbegin() const { - return total_size_ > 0 ? elements() : NULL; + return unsafe_elements(); } template inline typename RepeatedField::iterator RepeatedField::end() { - return total_size_ > 0 ? elements() + current_size_ : NULL; + return unsafe_elements() + current_size_; } template inline typename RepeatedField::const_iterator RepeatedField::end() const { - return total_size_ > 0 ? elements() + current_size_ : NULL; + return unsafe_elements() + current_size_; } template inline typename RepeatedField::const_iterator RepeatedField::cend() const { - return total_size_ > 0 ? elements() + current_size_ : NULL; + return unsafe_elements() + current_size_; } template @@ -1384,6 +1517,30 @@ inline size_t RepeatedField::SpaceUsedExcludingSelfLong() const { return total_size_ > 0 ? (total_size_ * sizeof(Element) + kRepHeaderSize) : 0; } +namespace internal { +// Returns the new size for a reserved field based on its 'total_size' and the +// requested 'new_size'. The result is clamped to the closed interval: +// [internal::kMinRepeatedFieldAllocationSize, +// std::numeric_limits::max()] +// Requires: +// new_size > total_size && +// (total_size == 0 || +// total_size >= kRepeatedFieldLowerClampLimit) +inline int CalculateReserveSize(int total_size, int new_size) { + if (new_size < kRepeatedFieldLowerClampLimit) { + // Clamp to smallest allowed size. + return kRepeatedFieldLowerClampLimit; + } + if (total_size < kRepeatedFieldUpperClampLimit) { + return std::max(total_size * 2, new_size); + } else { + // Clamp to largest allowed size. + GOOGLE_DCHECK_GT(new_size, kRepeatedFieldUpperClampLimit); + return std::numeric_limits::max(); + } +} +} // namespace internal + // Avoid inlining of Reserve(): new, copy, and delete[] lead to a significant // amount of code bloat. template @@ -1391,9 +1548,8 @@ void RepeatedField::Reserve(int new_size) { if (total_size_ >= new_size) return; Rep* old_rep = total_size_ > 0 ? rep() : NULL; Rep* new_rep; - Arena* arena = GetArenaNoVirtual(); - new_size = std::max(internal::kMinRepeatedFieldAllocationSize, - std::max(total_size_ * 2, new_size)); + Arena* arena = GetArena(); + new_size = internal::CalculateReserveSize(total_size_, new_size); GOOGLE_DCHECK_LE( static_cast(new_size), (std::numeric_limits::max() - kRepHeaderSize) / sizeof(Element)) @@ -1407,8 +1563,12 @@ void RepeatedField::Reserve(int new_size) { } new_rep->arena = arena; int old_total_size = total_size_; + // Already known: new_size >= internal::kMinRepeatedFieldAllocationSize + // Maintain invariant: + // total_size_ == 0 || + // total_size_ >= internal::kMinRepeatedFieldAllocationSize total_size_ = new_size; - ptr_.elements = new_rep->elements; + arena_or_elements_ = new_rep->elements; // Invoke placement-new on newly allocated elements. We shouldn't have to do // this, since Element is supposed to be POD, but a previous version of this // code allocated storage with "new Element[size]" and some code uses @@ -1501,7 +1661,7 @@ void RepeatedPtrFieldBase::Destroy() { template inline void RepeatedPtrFieldBase::Swap(RepeatedPtrFieldBase* other) { - if (other->GetArenaNoVirtual() == GetArenaNoVirtual()) { + if (other->GetArena() == GetArena()) { InternalSwap(other); } else { SwapFallback(other); @@ -1510,16 +1670,15 @@ inline void RepeatedPtrFieldBase::Swap(RepeatedPtrFieldBase* other) { template void RepeatedPtrFieldBase::SwapFallback(RepeatedPtrFieldBase* other) { - GOOGLE_DCHECK(other->GetArenaNoVirtual() != GetArenaNoVirtual()); + GOOGLE_DCHECK(other->GetArena() != GetArena()); // Copy semantics in this case. We try to improve efficiency by placing the - // temporary on |other|'s arena so that messages are copied cross-arena only - // once, not twice. - RepeatedPtrFieldBase temp(other->GetArenaNoVirtual()); + // temporary on |other|'s arena so that messages are copied twice rather than + // three times. + RepeatedPtrFieldBase temp(other->GetArena()); temp.MergeFrom(*this); this->Clear(); this->MergeFrom(*other); - other->Clear(); other->InternalSwap(&temp); temp.Destroy(); // Frees rep_ if `other` had no arena. } @@ -1529,7 +1688,7 @@ inline bool RepeatedPtrFieldBase::empty() const { return current_size_ == 0; } inline int RepeatedPtrFieldBase::size() const { return current_size_; } template -inline const typename TypeHandler::WeakType& RepeatedPtrFieldBase::Get( +inline const typename TypeHandler::Type& RepeatedPtrFieldBase::Get( int index) const { GOOGLE_DCHECK_GE(index, 0); GOOGLE_DCHECK_LT(index, current_size_); @@ -1656,18 +1815,18 @@ void RepeatedPtrFieldBase::MergeFromInnerLoop(void** our_elems, // to avoid a branch within the loop. for (int i = 0; i < already_allocated && i < length; i++) { // Already allocated: use existing element. - typename TypeHandler::WeakType* other_elem = - reinterpret_cast(other_elems[i]); - typename TypeHandler::WeakType* new_elem = - reinterpret_cast(our_elems[i]); + typename TypeHandler::Type* other_elem = + reinterpret_cast(other_elems[i]); + typename TypeHandler::Type* new_elem = + reinterpret_cast(our_elems[i]); TypeHandler::Merge(*other_elem, new_elem); } - Arena* arena = GetArenaNoVirtual(); + Arena* arena = GetArena(); for (int i = already_allocated; i < length; i++) { // Not allocated: alloc a new element first, then merge it. - typename TypeHandler::WeakType* other_elem = - reinterpret_cast(other_elems[i]); - typename TypeHandler::WeakType* new_elem = + typename TypeHandler::Type* other_elem = + reinterpret_cast(other_elems[i]); + typename TypeHandler::Type* new_elem = TypeHandler::NewFromPrototype(other_elem, arena); TypeHandler::Merge(*other_elem, new_elem); our_elems[i] = new_elem; @@ -1739,7 +1898,7 @@ void RepeatedPtrFieldBase::AddAllocatedInternal( typename TypeHandler::Type* value, std::true_type) { Arena* element_arena = reinterpret_cast(TypeHandler::GetMaybeArenaPointer(value)); - Arena* arena = GetArenaNoVirtual(); + Arena* arena = GetArena(); 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 least @@ -1838,7 +1997,7 @@ inline typename TypeHandler::Type* RepeatedPtrFieldBase::ReleaseLastInternal( // First, release an element. typename TypeHandler::Type* result = UnsafeArenaReleaseLast(); // Now perform a copy if we're on an arena. - Arena* arena = GetArenaNoVirtual(); + Arena* arena = GetArena(); if (arena == NULL) { return result; } else { @@ -1856,7 +2015,7 @@ inline typename TypeHandler::Type* RepeatedPtrFieldBase::ReleaseLastInternal( template inline typename TypeHandler::Type* RepeatedPtrFieldBase::ReleaseLastInternal( std::false_type) { - GOOGLE_DCHECK(GetArenaNoVirtual() == NULL) + GOOGLE_DCHECK(GetArena() == NULL) << "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."; @@ -1885,7 +2044,7 @@ inline int RepeatedPtrFieldBase::ClearedCount() const { template inline void RepeatedPtrFieldBase::AddCleared( typename TypeHandler::Type* value) { - GOOGLE_DCHECK(GetArenaNoVirtual() == NULL) + GOOGLE_DCHECK(GetArena() == NULL) << "AddCleared() can only be used on a RepeatedPtrField not on an arena."; GOOGLE_DCHECK(TypeHandler::GetArena(value) == NULL) << "AddCleared() can only accept values not on an arena."; @@ -1897,10 +2056,10 @@ inline void RepeatedPtrFieldBase::AddCleared( template inline typename TypeHandler::Type* RepeatedPtrFieldBase::ReleaseCleared() { - GOOGLE_DCHECK(GetArenaNoVirtual() == NULL) + GOOGLE_DCHECK(GetArena() == NULL) << "ReleaseCleared() can only be used on a RepeatedPtrField not on " << "an arena."; - GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); + GOOGLE_DCHECK(GetArena() == NULL); GOOGLE_DCHECK(rep_ != NULL); GOOGLE_DCHECK_GT(rep_->allocated_size, current_size_); return cast(rep_->elements[--rep_->allocated_size]); @@ -1964,7 +2123,7 @@ inline RepeatedPtrField::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.GetArenaNoVirtual()) { + if (other.GetArena()) { CopyFrom(other); } else { InternalSwap(&other); @@ -1977,7 +2136,7 @@ inline RepeatedPtrField& RepeatedPtrField::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 (this->GetArenaNoVirtual() != other.GetArenaNoVirtual()) { + if (this->GetArena() != other.GetArena()) { CopyFrom(other); } else { InternalSwap(&other); @@ -2063,7 +2222,7 @@ inline void RepeatedPtrField::ExtractSubrangeInternal( if (num > 0) { // Save the values of the removed elements if requested. if (elements != NULL) { - if (GetArenaNoVirtual() != NULL) { + if (GetArena() != NULL) { // If we're on an arena, we perform a copy for each element so that the // returned elements are heap-allocated. for (int i = 0; i < num; ++i) { @@ -2093,7 +2252,7 @@ inline void RepeatedPtrField::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(GetArenaNoVirtual() == NULL) + GOOGLE_DCHECK(GetArena() == NULL) << "ExtractSubrange() when arena is non-NULL is only supported when " << "the Element type supplies a MergeFrom() operation to make copies."; UnsafeArenaExtractSubrange(start, num, elements); @@ -2177,8 +2336,8 @@ inline void RepeatedPtrField::SwapElements(int index1, int index2) { } template -inline Arena* RepeatedPtrField::GetArenaNoVirtual() const { - return RepeatedPtrFieldBase::GetArenaNoVirtual(); +inline Arena* RepeatedPtrField::GetArena() const { + return RepeatedPtrFieldBase::GetArena(); } template @@ -2416,11 +2575,17 @@ class RepeatedPtrOverPtrsIterator { void RepeatedPtrFieldBase::InternalSwap(RepeatedPtrFieldBase* other) { GOOGLE_DCHECK(this != other); - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + GOOGLE_DCHECK(GetArena() == other->GetArena()); - std::swap(rep_, other->rep_); - std::swap(current_size_, other->current_size_); - std::swap(total_size_, other->total_size_); + // Swap all fields at once. + static_assert(std::is_standard_layout::value, + "offsetof() requires standard layout before c++17"); + internal::memswaprep_) - + offsetof(RepeatedPtrFieldBase, current_size_)>( + reinterpret_cast(this) + + offsetof(RepeatedPtrFieldBase, current_size_), + reinterpret_cast(other) + + offsetof(RepeatedPtrFieldBase, current_size_)); } } // namespace internal @@ -2650,15 +2815,16 @@ UnsafeArenaAllocatedRepeatedPtrFieldBackInserter( mutable_field); } -// Extern declarations of common instantiations to reduce libray bloat. -extern template class PROTOBUF_EXPORT RepeatedField; -extern template class PROTOBUF_EXPORT RepeatedField; -extern template class PROTOBUF_EXPORT RepeatedField; -extern template class PROTOBUF_EXPORT RepeatedField; -extern template class PROTOBUF_EXPORT RepeatedField; -extern template class PROTOBUF_EXPORT RepeatedField; -extern template class PROTOBUF_EXPORT RepeatedField; -extern template class PROTOBUF_EXPORT RepeatedPtrField; +// Extern declarations of common instantiations to reduce library bloat. +extern template class PROTOBUF_EXPORT_TEMPLATE_DECLARE RepeatedField; +extern template class PROTOBUF_EXPORT_TEMPLATE_DECLARE RepeatedField; +extern template class PROTOBUF_EXPORT_TEMPLATE_DECLARE RepeatedField; +extern template class PROTOBUF_EXPORT_TEMPLATE_DECLARE RepeatedField; +extern template class PROTOBUF_EXPORT_TEMPLATE_DECLARE RepeatedField; +extern template class PROTOBUF_EXPORT_TEMPLATE_DECLARE RepeatedField; +extern template class PROTOBUF_EXPORT_TEMPLATE_DECLARE RepeatedField; +extern template class PROTOBUF_EXPORT_TEMPLATE_DECLARE + RepeatedPtrField; } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/repeated_field_reflection_unittest.cc b/third_party/protobuf/src/google/protobuf/repeated_field_reflection_unittest.cc index 04991027..384d32f5 100644 --- a/third_party/protobuf/src/google/protobuf/repeated_field_reflection_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/repeated_field_reflection_unittest.cc @@ -52,11 +52,7 @@ namespace { static int Func(int i, int j) { return i * j; } -static std::string StrFunc(int i, int j) { - std::string str; - SStringPrintf(&str, "%d", Func(i, 4)); - return str; -} +static std::string StrFunc(int i, int j) { return StrCat(Func(i, 4)); } TEST(RepeatedFieldReflectionTest, RegularFields) { TestAllTypes message; @@ -344,7 +340,7 @@ TEST(RepeatedFieldReflectionTest, RepeatedFieldRefForRegularFields) { } EXPECT_EQ(10, index); - // Test iterator operators that are not ususally used in regular for-loops. + // Test iterator operators that are not usually used in regular for-loops. // Including: post increment, assign, ==. MessageIterator old_it = rf_foreign_message.begin(); MessageIterator new_it = old_it++; diff --git a/third_party/protobuf/src/google/protobuf/repeated_field_unittest.cc b/third_party/protobuf/src/google/protobuf/repeated_field_unittest.cc index 610cb91d..3d647827 100644 --- a/third_party/protobuf/src/google/protobuf/repeated_field_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/repeated_field_unittest.cc @@ -35,14 +35,17 @@ // TODO(kenton): Improve this unittest to bring it up to the standards of // other proto2 unittests. +#include + #include +#include +#include #include #include +#include #include #include -#include - #include #include #include @@ -50,9 +53,11 @@ #include #include #include - #include +// Must be included last. +#include + namespace google { namespace protobuf { namespace { @@ -268,6 +273,68 @@ TEST(RepeatedField, Resize) { EXPECT_TRUE(field.empty()); } +TEST(RepeatedField, ReserveNothing) { + RepeatedField field; + EXPECT_EQ(0, field.Capacity()); + + field.Reserve(-1); + EXPECT_EQ(0, field.Capacity()); +} + +TEST(RepeatedField, ReserveLowerClamp) { + const int clamped_value = internal::CalculateReserveSize(0, 1); + EXPECT_EQ(internal::kRepeatedFieldLowerClampLimit, clamped_value); + EXPECT_EQ(clamped_value, internal::CalculateReserveSize(clamped_value, 2)); +} + +TEST(RepeatedField, ReserveGrowth) { + // Make sure the field capacity doubles in size on repeated reservation. + for (int size = internal::kRepeatedFieldLowerClampLimit, i = 0; i < 4; + ++i, size *= 2) { + EXPECT_EQ(size * 2, internal::CalculateReserveSize(size, size + 1)); + } +} + +TEST(RepeatedField, ReserveLarge) { + const int old_size = 10; + // This is a size we won't get by doubling: + const int new_size = old_size * 3 + 1; + + // Reserving more than 2x current capacity should grow directly to that size. + EXPECT_EQ(new_size, internal::CalculateReserveSize(old_size, new_size)); +} + +TEST(RepeatedField, ReserveHuge) { + // Largest value that does not clamp to the large limit: + constexpr int non_clamping_limit = std::numeric_limits::max() / 2; + ASSERT_LT(2 * non_clamping_limit, std::numeric_limits::max()); + EXPECT_LT(internal::CalculateReserveSize(non_clamping_limit, + non_clamping_limit + 1), + std::numeric_limits::max()); + + // Smallest size that *will* clamp to the upper limit: + constexpr int min_clamping_size = std::numeric_limits::max() / 2 + 1; + EXPECT_EQ( + internal::CalculateReserveSize(min_clamping_size, min_clamping_size + 1), + std::numeric_limits::max()); + +#ifdef PROTOBUF_TEST_ALLOW_LARGE_ALLOC + // The rest of this test may allocate several GB of memory, so it is only + // built if explicitly requested. + RepeatedField huge_field; + + // Reserve a size for huge_field that will clamp. + huge_field.Reserve(min_clamping_size); + EXPECT_GE(huge_field.Capacity(), min_clamping_size); + ASSERT_LT(huge_field.Capacity(), std::numeric_limits::max() - 1); + + // Allocation may return more memory than we requested. However, the updated + // size must still be clamped to a valid range. + huge_field.Reserve(huge_field.Capacity() + 1); + EXPECT_EQ(huge_field.Capacity(), std::numeric_limits::max()); +#endif // PROTOBUF_TEST_ALLOW_LARGE_ALLOC +} + TEST(RepeatedField, MergeFrom) { RepeatedField source, destination; source.Add(4); @@ -343,6 +410,71 @@ TEST(RepeatedField, Erase) { EXPECT_EQ(8, me.Get(2)); } +// Add contents of empty container to an empty field. +TEST(RepeatedField, AddRange1) { + RepeatedField me; + std::vector values; + + me.Add(values.begin(), values.end()); + ASSERT_EQ(me.size(), 0); +} + +// Add contents of container with one thing to an empty field. +TEST(RepeatedField, AddRange2) { + RepeatedField me; + std::vector values; + values.push_back(-1); + + me.Add(values.begin(), values.end()); + ASSERT_EQ(me.size(), 1); + ASSERT_EQ(me.Get(0), values[0]); +} + +// Add contents of container with more than one thing to an empty field. +TEST(RepeatedField, AddRange3) { + RepeatedField me; + std::vector values; + values.push_back(0); + values.push_back(1); + + me.Add(values.begin(), values.end()); + ASSERT_EQ(me.size(), 2); + ASSERT_EQ(me.Get(0), values[0]); + ASSERT_EQ(me.Get(1), values[1]); +} + +// Add contents of container with more than one thing to a non-empty field. +TEST(RepeatedField, AddRange4) { + RepeatedField me; + me.Add(0); + me.Add(1); + + std::vector values; + values.push_back(2); + values.push_back(3); + + me.Add(values.begin(), values.end()); + ASSERT_EQ(me.size(), 4); + ASSERT_EQ(me.Get(0), 0); + ASSERT_EQ(me.Get(1), 1); + ASSERT_EQ(me.Get(2), values[0]); + ASSERT_EQ(me.Get(3), values[1]); +} + +// Add contents of a stringstream in order to test code paths where there is +// an input iterator. +TEST(RepeatedField, AddRange5) { + RepeatedField me; + + std::stringstream ss; + ss << 1 << ' ' << 2; + + me.Add(std::istream_iterator(ss), std::istream_iterator()); + ASSERT_EQ(me.size(), 2); + ASSERT_EQ(me.Get(0), 1); + ASSERT_EQ(me.Get(1), 2); +} + TEST(RepeatedField, CopyConstruct) { RepeatedField source; source.Add(1); @@ -1634,7 +1766,6 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, UninitializedConstPtrIterator) { // string // - i.e. *iter has type std::string*. struct StringLessThan { - bool operator()(const std::string* z, const std::string& y) { return *z < y; } bool operator()(const std::string* z, const std::string* y) const { return *z < *y; } @@ -1770,7 +1901,9 @@ class RepeatedFieldInsertionIteratorsTest : public testing::Test { } virtual void TearDown() { - STLDeleteContainerPointers(nested_ptrs.begin(), nested_ptrs.end()); + for (auto ptr : nested_ptrs) { + delete ptr; + } } }; diff --git a/third_party/protobuf/src/google/protobuf/service.h b/third_party/protobuf/src/google/protobuf/service.h index d6b4ab82..b18a8039 100644 --- a/third_party/protobuf/src/google/protobuf/service.h +++ b/third_party/protobuf/src/google/protobuf/service.h @@ -33,7 +33,7 @@ // Sanjay Ghemawat, Jeff Dean, and others. // // DEPRECATED: This module declares the abstract interfaces underlying proto2 -// RPC services. These are intented to be independent of any particular RPC +// RPC services. These are intended to be independent of any particular RPC // implementation, so that proto2 services can be used on top of a variety // of implementations. Starting with version 2.3.0, RPC implementations should // not try to build on these, but should instead provide code generator plugins diff --git a/third_party/protobuf/src/google/protobuf/source_context.pb.cc b/third_party/protobuf/src/google/protobuf/source_context.pb.cc index 50a5c0e4..9f09bec1 100644 --- a/third_party/protobuf/src/google/protobuf/source_context.pb.cc +++ b/third_party/protobuf/src/google/protobuf/source_context.pb.cc @@ -5,7 +5,6 @@ #include -#include #include #include #include @@ -33,7 +32,7 @@ static void InitDefaultsscc_info_SourceContext_google_2fprotobuf_2fsource_5fcont } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto}, {}}; static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto[1]; static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto = nullptr; @@ -55,7 +54,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_), }; -const char descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto[] = +const char descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n$google/protobuf/source_context.proto\022\017" "google.protobuf\"\"\n\rSourceContext\022\021\n\tfile" "_name\030\001 \001(\tB\225\001\n\023com.google.protobufB\022Sou" @@ -70,42 +69,38 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_goo &scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_once; -static bool descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto = { - &descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto, "google/protobuf/source_context.proto", 251, + false, false, descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto, "google/protobuf/source_context.proto", 251, &descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_once, descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_sccs, descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_deps, 1, 0, schemas, file_default_instances, TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto, file_level_service_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_google_2fprotobuf_2fsource_5fcontext_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto), true); +static bool dynamic_init_dummy_google_2fprotobuf_2fsource_5fcontext_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto)), true); PROTOBUF_NAMESPACE_OPEN // =================================================================== void SourceContext::InitAsDefaultInstance() { } -class SourceContext::HasBitSetters { +class SourceContext::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int SourceContext::kFileNameFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -SourceContext::SourceContext() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { +SourceContext::SourceContext(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.SourceContext) + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:google.protobuf.SourceContext) } SourceContext::SourceContext(const SourceContext& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.file_name().size() > 0) { - file_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.file_name_); + if (!from._internal_file_name().empty()) { + file_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_file_name(), + GetArena()); } // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceContext) } @@ -118,12 +113,20 @@ void SourceContext::SharedCtor() { SourceContext::~SourceContext() { // @@protoc_insertion_point(destructor:google.protobuf.SourceContext) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void SourceContext::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); file_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } +void SourceContext::ArenaDtor(void* object) { + SourceContext* _this = reinterpret_cast< SourceContext* >(object); + (void)_this; +} +void SourceContext::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} void SourceContext::SetCachedSize(int size) const { _cached_size_.Set(size); } @@ -139,13 +142,13 @@ void SourceContext::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - file_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - _internal_metadata_.Clear(); + file_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* SourceContext::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -154,7 +157,9 @@ const char* SourceContext::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ // string file_name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_file_name(), ptr, ctx, "google.protobuf.SourceContext.file_name"); + auto str = _internal_mutable_file_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.SourceContext.file_name")); CHK_(ptr); } else goto handle_unusual; continue; @@ -164,7 +169,9 @@ const char* SourceContext::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -177,78 +184,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool SourceContext::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.SourceContext) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string file_name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_file_name())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->file_name().data(), static_cast(this->file_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.SourceContext.file_name")); - } else { - goto handle_unusual; - } - break; - } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.SourceContext) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.SourceContext) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void SourceContext::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.SourceContext) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string file_name = 1; - if (this->file_name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->file_name().data(), static_cast(this->file_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.SourceContext.file_name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->file_name(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.SourceContext) -} - -::PROTOBUF_NAMESPACE_ID::uint8* SourceContext::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* SourceContext::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -256,17 +194,16 @@ void SourceContext::SerializeWithCachedSizes( // string file_name = 1; if (this->file_name().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->file_name().data(), static_cast(this->file_name().length()), + this->_internal_file_name().data(), static_cast(this->_internal_file_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.SourceContext.file_name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->file_name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_file_name(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceContext) return target; @@ -276,11 +213,6 @@ size_t SourceContext::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceContext) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -289,9 +221,13 @@ size_t SourceContext::ByteSizeLong() const { if (this->file_name().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->file_name()); + this->_internal_file_name()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -315,13 +251,12 @@ void SourceContext::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void SourceContext::MergeFrom(const SourceContext& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceContext) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.file_name().size() > 0) { - - file_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.file_name_); + _internal_set_file_name(from._internal_file_name()); } } @@ -343,15 +278,10 @@ bool SourceContext::IsInitialized() const { return true; } -void SourceContext::Swap(SourceContext* other) { - if (other == this) return; - InternalSwap(other); -} void SourceContext::InternalSwap(SourceContext* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - file_name_.Swap(&other->file_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + file_name_.Swap(&other->file_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } ::PROTOBUF_NAMESPACE_ID::Metadata SourceContext::GetMetadata() const { @@ -363,7 +293,7 @@ void SourceContext::InternalSwap(SourceContext* other) { PROTOBUF_NAMESPACE_CLOSE PROTOBUF_NAMESPACE_OPEN template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::SourceContext* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::SourceContext >(Arena* arena) { - return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::SourceContext >(arena); + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::SourceContext >(arena); } PROTOBUF_NAMESPACE_CLOSE diff --git a/third_party/protobuf/src/google/protobuf/source_context.pb.h b/third_party/protobuf/src/google/protobuf/source_context.pb.h index 9ef68699..f30cbe04 100644 --- a/third_party/protobuf/src/google/protobuf/source_context.pb.h +++ b/third_party/protobuf/src/google/protobuf/source_context.pb.h @@ -8,12 +8,12 @@ #include #include -#if PROTOBUF_VERSION < 3008000 +#if PROTOBUF_VERSION < 3012000 #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 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3012004 < 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. @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include // IWYU pragma: export @@ -66,10 +66,10 @@ PROTOBUF_NAMESPACE_OPEN // =================================================================== -class PROTOBUF_EXPORT SourceContext : +class PROTOBUF_EXPORT SourceContext PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceContext) */ { public: - SourceContext(); + inline SourceContext() : SourceContext(nullptr) {}; virtual ~SourceContext(); SourceContext(const SourceContext& from); @@ -83,7 +83,7 @@ class PROTOBUF_EXPORT SourceContext : return *this; } inline SourceContext& operator=(SourceContext&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -110,10 +110,22 @@ class PROTOBUF_EXPORT SourceContext : static constexpr int kIndexInFileMessages = 0; - void Swap(SourceContext* other); friend void swap(SourceContext& a, SourceContext& b) { a.Swap(&b); } + inline void Swap(SourceContext* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SourceContext* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -132,16 +144,9 @@ class PROTOBUF_EXPORT SourceContext : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -153,13 +158,11 @@ class PROTOBUF_EXPORT SourceContext : static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.SourceContext"; } + protected: + explicit SourceContext(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -175,9 +178,11 @@ class PROTOBUF_EXPORT SourceContext : // accessors ------------------------------------------------------- + enum : int { + kFileNameFieldNumber = 1, + }; // string file_name = 1; void clear_file_name(); - static const int kFileNameFieldNumber = 1; const std::string& file_name() const; void set_file_name(const std::string& value); void set_file_name(std::string&& value); @@ -186,12 +191,28 @@ class PROTOBUF_EXPORT SourceContext : std::string* mutable_file_name(); std::string* release_file_name(); void set_allocated_file_name(std::string* file_name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_file_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_file_name( + std::string* file_name); + private: + const std::string& _internal_file_name() const; + void _internal_set_file_name(const std::string& value); + std::string* _internal_mutable_file_name(); + public: // @@protoc_insertion_point(class_scope:google.protobuf.SourceContext) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template 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_; friend struct ::TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto; @@ -209,44 +230,54 @@ class PROTOBUF_EXPORT SourceContext : // string file_name = 1; inline void SourceContext::clear_file_name() { - file_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + file_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& SourceContext::file_name() const { // @@protoc_insertion_point(field_get:google.protobuf.SourceContext.file_name) - return file_name_.GetNoArena(); + return _internal_file_name(); } inline void SourceContext::set_file_name(const std::string& value) { - - file_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + _internal_set_file_name(value); // @@protoc_insertion_point(field_set:google.protobuf.SourceContext.file_name) } +inline std::string* SourceContext::mutable_file_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.SourceContext.file_name) + return _internal_mutable_file_name(); +} +inline const std::string& SourceContext::_internal_file_name() const { + return file_name_.Get(); +} +inline void SourceContext::_internal_set_file_name(const std::string& value) { + + file_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void SourceContext::set_file_name(std::string&& value) { - file_name_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + file_name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.SourceContext.file_name) } inline void SourceContext::set_file_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - file_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + file_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.SourceContext.file_name) } -inline void SourceContext::set_file_name(const char* value, size_t size) { +inline void SourceContext::set_file_name(const char* value, + size_t size) { - file_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + file_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceContext.file_name) } -inline std::string* SourceContext::mutable_file_name() { +inline std::string* SourceContext::_internal_mutable_file_name() { - // @@protoc_insertion_point(field_mutable:google.protobuf.SourceContext.file_name) - return file_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return file_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* SourceContext::release_file_name() { // @@protoc_insertion_point(field_release:google.protobuf.SourceContext.file_name) - - return file_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + return file_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void SourceContext::set_allocated_file_name(std::string* file_name) { if (file_name != nullptr) { @@ -254,9 +285,29 @@ inline void SourceContext::set_allocated_file_name(std::string* file_name) { } else { } - file_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), file_name); + file_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), file_name, + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceContext.file_name) } +inline std::string* SourceContext::unsafe_arena_release_file_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.SourceContext.file_name) + GOOGLE_DCHECK(GetArena() != nullptr); + + return file_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void SourceContext::unsafe_arena_set_allocated_file_name( + std::string* file_name) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (file_name != nullptr) { + + } else { + + } + file_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + file_name, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.SourceContext.file_name) +} #ifdef __GNUC__ #pragma GCC diagnostic pop diff --git a/third_party/protobuf/src/google/protobuf/struct.pb.cc b/third_party/protobuf/src/google/protobuf/struct.pb.cc index b7028f08..027fef6f 100644 --- a/third_party/protobuf/src/google/protobuf/struct.pb.cc +++ b/third_party/protobuf/src/google/protobuf/struct.pb.cc @@ -5,7 +5,6 @@ #include -#include #include #include #include @@ -69,7 +68,7 @@ static void InitDefaultsscc_info_ListValue_google_2fprotobuf_2fstruct_2eproto() } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ListValue_google_2fprotobuf_2fstruct_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ListValue_google_2fprotobuf_2fstruct_2eproto}, {}}; static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fstruct_2eproto[4]; static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[1]; @@ -124,7 +123,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_), }; -const char descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto[] = +const char descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\034google/protobuf/struct.proto\022\017google.p" "rotobuf\"\204\001\n\006Struct\0223\n\006fields\030\001 \003(\0132#.goo" "gle.protobuf.Struct.FieldsEntry\032E\n\013Field" @@ -149,16 +148,15 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_goo &scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fstruct_2eproto_once; -static bool descriptor_table_google_2fprotobuf_2fstruct_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fstruct_2eproto = { - &descriptor_table_google_2fprotobuf_2fstruct_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto, "google/protobuf/struct.proto", 641, + false, false, descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto, "google/protobuf/struct.proto", 641, &descriptor_table_google_2fprotobuf_2fstruct_2eproto_once, descriptor_table_google_2fprotobuf_2fstruct_2eproto_sccs, descriptor_table_google_2fprotobuf_2fstruct_2eproto_deps, 1, 0, schemas, file_default_instances, TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fstruct_2eproto, 4, file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto, file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_google_2fprotobuf_2fstruct_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fstruct_2eproto), true); +static bool dynamic_init_dummy_google_2fprotobuf_2fstruct_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fstruct_2eproto)), true); PROTOBUF_NAMESPACE_OPEN const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NullValue_descriptor() { ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fstruct_2eproto); @@ -195,31 +193,20 @@ void Struct_FieldsEntry_DoNotUse::MergeFrom( void Struct::InitAsDefaultInstance() { } -class Struct::HasBitSetters { +class Struct::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Struct::kFieldsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Struct::Struct() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.Struct) -} Struct::Struct(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), fields_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Struct) } Struct::Struct(const Struct& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); fields_.MergeFrom(from.fields_); // @@protoc_insertion_point(copy_constructor:google.protobuf.Struct) } @@ -231,10 +218,11 @@ void Struct::SharedCtor() { Struct::~Struct() { // @@protoc_insertion_point(destructor:google.protobuf.Struct) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Struct::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void Struct::ArenaDtor(void* object) { @@ -259,13 +247,12 @@ void Struct::Clear() { (void) cached_has_bits; fields_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Struct::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -280,7 +267,7 @@ const char* Struct::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int ptr = ctx->ParseMessage(&fields_, ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); } else goto handle_unusual; continue; default: { @@ -289,7 +276,9 @@ const char* Struct::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -302,124 +291,15 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Struct::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.Struct) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // map fields = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - Struct_FieldsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< - Struct_FieldsEntry_DoNotUse, - std::string, PROTOBUF_NAMESPACE_ID::Value, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, - 0 >, - ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value > > parser(&fields_); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( - input, &parser)); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - parser.key().data(), static_cast(parser.key().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Struct.FieldsEntry.key")); - } else { - goto handle_unusual; - } - break; - } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.Struct) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.Struct) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Struct::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.Struct) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // map fields = 1; - if (!this->fields().empty()) { - typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_pointer - ConstPtr; - typedef ConstPtr SortItem; - typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; - struct Utf8Check { - static void Check(ConstPtr p) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - p->first.data(), static_cast(p->first.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Struct.FieldsEntry.key"); - } - }; - - if (output->IsSerializationDeterministic() && - this->fields().size() > 1) { - ::std::unique_ptr items( - new SortItem[this->fields().size()]); - typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::size_type size_type; - size_type n = 0; - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator - it = this->fields().begin(); - it != this->fields().end(); ++it, ++n) { - items[static_cast(n)] = SortItem(&*it); - } - ::std::sort(&items[0], &items[static_cast(n)], Less()); - for (size_type i = 0; i < n; i++) { - Struct_FieldsEntry_DoNotUse::MapEntryWrapper entry(nullptr, items[static_cast(i)]->first, items[static_cast(i)]->second); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(1, entry, output); - Utf8Check::Check(&(*items[static_cast(i)])); - } - } else { - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator - it = this->fields().begin(); - it != this->fields().end(); ++it) { - Struct_FieldsEntry_DoNotUse::MapEntryWrapper entry(nullptr, it->first, it->second); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(1, entry, output); - Utf8Check::Check(&(*it)); - } - } - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.Struct) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Struct::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Struct::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Struct) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // map fields = 1; - if (!this->fields().empty()) { + if (!this->_internal_fields().empty()) { typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_pointer ConstPtr; typedef ConstPtr SortItem; @@ -433,37 +313,35 @@ void Struct::SerializeWithCachedSizes( } }; - if (false && - this->fields().size() > 1) { + if (stream->IsSerializationDeterministic() && + this->_internal_fields().size() > 1) { ::std::unique_ptr items( - new SortItem[this->fields().size()]); + new SortItem[this->_internal_fields().size()]); typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::size_type size_type; size_type n = 0; for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator - it = this->fields().begin(); - it != this->fields().end(); ++it, ++n) { + it = this->_internal_fields().begin(); + it != this->_internal_fields().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); } ::std::sort(&items[0], &items[static_cast(n)], Less()); for (size_type i = 0; i < n; i++) { - Struct_FieldsEntry_DoNotUse::MapEntryWrapper entry(nullptr, items[static_cast(i)]->first, items[static_cast(i)]->second); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(1, entry, target); + target = Struct_FieldsEntry_DoNotUse::Funcs::InternalSerialize(1, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); Utf8Check::Check(&(*items[static_cast(i)])); } } else { for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator - it = this->fields().begin(); - it != this->fields().end(); ++it) { - Struct_FieldsEntry_DoNotUse::MapEntryWrapper entry(nullptr, it->first, it->second); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(1, entry, target); + it = this->_internal_fields().begin(); + it != this->_internal_fields().end(); ++it) { + target = Struct_FieldsEntry_DoNotUse::Funcs::InternalSerialize(1, it->first, it->second, target, stream); Utf8Check::Check(&(*it)); } } } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Struct) return target; @@ -473,26 +351,23 @@ size_t Struct::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Struct) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // map fields = 1; total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->fields_size()); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_fields_size()); for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator - it = this->fields().begin(); - it != this->fields().end(); ++it) { - Struct_FieldsEntry_DoNotUse::MapEntryWrapper entry(nullptr, it->first, it->second); - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - MessageSizeNoVirtual(entry); + it = this->_internal_fields().begin(); + it != this->_internal_fields().end(); ++it) { + total_size += Struct_FieldsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -516,7 +391,7 @@ void Struct::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Struct::MergeFrom(const Struct& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Struct) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -541,28 +416,9 @@ bool Struct::IsInitialized() const { return true; } -void Struct::Swap(Struct* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - Struct* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void Struct::UnsafeArenaSwap(Struct* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void Struct::InternalSwap(Struct* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); fields_.Swap(&other->fields_); } @@ -584,22 +440,22 @@ void Value::InitAsDefaultInstance() { PROTOBUF_NAMESPACE_ID::_Value_default_instance_.list_value_ = const_cast< PROTOBUF_NAMESPACE_ID::ListValue*>( PROTOBUF_NAMESPACE_ID::ListValue::internal_default_instance()); } -class Value::HasBitSetters { +class Value::_Internal { public: static const PROTOBUF_NAMESPACE_ID::Struct& struct_value(const Value* msg); static const PROTOBUF_NAMESPACE_ID::ListValue& list_value(const Value* msg); }; const PROTOBUF_NAMESPACE_ID::Struct& -Value::HasBitSetters::struct_value(const Value* msg) { +Value::_Internal::struct_value(const Value* msg) { return *msg->kind_.struct_value_; } const PROTOBUF_NAMESPACE_ID::ListValue& -Value::HasBitSetters::list_value(const Value* msg) { +Value::_Internal::list_value(const Value* msg) { return *msg->kind_.list_value_; } void Value::set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct* struct_value) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); clear_kind(); if (struct_value) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = @@ -614,7 +470,7 @@ void Value::set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct* struct_val // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.struct_value) } void Value::set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue* list_value) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); clear_kind(); if (list_value) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = @@ -628,55 +484,39 @@ void Value::set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue* list_valu } // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.list_value) } -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Value::kNullValueFieldNumber; -const int Value::kNumberValueFieldNumber; -const int Value::kStringValueFieldNumber; -const int Value::kBoolValueFieldNumber; -const int Value::kStructValueFieldNumber; -const int Value::kListValueFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Value::Value() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.Value) -} Value::Value(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Value) } Value::Value(const Value& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); clear_has_kind(); switch (from.kind_case()) { case kNullValue: { - set_null_value(from.null_value()); + _internal_set_null_value(from._internal_null_value()); break; } case kNumberValue: { - set_number_value(from.number_value()); + _internal_set_number_value(from._internal_number_value()); break; } case kStringValue: { - set_string_value(from.string_value()); + _internal_set_string_value(from._internal_string_value()); break; } case kBoolValue: { - set_bool_value(from.bool_value()); + _internal_set_bool_value(from._internal_bool_value()); break; } case kStructValue: { - mutable_struct_value()->PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from.struct_value()); + _internal_mutable_struct_value()->PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from._internal_struct_value()); break; } case kListValue: { - mutable_list_value()->PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from.list_value()); + _internal_mutable_list_value()->PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from._internal_list_value()); break; } case KIND_NOT_SET: { @@ -694,10 +534,11 @@ void Value::SharedCtor() { Value::~Value() { // @@protoc_insertion_point(destructor:google.protobuf.Value) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Value::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); if (has_kind()) { clear_kind(); } @@ -730,8 +571,7 @@ void Value::clear_kind() { break; } case kStringValue: { - kind_.string_value_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + kind_.string_value_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); break; } case kBoolValue: { @@ -739,13 +579,13 @@ void Value::clear_kind() { break; } case kStructValue: { - if (GetArenaNoVirtual() == nullptr) { + if (GetArena() == nullptr) { delete kind_.struct_value_; } break; } case kListValue: { - if (GetArenaNoVirtual() == nullptr) { + if (GetArena() == nullptr) { delete kind_.list_value_; } break; @@ -765,13 +605,12 @@ void Value::Clear() { (void) cached_has_bits; clear_kind(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -780,43 +619,45 @@ const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte // .google.protobuf.NullValue null_value = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - set_null_value(static_cast(val)); + _internal_set_null_value(static_cast(val)); } else goto handle_unusual; continue; // double number_value = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 17)) { - set_number_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); + _internal_set_number_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(double); } else goto handle_unusual; continue; // string string_value = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_string_value(), ptr, ctx, "google.protobuf.Value.string_value"); + auto str = _internal_mutable_string_value(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Value.string_value")); CHK_(ptr); } else goto handle_unusual; continue; // bool bool_value = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - set_bool_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + _internal_set_bool_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; // .google.protobuf.Struct struct_value = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { - ptr = ctx->ParseMessage(mutable_struct_value(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_struct_value(), ptr); CHK_(ptr); } else goto handle_unusual; continue; // .google.protobuf.ListValue list_value = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { - ptr = ctx->ParseMessage(mutable_list_value(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_list_value(), ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -826,7 +667,9 @@ const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -839,218 +682,61 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Value::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.Value) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.protobuf.NullValue null_value = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - int value = 0; - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_null_value(static_cast< PROTOBUF_NAMESPACE_ID::NullValue >(value)); - } else { - goto handle_unusual; - } - break; - } - // double number_value = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (17 & 0xFF)) { - clear_kind(); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( - input, &kind_.number_value_))); - set_has_number_value(); - } else { - goto handle_unusual; - } - break; - } - - // string string_value = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_string_value())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->string_value().data(), static_cast(this->string_value().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Value.string_value")); - } else { - goto handle_unusual; - } - break; - } - - // bool bool_value = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { - clear_kind(); - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &kind_.bool_value_))); - set_has_bool_value(); - } else { - goto handle_unusual; - } - break; - } - - // .google.protobuf.Struct struct_value = 5; - case 5: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_struct_value())); - } else { - goto handle_unusual; - } - break; - } - - // .google.protobuf.ListValue list_value = 6; - case 6: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_list_value())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.Value) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.Value) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Value::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.Value) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // .google.protobuf.NullValue null_value = 1; - if (has_null_value()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( - 1, this->null_value(), output); - } - - // double number_value = 2; - if (has_number_value()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(2, this->number_value(), output); - } - - // string string_value = 3; - if (has_string_value()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->string_value().data(), static_cast(this->string_value().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Value.string_value"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 3, this->string_value(), output); - } - - // bool bool_value = 4; - if (has_bool_value()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->bool_value(), output); - } - - // .google.protobuf.Struct struct_value = 5; - if (has_struct_value()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 5, HasBitSetters::struct_value(this), output); - } - - // .google.protobuf.ListValue list_value = 6; - if (has_list_value()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 6, HasBitSetters::list_value(this), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.Value) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Value::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Value::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Value) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .google.protobuf.NullValue null_value = 1; - if (has_null_value()) { + if (_internal_has_null_value()) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 1, this->null_value(), target); + 1, this->_internal_null_value(), target); } // double number_value = 2; - if (has_number_value()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(2, this->number_value(), target); + if (_internal_has_number_value()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(2, this->_internal_number_value(), target); } // string string_value = 3; - if (has_string_value()) { + if (_internal_has_string_value()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->string_value().data(), static_cast(this->string_value().length()), + this->_internal_string_value().data(), static_cast(this->_internal_string_value().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Value.string_value"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 3, this->string_value(), target); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_string_value(), target); } // bool bool_value = 4; - if (has_bool_value()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->bool_value(), target); + if (_internal_has_bool_value()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_bool_value(), target); } // .google.protobuf.Struct struct_value = 5; - if (has_struct_value()) { + if (_internal_has_struct_value()) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 5, HasBitSetters::struct_value(this), target); + InternalWriteMessage( + 5, _Internal::struct_value(this), target, stream); } // .google.protobuf.ListValue list_value = 6; - if (has_list_value()) { + if (_internal_has_list_value()) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 6, HasBitSetters::list_value(this), target); + InternalWriteMessage( + 6, _Internal::list_value(this), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Value) return target; @@ -1060,11 +746,6 @@ size_t Value::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Value) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1073,7 +754,7 @@ size_t Value::ByteSizeLong() const { // .google.protobuf.NullValue null_value = 1; case kNullValue: { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->null_value()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_null_value()); break; } // double number_value = 2; @@ -1085,7 +766,7 @@ size_t Value::ByteSizeLong() const { case kStringValue: { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->string_value()); + this->_internal_string_value()); break; } // bool bool_value = 4; @@ -1111,6 +792,10 @@ size_t Value::ByteSizeLong() const { break; } } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -1134,33 +819,33 @@ void Value::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Value::MergeFrom(const Value& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Value) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; switch (from.kind_case()) { case kNullValue: { - set_null_value(from.null_value()); + _internal_set_null_value(from._internal_null_value()); break; } case kNumberValue: { - set_number_value(from.number_value()); + _internal_set_number_value(from._internal_number_value()); break; } case kStringValue: { - set_string_value(from.string_value()); + _internal_set_string_value(from._internal_string_value()); break; } case kBoolValue: { - set_bool_value(from.bool_value()); + _internal_set_bool_value(from._internal_bool_value()); break; } case kStructValue: { - mutable_struct_value()->PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from.struct_value()); + _internal_mutable_struct_value()->PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from._internal_struct_value()); break; } case kListValue: { - mutable_list_value()->PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from.list_value()); + _internal_mutable_list_value()->PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from._internal_list_value()); break; } case KIND_NOT_SET: { @@ -1187,28 +872,9 @@ bool Value::IsInitialized() const { return true; } -void Value::Swap(Value* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - Value* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void Value::UnsafeArenaSwap(Value* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void Value::InternalSwap(Value* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(kind_, other->kind_); swap(_oneof_case_[0], other->_oneof_case_[0]); } @@ -1222,22 +888,12 @@ void Value::InternalSwap(Value* other) { void ListValue::InitAsDefaultInstance() { } -class ListValue::HasBitSetters { +class ListValue::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ListValue::kValuesFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -ListValue::ListValue() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.ListValue) -} ListValue::ListValue(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), values_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -1245,9 +901,8 @@ ListValue::ListValue(::PROTOBUF_NAMESPACE_ID::Arena* arena) } ListValue::ListValue(const ListValue& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), values_(from.values_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:google.protobuf.ListValue) } @@ -1258,10 +913,11 @@ void ListValue::SharedCtor() { ListValue::~ListValue() { // @@protoc_insertion_point(destructor:google.protobuf.ListValue) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void ListValue::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void ListValue::ArenaDtor(void* object) { @@ -1286,13 +942,12 @@ void ListValue::Clear() { (void) cached_has_bits; values_.Clear(); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* ListValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -1304,10 +959,10 @@ const char* ListValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_values(), ptr); + ptr = ctx->ParseMessage(_internal_add_values(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); } else goto handle_unusual; continue; default: { @@ -1316,7 +971,9 @@ const char* ListValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -1329,88 +986,24 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool ListValue::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.ListValue) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.protobuf.Value values = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_values())); - } else { - goto handle_unusual; - } - break; - } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.ListValue) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.ListValue) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void ListValue::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.ListValue) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .google.protobuf.Value values = 1; - for (unsigned int i = 0, - n = static_cast(this->values_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, - this->values(static_cast(i)), - output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.ListValue) -} - -::PROTOBUF_NAMESPACE_ID::uint8* ListValue::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* ListValue::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ListValue) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.Value values = 1; for (unsigned int i = 0, - n = static_cast(this->values_size()); i < n; i++) { + n = static_cast(this->_internal_values_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 1, this->values(static_cast(i)), target); + InternalWriteMessage(1, this->_internal_values(i), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ListValue) return target; @@ -1420,26 +1013,21 @@ size_t ListValue::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ListValue) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.Value values = 1; - { - unsigned int count = static_cast(this->values_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->values(static_cast(i))); - } + total_size += 1UL * this->_internal_values_size(); + for (const auto& msg : this->values_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -1463,7 +1051,7 @@ void ListValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void ListValue::MergeFrom(const ListValue& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ListValue) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1488,29 +1076,10 @@ bool ListValue::IsInitialized() const { return true; } -void ListValue::Swap(ListValue* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - ListValue* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void ListValue::UnsafeArenaSwap(ListValue* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void ListValue::InternalSwap(ListValue* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - CastToBase(&values_)->InternalSwap(CastToBase(&other->values_)); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + values_.InternalSwap(&other->values_); } ::PROTOBUF_NAMESPACE_ID::Metadata ListValue::GetMetadata() const { diff --git a/third_party/protobuf/src/google/protobuf/struct.pb.h b/third_party/protobuf/src/google/protobuf/struct.pb.h index b5c78bd0..160304da 100644 --- a/third_party/protobuf/src/google/protobuf/struct.pb.h +++ b/third_party/protobuf/src/google/protobuf/struct.pb.h @@ -8,12 +8,12 @@ #include #include -#if PROTOBUF_VERSION < 3008000 +#if PROTOBUF_VERSION < 3012000 #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 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3012004 < 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. @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include // IWYU pragma: export @@ -122,7 +122,7 @@ public: void MergeFrom(const Struct_FieldsEntry_DoNotUse& other); static const Struct_FieldsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Struct_FieldsEntry_DoNotUse_default_instance_); } static bool ValidateKey(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), s->size(), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.Struct.FieldsEntry.key"); + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.Struct.FieldsEntry.key"); } static bool ValidateValue(void*) { return true; } void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; @@ -138,10 +138,10 @@ public: // ------------------------------------------------------------------- -class PROTOBUF_EXPORT Struct : +class PROTOBUF_EXPORT Struct PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Struct) */ { public: - Struct(); + inline Struct() : Struct(nullptr) {}; virtual ~Struct(); Struct(const Struct& from); @@ -155,7 +155,7 @@ class PROTOBUF_EXPORT Struct : return *this; } inline Struct& operator=(Struct&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -163,12 +163,6 @@ class PROTOBUF_EXPORT Struct : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -188,11 +182,22 @@ class PROTOBUF_EXPORT Struct : static constexpr int kIndexInFileMessages = 1; - void UnsafeArenaSwap(Struct* other); - void Swap(Struct* other); friend void swap(Struct& a, Struct& b) { a.Swap(&b); } + inline void Swap(Struct* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Struct* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -211,16 +216,9 @@ class PROTOBUF_EXPORT Struct : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -237,13 +235,6 @@ class PROTOBUF_EXPORT Struct : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -260,10 +251,21 @@ class PROTOBUF_EXPORT Struct : // accessors ------------------------------------------------------- + enum : int { + kFieldsFieldNumber = 1, + }; // map fields = 1; int fields_size() const; + private: + int _internal_fields_size() const; + public: void clear_fields(); - static const int kFieldsFieldNumber = 1; + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >& + _internal_fields() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >* + _internal_mutable_fields(); + public: const ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >& fields() const; ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >* @@ -271,9 +273,8 @@ class PROTOBUF_EXPORT Struct : // @@protoc_insertion_point(class_scope:google.protobuf.Struct) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -288,10 +289,10 @@ class PROTOBUF_EXPORT Struct : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT Value : +class PROTOBUF_EXPORT Value PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Value) */ { public: - Value(); + inline Value() : Value(nullptr) {}; virtual ~Value(); Value(const Value& from); @@ -305,7 +306,7 @@ class PROTOBUF_EXPORT Value : return *this; } inline Value& operator=(Value&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -313,12 +314,6 @@ class PROTOBUF_EXPORT Value : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -348,11 +343,22 @@ class PROTOBUF_EXPORT Value : static constexpr int kIndexInFileMessages = 2; - void UnsafeArenaSwap(Value* other); - void Swap(Value* other); friend void swap(Value& a, Value& b) { a.Swap(&b); } + inline void Swap(Value* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Value* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -371,16 +377,9 @@ class PROTOBUF_EXPORT Value : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -397,13 +396,6 @@ class PROTOBUF_EXPORT Value : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -419,30 +411,43 @@ class PROTOBUF_EXPORT Value : // accessors ------------------------------------------------------- + enum : int { + kNullValueFieldNumber = 1, + kNumberValueFieldNumber = 2, + kStringValueFieldNumber = 3, + kBoolValueFieldNumber = 4, + kStructValueFieldNumber = 5, + kListValueFieldNumber = 6, + }; // .google.protobuf.NullValue null_value = 1; private: - bool has_null_value() const; + bool _internal_has_null_value() const; public: void clear_null_value(); - static const int kNullValueFieldNumber = 1; PROTOBUF_NAMESPACE_ID::NullValue null_value() const; void set_null_value(PROTOBUF_NAMESPACE_ID::NullValue value); + private: + PROTOBUF_NAMESPACE_ID::NullValue _internal_null_value() const; + void _internal_set_null_value(PROTOBUF_NAMESPACE_ID::NullValue value); + public: // double number_value = 2; private: - bool has_number_value() const; + bool _internal_has_number_value() const; public: void clear_number_value(); - static const int kNumberValueFieldNumber = 2; double number_value() const; void set_number_value(double value); + private: + double _internal_number_value() const; + void _internal_set_number_value(double value); + public: // string string_value = 3; private: - bool has_string_value() const; + bool _internal_has_string_value() const; public: void clear_string_value(); - static const int kStringValueFieldNumber = 3; const std::string& string_value() const; void set_string_value(const std::string& value); void set_string_value(std::string&& value); @@ -460,36 +465,56 @@ class PROTOBUF_EXPORT Value : " future release.") void unsafe_arena_set_allocated_string_value( std::string* string_value); + private: + const std::string& _internal_string_value() const; + void _internal_set_string_value(const std::string& value); + std::string* _internal_mutable_string_value(); + public: // bool bool_value = 4; private: - bool has_bool_value() const; + bool _internal_has_bool_value() const; public: void clear_bool_value(); - static const int kBoolValueFieldNumber = 4; bool bool_value() const; void set_bool_value(bool value); + private: + bool _internal_bool_value() const; + void _internal_set_bool_value(bool value); + public: // .google.protobuf.Struct struct_value = 5; bool has_struct_value() const; + private: + bool _internal_has_struct_value() const; + public: void clear_struct_value(); - static const int kStructValueFieldNumber = 5; const PROTOBUF_NAMESPACE_ID::Struct& struct_value() const; PROTOBUF_NAMESPACE_ID::Struct* release_struct_value(); PROTOBUF_NAMESPACE_ID::Struct* mutable_struct_value(); void set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct* struct_value); + private: + const PROTOBUF_NAMESPACE_ID::Struct& _internal_struct_value() const; + PROTOBUF_NAMESPACE_ID::Struct* _internal_mutable_struct_value(); + public: void unsafe_arena_set_allocated_struct_value( PROTOBUF_NAMESPACE_ID::Struct* struct_value); PROTOBUF_NAMESPACE_ID::Struct* unsafe_arena_release_struct_value(); // .google.protobuf.ListValue list_value = 6; bool has_list_value() const; + private: + bool _internal_has_list_value() const; + public: void clear_list_value(); - static const int kListValueFieldNumber = 6; const PROTOBUF_NAMESPACE_ID::ListValue& list_value() const; PROTOBUF_NAMESPACE_ID::ListValue* release_list_value(); PROTOBUF_NAMESPACE_ID::ListValue* mutable_list_value(); void set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue* list_value); + private: + const PROTOBUF_NAMESPACE_ID::ListValue& _internal_list_value() const; + PROTOBUF_NAMESPACE_ID::ListValue* _internal_mutable_list_value(); + public: void unsafe_arena_set_allocated_list_value( PROTOBUF_NAMESPACE_ID::ListValue* list_value); PROTOBUF_NAMESPACE_ID::ListValue* unsafe_arena_release_list_value(); @@ -498,7 +523,7 @@ class PROTOBUF_EXPORT Value : KindCase kind_case() const; // @@protoc_insertion_point(class_scope:google.protobuf.Value) private: - class HasBitSetters; + class _Internal; void set_has_null_value(); void set_has_number_value(); void set_has_string_value(); @@ -509,7 +534,6 @@ class PROTOBUF_EXPORT Value : inline bool has_kind() const; inline void clear_has_kind(); - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -529,10 +553,10 @@ class PROTOBUF_EXPORT Value : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT ListValue : +class PROTOBUF_EXPORT ListValue PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ListValue) */ { public: - ListValue(); + inline ListValue() : ListValue(nullptr) {}; virtual ~ListValue(); ListValue(const ListValue& from); @@ -546,7 +570,7 @@ class PROTOBUF_EXPORT ListValue : return *this; } inline ListValue& operator=(ListValue&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -554,12 +578,6 @@ class PROTOBUF_EXPORT ListValue : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -579,11 +597,22 @@ class PROTOBUF_EXPORT ListValue : static constexpr int kIndexInFileMessages = 3; - void UnsafeArenaSwap(ListValue* other); - void Swap(ListValue* other); friend void swap(ListValue& a, ListValue& b) { a.Swap(&b); } + inline void Swap(ListValue* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ListValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -602,16 +631,9 @@ class PROTOBUF_EXPORT ListValue : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -628,13 +650,6 @@ class PROTOBUF_EXPORT ListValue : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -650,13 +665,22 @@ class PROTOBUF_EXPORT ListValue : // accessors ------------------------------------------------------- + enum : int { + kValuesFieldNumber = 1, + }; // repeated .google.protobuf.Value values = 1; int values_size() const; + private: + int _internal_values_size() const; + public: void clear_values(); - static const int kValuesFieldNumber = 1; PROTOBUF_NAMESPACE_ID::Value* mutable_values(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Value >* mutable_values(); + private: + const PROTOBUF_NAMESPACE_ID::Value& _internal_values(int index) const; + PROTOBUF_NAMESPACE_ID::Value* _internal_add_values(); + public: const PROTOBUF_NAMESPACE_ID::Value& values(int index) const; PROTOBUF_NAMESPACE_ID::Value* add_values(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Value >& @@ -664,9 +688,8 @@ class PROTOBUF_EXPORT ListValue : // @@protoc_insertion_point(class_scope:google.protobuf.ListValue) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -688,21 +711,32 @@ class PROTOBUF_EXPORT ListValue : // Struct // map fields = 1; -inline int Struct::fields_size() const { +inline int Struct::_internal_fields_size() const { return fields_.size(); } +inline int Struct::fields_size() const { + return _internal_fields_size(); +} inline void Struct::clear_fields() { fields_.Clear(); } inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >& +Struct::_internal_fields() const { + return fields_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >& Struct::fields() const { // @@protoc_insertion_point(field_map:google.protobuf.Struct.fields) - return fields_.GetMap(); + return _internal_fields(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >* +Struct::_internal_mutable_fields() { + return fields_.MutableMap(); } inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >* Struct::mutable_fields() { // @@protoc_insertion_point(field_mutable_map:google.protobuf.Struct.fields) - return fields_.MutableMap(); + return _internal_mutable_fields(); } // ------------------------------------------------------------------- @@ -710,119 +744,139 @@ Struct::mutable_fields() { // Value // .google.protobuf.NullValue null_value = 1; -inline bool Value::has_null_value() const { +inline bool Value::_internal_has_null_value() const { return kind_case() == kNullValue; } inline void Value::set_has_null_value() { _oneof_case_[0] = kNullValue; } inline void Value::clear_null_value() { - if (has_null_value()) { + if (_internal_has_null_value()) { kind_.null_value_ = 0; clear_has_kind(); } } -inline PROTOBUF_NAMESPACE_ID::NullValue Value::null_value() const { - // @@protoc_insertion_point(field_get:google.protobuf.Value.null_value) - if (has_null_value()) { +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 >(0); } -inline void Value::set_null_value(PROTOBUF_NAMESPACE_ID::NullValue value) { - if (!has_null_value()) { +inline PROTOBUF_NAMESPACE_ID::NullValue Value::null_value() const { + // @@protoc_insertion_point(field_get:google.protobuf.Value.null_value) + return _internal_null_value(); +} +inline void Value::_internal_set_null_value(PROTOBUF_NAMESPACE_ID::NullValue value) { + if (!_internal_has_null_value()) { clear_kind(); set_has_null_value(); } kind_.null_value_ = value; +} +inline void Value::set_null_value(PROTOBUF_NAMESPACE_ID::NullValue value) { // @@protoc_insertion_point(field_set:google.protobuf.Value.null_value) + _internal_set_null_value(value); } // double number_value = 2; -inline bool Value::has_number_value() const { +inline bool Value::_internal_has_number_value() const { return kind_case() == kNumberValue; } inline void Value::set_has_number_value() { _oneof_case_[0] = kNumberValue; } inline void Value::clear_number_value() { - if (has_number_value()) { + if (_internal_has_number_value()) { kind_.number_value_ = 0; clear_has_kind(); } } -inline double Value::number_value() const { - // @@protoc_insertion_point(field_get:google.protobuf.Value.number_value) - if (has_number_value()) { +inline double Value::_internal_number_value() const { + if (_internal_has_number_value()) { return kind_.number_value_; } return 0; } -inline void Value::set_number_value(double value) { - if (!has_number_value()) { +inline void Value::_internal_set_number_value(double value) { + if (!_internal_has_number_value()) { clear_kind(); set_has_number_value(); } kind_.number_value_ = value; +} +inline double Value::number_value() const { + // @@protoc_insertion_point(field_get:google.protobuf.Value.number_value) + return _internal_number_value(); +} +inline void Value::set_number_value(double value) { + _internal_set_number_value(value); // @@protoc_insertion_point(field_set:google.protobuf.Value.number_value) } // string string_value = 3; -inline bool Value::has_string_value() const { +inline bool Value::_internal_has_string_value() const { return kind_case() == kStringValue; } inline void Value::set_has_string_value() { _oneof_case_[0] = kStringValue; } inline void Value::clear_string_value() { - if (has_string_value()) { - kind_.string_value_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + if (_internal_has_string_value()) { + kind_.string_value_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); clear_has_kind(); } } inline const std::string& Value::string_value() const { // @@protoc_insertion_point(field_get:google.protobuf.Value.string_value) - if (has_string_value()) { + return _internal_string_value(); +} +inline void Value::set_string_value(const std::string& value) { + _internal_set_string_value(value); + // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value) +} +inline std::string* Value::mutable_string_value() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Value.string_value) + return _internal_mutable_string_value(); +} +inline const std::string& Value::_internal_string_value() const { + if (_internal_has_string_value()) { return kind_.string_value_.Get(); } return *&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } -inline void Value::set_string_value(const std::string& value) { - if (!has_string_value()) { +inline void Value::_internal_set_string_value(const std::string& value) { + if (!_internal_has_string_value()) { clear_kind(); set_has_string_value(); kind_.string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } - kind_.string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, - GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value) + kind_.string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); } inline void Value::set_string_value(std::string&& value) { // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value) - if (!has_string_value()) { + if (!_internal_has_string_value()) { clear_kind(); set_has_string_value(); kind_.string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } kind_.string_value_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Value.string_value) } inline void Value::set_string_value(const char* value) { GOOGLE_DCHECK(value != nullptr); - if (!has_string_value()) { + if (!_internal_has_string_value()) { clear_kind(); set_has_string_value(); kind_.string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } kind_.string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(value), GetArenaNoVirtual()); + ::std::string(value), GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Value.string_value) } inline void Value::set_string_value(const char* value, size_t size) { - if (!has_string_value()) { + if (!_internal_has_string_value()) { clear_kind(); set_has_string_value(); kind_.string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -830,25 +884,22 @@ inline void Value::set_string_value(const char* value, kind_.string_value_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Value.string_value) } -inline std::string* Value::mutable_string_value() { - if (!has_string_value()) { +inline std::string* Value::_internal_mutable_string_value() { + if (!_internal_has_string_value()) { clear_kind(); set_has_string_value(); kind_.string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } - return kind_.string_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - // @@protoc_insertion_point(field_mutable:google.protobuf.Value.string_value) + return kind_.string_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Value::release_string_value() { // @@protoc_insertion_point(field_release:google.protobuf.Value.string_value) - if (has_string_value()) { + if (_internal_has_string_value()) { clear_has_kind(); - return kind_.string_value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + return kind_.string_value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } else { return nullptr; } @@ -865,67 +916,76 @@ inline void Value::set_allocated_string_value(std::string* string_value) { } inline std::string* Value::unsafe_arena_release_string_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.string_value) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); - if (has_string_value()) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (_internal_has_string_value()) { clear_has_kind(); return kind_.string_value_.UnsafeArenaRelease( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } else { return nullptr; } } inline void Value::unsafe_arena_set_allocated_string_value(std::string* string_value) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); - if (!has_string_value()) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (!_internal_has_string_value()) { kind_.string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } clear_kind(); if (string_value) { set_has_string_value(); - kind_.string_value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), string_value, GetArenaNoVirtual()); + kind_.string_value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), string_value, GetArena()); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.string_value) } // bool bool_value = 4; -inline bool Value::has_bool_value() const { +inline bool Value::_internal_has_bool_value() const { return kind_case() == kBoolValue; } inline void Value::set_has_bool_value() { _oneof_case_[0] = kBoolValue; } inline void Value::clear_bool_value() { - if (has_bool_value()) { + if (_internal_has_bool_value()) { kind_.bool_value_ = false; clear_has_kind(); } } -inline bool Value::bool_value() const { - // @@protoc_insertion_point(field_get:google.protobuf.Value.bool_value) - if (has_bool_value()) { +inline bool Value::_internal_bool_value() const { + if (_internal_has_bool_value()) { return kind_.bool_value_; } return false; } -inline void Value::set_bool_value(bool value) { - if (!has_bool_value()) { +inline void Value::_internal_set_bool_value(bool value) { + if (!_internal_has_bool_value()) { clear_kind(); set_has_bool_value(); } kind_.bool_value_ = value; +} +inline bool Value::bool_value() const { + // @@protoc_insertion_point(field_get:google.protobuf.Value.bool_value) + return _internal_bool_value(); +} +inline void Value::set_bool_value(bool value) { + _internal_set_bool_value(value); // @@protoc_insertion_point(field_set:google.protobuf.Value.bool_value) } // .google.protobuf.Struct struct_value = 5; -inline bool Value::has_struct_value() const { +inline bool Value::_internal_has_struct_value() const { return kind_case() == kStructValue; } +inline bool Value::has_struct_value() const { + return _internal_has_struct_value(); +} inline void Value::set_has_struct_value() { _oneof_case_[0] = kStructValue; } inline void Value::clear_struct_value() { - if (has_struct_value()) { - if (GetArenaNoVirtual() == nullptr) { + if (_internal_has_struct_value()) { + if (GetArena() == nullptr) { delete kind_.struct_value_; } clear_has_kind(); @@ -933,10 +993,10 @@ inline void Value::clear_struct_value() { } inline PROTOBUF_NAMESPACE_ID::Struct* Value::release_struct_value() { // @@protoc_insertion_point(field_release:google.protobuf.Value.struct_value) - if (has_struct_value()) { + if (_internal_has_struct_value()) { clear_has_kind(); PROTOBUF_NAMESPACE_ID::Struct* temp = kind_.struct_value_; - if (GetArenaNoVirtual() != nullptr) { + if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } kind_.struct_value_ = nullptr; @@ -945,15 +1005,18 @@ inline PROTOBUF_NAMESPACE_ID::Struct* Value::release_struct_value() { return nullptr; } } -inline const PROTOBUF_NAMESPACE_ID::Struct& Value::struct_value() const { - // @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value) - return has_struct_value() +inline const PROTOBUF_NAMESPACE_ID::Struct& Value::_internal_struct_value() const { + return _internal_has_struct_value() ? *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 { + // @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value) + return _internal_struct_value(); +} inline PROTOBUF_NAMESPACE_ID::Struct* Value::unsafe_arena_release_struct_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.struct_value) - if (has_struct_value()) { + if (_internal_has_struct_value()) { clear_has_kind(); PROTOBUF_NAMESPACE_ID::Struct* temp = kind_.struct_value_; kind_.struct_value_ = nullptr; @@ -970,27 +1033,32 @@ inline void Value::unsafe_arena_set_allocated_struct_value(PROTOBUF_NAMESPACE_ID } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.struct_value) } -inline PROTOBUF_NAMESPACE_ID::Struct* Value::mutable_struct_value() { - if (!has_struct_value()) { +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 >( - GetArenaNoVirtual()); + kind_.struct_value_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Struct >(GetArena()); } - // @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value) return kind_.struct_value_; } +inline PROTOBUF_NAMESPACE_ID::Struct* Value::mutable_struct_value() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value) + return _internal_mutable_struct_value(); +} // .google.protobuf.ListValue list_value = 6; -inline bool Value::has_list_value() const { +inline bool Value::_internal_has_list_value() const { return kind_case() == kListValue; } +inline bool Value::has_list_value() const { + return _internal_has_list_value(); +} inline void Value::set_has_list_value() { _oneof_case_[0] = kListValue; } inline void Value::clear_list_value() { - if (has_list_value()) { - if (GetArenaNoVirtual() == nullptr) { + if (_internal_has_list_value()) { + if (GetArena() == nullptr) { delete kind_.list_value_; } clear_has_kind(); @@ -998,10 +1066,10 @@ inline void Value::clear_list_value() { } inline PROTOBUF_NAMESPACE_ID::ListValue* Value::release_list_value() { // @@protoc_insertion_point(field_release:google.protobuf.Value.list_value) - if (has_list_value()) { + if (_internal_has_list_value()) { clear_has_kind(); PROTOBUF_NAMESPACE_ID::ListValue* temp = kind_.list_value_; - if (GetArenaNoVirtual() != nullptr) { + if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } kind_.list_value_ = nullptr; @@ -1010,15 +1078,18 @@ inline PROTOBUF_NAMESPACE_ID::ListValue* Value::release_list_value() { return nullptr; } } -inline const PROTOBUF_NAMESPACE_ID::ListValue& Value::list_value() const { - // @@protoc_insertion_point(field_get:google.protobuf.Value.list_value) - return has_list_value() +inline const PROTOBUF_NAMESPACE_ID::ListValue& Value::_internal_list_value() const { + return _internal_has_list_value() ? *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 { + // @@protoc_insertion_point(field_get:google.protobuf.Value.list_value) + return _internal_list_value(); +} inline PROTOBUF_NAMESPACE_ID::ListValue* Value::unsafe_arena_release_list_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.list_value) - if (has_list_value()) { + if (_internal_has_list_value()) { clear_has_kind(); PROTOBUF_NAMESPACE_ID::ListValue* temp = kind_.list_value_; kind_.list_value_ = nullptr; @@ -1035,16 +1106,18 @@ inline void Value::unsafe_arena_set_allocated_list_value(PROTOBUF_NAMESPACE_ID:: } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.list_value) } -inline PROTOBUF_NAMESPACE_ID::ListValue* Value::mutable_list_value() { - if (!has_list_value()) { +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 >( - GetArenaNoVirtual()); + kind_.list_value_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::ListValue >(GetArena()); } - // @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value) return kind_.list_value_; } +inline PROTOBUF_NAMESPACE_ID::ListValue* Value::mutable_list_value() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value) + return _internal_mutable_list_value(); +} inline bool Value::has_kind() const { return kind_case() != KIND_NOT_SET; @@ -1060,9 +1133,12 @@ inline Value::KindCase Value::kind_case() const { // ListValue // repeated .google.protobuf.Value values = 1; -inline int ListValue::values_size() const { +inline int ListValue::_internal_values_size() const { return values_.size(); } +inline int ListValue::values_size() const { + return _internal_values_size(); +} inline void ListValue::clear_values() { values_.Clear(); } @@ -1075,13 +1151,19 @@ ListValue::mutable_values() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values) return &values_; } +inline const PROTOBUF_NAMESPACE_ID::Value& ListValue::_internal_values(int index) const { + return values_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::Value& ListValue::values(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.ListValue.values) - return values_.Get(index); + return _internal_values(index); +} +inline PROTOBUF_NAMESPACE_ID::Value* ListValue::_internal_add_values() { + return values_.Add(); } inline PROTOBUF_NAMESPACE_ID::Value* ListValue::add_values() { // @@protoc_insertion_point(field_add:google.protobuf.ListValue.values) - return values_.Add(); + return _internal_add_values(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Value >& ListValue::values() const { diff --git a/third_party/protobuf/src/google/protobuf/stubs/bytestream.h b/third_party/protobuf/src/google/protobuf/stubs/bytestream.h index 29a9fbe7..0193301a 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/bytestream.h +++ b/third_party/protobuf/src/google/protobuf/stubs/bytestream.h @@ -83,7 +83,7 @@ class PROTOBUF_EXPORT ByteSink { // Appends the "n" bytes starting at "bytes". virtual void Append(const char* bytes, size_t n) = 0; - // Flushes internal buffers. The default implemenation does nothing. ByteSink + // Flushes internal buffers. The default implementation does nothing. ByteSink // subclasses may use internal buffers that require calling Flush() at the end // of the stream. virtual void Flush(); @@ -274,7 +274,7 @@ class PROTOBUF_EXPORT StringByteSink : public ByteSink { class PROTOBUF_EXPORT NullByteSink : public ByteSink { public: NullByteSink() {} - virtual void Append(const char *data, size_t n) override {} + void Append(const char* /*data*/, size_t /*n*/) override {} private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(NullByteSink); diff --git a/third_party/protobuf/src/google/protobuf/stubs/callback.h b/third_party/protobuf/src/google/protobuf/stubs/callback.h index ab4a3aae..b7a3a829 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/callback.h +++ b/third_party/protobuf/src/google/protobuf/stubs/callback.h @@ -68,7 +68,7 @@ namespace protobuf { // Also note that the arguments cannot be references: // void Foo(const string& s); // string my_str; -// NewCallback(&Foo, my_str); // WON'T WORK: Can't use referecnes. +// NewCallback(&Foo, my_str); // WON'T WORK: Can't use references. // However, correctly-typed pointers will work just fine. class PROTOBUF_EXPORT Closure { public: diff --git a/third_party/protobuf/src/google/protobuf/stubs/casts.h b/third_party/protobuf/src/google/protobuf/stubs/casts.h index b509f68c..83750bd7 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/casts.h +++ b/third_party/protobuf/src/google/protobuf/stubs/casts.h @@ -31,13 +31,15 @@ #ifndef GOOGLE_PROTOBUF_CASTS_H__ #define GOOGLE_PROTOBUF_CASTS_H__ -#include - #include +#include +#include + namespace google { namespace protobuf { namespace internal { + // Use implicit_cast as a safe version of static_cast or const_cast // for upcasting in the type hierarchy (i.e. casting a pointer to Foo // to a pointer to SuperclassOfFoo or casting a pointer to Foo to @@ -88,7 +90,7 @@ inline To down_cast(From* f) { // so we only accept pointers implicit_cast(0); } -#if !defined(NDEBUG) && !defined(GOOGLE_PROTOBUF_NO_RTTI) +#if !defined(NDEBUG) && PROTOBUF_RTTI assert(f == nullptr || dynamic_cast(f) != nullptr); // RTTI: debug mode only! #endif return static_cast(f); @@ -105,7 +107,7 @@ inline To down_cast(From& f) { implicit_cast(0); } -#if !defined(NDEBUG) && !defined(GOOGLE_PROTOBUF_NO_RTTI) +#if !defined(NDEBUG) && PROTOBUF_RTTI // RTTI: debug mode only! assert(dynamic_cast(&f) != nullptr); #endif @@ -131,4 +133,7 @@ using internal::bit_cast; } // namespace protobuf } // namespace google + +#include + #endif // GOOGLE_PROTOBUF_CASTS_H__ diff --git a/third_party/protobuf/src/google/protobuf/stubs/common.cc b/third_party/protobuf/src/google/protobuf/stubs/common.cc index ff9a32d5..4db493b7 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/common.cc +++ b/third_party/protobuf/src/google/protobuf/stubs/common.cc @@ -39,7 +39,9 @@ #include #ifdef _WIN32 +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN // We only need minimal includes +#endif #include #define snprintf _snprintf // see comment in strutil.cc #elif defined(HAVE_PTHREAD) @@ -53,7 +55,6 @@ #include #include -#include #include #include #include @@ -316,52 +317,6 @@ uint32 ghtonl(uint32 x) { return result; } -// =================================================================== -// Shutdown support. - -namespace internal { - -struct ShutdownData { - ~ShutdownData() { - std::reverse(functions.begin(), functions.end()); - for (auto pair : functions) pair.first(pair.second); - } - - static ShutdownData* get() { - static auto* data = new ShutdownData; - return data; - } - - std::vector> functions; - Mutex mutex; -}; - -static void RunZeroArgFunc(const void* arg) { - void (*func)() = reinterpret_cast(const_cast(arg)); - func(); -} - -void OnShutdown(void (*func)()) { - OnShutdownRun(RunZeroArgFunc, reinterpret_cast(func)); -} - -void OnShutdownRun(void (*f)(const void*), const void* arg) { - auto shutdown_data = ShutdownData::get(); - MutexLock lock(&shutdown_data->mutex); - shutdown_data->functions.push_back(std::make_pair(f, arg)); -} - -} // namespace internal - -void ShutdownProtobufLibrary() { - // This function should be called only once, but accepts multiple calls. - static bool is_shutdown = false; - if (!is_shutdown) { - delete internal::ShutdownData::get(); - is_shutdown = true; - } -} - #if PROTOBUF_USE_EXCEPTIONS FatalException::~FatalException() throw() {} diff --git a/third_party/protobuf/src/google/protobuf/stubs/common.h b/third_party/protobuf/src/google/protobuf/stubs/common.h index 29efde1d..7bdd7aaf 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/common.h +++ b/third_party/protobuf/src/google/protobuf/stubs/common.h @@ -81,7 +81,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 3008000 +#define GOOGLE_PROTOBUF_VERSION 3012004 // A suffix string for alpha, beta or rc releases. Empty for stable releases. #define GOOGLE_PROTOBUF_VERSION_SUFFIX "" @@ -89,15 +89,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 = 3008000; +static const int kMinHeaderVersionForLibrary = 3012000; // The minimum protoc version which works with the current version of the // headers. -#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 3008000 +#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 3012000 // The minimum header version which works with the current version of // protoc. This constant should only be used in VerifyVersion(). -static const int kMinHeaderVersionForProtoc = 3008000; +static const int kMinHeaderVersionForProtoc = 3012000; // Verifies that the headers and libraries are compatible. Use the macro // below to call this. @@ -133,7 +133,7 @@ inline bool IsStructurallyValidUTF8(const std::string& str) { return IsStructurallyValidUTF8(str.data(), static_cast(str.length())); } -// Returns initial number of bytes of structually valid UTF-8. +// Returns initial number of bytes of structurally valid UTF-8. PROTOBUF_EXPORT int UTF8SpnStructurallyValid(const StringPiece& str); // Coerce UTF-8 byte string in src_str to be @@ -154,37 +154,18 @@ PROTOBUF_EXPORT char* UTF8CoerceToStructurallyValid(const StringPiece& str, } // namespace internal - -// =================================================================== -// Shutdown support. - -// Shut down the entire protocol buffers library, deleting all static-duration -// objects allocated by the library or by generated .pb.cc files. -// -// There are two reasons you might want to call this: -// * You use a draconian definition of "memory leak" in which you expect -// every single malloc() to have a corresponding free(), even for objects -// which live until program exit. -// * You are writing a dynamically-loaded library which needs to clean up -// after itself when the library is unloaded. -// -// It is safe to call this multiple times. However, it is not safe to use -// any other part of the protocol buffers library after -// ShutdownProtobufLibrary() has been called. Furthermore this call is not -// thread safe, user needs to synchronize multiple calls. +// This lives in message_lite.h now, but we leave this here for any users that +// #include common.h and not message_lite.h. PROTOBUF_EXPORT void ShutdownProtobufLibrary(); namespace internal { -// Register a function to be called when ShutdownProtocolBuffers() is called. -PROTOBUF_EXPORT void OnShutdown(void (*func)()); -// Run an arbitrary function on an arg -PROTOBUF_EXPORT void OnShutdownRun(void (*f)(const void*), const void* arg); - +// Strongly references the given variable such that the linker will be forced +// to pull in this variable's translation unit. template -T* OnShutdownDelete(T* p) { - OnShutdownRun([](const void* pp) { delete static_cast(pp); }, p); - return p; +void StrongReference(const T& var) { + auto volatile unused = &var; + (void)&unused; // Use address to avoid an extra load of "unused". } } // namespace internal diff --git a/third_party/protobuf/src/google/protobuf/stubs/map_util.h b/third_party/protobuf/src/google/protobuf/stubs/map_util.h index 2313e1f5..24e098ad 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/map_util.h +++ b/third_party/protobuf/src/google/protobuf/stubs/map_util.h @@ -620,9 +620,8 @@ bool UpdateReturnCopy(Collection* const collection, // twice. Unlike UpdateReturnCopy this also does not come with the issue of an // undefined previous* in case new data was inserted. template -typename Collection::value_type::second_type* const -InsertOrReturnExisting(Collection* const collection, - const typename Collection::value_type& vt) { +typename Collection::value_type::second_type* InsertOrReturnExisting( + Collection* const collection, const typename Collection::value_type& vt) { std::pair ret = collection->insert(vt); if (ret.second) { return nullptr; // Inserted, no existing previous value. @@ -633,8 +632,7 @@ InsertOrReturnExisting(Collection* const collection, // Same as above, except for explicit key and data. template -typename Collection::value_type::second_type* const -InsertOrReturnExisting( +typename Collection::value_type::second_type* InsertOrReturnExisting( Collection* const collection, const typename Collection::value_type::first_type& key, const typename Collection::value_type::second_type& data) { diff --git a/third_party/protobuf/src/google/protobuf/stubs/mathlimits.cc b/third_party/protobuf/src/google/protobuf/stubs/mathlimits.cc deleted file mode 100644 index 7a335bd6..00000000 --- a/third_party/protobuf/src/google/protobuf/stubs/mathlimits.cc +++ /dev/null @@ -1,89 +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. - -// All Rights Reserved. -// -// Author: Maxim Lifantsev -// - -#include - -#include - -namespace google { -namespace protobuf { - -// http://en.wikipedia.org/wiki/Quadruple_precision_floating-point_format#Double-double_arithmetic -// With some compilers (gcc 4.6.x) on some platforms (powerpc64), -// "long double" is implemented as a pair of double: "double double" format. -// This causes a problem with epsilon (eps). -// eps is the smallest positive number such that 1.0 + eps > 1.0 -// -// Normal format: 1.0 + e = 1.0...01 // N-1 zeros for N fraction bits -// D-D format: 1.0 + e = 1.000...0001 // epsilon can be very small -// -// In the normal format, 1.0 + e has to fit in one stretch of bits. -// The maximum rounding error is half of eps. -// -// In the double-double format, 1.0 + e splits across two doubles: -// 1.0 in the high double, e in the low double, and they do not have to -// be contiguous. The maximum rounding error on a value close to 1.0 is -// much larger than eps. -// -// Some code checks for errors by comparing a computed value to a golden -// value +/- some multiple of the maximum rounding error. The maximum -// rounding error is not available so we use eps as an approximation -// instead. That fails when long double is in the double-double format. -// Therefore, we define kStdError as a multiple of -// max(DBL_EPSILON * DBL_EPSILON, kEpsilon) rather than a multiple of kEpsilon. - -#define DEF_FP_LIMITS(Type, PREFIX) \ -const Type MathLimits::kPosMin = PREFIX##_MIN; \ -const Type MathLimits::kPosMax = PREFIX##_MAX; \ -const Type MathLimits::kMin = -MathLimits::kPosMax; \ -const Type MathLimits::kMax = MathLimits::kPosMax; \ -const Type MathLimits::kNegMin = -MathLimits::kPosMin; \ -const Type MathLimits::kNegMax = -MathLimits::kPosMax; \ -const Type MathLimits::kEpsilon = PREFIX##_EPSILON; \ -/* 32 is 5 bits of mantissa error; should be adequate for common errors */ \ -const Type MathLimits::kStdError = \ - 32 * (DBL_EPSILON * DBL_EPSILON > MathLimits::kEpsilon \ - ? DBL_EPSILON * DBL_EPSILON : MathLimits::kEpsilon); \ -const Type MathLimits::kNaN = HUGE_VAL - HUGE_VAL; \ -const Type MathLimits::kPosInf = HUGE_VAL; \ -const Type MathLimits::kNegInf = -HUGE_VAL; - -DEF_FP_LIMITS(float, FLT) -DEF_FP_LIMITS(double, DBL) -DEF_FP_LIMITS(long double, LDBL); - -#undef DEF_FP_LIMITS -} // namespace protobuf -} // namespace google diff --git a/third_party/protobuf/src/google/protobuf/stubs/mathlimits.h b/third_party/protobuf/src/google/protobuf/stubs/mathlimits.h deleted file mode 100644 index 0e844322..00000000 --- a/third_party/protobuf/src/google/protobuf/stubs/mathlimits.h +++ /dev/null @@ -1,307 +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. - -// All Rights Reserved. -// -// Author: Maxim Lifantsev -// -// Useful integer and floating point limits and type traits. -// -// This partially replaces/duplictes numeric_limits<> from . -// We get a Google-style class that we have a greater control over -// and thus can add new features to it or fix whatever happens to be broken in -// numeric_limits for the compilers we use. -// - -#ifndef UTIL_MATH_MATHLIMITS_H__ -#define UTIL_MATH_MATHLIMITS_H__ - -// Note that for Windows we do something different because it does not support -// the plain isinf and isnan. -#if __cplusplus >= 201103L -// GCC 4.9 has a bug that makes isinf and isnan ambigious when both -// and get pulled into the same translation unit. We use the ones in -// std:: namespace explicitly for C++11 -#include -#define GOOGLE_PROTOBUF_USE_STD_CMATH -#elif _GLIBCXX_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC -// libstdc++ header undefines the global macros and put functions in -// std:: namespace even before C++11. Use the ones in std:: instead too. -#include -#define GOOGLE_PROTOBUF_USE_STD_CMATH -#else -#include -#endif - -#include - -#include - -#include - -#include - -// ========================================================================= // - -// Useful integer and floating point limits and type traits. -// This is just for the documentation; -// real members are defined in our specializations below. -namespace google { -namespace protobuf { -template struct MathLimits { - // Type name. - typedef T Type; - // Unsigned version of the Type with the same byte size. - // Same as Type for floating point and unsigned types. - typedef T UnsignedType; - // If the type supports negative values. - static const bool kIsSigned; - // If the type supports only integer values. - static const bool kIsInteger; - // Magnitude-wise smallest representable positive value. - static const Type kPosMin; - // Magnitude-wise largest representable positive value. - static const Type kPosMax; - // Smallest representable value. - static const Type kMin; - // Largest representable value. - static const Type kMax; - // Magnitude-wise smallest representable negative value. - // Present only if kIsSigned. - static const Type kNegMin; - // Magnitude-wise largest representable negative value. - // Present only if kIsSigned. - static const Type kNegMax; - // Smallest integer x such that 10^x is representable. - static const int kMin10Exp; - // Largest integer x such that 10^x is representable. - static const int kMax10Exp; - // Smallest positive value such that Type(1) + kEpsilon != Type(1) - static const Type kEpsilon; - // Typical rounding error that is enough to cover - // a few simple floating-point operations. - // Slightly larger than kEpsilon to account for a few rounding errors. - // Is zero if kIsInteger. - static const Type kStdError; - // Number of decimal digits of mantissa precision. - // Present only if !kIsInteger. - static const int kPrecisionDigits; - // Not a number, i.e. result of 0/0. - // Present only if !kIsInteger. - static const Type kNaN; - // Positive infinity, i.e. result of 1/0. - // Present only if !kIsInteger. - static const Type kPosInf; - // Negative infinity, i.e. result of -1/0. - // Present only if !kIsInteger. - static const Type kNegInf; - - // NOTE: Special floating point values behave - // in a special (but mathematically-logical) way - // in terms of (in)equalty comparison and mathematical operations - // -- see out unittest for examples. - - // Special floating point value testers. - // Present in integer types for convenience. - static bool IsFinite(const Type x); - static bool IsNaN(const Type x); - static bool IsInf(const Type x); - static bool IsPosInf(const Type x); - static bool IsNegInf(const Type x); -}; - -// ========================================================================= // - -// All #define-s below are simply to refactor the declarations of -// MathLimits template specializations. -// They are all #undef-ined below. - -// The hoop-jumping in *_INT_(MAX|MIN) below is so that the compiler does not -// get an overflow while computing the constants. - -#define SIGNED_INT_MAX(Type) \ - (((Type(1) << (sizeof(Type)*8 - 2)) - 1) + (Type(1) << (sizeof(Type)*8 - 2))) - -#define SIGNED_INT_MIN(Type) \ - (-(Type(1) << (sizeof(Type)*8 - 2)) - (Type(1) << (sizeof(Type)*8 - 2))) - -#define UNSIGNED_INT_MAX(Type) \ - (((Type(1) << (sizeof(Type)*8 - 1)) - 1) + (Type(1) << (sizeof(Type)*8 - 1))) - -// Compile-time selected log10-related constants for integer types. -#define SIGNED_MAX_10_EXP(Type) \ - (sizeof(Type) == 1 ? 2 : ( \ - sizeof(Type) == 2 ? 4 : ( \ - sizeof(Type) == 4 ? 9 : ( \ - sizeof(Type) == 8 ? 18 : -1)))) - -#define UNSIGNED_MAX_10_EXP(Type) \ - (sizeof(Type) == 1 ? 2 : ( \ - sizeof(Type) == 2 ? 4 : ( \ - sizeof(Type) == 4 ? 9 : ( \ - sizeof(Type) == 8 ? 19 : -1)))) - -#define DECL_INT_LIMIT_FUNCS \ - static bool IsFinite(const Type /*x*/) { return true; } \ - static bool IsNaN(const Type /*x*/) { return false; } \ - static bool IsInf(const Type /*x*/) { return false; } \ - static bool IsPosInf(const Type /*x*/) { return false; } \ - static bool IsNegInf(const Type /*x*/) { return false; } - -#define DECL_SIGNED_INT_LIMITS(IntType, UnsignedIntType) \ - template <> \ - struct PROTOBUF_EXPORT MathLimits { \ - typedef IntType Type; \ - typedef UnsignedIntType UnsignedType; \ - static const bool kIsSigned = true; \ - static const bool kIsInteger = true; \ - static const Type kPosMin = 1; \ - static const Type kPosMax = SIGNED_INT_MAX(Type); \ - static const Type kMin = SIGNED_INT_MIN(Type); \ - static const Type kMax = kPosMax; \ - static const Type kNegMin = -1; \ - static const Type kNegMax = kMin; \ - static const int kMin10Exp = 0; \ - static const int kMax10Exp = SIGNED_MAX_10_EXP(Type); \ - static const Type kEpsilon = 1; \ - static const Type kStdError = 0; \ - DECL_INT_LIMIT_FUNCS \ - }; - -#define DECL_UNSIGNED_INT_LIMITS(IntType) \ - template <> \ - struct PROTOBUF_EXPORT MathLimits { \ - typedef IntType Type; \ - typedef IntType UnsignedType; \ - static const bool kIsSigned = false; \ - static const bool kIsInteger = true; \ - static const Type kPosMin = 1; \ - static const Type kPosMax = UNSIGNED_INT_MAX(Type); \ - static const Type kMin = 0; \ - static const Type kMax = kPosMax; \ - static const int kMin10Exp = 0; \ - static const int kMax10Exp = UNSIGNED_MAX_10_EXP(Type); \ - static const Type kEpsilon = 1; \ - static const Type kStdError = 0; \ - DECL_INT_LIMIT_FUNCS \ - }; - -DECL_SIGNED_INT_LIMITS(signed char, unsigned char) -DECL_SIGNED_INT_LIMITS(signed short int, unsigned short int) -DECL_SIGNED_INT_LIMITS(signed int, unsigned int) -DECL_SIGNED_INT_LIMITS(signed long int, unsigned long int) -DECL_SIGNED_INT_LIMITS(signed long long int, unsigned long long int) -DECL_UNSIGNED_INT_LIMITS(unsigned char) -DECL_UNSIGNED_INT_LIMITS(unsigned short int) -DECL_UNSIGNED_INT_LIMITS(unsigned int) -DECL_UNSIGNED_INT_LIMITS(unsigned long int) -DECL_UNSIGNED_INT_LIMITS(unsigned long long int) - -#undef DECL_SIGNED_INT_LIMITS -#undef DECL_UNSIGNED_INT_LIMITS -#undef SIGNED_INT_MAX -#undef SIGNED_INT_MIN -#undef UNSIGNED_INT_MAX -#undef SIGNED_MAX_10_EXP -#undef UNSIGNED_MAX_10_EXP -#undef DECL_INT_LIMIT_FUNCS - -// For non-Windows builds we use the std:: versions of isinf and isnan if they -// are available; see the comment about at the top of this file for the -// details on why we need to do this. -#ifdef GOOGLE_PROTOBUF_USE_STD_CMATH -#define ISINF std::isinf -#define ISNAN std::isnan -#else -#define ISINF isinf -#define ISNAN isnan -#endif - -// ========================================================================= // -#if defined(_WIN32) && !defined(__MINGW32__) // Lacks built-in isnan() and isinf() -#define DECL_FP_LIMIT_FUNCS \ - static bool IsFinite(const Type x) { return _finite(x); } \ - static bool IsNaN(const Type x) { return _isnan(x); } \ - static bool IsInf(const Type x) { return (_fpclass(x) & (_FPCLASS_NINF | _FPCLASS_PINF)) != 0; } \ - static bool IsPosInf(const Type x) { return _fpclass(x) == _FPCLASS_PINF; } \ - static bool IsNegInf(const Type x) { return _fpclass(x) == _FPCLASS_NINF; } -#else -#define DECL_FP_LIMIT_FUNCS \ - static bool IsFinite(const Type x) { return !ISINF(x) && !ISNAN(x); } \ - static bool IsNaN(const Type x) { return ISNAN(x); } \ - static bool IsInf(const Type x) { return ISINF(x); } \ - static bool IsPosInf(const Type x) { return ISINF(x) && x > 0; } \ - static bool IsNegInf(const Type x) { return ISINF(x) && x < 0; } -#endif - -// We can't put floating-point constant values in the header here because -// such constants are not considered to be primitive-type constants by gcc. -// CAVEAT: Hence, they are going to be initialized only during -// the global objects construction time. -#define DECL_FP_LIMITS(FP_Type, PREFIX) \ - template <> \ - struct PROTOBUF_EXPORT MathLimits { \ - typedef FP_Type Type; \ - typedef FP_Type UnsignedType; \ - static const bool kIsSigned = true; \ - static const bool kIsInteger = false; \ - static const Type kPosMin; \ - static const Type kPosMax; \ - static const Type kMin; \ - static const Type kMax; \ - static const Type kNegMin; \ - static const Type kNegMax; \ - static const int kMin10Exp = PREFIX##_MIN_10_EXP; \ - static const int kMax10Exp = PREFIX##_MAX_10_EXP; \ - static const Type kEpsilon; \ - static const Type kStdError; \ - static const int kPrecisionDigits = PREFIX##_DIG; \ - static const Type kNaN; \ - static const Type kPosInf; \ - static const Type kNegInf; \ - DECL_FP_LIMIT_FUNCS \ - }; - -DECL_FP_LIMITS(float, FLT) -DECL_FP_LIMITS(double, DBL) -DECL_FP_LIMITS(long double, LDBL) - -#undef ISINF -#undef ISNAN -#undef DECL_FP_LIMITS -#undef DECL_FP_LIMIT_FUNCS - -// ========================================================================= // -} // namespace protobuf -} // namespace google - -#include - -#endif // UTIL_MATH_MATHLIMITS_H__ diff --git a/third_party/protobuf/src/google/protobuf/stubs/mathutil.h b/third_party/protobuf/src/google/protobuf/stubs/mathutil.h index b87b2869..7116d2d5 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/mathutil.h +++ b/third_party/protobuf/src/google/protobuf/stubs/mathutil.h @@ -30,16 +30,37 @@ #ifndef GOOGLE_PROTOBUF_STUBS_MATHUTIL_H_ #define GOOGLE_PROTOBUF_STUBS_MATHUTIL_H_ +#include #include -#include +#include #include #include -#include namespace google { namespace protobuf { namespace internal { + +// Like std::make_unsigned_t except floating point types map to themselves. +template +using MakeUnsignedT = + typename std::conditional::value, std::make_unsigned, + std::common_type>::type::type; + +// Like std::isnan() except a template function that is defined for all numeric +// types. +template ::value, int>::type = 0> +bool IsNan(T val) { + return false; +} + +template ::value, + int>::type = 0> +bool IsNan(T val) { + return std::isnan(val); +} + template bool AlmostEquals(T a, T b) { return a == b; @@ -53,19 +74,20 @@ template<> inline bool AlmostEquals(double a, double b) { return fabs(a - b) < 32 * DBL_EPSILON; } + } // namespace internal class MathUtil { public: - template + template static T Sign(T value) { - if (value == T(0) || MathLimits::IsNaN(value)) { + if (value == T(0) || internal::IsNan(value)) { return value; } return value > T(0) ? 1 : -1; } - template + template static bool AlmostEquals(T a, T b) { return internal::AlmostEquals(a, b); } @@ -76,9 +98,9 @@ class MathUtil { // which should be OK because, although they (can) have different // bit representation, they are observably the same when examined // with arithmetic and (in)equality operators. - template + template static T Max(const T x, const T y) { - return MathLimits::IsNaN(x) || x > y ? x : y; + return internal::IsNan(x) || x > y ? x : y; } // Absolute value of x @@ -93,10 +115,10 @@ class MathUtil { // Absolute value of the difference between two numbers. // Works correctly for signed types and special floating point values. - template - static typename MathLimits::UnsignedType AbsDiff(const T x, const T y) { + template + static typename internal::MakeUnsignedT AbsDiff(const T x, const T y) { // Carries out arithmetic as unsigned to avoid overflow. - typedef typename MathLimits::UnsignedType R; + typedef typename internal::MakeUnsignedT R; return x > y ? R(x) - R(y) : R(y) - R(x); } @@ -123,11 +145,10 @@ bool MathUtil::WithinFractionOrMargin(const T x, const T y, // which will cause the compiler to generate code for either the "if" part // or the "then" part. In this way we avoid a compiler warning // about a potential integer overflow in crosstool v12 (gcc 4.3.1). - if (MathLimits::kIsInteger) { + if (std::numeric_limits::is_integer) { return x == y; } else { - // IsFinite checks are to make kPosInf and kNegInf not within fraction - if (!MathLimits::IsFinite(x) && !MathLimits::IsFinite(y)) { + if (!std::isfinite(x) || !std::isfinite(y)) { return false; } T relative_margin = static_cast(fraction * Max(Abs(x), Abs(y))); diff --git a/third_party/protobuf/src/google/protobuf/stubs/mutex.h b/third_party/protobuf/src/google/protobuf/stubs/mutex.h index a3118896..b222ff74 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/mutex.h +++ b/third_party/protobuf/src/google/protobuf/stubs/mutex.h @@ -93,7 +93,7 @@ class PROTOBUF_EXPORT CriticalSectionLock { // Mutex is a natural type to wrap. As both google and other organization have // specialized mutexes. gRPC also provides an injection mechanism for custom // mutexes. -class PROTOBUF_EXPORT GOOGLE_PROTOBUF_CAPABILITY("mutex") WrappedMutex { +class GOOGLE_PROTOBUF_CAPABILITY("mutex") PROTOBUF_EXPORT WrappedMutex { public: WrappedMutex() = default; void Lock() GOOGLE_PROTOBUF_ACQUIRE() { mu_.lock(); } diff --git a/third_party/protobuf/src/google/protobuf/stubs/port.h b/third_party/protobuf/src/google/protobuf/stubs/port.h index 5b8e85dc..31d2a10c 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/port.h +++ b/third_party/protobuf/src/google/protobuf/stubs/port.h @@ -32,17 +32,11 @@ #define GOOGLE_PROTOBUF_STUBS_PORT_H_ #include +#include #include #include #include #include -#if defined(__osf__) -// Tru64 lacks stdint.h, but has inttypes.h which defines a superset of -// what stdint.h would define. -#include -#elif !defined(_MSC_VER) -#include -#endif #include @@ -103,8 +97,9 @@ #define LIBPROTOC_EXPORT #endif -#define PROTOBUF_RUNTIME_DEPRECATED(message) -#define GOOGLE_PROTOBUF_RUNTIME_DEPRECATED(message) +#define PROTOBUF_RUNTIME_DEPRECATED(message) PROTOBUF_DEPRECATED_MSG(message) +#define GOOGLE_PROTOBUF_RUNTIME_DEPRECATED(message) \ + PROTOBUF_DEPRECATED_MSG(message) // =================================================================== // from google3/base/port.h @@ -115,18 +110,8 @@ // undefined otherwise. Do NOT define it to 0 -- that causes // '#ifdef LANG_CXX11' to behave differently from '#if LANG_CXX11'. #define LANG_CXX11 1 -#endif - -#if LANG_CXX11 && !defined(__NVCC__) -#define PROTOBUF_CXX11 1 #else -#define PROTOBUF_CXX11 0 -#endif - -#if PROTOBUF_CXX11 -#define PROTOBUF_FINAL final -#else -#define PROTOBUF_FINAL +#error "Protobuf requires at least C++11." #endif namespace google { @@ -134,17 +119,6 @@ namespace protobuf { typedef unsigned int uint; -#ifdef _MSC_VER -typedef signed __int8 int8; -typedef __int16 int16; -typedef __int32 int32; -typedef __int64 int64; - -typedef unsigned __int8 uint8; -typedef unsigned __int16 uint16; -typedef unsigned __int32 uint32; -typedef unsigned __int64 uint64; -#else typedef int8_t int8; typedef int16_t int16; typedef int32_t int32; @@ -154,7 +128,6 @@ typedef uint8_t uint8; typedef uint16_t uint16; typedef uint32_t uint32; typedef uint64_t uint64; -#endif static const int32 kint32max = 0x7FFFFFFF; static const int32 kint32min = -kint32max - 1; @@ -203,7 +176,7 @@ inline void GOOGLE_UNALIGNED_STORE64(void *p, uint64 v) { __sanitizer_unaligned_store64(p, v); } -#elif GOOGLE_PROTOBUF_USE_UNALIGNED +#elif defined(GOOGLE_PROTOBUF_USE_UNALIGNED) && GOOGLE_PROTOBUF_USE_UNALIGNED #define GOOGLE_UNALIGNED_LOAD16(_p) (*reinterpret_cast(_p)) #define GOOGLE_UNALIGNED_LOAD32(_p) (*reinterpret_cast(_p)) @@ -431,13 +404,6 @@ class BigEndian { } // namespace protobuf } // namespace google -#ifdef PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -#define GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER \ - PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -#else -#define GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER 0 -#endif - #include #endif // GOOGLE_PROTOBUF_STUBS_PORT_H_ diff --git a/third_party/protobuf/src/google/protobuf/stubs/status.h b/third_party/protobuf/src/google/protobuf/stubs/status.h index 440a0ed4..04ecc633 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/status.h +++ b/third_party/protobuf/src/google/protobuf/stubs/status.h @@ -116,8 +116,6 @@ class PROTOBUF_EXPORT Status { // Prints a human-readable representation of 'x' to 'os'. PROTOBUF_EXPORT std::ostream& operator<<(std::ostream& os, const Status& x); -#define EXPECT_OK(value) EXPECT_TRUE((value).ok()) - } // namespace util } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/stubs/statusor.h b/third_party/protobuf/src/google/protobuf/stubs/statusor.h index 90fd5f0d..c02e89a9 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/statusor.h +++ b/third_party/protobuf/src/google/protobuf/stubs/statusor.h @@ -153,6 +153,7 @@ class StatusOr { // If you need to initialize a T object from the stored value, // ConsumeValueOrDie() may be more efficient. const T& ValueOrDie() const; + const T& value () const; private: Status status_; @@ -204,7 +205,7 @@ inline StatusOr::StatusOr(const Status& status) { template inline StatusOr::StatusOr(const T& value) { if (internal::StatusOrHelper::Specialize::IsValueNull(value)) { - status_ = Status(error::INTERNAL, "nullptr is not a vaild argument."); + status_ = Status(error::INTERNAL, "nullptr is not a valid argument."); } else { status_ = Status::OK; value_ = value; @@ -254,6 +255,14 @@ inline const T& StatusOr::ValueOrDie() const { } return value_; } + +template +inline const T& StatusOr::value() const { + if (!status_.ok()) { + internal::StatusOrHelper::Crash(status_); + } + return value_; +} } // namespace util } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/stubs/stl_util.h b/third_party/protobuf/src/google/protobuf/stubs/stl_util.h index 2c265e92..aa81eb6f 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/stl_util.h +++ b/third_party/protobuf/src/google/protobuf/stubs/stl_util.h @@ -38,26 +38,6 @@ namespace google { namespace protobuf { -// STLDeleteContainerPointers() -// For a range within a container of pointers, calls delete -// (non-array version) on these pointers. -// NOTE: for these three functions, we could just implement a DeleteObject -// functor and then call for_each() on the range and functor, but this -// requires us to pull in all of algorithm.h, which seems expensive. -// For hash_[multi]set, it is important that this deletes behind the iterator -// because the hash_set may call the hash function on the iterator when it is -// advanced, which could result in the hash function trying to deference a -// stale pointer. -template -void STLDeleteContainerPointers(ForwardIterator begin, - ForwardIterator end) { - while (begin != end) { - ForwardIterator temp = begin; - ++begin; - delete *temp; - } -} - // Inside Google, this function implements a horrible, disgusting hack in which // we reach into the string's private implementation and resize it without // initializing the new bytes. In some cases doing this can significantly @@ -85,36 +65,6 @@ inline char* string_as_array(string* str) { return str->empty() ? nullptr : &*str->begin(); } -// STLDeleteElements() deletes all the elements in an STL container and clears -// the container. This function is suitable for use with a vector, set, -// hash_set, or any other STL container which defines sensible begin(), end(), -// and clear() methods. -// -// If container is nullptr, this function is a no-op. -// -// As an alternative to calling STLDeleteElements() directly, consider -// ElementDeleter (defined below), which ensures that your container's elements -// are deleted when the ElementDeleter goes out of scope. -template -void STLDeleteElements(T *container) { - if (!container) return; - STLDeleteContainerPointers(container->begin(), container->end()); - container->clear(); -} - -// Given an STL container consisting of (key, value) pairs, STLDeleteValues -// deletes all the "value" components and clears the container. Does nothing -// in the case it's given a null pointer. - -template -void STLDeleteValues(T *v) { - if (!v) return; - for (typename T::iterator i = v->begin(); i != v->end(); ++i) { - delete i->second; - } - v->clear(); -} - } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/stubs/structurally_valid.cc b/third_party/protobuf/src/google/protobuf/stubs/structurally_valid.cc index 0598427d..4d424a15 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/structurally_valid.cc +++ b/third_party/protobuf/src/google/protobuf/stubs/structurally_valid.cc @@ -395,7 +395,7 @@ int UTF8GenericScan(const UTF8ScanObj* st, const uint8* isrc = reinterpret_cast(str); const uint8* src = isrc; const uint8* srclimit = isrc + str_length; - const uint8* srclimit8 = srclimit - 7; + const uint8* srclimit8 = str_length < 7 ? isrc : srclimit - 7; const uint8* Tbl_0 = &st->state_table[st->state0]; DoAgain: @@ -456,8 +456,7 @@ int UTF8GenericScan(const UTF8ScanObj* st, } //---------------------------- - - // Exit posibilities: + // Exit possibilities: // Some exit code, !state0, back up over last char // Some exit code, state0, back up one byte exactly // source consumed, !state0, back up over partial char @@ -504,7 +503,7 @@ int UTF8GenericScanFastAscii(const UTF8ScanObj* st, const uint8* isrc = reinterpret_cast(str); const uint8* src = isrc; const uint8* srclimit = isrc + str_length; - const uint8* srclimit8 = srclimit - 7; + const uint8* srclimit8 = str_length < 7 ? isrc : srclimit - 7; int n; int rest_consumed; int exit_reason; diff --git a/third_party/protobuf/src/google/protobuf/stubs/strutil.cc b/third_party/protobuf/src/google/protobuf/stubs/strutil.cc index 3844fa6b..24ae286d 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/strutil.cc +++ b/third_party/protobuf/src/google/protobuf/stubs/strutil.cc @@ -42,7 +42,6 @@ #include #include -#include #ifdef _WIN32 // MSVC has only _snprintf, not snprintf. @@ -80,21 +79,6 @@ inline bool isprint(char c) { return c >= 0x20 && c <= 0x7E; } -// ---------------------------------------------------------------------- -// StripString -// Replaces any occurrence of the character 'remove' (or the characters -// in 'remove') with the character 'replacewith'. -// ---------------------------------------------------------------------- -void StripString(string* s, const char* remove, char replacewith) { - const char * str_start = s->c_str(); - const char * str = str_start; - for (str = strpbrk(str, remove); - str != nullptr; - str = strpbrk(str + 1, remove)) { - (*s)[str - str_start] = replacewith; - } -} - // ---------------------------------------------------------------------- // ReplaceCharacters // Replaces any occurrence of the character 'remove' (or the characters @@ -1065,10 +1049,12 @@ done: } char* FastInt32ToBufferLeft(int32 i, char* buffer) { - uint32 u = i; + uint32 u = 0; if (i < 0) { *buffer++ = '-'; - u = -i; + u -= i; + } else { + u = i; } return FastUInt32ToBufferLeft(u, buffer); } @@ -1290,7 +1276,7 @@ char* DoubleToBuffer(double value, char* buffer) { // of a double. This long double may have extra bits that make it compare // unequal to "value" even though it would be exactly equal if it were // truncated to a double. - volatile double parsed_value = io::NoLocaleStrtod(buffer, nullptr); + volatile double parsed_value = internal::NoLocaleStrtod(buffer, nullptr); if (parsed_value != value) { int snprintf_result = snprintf(buffer, kDoubleToBufferSize, "%.*g", DBL_DIG+2, value); @@ -1342,7 +1328,7 @@ bool safe_strtof(const char* str, float* value) { char* endptr; errno = 0; // errno only gets set on errors #if defined(_WIN32) || defined (__hpux) // has no strtof() - *value = io::NoLocaleStrtod(str, &endptr); + *value = internal::NoLocaleStrtod(str, &endptr); #else *value = strtof(str, &endptr); #endif @@ -1351,7 +1337,7 @@ bool safe_strtof(const char* str, float* value) { bool safe_strtod(const char* str, double* value) { char* endptr; - *value = io::NoLocaleStrtod(str, &endptr); + *value = internal::NoLocaleStrtod(str, &endptr); if (endptr != str) { while (ascii_isspace(*endptr)) ++endptr; } @@ -1449,32 +1435,44 @@ AlphaNum::AlphaNum(strings::Hex hex) { // after the area just overwritten. It comes in multiple flavors to minimize // call overhead. static char *Append1(char *out, const AlphaNum &x) { - memcpy(out, x.data(), x.size()); - return out + x.size(); + if (x.size() > 0) { + memcpy(out, x.data(), x.size()); + out += x.size(); + } + return out; } static char *Append2(char *out, const AlphaNum &x1, const AlphaNum &x2) { - memcpy(out, x1.data(), x1.size()); - out += x1.size(); - - memcpy(out, x2.data(), x2.size()); - return out + x2.size(); + if (x1.size() > 0) { + memcpy(out, x1.data(), x1.size()); + out += x1.size(); + } + if (x2.size() > 0) { + memcpy(out, x2.data(), x2.size()); + out += x2.size(); + } + return out; } -static char *Append4(char *out, - const AlphaNum &x1, const AlphaNum &x2, +static char *Append4(char *out, const AlphaNum &x1, const AlphaNum &x2, const AlphaNum &x3, const AlphaNum &x4) { - memcpy(out, x1.data(), x1.size()); - out += x1.size(); - - memcpy(out, x2.data(), x2.size()); - out += x2.size(); - - memcpy(out, x3.data(), x3.size()); - out += x3.size(); - - memcpy(out, x4.data(), x4.size()); - return out + x4.size(); + if (x1.size() > 0) { + memcpy(out, x1.data(), x1.size()); + out += x1.size(); + } + if (x2.size() > 0) { + memcpy(out, x2.data(), x2.size()); + out += x2.size(); + } + if (x3.size() > 0) { + memcpy(out, x3.data(), x3.size()); + out += x3.size(); + } + if (x4.size() > 0) { + memcpy(out, x4.data(), x4.size()); + out += x4.size(); + } + return out; } string StrCat(const AlphaNum &a, const AlphaNum &b) { @@ -2286,16 +2284,19 @@ int EncodeAsUTF8Char(uint32 code_point, char* output) { // Table of UTF-8 character lengths, based on first byte static const unsigned char kUTF8LenTbl[256] = { - 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, - 2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2, - 3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3, 4,4,4,4,4,4,4,4, 4,4,4,4,4,4,4,4 -}; + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; // Return length of a single UTF-8 source character int UTF8FirstLetterNumBytes(const char* src, int len) { @@ -2410,5 +2411,76 @@ void CleanStringLineEndings(string *str, bool auto_end_last_line) { } } +namespace internal { + +// ---------------------------------------------------------------------- +// NoLocaleStrtod() +// This code will make you cry. +// ---------------------------------------------------------------------- + +namespace { + +// Returns a string identical to *input except that the character pointed to +// by radix_pos (which should be '.') is replaced with the locale-specific +// radix character. +std::string LocalizeRadix(const char *input, const char *radix_pos) { + // Determine the locale-specific radix character by calling sprintf() to + // print the number 1.5, then stripping off the digits. As far as I can + // tell, this is the only portable, thread-safe way to get the C library + // to divuldge the locale's radix character. No, localeconv() is NOT + // thread-safe. + char temp[16]; + int size = snprintf(temp, sizeof(temp), "%.1f", 1.5); + GOOGLE_CHECK_EQ(temp[0], '1'); + GOOGLE_CHECK_EQ(temp[size - 1], '5'); + GOOGLE_CHECK_LE(size, 6); + + // Now replace the '.' in the input with it. + std::string result; + result.reserve(strlen(input) + size - 3); + result.append(input, radix_pos); + result.append(temp + 1, size - 2); + result.append(radix_pos + 1); + return result; +} + +} // namespace + +double NoLocaleStrtod(const char *str, char **endptr) { + // We cannot simply set the locale to "C" temporarily with setlocale() + // as this is not thread-safe. Instead, we try to parse in the current + // locale first. If parsing stops at a '.' character, then this is a + // pretty good hint that we're actually in some other locale in which + // '.' is not the radix character. + + char *temp_endptr; + double result = strtod(str, &temp_endptr); + if (endptr != NULL) *endptr = temp_endptr; + if (*temp_endptr != '.') return result; + + // Parsing halted on a '.'. Perhaps we're in a different locale? Let's + // try to replace the '.' with a locale-specific radix character and + // try again. + std::string localized = LocalizeRadix(str, temp_endptr); + const char *localized_cstr = localized.c_str(); + char *localized_endptr; + result = strtod(localized_cstr, &localized_endptr); + if ((localized_endptr - localized_cstr) > (temp_endptr - str)) { + // This attempt got further, so replacing the decimal must have helped. + // Update endptr to point at the right location. + if (endptr != NULL) { + // size_diff is non-zero if the localized radix has multiple bytes. + int size_diff = localized.size() - strlen(str); + // const_cast is necessary to match the strtod() interface. + *endptr = const_cast( + str + (localized_endptr - localized_cstr - size_diff)); + } + } + + return result; +} + +} // namespace internal + } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/stubs/strutil.h b/third_party/protobuf/src/google/protobuf/stubs/strutil.h index 790500d2..79a7aeb5 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/strutil.h +++ b/third_party/protobuf/src/google/protobuf/stubs/strutil.h @@ -33,12 +33,13 @@ #ifndef GOOGLE_PROTOBUF_STUBS_STRUTIL_H__ #define GOOGLE_PROTOBUF_STUBS_STRUTIL_H__ -#include -#include #include #include +#include +#include #include +#include namespace google { namespace protobuf { @@ -118,6 +119,11 @@ inline bool HasPrefixString(const string& str, str.compare(0, prefix.size(), prefix) == 0; } +inline bool HasPrefixString(StringPiece str, StringPiece prefix) { + return str.size() >= prefix.size() && + memcmp(str.data(), prefix.data(), prefix.size()) == 0; +} + inline string StripPrefixString(const string& str, const string& prefix) { if (HasPrefixString(str, prefix)) { return str.substr(prefix.size()); @@ -159,8 +165,6 @@ inline string StripSuffixString(const string& str, const string& suffix) { // ---------------------------------------------------------------------- PROTOBUF_EXPORT void ReplaceCharacters(string* s, const char* remove, char replacewith); -PROTOBUF_EXPORT void StripString(string* s, const char* remove, - char replacewith); PROTOBUF_EXPORT void StripWhitespace(string* s); @@ -932,6 +936,14 @@ inline bool EndsWith(StringPiece text, StringPiece suffix) { } } // namespace strings +namespace internal { + +// A locale-independent version of the standard strtod(), which always +// uses a dot as the decimal separator. +double NoLocaleStrtod(const char* str, char** endptr); + +} // namespace internal + } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/stubs/strutil_unittest.cc b/third_party/protobuf/src/google/protobuf/stubs/strutil_unittest.cc index f830e377..141d263a 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/strutil_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/stubs/strutil_unittest.cc @@ -836,6 +836,60 @@ TEST(StrCat, Ints) { EXPECT_EQ(answer, "130"); } +class ReplaceChars : public ::testing::TestWithParam< + std::tuple> {}; + +TEST_P(ReplaceChars, ReplacesAllOccurencesOfAnyCharInReplaceWithAReplaceChar) { + string expected = std::get<0>(GetParam()); + string string_to_replace_in = std::get<1>(GetParam()); + const char* what_to_replace = std::get<2>(GetParam()); + char replacement = std::get<3>(GetParam()); + ReplaceCharacters(&string_to_replace_in, what_to_replace, replacement); + ASSERT_EQ(expected, string_to_replace_in); +} + +INSTANTIATE_TEST_CASE_P( + Replace, ReplaceChars, + ::testing::Values( + std::make_tuple("", "", "", '_'), // empty string should remain empty + std::make_tuple(" ", " ", "", '_'), // no replacement string + std::make_tuple(" ", " ", "_-abcedf", + '*'), // replacement character not in string + std::make_tuple("replace", "Replace", "R", + 'r'), // replace one character + std::make_tuple("not_spaces__", "not\nspaces\t ", " \t\r\n", + '_'), // replace some special characters + std::make_tuple("c++", "cxx", "x", + '+'), // same character multiple times + std::make_tuple("qvvvvvng v T", "queueing a T", "aeiou", + 'v'))); // replace all voewls + +class StripWs : public ::testing::TestWithParam> {}; + +TEST_P(StripWs, AlwaysStripsLeadingAndTrailingWhitespace) { + string expected = std::get<0>(GetParam()); + string string_to_strip = std::get<1>(GetParam()); + StripWhitespace(&string_to_strip); + ASSERT_EQ(expected, string_to_strip); +} + +INSTANTIATE_TEST_CASE_P( + Strip, StripWs, + ::testing::Values( + std::make_tuple("", ""), // empty string should remain empty + std::make_tuple("", " "), // only ws should become empty + std::make_tuple("no whitespace", + " no whitespace"), // leading ws removed + std::make_tuple("no whitespace", + "no whitespace "), // trailing ws removed + std::make_tuple("no whitespace", + " no whitespace "), // same nb. of leading and trailing + std::make_tuple( + "no whitespace", + " no whitespace "), // different nb. of leading/trailing + std::make_tuple("no whitespace", + " no whitespace "))); // more trailing than leading + } // anonymous namespace } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/stubs/time.cc b/third_party/protobuf/src/google/protobuf/stubs/time.cc index a1e5e1e2..64f3ceb9 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/time.cc +++ b/third_party/protobuf/src/google/protobuf/stubs/time.cc @@ -212,7 +212,7 @@ bool SecondsToDateTime(int64 seconds, DateTime* time) { if (seconds < kMinTime || seconds > kMaxTime) { return false; } - // It's easier to calcuate the DateTime starting from 0001-01-01T00:00:00 + // It's easier to calculate the DateTime starting from 0001-01-01T00:00:00 seconds = seconds + kSecondsFromEraToEpoch; int year = 1; if (seconds >= kSecondsPer400Years) { diff --git a/third_party/protobuf/src/google/protobuf/stubs/time.h b/third_party/protobuf/src/google/protobuf/stubs/time.h index 12091de3..b52f3f96 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/time.h +++ b/third_party/protobuf/src/google/protobuf/stubs/time.h @@ -58,7 +58,7 @@ bool PROTOBUF_EXPORT DateTimeToSeconds(const DateTime& time, int64* seconds); void PROTOBUF_EXPORT GetCurrentTime(int64* seconds, int32* nanos); -// Formats a time string in RFC3339 fromat. +// Formats a time string in RFC3339 format. // // For example, "2015-05-20T13:29:35.120Z". For nanos, 0, 3, 6 or 9 fractional // digits will be used depending on how many are required to represent the exact diff --git a/third_party/protobuf/src/google/protobuf/stubs/time_test.cc b/third_party/protobuf/src/google/protobuf/stubs/time_test.cc index 4dd06a64..fc72925f 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/time_test.cc +++ b/third_party/protobuf/src/google/protobuf/stubs/time_test.cc @@ -223,7 +223,7 @@ TEST(DateTimeTest, StringFormat) { EXPECT_EQ("0001-01-01T00:00:00Z", FormatTime(start_time, 0)); EXPECT_EQ("9999-12-31T23:59:59Z", FormatTime(end_time, 0)); - // Make sure the nanoseconds part is formated correctly. + // Make sure the nanoseconds part is formatted correctly. EXPECT_EQ("1970-01-01T00:00:00.010Z", FormatTime(0, 10000000)); EXPECT_EQ("1970-01-01T00:00:00.000010Z", FormatTime(0, 10000)); EXPECT_EQ("1970-01-01T00:00:00.000000010Z", FormatTime(0, 10)); diff --git a/third_party/protobuf/src/google/protobuf/test_messages_proto2.proto b/third_party/protobuf/src/google/protobuf/test_messages_proto2.proto index dc6aaa37..1d0c33f5 100644 --- a/third_party/protobuf/src/google/protobuf/test_messages_proto2.proto +++ b/third_party/protobuf/src/google/protobuf/test_messages_proto2.proto @@ -38,6 +38,7 @@ syntax = "proto2"; package protobuf_test_messages.proto2; + option java_package = "com.google.protobuf_test_messages.proto2"; // This is the default, but we specify it here explicitly. @@ -66,79 +67,111 @@ message TestAllTypesProto2 { } // Singular - optional int32 optional_int32 = 1; - optional int64 optional_int64 = 2; - optional uint32 optional_uint32 = 3; - optional uint64 optional_uint64 = 4; - optional sint32 optional_sint32 = 5; - optional sint64 optional_sint64 = 6; - optional fixed32 optional_fixed32 = 7; - optional fixed64 optional_fixed64 = 8; - optional sfixed32 optional_sfixed32 = 9; + optional int32 optional_int32 = 1; + optional int64 optional_int64 = 2; + optional uint32 optional_uint32 = 3; + optional uint64 optional_uint64 = 4; + optional sint32 optional_sint32 = 5; + optional sint64 optional_sint64 = 6; + optional fixed32 optional_fixed32 = 7; + optional fixed64 optional_fixed64 = 8; + optional sfixed32 optional_sfixed32 = 9; optional sfixed64 optional_sfixed64 = 10; - optional float optional_float = 11; - optional double optional_double = 12; - optional bool optional_bool = 13; - optional string optional_string = 14; - optional bytes optional_bytes = 15; + optional float optional_float = 11; + optional double optional_double = 12; + optional bool optional_bool = 13; + optional string optional_string = 14; + optional bytes optional_bytes = 15; - optional NestedMessage optional_nested_message = 18; - optional ForeignMessageProto2 optional_foreign_message = 19; + optional NestedMessage optional_nested_message = 18; + optional ForeignMessageProto2 optional_foreign_message = 19; - optional NestedEnum optional_nested_enum = 21; - optional ForeignEnumProto2 optional_foreign_enum = 22; + optional NestedEnum optional_nested_enum = 21; + optional ForeignEnumProto2 optional_foreign_enum = 22; - optional string optional_string_piece = 24 [ctype=STRING_PIECE]; - optional string optional_cord = 25 [ctype=CORD]; + optional string optional_string_piece = 24 [ctype = STRING_PIECE]; + optional string optional_cord = 25 [ctype = CORD]; optional TestAllTypesProto2 recursive_message = 27; // Repeated - repeated int32 repeated_int32 = 31; - repeated int64 repeated_int64 = 32; - repeated uint32 repeated_uint32 = 33; - repeated uint64 repeated_uint64 = 34; - repeated sint32 repeated_sint32 = 35; - repeated sint64 repeated_sint64 = 36; - repeated fixed32 repeated_fixed32 = 37; - repeated fixed64 repeated_fixed64 = 38; + repeated int32 repeated_int32 = 31; + repeated int64 repeated_int64 = 32; + repeated uint32 repeated_uint32 = 33; + repeated uint64 repeated_uint64 = 34; + repeated sint32 repeated_sint32 = 35; + repeated sint64 repeated_sint64 = 36; + repeated fixed32 repeated_fixed32 = 37; + repeated fixed64 repeated_fixed64 = 38; repeated sfixed32 repeated_sfixed32 = 39; repeated sfixed64 repeated_sfixed64 = 40; - repeated float repeated_float = 41; - repeated double repeated_double = 42; - repeated bool repeated_bool = 43; - repeated string repeated_string = 44; - repeated bytes repeated_bytes = 45; + repeated float repeated_float = 41; + repeated double repeated_double = 42; + repeated bool repeated_bool = 43; + repeated string repeated_string = 44; + repeated bytes repeated_bytes = 45; - repeated NestedMessage repeated_nested_message = 48; - repeated ForeignMessageProto2 repeated_foreign_message = 49; + repeated NestedMessage repeated_nested_message = 48; + repeated ForeignMessageProto2 repeated_foreign_message = 49; - repeated NestedEnum repeated_nested_enum = 51; - repeated ForeignEnumProto2 repeated_foreign_enum = 52; + repeated NestedEnum repeated_nested_enum = 51; + repeated ForeignEnumProto2 repeated_foreign_enum = 52; - repeated string repeated_string_piece = 54 [ctype=STRING_PIECE]; - repeated string repeated_cord = 55 [ctype=CORD]; + repeated string repeated_string_piece = 54 [ctype = STRING_PIECE]; + repeated string repeated_cord = 55 [ctype = CORD]; + + // Packed + repeated int32 packed_int32 = 75 [packed = true]; + repeated int64 packed_int64 = 76 [packed = true]; + repeated uint32 packed_uint32 = 77 [packed = true]; + repeated uint64 packed_uint64 = 78 [packed = true]; + repeated sint32 packed_sint32 = 79 [packed = true]; + repeated sint64 packed_sint64 = 80 [packed = true]; + repeated fixed32 packed_fixed32 = 81 [packed = true]; + repeated fixed64 packed_fixed64 = 82 [packed = true]; + repeated sfixed32 packed_sfixed32 = 83 [packed = true]; + repeated sfixed64 packed_sfixed64 = 84 [packed = true]; + repeated float packed_float = 85 [packed = true]; + repeated double packed_double = 86 [packed = true]; + repeated bool packed_bool = 87 [packed = true]; + repeated NestedEnum packed_nested_enum = 88 [packed = true]; + + // Unpacked + repeated int32 unpacked_int32 = 89 [packed = false]; + repeated int64 unpacked_int64 = 90 [packed = false]; + repeated uint32 unpacked_uint32 = 91 [packed = false]; + repeated uint64 unpacked_uint64 = 92 [packed = false]; + repeated sint32 unpacked_sint32 = 93 [packed = false]; + repeated sint64 unpacked_sint64 = 94 [packed = false]; + repeated fixed32 unpacked_fixed32 = 95 [packed = false]; + repeated fixed64 unpacked_fixed64 = 96 [packed = false]; + repeated sfixed32 unpacked_sfixed32 = 97 [packed = false]; + repeated sfixed64 unpacked_sfixed64 = 98 [packed = false]; + repeated float unpacked_float = 99 [packed = false]; + repeated double unpacked_double = 100 [packed = false]; + repeated bool unpacked_bool = 101 [packed = false]; + repeated NestedEnum unpacked_nested_enum = 102 [packed = false]; // Map - map < int32, int32> map_int32_int32 = 56; - map < int64, int64> map_int64_int64 = 57; - map < uint32, uint32> map_uint32_uint32 = 58; - map < uint64, uint64> map_uint64_uint64 = 59; - map < sint32, sint32> map_sint32_sint32 = 60; - map < sint64, sint64> map_sint64_sint64 = 61; - map < fixed32, fixed32> map_fixed32_fixed32 = 62; - map < fixed64, fixed64> map_fixed64_fixed64 = 63; - map map_sfixed32_sfixed32 = 64; - map map_sfixed64_sfixed64 = 65; - map < int32, float> map_int32_float = 66; - map < int32, double> map_int32_double = 67; - map < bool, bool> map_bool_bool = 68; - map < string, string> map_string_string = 69; - map < string, bytes> map_string_bytes = 70; - map < string, NestedMessage> map_string_nested_message = 71; - map < string, ForeignMessageProto2> map_string_foreign_message = 72; - map < string, NestedEnum> map_string_nested_enum = 73; - map < string, ForeignEnumProto2> map_string_foreign_enum = 74; + map map_int32_int32 = 56; + map map_int64_int64 = 57; + map map_uint32_uint32 = 58; + map map_uint64_uint64 = 59; + map map_sint32_sint32 = 60; + map map_sint64_sint64 = 61; + map map_fixed32_fixed32 = 62; + map map_fixed64_fixed64 = 63; + map map_sfixed32_sfixed32 = 64; + map map_sfixed64_sfixed64 = 65; + map map_int32_float = 66; + map map_int32_double = 67; + map map_bool_bool = 68; + map map_string_string = 69; + map map_string_bytes = 70; + map map_string_nested_message = 71; + map map_string_foreign_message = 72; + map map_string_nested_enum = 73; + map map_string_foreign_enum = 74; oneof oneof_field { uint32 oneof_uint32 = 111; @@ -159,7 +192,7 @@ message TestAllTypesProto2 { optional group Data = 201 { optional int32 group_int32 = 202; optional uint32 group_uint32 = 203; - }; + } // Test field-name-to-JSON-name convention. // (protobuf says names can be any valid C/C++ identifier.) @@ -188,6 +221,7 @@ message TestAllTypesProto2 { // message_set test case. message MessageSetCorrect { option message_set_wire_format = true; + extensions 4 to max; } @@ -221,7 +255,7 @@ extend TestAllTypesProto2 { } message UnknownToTestAllTypes { - optional int32 optional_int32 = 1001; + optional int32 optional_int32 = 1001; optional string optional_string = 1002; optional ForeignMessageProto2 nested_message = 1003; optional group OptionalGroup = 1004 { @@ -230,4 +264,3 @@ message UnknownToTestAllTypes { optional bool optional_bool = 1006; repeated int32 repeated_int32 = 1011; } - diff --git a/third_party/protobuf/src/google/protobuf/test_messages_proto3.proto b/third_party/protobuf/src/google/protobuf/test_messages_proto3.proto index 908511e5..a10f44d9 100644 --- a/third_party/protobuf/src/google/protobuf/test_messages_proto3.proto +++ b/third_party/protobuf/src/google/protobuf/test_messages_proto3.proto @@ -38,6 +38,7 @@ syntax = "proto3"; package protobuf_test_messages.proto3; + option java_package = "com.google.protobuf_test_messages.proto3"; option objc_class_prefix = "Proto3"; @@ -85,80 +86,112 @@ message TestAllTypesProto3 { } // Singular - int32 optional_int32 = 1; - int64 optional_int64 = 2; - uint32 optional_uint32 = 3; - uint64 optional_uint64 = 4; - sint32 optional_sint32 = 5; - sint64 optional_sint64 = 6; - fixed32 optional_fixed32 = 7; - fixed64 optional_fixed64 = 8; - sfixed32 optional_sfixed32 = 9; + int32 optional_int32 = 1; + int64 optional_int64 = 2; + uint32 optional_uint32 = 3; + uint64 optional_uint64 = 4; + sint32 optional_sint32 = 5; + sint64 optional_sint64 = 6; + fixed32 optional_fixed32 = 7; + fixed64 optional_fixed64 = 8; + sfixed32 optional_sfixed32 = 9; sfixed64 optional_sfixed64 = 10; - float optional_float = 11; - double optional_double = 12; - bool optional_bool = 13; - string optional_string = 14; - bytes optional_bytes = 15; + float optional_float = 11; + double optional_double = 12; + bool optional_bool = 13; + string optional_string = 14; + bytes optional_bytes = 15; - NestedMessage optional_nested_message = 18; - ForeignMessage optional_foreign_message = 19; + NestedMessage optional_nested_message = 18; + ForeignMessage optional_foreign_message = 19; - NestedEnum optional_nested_enum = 21; - ForeignEnum optional_foreign_enum = 22; - AliasedEnum optional_aliased_enum = 23; + NestedEnum optional_nested_enum = 21; + ForeignEnum optional_foreign_enum = 22; + AliasedEnum optional_aliased_enum = 23; - string optional_string_piece = 24 [ctype=STRING_PIECE]; - string optional_cord = 25 [ctype=CORD]; + string optional_string_piece = 24 [ctype = STRING_PIECE]; + string optional_cord = 25 [ctype = CORD]; TestAllTypesProto3 recursive_message = 27; // Repeated - repeated int32 repeated_int32 = 31; - repeated int64 repeated_int64 = 32; - repeated uint32 repeated_uint32 = 33; - repeated uint64 repeated_uint64 = 34; - repeated sint32 repeated_sint32 = 35; - repeated sint64 repeated_sint64 = 36; - repeated fixed32 repeated_fixed32 = 37; - repeated fixed64 repeated_fixed64 = 38; + repeated int32 repeated_int32 = 31; + repeated int64 repeated_int64 = 32; + repeated uint32 repeated_uint32 = 33; + repeated uint64 repeated_uint64 = 34; + repeated sint32 repeated_sint32 = 35; + repeated sint64 repeated_sint64 = 36; + repeated fixed32 repeated_fixed32 = 37; + repeated fixed64 repeated_fixed64 = 38; repeated sfixed32 repeated_sfixed32 = 39; repeated sfixed64 repeated_sfixed64 = 40; - repeated float repeated_float = 41; - repeated double repeated_double = 42; - repeated bool repeated_bool = 43; - repeated string repeated_string = 44; - repeated bytes repeated_bytes = 45; + repeated float repeated_float = 41; + repeated double repeated_double = 42; + repeated bool repeated_bool = 43; + repeated string repeated_string = 44; + repeated bytes repeated_bytes = 45; - repeated NestedMessage repeated_nested_message = 48; - repeated ForeignMessage repeated_foreign_message = 49; + repeated NestedMessage repeated_nested_message = 48; + repeated ForeignMessage repeated_foreign_message = 49; - repeated NestedEnum repeated_nested_enum = 51; - repeated ForeignEnum repeated_foreign_enum = 52; + repeated NestedEnum repeated_nested_enum = 51; + repeated ForeignEnum repeated_foreign_enum = 52; - repeated string repeated_string_piece = 54 [ctype=STRING_PIECE]; - repeated string repeated_cord = 55 [ctype=CORD]; + repeated string repeated_string_piece = 54 [ctype = STRING_PIECE]; + repeated string repeated_cord = 55 [ctype = CORD]; + + // Packed + repeated int32 packed_int32 = 75 [packed = true]; + repeated int64 packed_int64 = 76 [packed = true]; + repeated uint32 packed_uint32 = 77 [packed = true]; + repeated uint64 packed_uint64 = 78 [packed = true]; + repeated sint32 packed_sint32 = 79 [packed = true]; + repeated sint64 packed_sint64 = 80 [packed = true]; + repeated fixed32 packed_fixed32 = 81 [packed = true]; + repeated fixed64 packed_fixed64 = 82 [packed = true]; + repeated sfixed32 packed_sfixed32 = 83 [packed = true]; + repeated sfixed64 packed_sfixed64 = 84 [packed = true]; + repeated float packed_float = 85 [packed = true]; + repeated double packed_double = 86 [packed = true]; + repeated bool packed_bool = 87 [packed = true]; + repeated NestedEnum packed_nested_enum = 88 [packed = true]; + + // Unpacked + repeated int32 unpacked_int32 = 89 [packed = false]; + repeated int64 unpacked_int64 = 90 [packed = false]; + repeated uint32 unpacked_uint32 = 91 [packed = false]; + repeated uint64 unpacked_uint64 = 92 [packed = false]; + repeated sint32 unpacked_sint32 = 93 [packed = false]; + repeated sint64 unpacked_sint64 = 94 [packed = false]; + repeated fixed32 unpacked_fixed32 = 95 [packed = false]; + repeated fixed64 unpacked_fixed64 = 96 [packed = false]; + repeated sfixed32 unpacked_sfixed32 = 97 [packed = false]; + repeated sfixed64 unpacked_sfixed64 = 98 [packed = false]; + repeated float unpacked_float = 99 [packed = false]; + repeated double unpacked_double = 100 [packed = false]; + repeated bool unpacked_bool = 101 [packed = false]; + repeated NestedEnum unpacked_nested_enum = 102 [packed = false]; // Map - map < int32, int32> map_int32_int32 = 56; - map < int64, int64> map_int64_int64 = 57; - map < uint32, uint32> map_uint32_uint32 = 58; - map < uint64, uint64> map_uint64_uint64 = 59; - map < sint32, sint32> map_sint32_sint32 = 60; - map < sint64, sint64> map_sint64_sint64 = 61; - map < fixed32, fixed32> map_fixed32_fixed32 = 62; - map < fixed64, fixed64> map_fixed64_fixed64 = 63; - map map_sfixed32_sfixed32 = 64; - map map_sfixed64_sfixed64 = 65; - map < int32, float> map_int32_float = 66; - map < int32, double> map_int32_double = 67; - map < bool, bool> map_bool_bool = 68; - map < string, string> map_string_string = 69; - map < string, bytes> map_string_bytes = 70; - map < string, NestedMessage> map_string_nested_message = 71; - map < string, ForeignMessage> map_string_foreign_message = 72; - map < string, NestedEnum> map_string_nested_enum = 73; - map < string, ForeignEnum> map_string_foreign_enum = 74; + map map_int32_int32 = 56; + map map_int64_int64 = 57; + map map_uint32_uint32 = 58; + map map_uint64_uint64 = 59; + map map_sint32_sint32 = 60; + map map_sint64_sint64 = 61; + map map_fixed32_fixed32 = 62; + map map_fixed64_fixed64 = 63; + map map_sfixed32_sfixed32 = 64; + map map_sfixed64_sfixed64 = 65; + map map_int32_float = 66; + map map_int32_double = 67; + map map_bool_bool = 68; + map map_string_string = 69; + map map_string_bytes = 70; + map map_string_nested_message = 71; + map map_string_foreign_message = 72; + map map_string_nested_enum = 73; + map map_string_foreign_enum = 74; oneof oneof_field { uint32 oneof_uint32 = 111; diff --git a/third_party/protobuf/src/google/protobuf/test_util.h b/third_party/protobuf/src/google/protobuf/test_util.h index 47d3d719..de48c1a4 100644 --- a/third_party/protobuf/src/google/protobuf/test_util.h +++ b/third_party/protobuf/src/google/protobuf/test_util.h @@ -69,9 +69,7 @@ class ReflectionTester { void ExpectClearViaReflection(const Message& message); void SetPackedFieldsViaReflection(Message* message); - void ModifyPackedFieldsViaReflection(Message* message); void ExpectPackedFieldsSetViaReflection(const Message& message); - void ExpectPackedClearViaReflection(const Message& message); void RemoveLastRepeatedsViaReflection(Message* message); void ReleaseLastRepeatedsViaReflection(Message* message, @@ -1058,26 +1056,6 @@ inline void TestUtil::ReflectionTester::ExpectClearViaReflection( &scratch)); } -inline void TestUtil::ReflectionTester::ExpectPackedClearViaReflection( - const Message& message) { - const Reflection* reflection = message.GetReflection(); - - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_int32"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_int64"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_uint32"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_uint64"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_sint32"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_sint64"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_fixed32"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_fixed64"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_sfixed32"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_sfixed64"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_float"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_double"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_bool"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_enum"))); -} - // ------------------------------------------------------------------- inline void TestUtil::ReflectionTester::ModifyRepeatedFieldsViaReflection( @@ -1128,25 +1106,6 @@ inline void TestUtil::ReflectionTester::ModifyRepeatedFieldsViaReflection( reflection->SetRepeatedString(message, F("repeated_cord"), 1, "525"); } -inline void TestUtil::ReflectionTester::ModifyPackedFieldsViaReflection( - Message* message) { - const Reflection* reflection = message->GetReflection(); - reflection->SetRepeatedInt32(message, F("packed_int32"), 1, 801); - reflection->SetRepeatedInt64(message, F("packed_int64"), 1, 802); - reflection->SetRepeatedUInt32(message, F("packed_uint32"), 1, 803); - reflection->SetRepeatedUInt64(message, F("packed_uint64"), 1, 804); - reflection->SetRepeatedInt32(message, F("packed_sint32"), 1, 805); - reflection->SetRepeatedInt64(message, F("packed_sint64"), 1, 806); - reflection->SetRepeatedUInt32(message, F("packed_fixed32"), 1, 807); - reflection->SetRepeatedUInt64(message, F("packed_fixed64"), 1, 808); - reflection->SetRepeatedInt32(message, F("packed_sfixed32"), 1, 809); - reflection->SetRepeatedInt64(message, F("packed_sfixed64"), 1, 810); - reflection->SetRepeatedFloat(message, F("packed_float"), 1, 811); - reflection->SetRepeatedDouble(message, F("packed_double"), 1, 812); - reflection->SetRepeatedBool(message, F("packed_bool"), 1, true); - reflection->SetRepeatedEnum(message, F("packed_enum"), 1, foreign_foo_); -} - inline void TestUtil::ReflectionTester::RemoveLastRepeatedsViaReflection( Message* message) { const Reflection* reflection = message->GetReflection(); diff --git a/third_party/protobuf/src/google/protobuf/test_util.inc b/third_party/protobuf/src/google/protobuf/test_util.inc index 7c1bfc19..0f1b147b 100644 --- a/third_party/protobuf/src/google/protobuf/test_util.inc +++ b/third_party/protobuf/src/google/protobuf/test_util.inc @@ -69,8 +69,6 @@ inline void SetOneof2(UNITTEST::TestOneof2* message); // the add_*() accessors. inline void ModifyRepeatedFields(UNITTEST::TestAllTypes* message); inline void ModifyRepeatedExtensions(UNITTEST::TestAllExtensions* message); -inline void ModifyPackedFields(UNITTEST::TestPackedTypes* message); -inline void ModifyPackedExtensions(UNITTEST::TestPackedExtensions* message); // Check that all fields have the values that they should have after // Set*Fields() is called. @@ -90,17 +88,10 @@ inline void ExpectOneofSet2(const UNITTEST::TestOneof2& message); inline void ExpectRepeatedFieldsModified(const UNITTEST::TestAllTypes& message); inline void ExpectRepeatedExtensionsModified( const UNITTEST::TestAllExtensions& message); -inline void ExpectPackedFieldsModified( - const UNITTEST::TestPackedTypes& message); -inline void ExpectPackedExtensionsModified( - const UNITTEST::TestPackedExtensions& message); // Check that all fields have their default values. inline void ExpectClear(const UNITTEST::TestAllTypes& message); inline void ExpectExtensionsClear(const UNITTEST::TestAllExtensions& message); -inline void ExpectPackedClear(const UNITTEST::TestPackedTypes& message); -inline void ExpectPackedExtensionsClear( - const UNITTEST::TestPackedExtensions& message); inline void ExpectOneofClear(const UNITTEST::TestOneof2& message); // Check that all repeated fields have had their last elements removed. @@ -853,25 +844,6 @@ inline void TestUtil::SetUnpackedFields(UNITTEST::TestUnpackedTypes* message) { // ------------------------------------------------------------------- -inline void TestUtil::ModifyPackedFields(UNITTEST::TestPackedTypes* message) { - message->set_packed_int32(1, 801); - message->set_packed_int64(1, 802); - message->set_packed_uint32(1, 803); - message->set_packed_uint64(1, 804); - message->set_packed_sint32(1, 805); - message->set_packed_sint64(1, 806); - message->set_packed_fixed32(1, 807); - message->set_packed_fixed64(1, 808); - message->set_packed_sfixed32(1, 809); - message->set_packed_sfixed64(1, 810); - message->set_packed_float(1, 811); - message->set_packed_double(1, 812); - message->set_packed_bool(1, true); - message->set_packed_enum(1, UNITTEST::FOREIGN_FOO); -} - -// ------------------------------------------------------------------- - inline void TestUtil::ExpectPackedFieldsSet( const UNITTEST::TestPackedTypes& message) { ASSERT_EQ(2, message.packed_int32_size()); @@ -970,78 +942,6 @@ inline void TestUtil::ExpectUnpackedFieldsSet( EXPECT_EQ(UNITTEST::FOREIGN_BAZ, message.unpacked_enum(1)); } -// ------------------------------------------------------------------- - -inline void TestUtil::ExpectPackedClear( - const UNITTEST::TestPackedTypes& message) { - // Packed repeated fields are empty. - EXPECT_EQ(0, message.packed_int32_size()); - EXPECT_EQ(0, message.packed_int64_size()); - EXPECT_EQ(0, message.packed_uint32_size()); - EXPECT_EQ(0, message.packed_uint64_size()); - EXPECT_EQ(0, message.packed_sint32_size()); - EXPECT_EQ(0, message.packed_sint64_size()); - EXPECT_EQ(0, message.packed_fixed32_size()); - EXPECT_EQ(0, message.packed_fixed64_size()); - EXPECT_EQ(0, message.packed_sfixed32_size()); - EXPECT_EQ(0, message.packed_sfixed64_size()); - EXPECT_EQ(0, message.packed_float_size()); - EXPECT_EQ(0, message.packed_double_size()); - EXPECT_EQ(0, message.packed_bool_size()); - EXPECT_EQ(0, message.packed_enum_size()); -} - -// ------------------------------------------------------------------- - -inline void TestUtil::ExpectPackedFieldsModified( - const UNITTEST::TestPackedTypes& message) { - // Do the same for packed repeated fields. - ASSERT_EQ(2, message.packed_int32_size()); - ASSERT_EQ(2, message.packed_int64_size()); - ASSERT_EQ(2, message.packed_uint32_size()); - ASSERT_EQ(2, message.packed_uint64_size()); - ASSERT_EQ(2, message.packed_sint32_size()); - ASSERT_EQ(2, message.packed_sint64_size()); - ASSERT_EQ(2, message.packed_fixed32_size()); - ASSERT_EQ(2, message.packed_fixed64_size()); - ASSERT_EQ(2, message.packed_sfixed32_size()); - ASSERT_EQ(2, message.packed_sfixed64_size()); - ASSERT_EQ(2, message.packed_float_size()); - ASSERT_EQ(2, message.packed_double_size()); - ASSERT_EQ(2, message.packed_bool_size()); - ASSERT_EQ(2, message.packed_enum_size()); - - EXPECT_EQ(601, message.packed_int32(0)); - EXPECT_EQ(602, message.packed_int64(0)); - EXPECT_EQ(603, message.packed_uint32(0)); - EXPECT_EQ(604, message.packed_uint64(0)); - EXPECT_EQ(605, message.packed_sint32(0)); - EXPECT_EQ(606, message.packed_sint64(0)); - EXPECT_EQ(607, message.packed_fixed32(0)); - EXPECT_EQ(608, message.packed_fixed64(0)); - EXPECT_EQ(609, message.packed_sfixed32(0)); - EXPECT_EQ(610, message.packed_sfixed64(0)); - EXPECT_EQ(611, message.packed_float(0)); - EXPECT_EQ(612, message.packed_double(0)); - EXPECT_TRUE(message.packed_bool(0)); - EXPECT_EQ(UNITTEST::FOREIGN_BAR, message.packed_enum(0)); - // Actually verify the second (modified) elements now. - EXPECT_EQ(801, message.packed_int32(1)); - EXPECT_EQ(802, message.packed_int64(1)); - EXPECT_EQ(803, message.packed_uint32(1)); - EXPECT_EQ(804, message.packed_uint64(1)); - EXPECT_EQ(805, message.packed_sint32(1)); - EXPECT_EQ(806, message.packed_sint64(1)); - EXPECT_EQ(807, message.packed_fixed32(1)); - EXPECT_EQ(808, message.packed_fixed64(1)); - EXPECT_EQ(809, message.packed_sfixed32(1)); - EXPECT_EQ(810, message.packed_sfixed64(1)); - EXPECT_EQ(811, message.packed_float(1)); - EXPECT_EQ(812, message.packed_double(1)); - EXPECT_TRUE(message.packed_bool(1)); - EXPECT_EQ(UNITTEST::FOREIGN_FOO, message.packed_enum(1)); -} - // =================================================================== // Extensions // @@ -1908,27 +1808,6 @@ inline void TestUtil::SetPackedExtensions( // ------------------------------------------------------------------- -inline void TestUtil::ModifyPackedExtensions( - UNITTEST::TestPackedExtensions* message) { - message->SetExtension(UNITTEST::packed_int32_extension, 1, 801); - message->SetExtension(UNITTEST::packed_int64_extension, 1, 802); - message->SetExtension(UNITTEST::packed_uint32_extension, 1, 803); - message->SetExtension(UNITTEST::packed_uint64_extension, 1, 804); - message->SetExtension(UNITTEST::packed_sint32_extension, 1, 805); - message->SetExtension(UNITTEST::packed_sint64_extension, 1, 806); - message->SetExtension(UNITTEST::packed_fixed32_extension, 1, 807); - message->SetExtension(UNITTEST::packed_fixed64_extension, 1, 808); - message->SetExtension(UNITTEST::packed_sfixed32_extension, 1, 809); - message->SetExtension(UNITTEST::packed_sfixed64_extension, 1, 810); - message->SetExtension(UNITTEST::packed_float_extension, 1, 811); - message->SetExtension(UNITTEST::packed_double_extension, 1, 812); - message->SetExtension(UNITTEST::packed_bool_extension, 1, true); - message->SetExtension(UNITTEST::packed_enum_extension, 1, - UNITTEST::FOREIGN_FOO); -} - -// ------------------------------------------------------------------- - inline void TestUtil::ExpectPackedExtensionsSet( const UNITTEST::TestPackedExtensions& message) { ASSERT_EQ(2, message.ExtensionSize(UNITTEST::packed_int32_extension)); @@ -1980,78 +1859,6 @@ inline void TestUtil::ExpectPackedExtensionsSet( // ------------------------------------------------------------------- -inline void TestUtil::ExpectPackedExtensionsClear( - const UNITTEST::TestPackedExtensions& message) { - EXPECT_EQ(0, message.ExtensionSize(UNITTEST::packed_int32_extension)); - EXPECT_EQ(0, message.ExtensionSize(UNITTEST::packed_int64_extension)); - EXPECT_EQ(0, message.ExtensionSize(UNITTEST::packed_uint32_extension)); - EXPECT_EQ(0, message.ExtensionSize(UNITTEST::packed_uint64_extension)); - EXPECT_EQ(0, message.ExtensionSize(UNITTEST::packed_sint32_extension)); - EXPECT_EQ(0, message.ExtensionSize(UNITTEST::packed_sint64_extension)); - EXPECT_EQ(0, message.ExtensionSize(UNITTEST::packed_fixed32_extension)); - EXPECT_EQ(0, message.ExtensionSize(UNITTEST::packed_fixed64_extension)); - EXPECT_EQ(0, message.ExtensionSize(UNITTEST::packed_sfixed32_extension)); - EXPECT_EQ(0, message.ExtensionSize(UNITTEST::packed_sfixed64_extension)); - EXPECT_EQ(0, message.ExtensionSize(UNITTEST::packed_float_extension)); - EXPECT_EQ(0, message.ExtensionSize(UNITTEST::packed_double_extension)); - EXPECT_EQ(0, message.ExtensionSize(UNITTEST::packed_bool_extension)); - EXPECT_EQ(0, message.ExtensionSize(UNITTEST::packed_enum_extension)); -} - -// ------------------------------------------------------------------- - -inline void TestUtil::ExpectPackedExtensionsModified( - const UNITTEST::TestPackedExtensions& message) { - ASSERT_EQ(2, message.ExtensionSize(UNITTEST::packed_int32_extension)); - ASSERT_EQ(2, message.ExtensionSize(UNITTEST::packed_int64_extension)); - ASSERT_EQ(2, message.ExtensionSize(UNITTEST::packed_uint32_extension)); - ASSERT_EQ(2, message.ExtensionSize(UNITTEST::packed_uint64_extension)); - ASSERT_EQ(2, message.ExtensionSize(UNITTEST::packed_sint32_extension)); - ASSERT_EQ(2, message.ExtensionSize(UNITTEST::packed_sint64_extension)); - ASSERT_EQ(2, message.ExtensionSize(UNITTEST::packed_fixed32_extension)); - ASSERT_EQ(2, message.ExtensionSize(UNITTEST::packed_fixed64_extension)); - ASSERT_EQ(2, message.ExtensionSize(UNITTEST::packed_sfixed32_extension)); - ASSERT_EQ(2, message.ExtensionSize(UNITTEST::packed_sfixed64_extension)); - ASSERT_EQ(2, message.ExtensionSize(UNITTEST::packed_float_extension)); - ASSERT_EQ(2, message.ExtensionSize(UNITTEST::packed_double_extension)); - ASSERT_EQ(2, message.ExtensionSize(UNITTEST::packed_bool_extension)); - ASSERT_EQ(2, message.ExtensionSize(UNITTEST::packed_enum_extension)); - EXPECT_EQ(601, message.GetExtension(UNITTEST::packed_int32_extension, 0)); - EXPECT_EQ(602, message.GetExtension(UNITTEST::packed_int64_extension, 0)); - EXPECT_EQ(603, message.GetExtension(UNITTEST::packed_uint32_extension, 0)); - EXPECT_EQ(604, message.GetExtension(UNITTEST::packed_uint64_extension, 0)); - EXPECT_EQ(605, message.GetExtension(UNITTEST::packed_sint32_extension, 0)); - EXPECT_EQ(606, message.GetExtension(UNITTEST::packed_sint64_extension, 0)); - EXPECT_EQ(607, message.GetExtension(UNITTEST::packed_fixed32_extension, 0)); - EXPECT_EQ(608, message.GetExtension(UNITTEST::packed_fixed64_extension, 0)); - EXPECT_EQ(609, message.GetExtension(UNITTEST::packed_sfixed32_extension, 0)); - EXPECT_EQ(610, message.GetExtension(UNITTEST::packed_sfixed64_extension, 0)); - EXPECT_EQ(611, message.GetExtension(UNITTEST::packed_float_extension, 0)); - EXPECT_EQ(612, message.GetExtension(UNITTEST::packed_double_extension, 0)); - EXPECT_TRUE(message.GetExtension(UNITTEST::packed_bool_extension, 0)); - EXPECT_EQ(UNITTEST::FOREIGN_BAR, - message.GetExtension(UNITTEST::packed_enum_extension, 0)); - - // Actually verify the second (modified) elements now. - EXPECT_EQ(801, message.GetExtension(UNITTEST::packed_int32_extension, 1)); - EXPECT_EQ(802, message.GetExtension(UNITTEST::packed_int64_extension, 1)); - EXPECT_EQ(803, message.GetExtension(UNITTEST::packed_uint32_extension, 1)); - EXPECT_EQ(804, message.GetExtension(UNITTEST::packed_uint64_extension, 1)); - EXPECT_EQ(805, message.GetExtension(UNITTEST::packed_sint32_extension, 1)); - EXPECT_EQ(806, message.GetExtension(UNITTEST::packed_sint64_extension, 1)); - EXPECT_EQ(807, message.GetExtension(UNITTEST::packed_fixed32_extension, 1)); - EXPECT_EQ(808, message.GetExtension(UNITTEST::packed_fixed64_extension, 1)); - EXPECT_EQ(809, message.GetExtension(UNITTEST::packed_sfixed32_extension, 1)); - EXPECT_EQ(810, message.GetExtension(UNITTEST::packed_sfixed64_extension, 1)); - EXPECT_EQ(811, message.GetExtension(UNITTEST::packed_float_extension, 1)); - EXPECT_EQ(812, message.GetExtension(UNITTEST::packed_double_extension, 1)); - EXPECT_TRUE(message.GetExtension(UNITTEST::packed_bool_extension, 1)); - EXPECT_EQ(UNITTEST::FOREIGN_FOO, - message.GetExtension(UNITTEST::packed_enum_extension, 1)); -} - -// ------------------------------------------------------------------- - inline void TestUtil::ExpectUnpackedExtensionsSet( const UNITTEST::TestUnpackedExtensions& message) { ASSERT_EQ(2, message.ExtensionSize(UNITTEST::unpacked_int32_extension)); diff --git a/third_party/protobuf/src/google/protobuf/test_util2.h b/third_party/protobuf/src/google/protobuf/test_util2.h index d1cf2119..f12addb3 100644 --- a/third_party/protobuf/src/google/protobuf/test_util2.h +++ b/third_party/protobuf/src/google/protobuf/test_util2.h @@ -36,7 +36,6 @@ #include #include - namespace google { namespace protobuf { namespace TestUtil { diff --git a/third_party/protobuf/src/google/protobuf/test_util_lite.cc b/third_party/protobuf/src/google/protobuf/test_util_lite.cc index a83d1092..a897fe26 100644 --- a/third_party/protobuf/src/google/protobuf/test_util_lite.cc +++ b/third_party/protobuf/src/google/protobuf/test_util_lite.cc @@ -33,10 +33,11 @@ // Sanjay Ghemawat, Jeff Dean, and others. #include + #include #include #include - +#include namespace google { namespace protobuf { diff --git a/third_party/protobuf/src/google/protobuf/testing/zcgunzip.cc b/third_party/protobuf/src/google/protobuf/testing/zcgunzip.cc index 349ad86e..68f8172f 100644 --- a/third_party/protobuf/src/google/protobuf/testing/zcgunzip.cc +++ b/third_party/protobuf/src/google/protobuf/testing/zcgunzip.cc @@ -39,9 +39,10 @@ // output. #include +#include #include #include -#include +#include #ifdef _WIN32 #ifndef STDIN_FILENO diff --git a/third_party/protobuf/src/google/protobuf/testing/zcgzip.cc b/third_party/protobuf/src/google/protobuf/testing/zcgzip.cc index 992ddc6e..808d058a 100644 --- a/third_party/protobuf/src/google/protobuf/testing/zcgzip.cc +++ b/third_party/protobuf/src/google/protobuf/testing/zcgzip.cc @@ -38,9 +38,10 @@ // Reads data on standard input and writes compressed gzip stream to standard // output. +#include #include #include -#include +#include #ifdef _WIN32 #ifndef STDIN_FILENO diff --git a/third_party/protobuf/src/google/protobuf/text_format.cc b/third_party/protobuf/src/google/protobuf/text_format.cc index 801a8e37..8f4771de 100644 --- a/third_party/protobuf/src/google/protobuf/text_format.cc +++ b/third_party/protobuf/src/google/protobuf/text_format.cc @@ -35,17 +35,17 @@ #include #include -#include #include + #include #include +#include #include #include #include #include #include -#include #include #include #include @@ -54,18 +54,15 @@ #include #include #include +#include #include #include #include #include - - - +#include #include #include -#include - namespace google { namespace protobuf { @@ -104,7 +101,7 @@ std::string Message::ShortDebugString() const { printer.PrintToString(*this, &debug_string); // Single line mode currently might have an extra space at the end. - if (debug_string.size() > 0 && debug_string[debug_string.size() - 1] == ' ') { + if (!debug_string.empty() && debug_string[debug_string.size() - 1] == ' ') { debug_string.resize(debug_string.size() - 1); } @@ -128,15 +125,6 @@ void Message::PrintDebugString() const { printf("%s", DebugString().c_str()); } // =========================================================================== // Implementation of the parse information tree class. -TextFormat::ParseInfoTree::ParseInfoTree() {} - -TextFormat::ParseInfoTree::~ParseInfoTree() { - // Remove any nested information trees, as they are owned by this tree. - for (NestedMap::iterator it = nested_.begin(); it != nested_.end(); ++it) { - STLDeleteElements(&(it->second)); - } -} - void TextFormat::ParseInfoTree::RecordLocation( const FieldDescriptor* field, TextFormat::ParseLocation location) { locations_[field].push_back(location); @@ -145,15 +133,13 @@ void TextFormat::ParseInfoTree::RecordLocation( TextFormat::ParseInfoTree* TextFormat::ParseInfoTree::CreateNested( const FieldDescriptor* field) { // Owned by us in the map. - TextFormat::ParseInfoTree* instance = new TextFormat::ParseInfoTree(); - std::vector* trees = &nested_[field]; - GOOGLE_CHECK(trees); - trees->push_back(instance); - return instance; + auto& vec = nested_[field]; + vec.emplace_back(new TextFormat::ParseInfoTree()); + return vec.back().get(); } void CheckFieldIndex(const FieldDescriptor* field, int index) { - if (field == NULL) { + if (field == nullptr) { return; } @@ -175,7 +161,7 @@ TextFormat::ParseLocation TextFormat::ParseInfoTree::GetLocation( const std::vector* locations = FindOrNull(locations_, field); - if (locations == NULL || index >= locations->size()) { + if (locations == nullptr || index >= locations->size()) { return TextFormat::ParseLocation(); } @@ -189,21 +175,27 @@ TextFormat::ParseInfoTree* TextFormat::ParseInfoTree::GetTreeForNested( index = 0; } - const std::vector* trees = - FindOrNull(nested_, field); - if (trees == NULL || index >= trees->size()) { - return NULL; + auto it = nested_.find(field); + if (it == nested_.end() || index >= it->second.size()) { + return nullptr; } - return (*trees)[index]; + return it->second[index].get(); } namespace { // These functions implement the behavior of the "default" TextFormat::Finder, -// they are defined as standalone to be called when finder_ is NULL. +// they are defined as standalone to be called when finder_ is nullptr. const FieldDescriptor* DefaultFinderFindExtension(Message* message, const std::string& name) { - return message->GetReflection()->FindKnownExtensionByName(name); + const Descriptor* descriptor = message->GetDescriptor(); + return descriptor->file()->pool()->FindExtensionByPrintableName(descriptor, + name); +} + +const FieldDescriptor* DefaultFinderFindExtensionByNumber( + const Descriptor* descriptor, int number) { + return descriptor->file()->pool()->FindExtensionByNumber(descriptor, number); } const Descriptor* DefaultFinderFindAnyType(const Message& message, @@ -211,7 +203,7 @@ const Descriptor* DefaultFinderFindAnyType(const Message& message, const std::string& name) { if (prefix != internal::kTypeGoogleApisComPrefix && prefix != internal::kTypeGoogleProdComPrefix) { - return NULL; + return nullptr; } return message.GetDescriptor()->file()->pool()->FindMessageTypeByName(name); } @@ -312,7 +304,7 @@ class TextFormat::Parser::ParserImpl { void ReportError(int line, int col, const std::string& message) { had_errors_ = true; - if (error_collector_ == NULL) { + if (error_collector_ == nullptr) { if (line >= 0) { GOOGLE_LOG(ERROR) << "Error parsing text-format " << root_message_type_->full_name() << ": " << (line + 1) @@ -327,7 +319,7 @@ class TextFormat::Parser::ParserImpl { } void ReportWarning(int line, int col, const std::string& message) { - if (error_collector_ == NULL) { + if (error_collector_ == nullptr) { if (line >= 0) { GOOGLE_LOG(WARNING) << "Warning parsing text-format " << root_message_type_->full_name() << ": " << (line + 1) @@ -391,7 +383,7 @@ class TextFormat::Parser::ParserImpl { std::string field_name; bool reserved_field = false; - const FieldDescriptor* field = NULL; + const FieldDescriptor* field = nullptr; int start_line = tokenizer_.current().line; int start_column = tokenizer_.current().column; @@ -408,7 +400,7 @@ class TextFormat::Parser::ParserImpl { const Descriptor* value_descriptor = finder_ ? finder_->FindAnyType(*message, prefix, full_type_name) : DefaultFinderFindAnyType(*message, prefix, full_type_name); - if (value_descriptor == NULL) { + if (value_descriptor == nullptr) { ReportError("Could not find type \"" + prefix + full_type_name + "\" stored in google.protobuf.Any."); return false; @@ -437,7 +429,7 @@ class TextFormat::Parser::ParserImpl { field = finder_ ? finder_->FindExtension(message, field_name) : DefaultFinderFindExtension(message, field_name); - if (field == NULL) { + if (field == nullptr) { if (!allow_unknown_field_ && !allow_unknown_extension_) { ReportError("Extension \"" + field_name + "\" is not defined or " @@ -457,7 +449,10 @@ class TextFormat::Parser::ParserImpl { if (allow_field_number_ && safe_strto32(field_name, &field_number)) { if (descriptor->IsExtensionNumber(field_number)) { - field = reflection->FindKnownExtensionByNumber(field_number); + field = finder_ + ? finder_->FindExtensionByNumber(descriptor, field_number) + : DefaultFinderFindExtensionByNumber(descriptor, + field_number); } else if (descriptor->IsReservedNumber(field_number)) { reserved_field = true; } else { @@ -468,33 +463,34 @@ class TextFormat::Parser::ParserImpl { // Group names are expected to be capitalized as they appear in the // .proto file, which actually matches their type names, not their // field names. - if (field == NULL) { + if (field == nullptr) { std::string lower_field_name = field_name; LowerString(&lower_field_name); field = descriptor->FindFieldByName(lower_field_name); // If the case-insensitive match worked but the field is NOT a group, - if (field != NULL && field->type() != FieldDescriptor::TYPE_GROUP) { - field = NULL; + if (field != nullptr && + field->type() != FieldDescriptor::TYPE_GROUP) { + field = nullptr; } } // Again, special-case group names as described above. - if (field != NULL && field->type() == FieldDescriptor::TYPE_GROUP && + if (field != nullptr && field->type() == FieldDescriptor::TYPE_GROUP && field->message_type()->name() != field_name) { - field = NULL; + field = nullptr; } - if (field == NULL && allow_case_insensitive_field_) { + if (field == nullptr && allow_case_insensitive_field_) { std::string lower_field_name = field_name; LowerString(&lower_field_name); field = descriptor->FindFieldByLowercaseName(lower_field_name); } - if (field == NULL) { + if (field == nullptr) { reserved_field = descriptor->IsReservedName(field_name); } } - if (field == NULL && !reserved_field) { + if (field == nullptr && !reserved_field) { if (!allow_unknown_field_) { ReportError("Message type \"" + descriptor->full_name() + "\" has no field named \"" + field_name + "\"."); @@ -507,7 +503,7 @@ class TextFormat::Parser::ParserImpl { } // Skips unknown or reserved fields. - if (field == NULL) { + if (field == nullptr) { GOOGLE_CHECK(allow_unknown_field_ || allow_unknown_extension_ || reserved_field); // Try to guess the type of this field. @@ -533,7 +529,7 @@ class TextFormat::Parser::ParserImpl { // Fail if the field is a member of a oneof and another member has already // been specified. const OneofDescriptor* oneof = field->containing_oneof(); - if (oneof != NULL && reflection->HasOneof(*message, oneof)) { + if (oneof != nullptr && reflection->HasOneof(*message, oneof)) { const FieldDescriptor* other_field = reflection->GetOneofFieldDescriptor(*message, oneof); ReportError("Field \"" + field_name + @@ -601,7 +597,7 @@ class TextFormat::Parser::ParserImpl { // If a parse info tree exists, add the location for the parsed // field. - if (parse_info_tree_ != NULL) { + if (parse_info_tree_ != nullptr) { RecordLocation(parse_info_tree_, field, ParseLocation(start_line, start_column)); } @@ -643,10 +639,10 @@ class TextFormat::Parser::ParserImpl { ReportError("Message is too deep"); return false; } - // If the parse information tree is not NULL, create a nested one + // If the parse information tree is not nullptr, create a nested one // for the nested message. ParseInfoTree* parent = parse_info_tree_; - if (parent != NULL) { + if (parent != nullptr) { parse_info_tree_ = CreateNested(parent, field); } @@ -768,7 +764,7 @@ class TextFormat::Parser::ParserImpl { std::string value; int64 int_value = kint64max; const EnumDescriptor* enum_type = field->enum_type(); - const EnumValueDescriptor* enum_value = NULL; + const EnumValueDescriptor* enum_value = nullptr; if (LookingAtType(io::Tokenizer::TYPE_IDENTIFIER)) { DO(ConsumeIdentifier(&value)); @@ -786,7 +782,7 @@ class TextFormat::Parser::ParserImpl { return false; } - if (enum_value == NULL) { + if (enum_value == nullptr) { if (int_value != kint64max && reflection->SupportsUnknownEnumValues()) { SET_FIELD(EnumValue, int_value); @@ -1111,7 +1107,7 @@ class TextFormat::Parser::ParserImpl { std::string* serialized_value) { DynamicMessageFactory factory; const Message* value_prototype = factory.GetPrototype(value_descriptor); - if (value_prototype == NULL) { + if (value_prototype == nullptr) { return false; } std::unique_ptr value(value_prototype->New()); @@ -1209,7 +1205,7 @@ class TextFormat::Printer::TextGenerator explicit TextGenerator(io::ZeroCopyOutputStream* output, int initial_indent_level) : output_(output), - buffer_(NULL), + buffer_(nullptr), buffer_size_(0), at_start_of_line_(true), failed_(false), @@ -1240,6 +1236,10 @@ class TextFormat::Printer::TextGenerator --indent_level_; } + size_t GetCurrentIndentationSize() const override { + return 2 * indent_level_; + } + // Print text to the output stream. void Print(const char* text, size_t size) override { if (indent_level_ > 0) { @@ -1293,7 +1293,7 @@ class TextFormat::Printer::TextGenerator data += buffer_size_; size -= buffer_size_; } - void* void_buffer = NULL; + void* void_buffer = nullptr; failed_ = !output_->Next(&void_buffer, &buffer_size_); if (failed_) return; buffer_ = reinterpret_cast(void_buffer); @@ -1310,7 +1310,7 @@ class TextFormat::Printer::TextGenerator return; } GOOGLE_DCHECK(!failed_); - int size = 2 * indent_level_; + int size = GetCurrentIndentationSize(); while (size > buffer_size_) { // Data exceeds space in the buffer. Write what we can and request a new @@ -1350,6 +1350,11 @@ const FieldDescriptor* TextFormat::Finder::FindExtension( return DefaultFinderFindExtension(message, name); } +const FieldDescriptor* TextFormat::Finder::FindExtensionByNumber( + const Descriptor* descriptor, int number) const { + return DefaultFinderFindExtensionByNumber(descriptor, number); +} + const Descriptor* TextFormat::Finder::FindAnyType( const Message& message, const std::string& prefix, const std::string& name) const { @@ -1364,9 +1369,9 @@ MessageFactory* TextFormat::Finder::FindExtensionFactory( // =========================================================================== TextFormat::Parser::Parser() - : error_collector_(NULL), - finder_(NULL), - parse_info_tree_(NULL), + : error_collector_(nullptr), + finder_(nullptr), + parse_info_tree_(nullptr), allow_partial_(false), allow_case_insensitive_field_(false), allow_unknown_field_(false), @@ -1615,11 +1620,11 @@ void TextFormat::FastFieldValuePrinter::PrintUInt64( } void TextFormat::FastFieldValuePrinter::PrintFloat( float val, BaseTextGenerator* generator) const { - generator->PrintString(SimpleFtoa(val)); + generator->PrintString(!std::isnan(val) ? SimpleFtoa(val) : "nan"); } void TextFormat::FastFieldValuePrinter::PrintDouble( double val, BaseTextGenerator* generator) const { - generator->PrintString(SimpleDtoa(val)); + generator->PrintString(!std::isnan(val) ? SimpleDtoa(val) : "nan"); } void TextFormat::FastFieldValuePrinter::PrintEnum( int32 val, const std::string& name, BaseTextGenerator* generator) const { @@ -1647,15 +1652,7 @@ void TextFormat::FastFieldValuePrinter::PrintFieldName( const FieldDescriptor* field, BaseTextGenerator* generator) const { if (field->is_extension()) { generator->PrintLiteral("["); - // We special-case MessageSet elements for compatibility with proto1. - if (field->containing_type()->options().message_set_wire_format() && - field->type() == FieldDescriptor::TYPE_MESSAGE && - field->is_optional() && - field->extension_scope() == field->message_type()) { - generator->PrintString(field->message_type()->full_name()); - } else { - generator->PrintString(field->full_name()); - } + generator->PrintString(field->PrintableNameForExtension()); generator->PrintLiteral("]"); } else if (field->type() == FieldDescriptor::TYPE_GROUP) { // Groups must be serialized with their original capitalization. @@ -1673,6 +1670,11 @@ void TextFormat::FastFieldValuePrinter::PrintMessageStart( generator->PrintLiteral(" {\n"); } } +bool TextFormat::FastFieldValuePrinter::PrintMessageContent( + const Message& message, int field_index, int field_count, + bool single_line_mode, BaseTextGenerator* generator) const { + return false; // Use the default printing function. +} void TextFormat::FastFieldValuePrinter::PrintMessageEnd( const Message& message, int field_index, int field_count, bool single_line_mode, BaseTextGenerator* generator) const { @@ -1795,15 +1797,10 @@ TextFormat::Printer::Printer() print_message_fields_in_index_order_(false), expand_any_(false), truncate_string_field_longer_than_(0LL), - finder_(NULL) { + finder_(nullptr) { SetUseUtf8StringEscaping(false); } -TextFormat::Printer::~Printer() { - STLDeleteValues(&custom_printers_); - STLDeleteValues(&custom_message_printers_); -} - void TextFormat::Printer::SetUseUtf8StringEscaping(bool as_utf8) { SetDefaultFieldValuePrinter(as_utf8 ? new FastFieldValuePrinterUtf8Escaping() : new FastFieldValuePrinter()); @@ -1821,36 +1818,53 @@ void TextFormat::Printer::SetDefaultFieldValuePrinter( bool TextFormat::Printer::RegisterFieldValuePrinter( const FieldDescriptor* field, const FieldValuePrinter* printer) { - if (field == NULL || printer == NULL) { + if (field == nullptr || printer == nullptr) { return false; } - FieldValuePrinterWrapper* const wrapper = - new FieldValuePrinterWrapper(nullptr); - if (custom_printers_.insert(std::make_pair(field, wrapper)).second) { + std::unique_ptr wrapper( + new FieldValuePrinterWrapper(nullptr)); + auto pair = custom_printers_.insert(std::make_pair(field, nullptr)); + if (pair.second) { wrapper->SetDelegate(printer); + pair.first->second = std::move(wrapper); return true; } else { - delete wrapper; return false; } } bool TextFormat::Printer::RegisterFieldValuePrinter( const FieldDescriptor* field, const FastFieldValuePrinter* printer) { - return field != NULL && printer != NULL && - custom_printers_.insert(std::make_pair(field, printer)).second; + if (field == nullptr || printer == nullptr) { + return false; + } + auto pair = custom_printers_.insert(std::make_pair(field, nullptr)); + if (pair.second) { + pair.first->second.reset(printer); + return true; + } else { + return false; + } } bool TextFormat::Printer::RegisterMessagePrinter( const Descriptor* descriptor, const MessagePrinter* printer) { - return descriptor != nullptr && printer != nullptr && - custom_message_printers_.insert(std::make_pair(descriptor, printer)) - .second; + if (descriptor == nullptr || printer == nullptr) { + return false; + } + auto pair = + custom_message_printers_.insert(std::make_pair(descriptor, nullptr)); + if (pair.second) { + pair.first->second.reset(printer); + return true; + } else { + return false; + } } bool TextFormat::Printer::PrintToString(const Message& message, std::string* output) const { - GOOGLE_DCHECK(output) << "output specified is NULL"; + GOOGLE_DCHECK(output) << "output specified is nullptr"; output->clear(); io::StringOutputStream output_stream(output); @@ -1860,7 +1874,7 @@ bool TextFormat::Printer::PrintToString(const Message& message, bool TextFormat::Printer::PrintUnknownFieldsToString( const UnknownFieldSet& unknown_fields, std::string* output) const { - GOOGLE_DCHECK(output) << "output specified is NULL"; + GOOGLE_DCHECK(output) << "output specified is nullptr"; output->clear(); io::StringOutputStream output_stream(output); @@ -1877,12 +1891,16 @@ bool TextFormat::Printer::Print(const Message& message, return !generator.failed(); } +// Maximum recursion depth for heuristically printing out length-delimited +// unknown fields as messages. +static constexpr int kUnknownFieldRecursionLimit = 10; + bool TextFormat::Printer::PrintUnknownFields( const UnknownFieldSet& unknown_fields, io::ZeroCopyOutputStream* output) const { TextGenerator generator(output, initial_indent_level_); - PrintUnknownFields(unknown_fields, &generator); + PrintUnknownFields(unknown_fields, &generator, kUnknownFieldRecursionLimit); // Output false if the generator failed internally. return !generator.failed(); @@ -1931,8 +1949,9 @@ bool TextFormat::Printer::PrintAny(const Message& message, const Descriptor* value_descriptor = finder_ ? finder_->FindAnyType(message, url_prefix, full_type_name) : DefaultFinderFindAnyType(message, url_prefix, full_type_name); - if (value_descriptor == NULL) { - GOOGLE_LOG(WARNING) << "Proto type " << type_url << " not found"; + if (value_descriptor == nullptr) { + GOOGLE_LOG(WARNING) << "Can't print proto content: proto type " << type_url + << " not found"; return false; } DynamicMessageFactory factory; @@ -1946,8 +1965,7 @@ bool TextFormat::Printer::PrintAny(const Message& message, generator->PrintLiteral("["); generator->PrintString(type_url); generator->PrintLiteral("]"); - const FastFieldValuePrinter* printer = FindWithDefault( - custom_printers_, value_field, default_field_value_printer_.get()); + const FastFieldValuePrinter* printer = GetFieldPrinter(value_field); printer->PrintMessageStart(message, -1, 0, single_line_mode_, generator); generator->Indent(); Print(*value_message, generator); @@ -1968,7 +1986,7 @@ void TextFormat::Printer::Print(const Message& message, io::ArrayInputStream input(serialized.data(), serialized.size()); unknown_fields.ParseFromZeroCopyStream(&input); } - PrintUnknownFields(unknown_fields, generator); + PrintUnknownFields(unknown_fields, generator, kUnknownFieldRecursionLimit); return; } const Descriptor* descriptor = message.GetDescriptor(); @@ -1996,7 +2014,8 @@ void TextFormat::Printer::Print(const Message& message, PrintField(message, reflection, fields[i], generator); } if (!hide_unknown_fields_) { - PrintUnknownFields(reflection->GetUnknownFields(message), generator); + PrintUnknownFields(reflection->GetUnknownFields(message), generator, + kUnknownFieldRecursionLimit); } } @@ -2004,7 +2023,7 @@ void TextFormat::Printer::PrintFieldValueToString(const Message& message, const FieldDescriptor* field, int index, std::string* output) const { - GOOGLE_DCHECK(output) << "output specified is NULL"; + GOOGLE_DCHECK(output) << "output specified is nullptr"; output->clear(); io::StringOutputStream output_stream(output); @@ -2085,7 +2104,7 @@ bool MapFieldPrinterHelper::SortMap( if (base.IsRepeatedFieldValid()) { const RepeatedPtrField& map_field = - reflection->GetRepeatedPtrField(message, field); + reflection->GetRepeatedPtrFieldInternal(message, field); for (int i = 0; i < map_field.size(); ++i) { sorted_map_field->push_back( const_cast*>(&map_field)->Mutable(i)); @@ -2222,8 +2241,7 @@ void TextFormat::Printer::PrintField(const Message& message, PrintFieldName(message, field_index, count, reflection, field, generator); if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - const FastFieldValuePrinter* printer = FindWithDefault( - custom_printers_, field, default_field_value_printer_.get()); + const FastFieldValuePrinter* printer = GetFieldPrinter(field); const Message& sub_message = field->is_repeated() ? (is_map ? *sorted_map_field[j] @@ -2232,7 +2250,10 @@ void TextFormat::Printer::PrintField(const Message& message, printer->PrintMessageStart(sub_message, field_index, count, single_line_mode_, generator); generator->Indent(); - Print(sub_message, generator); + if (!printer->PrintMessageContent(sub_message, field_index, count, + single_line_mode_, generator)) { + Print(sub_message, generator); + } generator->Outdent(); printer->PrintMessageEnd(sub_message, field_index, count, single_line_mode_, generator); @@ -2286,8 +2307,7 @@ void TextFormat::Printer::PrintFieldName(const Message& message, return; } - const FastFieldValuePrinter* printer = FindWithDefault( - custom_printers_, field, default_field_value_printer_.get()); + const FastFieldValuePrinter* printer = GetFieldPrinter(field); printer->PrintFieldName(message, field_index, field_count, reflection, field, generator); } @@ -2300,8 +2320,7 @@ void TextFormat::Printer::PrintFieldValue(const Message& message, GOOGLE_DCHECK(field->is_repeated() || (index == -1)) << "Index must be -1 for non-repeated fields"; - const FastFieldValuePrinter* printer = FindWithDefault( - custom_printers_, field, default_field_value_printer_.get()); + const FastFieldValuePrinter* printer = GetFieldPrinter(field); switch (field->cpp_type()) { #define OUTPUT_FIELD(CPPTYPE, METHOD) \ @@ -2353,7 +2372,7 @@ void TextFormat::Printer::PrintFieldValue(const Message& message, : reflection->GetEnumValue(message, field); const EnumValueDescriptor* enum_desc = field->enum_type()->FindValueByNumber(enum_value); - if (enum_desc != NULL) { + if (enum_desc != nullptr) { printer->PrintEnum(enum_value, enum_desc->name(), generator); } else { // Ordinarily, enum_desc should not be null, because proto2 has the @@ -2362,8 +2381,7 @@ void TextFormat::Printer::PrintFieldValue(const Message& message, // it is possible for the user to force an unknown integer value. So we // simply use the integer value itself as the enum value name in this // case. - printer->PrintEnum(enum_value, StringPrintf("%d", enum_value), - generator); + printer->PrintEnum(enum_value, StrCat(enum_value), generator); } break; } @@ -2408,20 +2426,9 @@ void TextFormat::Printer::PrintFieldValue(const Message& message, return Parser().ParseFieldValueFromString(input, field, message); } -// Prints an integer as hex with a fixed number of digits dependent on the -// integer type. -template -static std::string PaddedHex(IntType value) { - std::string result; - result.reserve(sizeof(value) * 2); - for (int i = sizeof(value) * 2 - 1; i >= 0; i--) { - result.push_back(int_to_hex_digit(value >> (i * 4) & 0x0F)); - } - return result; -} - void TextFormat::Printer::PrintUnknownFields( - const UnknownFieldSet& unknown_fields, TextGenerator* generator) const { + const UnknownFieldSet& unknown_fields, TextGenerator* generator, + int recursion_budget) const { for (int i = 0; i < unknown_fields.field_count(); i++) { const UnknownField& field = unknown_fields.field(i); std::string field_number = StrCat(field.number()); @@ -2464,8 +2471,15 @@ void TextFormat::Printer::PrintUnknownFields( case UnknownField::TYPE_LENGTH_DELIMITED: { generator->PrintString(field_number); const std::string& value = field.length_delimited(); + // We create a CodedInputStream so that we can adhere to our recursion + // budget when we attempt to parse the data. UnknownFieldSet parsing is + // recursive because of groups. + io::CodedInputStream input_stream( + reinterpret_cast(value.data()), value.size()); + input_stream.SetRecursionLimit(recursion_budget); UnknownFieldSet embedded_unknown_fields; - if (!value.empty() && embedded_unknown_fields.ParseFromString(value)) { + if (!value.empty() && recursion_budget > 0 && + embedded_unknown_fields.ParseFromCodedStream(&input_stream)) { // This field is parseable as a Message. // So it is probably an embedded message. if (single_line_mode_) { @@ -2474,7 +2488,8 @@ void TextFormat::Printer::PrintUnknownFields( generator->PrintLiteral(" {\n"); generator->Indent(); } - PrintUnknownFields(embedded_unknown_fields, generator); + PrintUnknownFields(embedded_unknown_fields, generator, + recursion_budget - 1); if (single_line_mode_) { generator->PrintLiteral("} "); } else { @@ -2482,8 +2497,8 @@ void TextFormat::Printer::PrintUnknownFields( generator->PrintLiteral("}\n"); } } else { - // This field is not parseable as a Message. - // So it is probably just a plain string. + // This field is not parseable as a Message (or we ran out of + // recursion budget). So it is probably just a plain string. generator->PrintLiteral(": \""); generator->PrintString(CEscape(value)); if (single_line_mode_) { @@ -2502,7 +2517,10 @@ void TextFormat::Printer::PrintUnknownFields( generator->PrintLiteral(" {\n"); generator->Indent(); } - PrintUnknownFields(field.group(), generator); + // For groups, we recurse without checking the budget. This is OK, + // because if the groups were too deeply nested then we would have + // already rejected the message when we originally parsed it. + PrintUnknownFields(field.group(), generator, recursion_budget - 1); if (single_line_mode_) { generator->PrintLiteral("} "); } else { diff --git a/third_party/protobuf/src/google/protobuf/text_format.h b/third_party/protobuf/src/google/protobuf/text_format.h index f999f472..26c4afbf 100644 --- a/third_party/protobuf/src/google/protobuf/text_format.h +++ b/third_party/protobuf/src/google/protobuf/text_format.h @@ -103,6 +103,8 @@ class PROTOBUF_EXPORT TextFormat { virtual void Indent() {} virtual void Outdent() {} + // Returns the current indentation size in characters. + virtual size_t GetCurrentIndentationSize() const { return 0; } // Print text to the output stream. virtual void Print(const char* text, size_t size) = 0; @@ -147,6 +149,14 @@ class PROTOBUF_EXPORT TextFormat { virtual void PrintMessageStart(const Message& message, int field_index, int field_count, bool single_line_mode, BaseTextGenerator* generator) const; + // Allows to override the logic on how to print the content of a message. + // Return false to use the default printing logic. Note that it is legal for + // this function to print something and then return false to use the default + // content printing (although at that point it would behave similarly to + // PrintMessageStart). + virtual bool PrintMessageContent(const Message& message, int field_index, + int field_count, bool single_line_mode, + BaseTextGenerator* generator) const; virtual void PrintMessageEnd(const Message& message, int field_index, int field_count, bool single_line_mode, BaseTextGenerator* generator) const; @@ -155,8 +165,8 @@ class PROTOBUF_EXPORT TextFormat { GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FastFieldValuePrinter); }; - class PROTOBUF_EXPORT PROTOBUF_DEPRECATED_MSG( - "Please use FastFieldValuePrinter") FieldValuePrinter { + // Deprecated: please use FastFieldValuePrinter instead. + class PROTOBUF_EXPORT FieldValuePrinter { public: FieldValuePrinter(); virtual ~FieldValuePrinter(); @@ -208,6 +218,11 @@ class PROTOBUF_EXPORT TextFormat { virtual const FieldDescriptor* FindExtension(Message* message, const std::string& name) const; + // Similar to FindExtension, but uses a Descriptor and the extension number + // instead of using a Message and the name when doing the look up. + virtual const FieldDescriptor* FindExtensionByNumber( + const Descriptor* descriptor, int number) const; + // Find the message type for an Any proto. // Returns NULL if no message is known for this name. // The base implementation only accepts prefixes of type.googleprod.com/ or @@ -229,7 +244,6 @@ class PROTOBUF_EXPORT TextFormat { class PROTOBUF_EXPORT Printer { public: Printer(); - ~Printer(); // Like TextFormat::Print bool Print(const Message& message, io::ZeroCopyOutputStream* output) const; @@ -280,10 +294,12 @@ class PROTOBUF_EXPORT TextFormat { // sequences. This will change the default FastFieldValuePrinter. void SetUseUtf8StringEscaping(bool as_utf8); - // Set the default (Fast)FieldValuePrinter that is used for all fields that + // Set the default FastFieldValuePrinter that is used for all fields that // don't have a field-specific printer registered. // Takes ownership of the printer. void SetDefaultFieldValuePrinter(const FastFieldValuePrinter* printer); + + PROTOBUF_DEPRECATED_MSG("Please use FastFieldValuePrinter") void SetDefaultFieldValuePrinter(const FieldValuePrinter* printer); // Sets whether we want to hide unknown fields or not. @@ -329,16 +345,18 @@ class PROTOBUF_EXPORT TextFormat { truncate_string_field_longer_than_ = truncate_string_field_longer_than; } - // Register a custom field-specific (Fast)FieldValuePrinter for fields + // Register a custom field-specific FastFieldValuePrinter for fields // with a particular FieldDescriptor. // Returns "true" if the registration succeeded, or "false", if there is // already a printer for that FieldDescriptor. // Takes ownership of the printer on successful registration. - bool RegisterFieldValuePrinter(const FieldDescriptor* field, - const FieldValuePrinter* printer); bool RegisterFieldValuePrinter(const FieldDescriptor* field, const FastFieldValuePrinter* printer); + PROTOBUF_DEPRECATED_MSG("Please use FastFieldValuePrinter") + bool RegisterFieldValuePrinter(const FieldDescriptor* field, + const FieldValuePrinter* printer); + // Register a custom message-specific MessagePrinter for messages with a // particular Descriptor. // Returns "true" if the registration succeeded, or "false" if there is @@ -381,34 +399,36 @@ class PROTOBUF_EXPORT TextFormat { // Print the fields in an UnknownFieldSet. They are printed by tag number // only. Embedded messages are heuristically identified by attempting to - // parse them. + // parse them (subject to the recursion budget). void PrintUnknownFields(const UnknownFieldSet& unknown_fields, - TextGenerator* generator) const; + TextGenerator* generator, + int recursion_budget) const; bool PrintAny(const Message& message, TextGenerator* generator) const; + const FastFieldValuePrinter* GetFieldPrinter( + const FieldDescriptor* field) const { + auto it = custom_printers_.find(field); + return it == custom_printers_.end() ? default_field_value_printer_.get() + : it->second.get(); + } + int initial_indent_level_; - bool single_line_mode_; - bool use_field_number_; - bool use_short_repeated_primitives_; - bool hide_unknown_fields_; - bool print_message_fields_in_index_order_; - bool expand_any_; - int64 truncate_string_field_longer_than_; std::unique_ptr default_field_value_printer_; - typedef std::map + typedef std::map> CustomPrinterMap; CustomPrinterMap custom_printers_; - typedef std::map + typedef std::map> CustomMessagePrinterMap; CustomMessagePrinterMap custom_message_printers_; @@ -461,8 +481,9 @@ class PROTOBUF_EXPORT TextFormat { // value parsed from the text. class PROTOBUF_EXPORT ParseInfoTree { public: - ParseInfoTree(); - ~ParseInfoTree(); + ParseInfoTree() = default; + ParseInfoTree(const ParseInfoTree&) = delete; + ParseInfoTree& operator=(const ParseInfoTree&) = delete; // Returns the parse location for index-th value of the field in the parsed // text. If none exists, returns a location with line = -1. Index should be @@ -491,13 +512,12 @@ class PROTOBUF_EXPORT TextFormat { // Defines the map from the index-th field descriptor to the nested parse // info tree. - typedef std::map > + typedef std::map>> NestedMap; LocationMap locations_; NestedMap nested_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ParseInfoTree); }; // For more control over parsing, use this class. diff --git a/third_party/protobuf/src/google/protobuf/text_format_unittest.cc b/third_party/protobuf/src/google/protobuf/text_format_unittest.cc index 11e4c106..72a2e6dd 100644 --- a/third_party/protobuf/src/google/protobuf/text_format_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/text_format_unittest.cc @@ -36,6 +36,7 @@ #include #include + #include #include @@ -54,12 +55,9 @@ #include #include #include - - #include #include #include -#include #include @@ -82,7 +80,7 @@ const std::string kEscapeTestStringEscaped = class TextFormatTest : public testing::Test { public: - static void SetUpTestCase() { + static void SetUpTestSuite() { GOOGLE_CHECK_OK(File::GetContents( TestUtil::GetTestDataPath( "net/proto2/internal/" @@ -105,7 +103,7 @@ std::string TextFormatTest::static_proto_debug_string_; class TextFormatExtensionsTest : public testing::Test { public: - static void SetUpTestCase() { + static void SetUpTestSuite() { GOOGLE_CHECK_OK(File::GetContents( TestUtil::GetTestDataPath("net/proto2/internal/testdata/" "text_format_unittest_extensions_data.txt"), @@ -358,6 +356,39 @@ TEST_F(TextFormatTest, PrintUnknownMessage) { text); } +TEST_F(TextFormatTest, PrintDeeplyNestedUnknownMessage) { + // Create a deeply nested message. + static constexpr int kNestingDepth = 25000; + static constexpr int kUnknownFieldNumber = 1; + std::vector lengths; + lengths.reserve(kNestingDepth); + lengths.push_back(0); + for (int i = 0; i < kNestingDepth - 1; ++i) { + lengths.push_back( + internal::WireFormatLite::TagSize( + kUnknownFieldNumber, internal::WireFormatLite::TYPE_BYTES) + + internal::WireFormatLite::LengthDelimitedSize(lengths.back())); + } + std::string serialized; + { + io::StringOutputStream zero_copy_stream(&serialized); + io::CodedOutputStream coded_stream(&zero_copy_stream); + for (int i = kNestingDepth - 1; i >= 0; --i) { + internal::WireFormatLite::WriteTag( + kUnknownFieldNumber, + internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, &coded_stream); + coded_stream.WriteVarint32(lengths[i]); + } + } + + // Parse the data and verify that we can print it without overflowing the + // stack. + unittest::TestEmptyMessage message; + ASSERT_TRUE(message.ParseFromString(serialized)); + std::string text; + EXPECT_TRUE(TextFormat::PrintToString(message, &text)); +} + TEST_F(TextFormatTest, PrintMessageWithIndent) { // Test adding an initial indent to printing. @@ -541,6 +572,54 @@ TEST_F(TextFormatTest, CustomPrinterForComments) { text); } +class CustomMessageContentFieldValuePrinter + : public TextFormat::FastFieldValuePrinter { + public: + bool PrintMessageContent( + const Message& message, int field_index, int field_count, + bool single_line_mode, + TextFormat::BaseTextGenerator* generator) const override { + if (message.ByteSizeLong() > 0) { + generator->PrintString( + strings::Substitute("# REDACTED, $0 bytes\n", message.ByteSizeLong())); + } + return true; + } +}; + +TEST_F(TextFormatTest, CustomPrinterForMessageContent) { + protobuf_unittest::TestAllTypes message; + message.mutable_optional_nested_message(); + message.mutable_optional_import_message()->set_d(42); + message.add_repeated_nested_message(); + message.add_repeated_nested_message(); + message.add_repeated_import_message()->set_d(43); + message.add_repeated_import_message()->set_d(44); + TextFormat::Printer printer; + CustomMessageContentFieldValuePrinter my_field_printer; + printer.SetDefaultFieldValuePrinter( + new CustomMessageContentFieldValuePrinter()); + std::string text; + printer.PrintToString(message, &text); + EXPECT_EQ( + "optional_nested_message {\n" + "}\n" + "optional_import_message {\n" + " # REDACTED, 2 bytes\n" + "}\n" + "repeated_nested_message {\n" + "}\n" + "repeated_nested_message {\n" + "}\n" + "repeated_import_message {\n" + " # REDACTED, 2 bytes\n" + "}\n" + "repeated_import_message {\n" + " # REDACTED, 2 bytes\n" + "}\n", + text); +} + class CustomMultilineCommentPrinter : public TextFormat::FieldValuePrinter { public: virtual std::string PrintMessageStart(const Message& message, int field_index, @@ -728,8 +807,8 @@ TEST_F(TextFormatExtensionsTest, ParseExtensions) { TEST_F(TextFormatTest, ParseEnumFieldFromNumber) { // Create a parse string with a numerical value for an enum field. - std::string parse_string = strings::Substitute("optional_nested_enum: $0", - unittest::TestAllTypes::BAZ); + std::string parse_string = + strings::Substitute("optional_nested_enum: $0", unittest::TestAllTypes::BAZ); EXPECT_TRUE(TextFormat::ParseFromString(parse_string, &proto_)); EXPECT_TRUE(proto_.has_optional_nested_enum()); EXPECT_EQ(unittest::TestAllTypes::BAZ, proto_.optional_nested_enum()); @@ -778,7 +857,7 @@ TEST_F(TextFormatTest, ParseUnknownEnumFieldProto3) { } TEST_F(TextFormatTest, ParseStringEscape) { - // Create a parse string with escpaed characters in it. + // Create a parse string with escaped characters in it. std::string parse_string = "optional_string: " + kEscapeTestStringEscaped + "\n"; @@ -1003,6 +1082,9 @@ TEST_F(TextFormatTest, PrintExotic) { message.add_repeated_double(std::numeric_limits::infinity()); message.add_repeated_double(-std::numeric_limits::infinity()); message.add_repeated_double(std::numeric_limits::quiet_NaN()); + message.add_repeated_double(-std::numeric_limits::quiet_NaN()); + message.add_repeated_double(std::numeric_limits::signaling_NaN()); + message.add_repeated_double(-std::numeric_limits::signaling_NaN()); message.add_repeated_string(std::string("\000\001\a\b\f\n\r\t\v\\\'\"", 12)); // Fun story: We used to use 1.23e22 instead of 1.23e21 above, but this @@ -1025,6 +1107,9 @@ TEST_F(TextFormatTest, PrintExotic) { "repeated_double: inf\n" "repeated_double: -inf\n" "repeated_double: nan\n" + "repeated_double: nan\n" + "repeated_double: nan\n" + "repeated_double: nan\n" "repeated_string: " "\"\\000\\001\\007\\010\\014\\n\\r\\t\\013\\\\\\'\\\"\"\n", RemoveRedundantZeros(message.DebugString())); @@ -1198,8 +1283,8 @@ TEST_F(TextFormatTest, ParseExotic) { -std::numeric_limits::infinity()); EXPECT_EQ(message.repeated_double(10), -std::numeric_limits::infinity()); - EXPECT_TRUE(MathLimits::IsNaN(message.repeated_double(11))); - EXPECT_TRUE(MathLimits::IsNaN(message.repeated_double(12))); + EXPECT_TRUE(std::isnan(message.repeated_double(11))); + EXPECT_TRUE(std::isnan(message.repeated_double(12))); // Note: Since these string literals have \0's in them, we must explicitly // pass their sizes to string's constructor. @@ -1361,7 +1446,7 @@ class TextFormatParserTest : public testing::Test { // implements ErrorCollector ------------------------------------- void AddError(int line, int column, const std::string& message) { strings::SubstituteAndAppend(&text_, "$0:$1: $2\n", line + 1, column + 1, - message); + message); } void AddWarning(int line, int column, const std::string& message) { diff --git a/third_party/protobuf/src/google/protobuf/timestamp.pb.cc b/third_party/protobuf/src/google/protobuf/timestamp.pb.cc index 65849a34..8b272102 100644 --- a/third_party/protobuf/src/google/protobuf/timestamp.pb.cc +++ b/third_party/protobuf/src/google/protobuf/timestamp.pb.cc @@ -5,7 +5,6 @@ #include -#include #include #include #include @@ -33,7 +32,7 @@ static void InitDefaultsscc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto}, {}}; static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2ftimestamp_2eproto[1]; static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ftimestamp_2eproto = nullptr; @@ -56,7 +55,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_), }; -const char descriptor_table_protodef_google_2fprotobuf_2ftimestamp_2eproto[] = +const char descriptor_table_protodef_google_2fprotobuf_2ftimestamp_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\037google/protobuf/timestamp.proto\022\017googl" "e.protobuf\"+\n\tTimestamp\022\017\n\007seconds\030\001 \001(\003" "\022\r\n\005nanos\030\002 \001(\005B~\n\023com.google.protobufB\016" @@ -70,47 +69,34 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_goo &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_once; -static bool descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ftimestamp_2eproto = { - &descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2ftimestamp_2eproto, "google/protobuf/timestamp.proto", 231, + false, false, descriptor_table_protodef_google_2fprotobuf_2ftimestamp_2eproto, "google/protobuf/timestamp.proto", 231, &descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_once, descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_sccs, descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_deps, 1, 0, schemas, file_default_instances, TableStruct_google_2fprotobuf_2ftimestamp_2eproto::offsets, file_level_metadata_google_2fprotobuf_2ftimestamp_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2ftimestamp_2eproto, file_level_service_descriptors_google_2fprotobuf_2ftimestamp_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_google_2fprotobuf_2ftimestamp_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2ftimestamp_2eproto), true); +static bool dynamic_init_dummy_google_2fprotobuf_2ftimestamp_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2ftimestamp_2eproto)), true); PROTOBUF_NAMESPACE_OPEN // =================================================================== void Timestamp::InitAsDefaultInstance() { } -class Timestamp::HasBitSetters { +class Timestamp::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Timestamp::kSecondsFieldNumber; -const int Timestamp::kNanosFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Timestamp::Timestamp() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.Timestamp) -} Timestamp::Timestamp(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Timestamp) } Timestamp::Timestamp(const Timestamp& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::memcpy(&seconds_, &from.seconds_, static_cast(reinterpret_cast(&nanos_) - reinterpret_cast(&seconds_)) + sizeof(nanos_)); @@ -126,10 +112,11 @@ void Timestamp::SharedCtor() { Timestamp::~Timestamp() { // @@protoc_insertion_point(destructor:google.protobuf.Timestamp) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Timestamp::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void Timestamp::ArenaDtor(void* object) { @@ -156,13 +143,12 @@ void Timestamp::Clear() { ::memset(&seconds_, 0, static_cast( reinterpret_cast(&nanos_) - reinterpret_cast(&seconds_)) + sizeof(nanos_)); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Timestamp::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -171,14 +157,14 @@ const char* Timestamp::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: // int64 seconds = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // int32 nanos = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -188,7 +174,9 @@ const char* Timestamp::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -201,106 +189,28 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Timestamp::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.Timestamp) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // int64 seconds = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - input, &seconds_))); - } else { - goto handle_unusual; - } - break; - } - - // int32 nanos = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &nanos_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.Timestamp) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.Timestamp) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Timestamp::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.Timestamp) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // int64 seconds = 1; - if (this->seconds() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->seconds(), output); - } - - // int32 nanos = 2; - if (this->nanos() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->nanos(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.Timestamp) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Timestamp::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Timestamp::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Timestamp) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // int64 seconds = 1; if (this->seconds() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->seconds(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_seconds(), target); } // int32 nanos = 2; if (this->nanos() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->nanos(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_nanos(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Timestamp) return target; @@ -310,11 +220,6 @@ size_t Timestamp::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Timestamp) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -323,16 +228,20 @@ size_t Timestamp::ByteSizeLong() const { if (this->seconds() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( - this->seconds()); + this->_internal_seconds()); } // int32 nanos = 2; if (this->nanos() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->nanos()); + this->_internal_nanos()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -356,15 +265,15 @@ void Timestamp::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Timestamp::MergeFrom(const Timestamp& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Timestamp) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.seconds() != 0) { - set_seconds(from.seconds()); + _internal_set_seconds(from._internal_seconds()); } if (from.nanos() != 0) { - set_nanos(from.nanos()); + _internal_set_nanos(from._internal_nanos()); } } @@ -386,30 +295,15 @@ bool Timestamp::IsInitialized() const { return true; } -void Timestamp::Swap(Timestamp* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - Timestamp* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void Timestamp::UnsafeArenaSwap(Timestamp* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void Timestamp::InternalSwap(Timestamp* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - swap(seconds_, other->seconds_); - swap(nanos_, other->nanos_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Timestamp, nanos_) + + sizeof(Timestamp::nanos_) + - PROTOBUF_FIELD_OFFSET(Timestamp, seconds_)>( + reinterpret_cast(&seconds_), + reinterpret_cast(&other->seconds_)); } ::PROTOBUF_NAMESPACE_ID::Metadata Timestamp::GetMetadata() const { diff --git a/third_party/protobuf/src/google/protobuf/timestamp.pb.h b/third_party/protobuf/src/google/protobuf/timestamp.pb.h index d4dac221..4fd912f4 100644 --- a/third_party/protobuf/src/google/protobuf/timestamp.pb.h +++ b/third_party/protobuf/src/google/protobuf/timestamp.pb.h @@ -8,12 +8,12 @@ #include #include -#if PROTOBUF_VERSION < 3008000 +#if PROTOBUF_VERSION < 3012000 #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 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3012004 < 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. @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include // IWYU pragma: export @@ -66,10 +66,10 @@ PROTOBUF_NAMESPACE_OPEN // =================================================================== -class PROTOBUF_EXPORT Timestamp : +class PROTOBUF_EXPORT Timestamp PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Timestamp) */ { public: - Timestamp(); + inline Timestamp() : Timestamp(nullptr) {}; virtual ~Timestamp(); Timestamp(const Timestamp& from); @@ -83,7 +83,7 @@ class PROTOBUF_EXPORT Timestamp : return *this; } inline Timestamp& operator=(Timestamp&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -91,12 +91,6 @@ class PROTOBUF_EXPORT Timestamp : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -116,11 +110,22 @@ class PROTOBUF_EXPORT Timestamp : static constexpr int kIndexInFileMessages = 0; - void UnsafeArenaSwap(Timestamp* other); - void Swap(Timestamp* other); friend void swap(Timestamp& a, Timestamp& b) { a.Swap(&b); } + inline void Swap(Timestamp* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Timestamp* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -139,16 +144,9 @@ class PROTOBUF_EXPORT Timestamp : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -165,13 +163,6 @@ class PROTOBUF_EXPORT Timestamp : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -187,23 +178,32 @@ class PROTOBUF_EXPORT Timestamp : // accessors ------------------------------------------------------- + enum : int { + kSecondsFieldNumber = 1, + kNanosFieldNumber = 2, + }; // int64 seconds = 1; void clear_seconds(); - static const int kSecondsFieldNumber = 1; ::PROTOBUF_NAMESPACE_ID::int64 seconds() const; void set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_seconds() const; + void _internal_set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value); + public: // int32 nanos = 2; void clear_nanos(); - static const int kNanosFieldNumber = 2; ::PROTOBUF_NAMESPACE_ID::int32 nanos() const; void set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_nanos() const; + void _internal_set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.Timestamp) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -227,13 +227,19 @@ class PROTOBUF_EXPORT Timestamp : inline void Timestamp::clear_seconds() { seconds_ = PROTOBUF_LONGLONG(0); } -inline ::PROTOBUF_NAMESPACE_ID::int64 Timestamp::seconds() const { - // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.seconds) +inline ::PROTOBUF_NAMESPACE_ID::int64 Timestamp::_internal_seconds() const { return seconds_; } -inline void Timestamp::set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) { +inline ::PROTOBUF_NAMESPACE_ID::int64 Timestamp::seconds() const { + // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.seconds) + return _internal_seconds(); +} +inline void Timestamp::_internal_set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) { seconds_ = value; +} +inline void Timestamp::set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_seconds(value); // @@protoc_insertion_point(field_set:google.protobuf.Timestamp.seconds) } @@ -241,13 +247,19 @@ inline void Timestamp::set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) { inline void Timestamp::clear_nanos() { nanos_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Timestamp::nanos() const { - // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.nanos) +inline ::PROTOBUF_NAMESPACE_ID::int32 Timestamp::_internal_nanos() const { return nanos_; } -inline void Timestamp::set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 Timestamp::nanos() const { + // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.nanos) + return _internal_nanos(); +} +inline void Timestamp::_internal_set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) { nanos_ = value; +} +inline void Timestamp::set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_nanos(value); // @@protoc_insertion_point(field_set:google.protobuf.Timestamp.nanos) } diff --git a/third_party/protobuf/src/google/protobuf/type.pb.cc b/third_party/protobuf/src/google/protobuf/type.pb.cc index 66f7d07a..8da70ecc 100644 --- a/third_party/protobuf/src/google/protobuf/type.pb.cc +++ b/third_party/protobuf/src/google/protobuf/type.pb.cc @@ -5,7 +5,6 @@ #include -#include #include #include #include @@ -54,7 +53,7 @@ static void InitDefaultsscc_info_Enum_google_2fprotobuf_2ftype_2eproto() { } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_Enum_google_2fprotobuf_2ftype_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_Enum_google_2fprotobuf_2ftype_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_Enum_google_2fprotobuf_2ftype_2eproto}, { &scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto.base, &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base, &scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base,}}; @@ -71,7 +70,7 @@ static void InitDefaultsscc_info_EnumValue_google_2fprotobuf_2ftype_2eproto() { } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_EnumValue_google_2fprotobuf_2ftype_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_EnumValue_google_2fprotobuf_2ftype_2eproto}, { &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,}}; static void InitDefaultsscc_info_Field_google_2fprotobuf_2ftype_2eproto() { @@ -86,7 +85,7 @@ static void InitDefaultsscc_info_Field_google_2fprotobuf_2ftype_2eproto() { } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Field_google_2fprotobuf_2ftype_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Field_google_2fprotobuf_2ftype_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Field_google_2fprotobuf_2ftype_2eproto}, { &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,}}; static void InitDefaultsscc_info_Option_google_2fprotobuf_2ftype_2eproto() { @@ -101,7 +100,7 @@ static void InitDefaultsscc_info_Option_google_2fprotobuf_2ftype_2eproto() { } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Option_google_2fprotobuf_2ftype_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Option_google_2fprotobuf_2ftype_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Option_google_2fprotobuf_2ftype_2eproto}, { &scc_info_Any_google_2fprotobuf_2fany_2eproto.base,}}; static void InitDefaultsscc_info_Type_google_2fprotobuf_2ftype_2eproto() { @@ -116,7 +115,7 @@ static void InitDefaultsscc_info_Type_google_2fprotobuf_2ftype_2eproto() { } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_Type_google_2fprotobuf_2ftype_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_Type_google_2fprotobuf_2ftype_2eproto}, { + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_Type_google_2fprotobuf_2ftype_2eproto}, { &scc_info_Field_google_2fprotobuf_2ftype_2eproto.base, &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base, &scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base,}}; @@ -194,7 +193,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Option_default_instance_), }; -const char descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto[] = +const char descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\032google/protobuf/type.proto\022\017google.pro" "tobuf\032\031google/protobuf/any.proto\032$google" "/protobuf/source_context.proto\"\327\001\n\004Type\022" @@ -248,16 +247,15 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_goo &scc_info_Type_google_2fprotobuf_2ftype_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2ftype_2eproto_once; -static bool descriptor_table_google_2fprotobuf_2ftype_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ftype_2eproto = { - &descriptor_table_google_2fprotobuf_2ftype_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto, "google/protobuf/type.proto", 1594, + false, false, descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto, "google/protobuf/type.proto", 1594, &descriptor_table_google_2fprotobuf_2ftype_2eproto_once, descriptor_table_google_2fprotobuf_2ftype_2eproto_sccs, descriptor_table_google_2fprotobuf_2ftype_2eproto_deps, 5, 2, schemas, file_default_instances, TableStruct_google_2fprotobuf_2ftype_2eproto::offsets, file_level_metadata_google_2fprotobuf_2ftype_2eproto, 5, file_level_enum_descriptors_google_2fprotobuf_2ftype_2eproto, file_level_service_descriptors_google_2fprotobuf_2ftype_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_google_2fprotobuf_2ftype_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto), true); +static bool dynamic_init_dummy_google_2fprotobuf_2ftype_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto)), true); PROTOBUF_NAMESPACE_OPEN const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Field_Kind_descriptor() { ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2ftype_2eproto); @@ -360,51 +358,23 @@ void Type::InitAsDefaultInstance() { PROTOBUF_NAMESPACE_ID::_Type_default_instance_._instance.get_mutable()->source_context_ = const_cast< PROTOBUF_NAMESPACE_ID::SourceContext*>( PROTOBUF_NAMESPACE_ID::SourceContext::internal_default_instance()); } -class Type::HasBitSetters { +class Type::_Internal { public: static const PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Type* msg); }; const PROTOBUF_NAMESPACE_ID::SourceContext& -Type::HasBitSetters::source_context(const Type* msg) { +Type::_Internal::source_context(const Type* msg) { return *msg->source_context_; } -void Type::unsafe_arena_set_allocated_source_context( - PROTOBUF_NAMESPACE_ID::SourceContext* source_context) { - if (GetArenaNoVirtual() == nullptr) { - delete source_context_; - } - source_context_ = source_context; - if (source_context) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Type.source_context) -} void Type::clear_source_context() { - if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) { + if (GetArena() == nullptr && source_context_ != nullptr) { delete source_context_; } source_context_ = nullptr; } -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Type::kNameFieldNumber; -const int Type::kFieldsFieldNumber; -const int Type::kOneofsFieldNumber; -const int Type::kOptionsFieldNumber; -const int Type::kSourceContextFieldNumber; -const int Type::kSyntaxFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Type::Type() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.Type) -} Type::Type(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), fields_(arena), oneofs_(arena), options_(arena) { @@ -414,17 +384,16 @@ Type::Type(::PROTOBUF_NAMESPACE_ID::Arena* arena) } Type::Type(const Type& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), fields_(from.fields_), oneofs_(from.oneofs_), options_(from.options_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.name().size() > 0) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), - GetArenaNoVirtual()); + if (!from._internal_name().empty()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } - if (from.has_source_context()) { + if (from._internal_has_source_context()) { source_context_ = new PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_); } else { source_context_ = nullptr; @@ -444,10 +413,11 @@ void Type::SharedCtor() { Type::~Type() { // @@protoc_insertion_point(destructor:google.protobuf.Type) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Type::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete source_context_; } @@ -476,19 +446,18 @@ void Type::Clear() { fields_.Clear(); oneofs_.Clear(); options_.Clear(); - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) { + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + if (GetArena() == nullptr && source_context_ != nullptr) { delete source_context_; } source_context_ = nullptr; syntax_ = 0; - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -497,7 +466,9 @@ const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter // string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Type.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Type.name")); CHK_(ptr); } else goto handle_unusual; continue; @@ -507,10 +478,10 @@ const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_fields(), ptr); + ptr = ctx->ParseMessage(_internal_add_fields(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); } else goto handle_unusual; continue; // repeated string oneofs = 3; @@ -519,10 +490,12 @@ const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter ptr -= 1; do { ptr += 1; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_oneofs(), ptr, ctx, "google.protobuf.Type.oneofs"); + auto str = _internal_add_oneofs(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Type.oneofs")); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); } else goto handle_unusual; continue; // repeated .google.protobuf.Option options = 4; @@ -531,25 +504,25 @@ const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_options(), ptr); + ptr = ctx->ParseMessage(_internal_add_options(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); } else goto handle_unusual; continue; // .google.protobuf.SourceContext source_context = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { - ptr = ctx->ParseMessage(mutable_source_context(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr); CHK_(ptr); } else goto handle_unusual; continue; // .google.protobuf.Syntax syntax = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - set_syntax(static_cast(val)); + _internal_set_syntax(static_cast(val)); } else goto handle_unusual; continue; default: { @@ -558,7 +531,9 @@ const char* Type::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -571,181 +546,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Type::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.Type) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Type.name")); - } else { - goto handle_unusual; - } - break; - } - // repeated .google.protobuf.Field fields = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_fields())); - } else { - goto handle_unusual; - } - break; - } - - // repeated string oneofs = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->add_oneofs())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->oneofs(this->oneofs_size() - 1).data(), - static_cast(this->oneofs(this->oneofs_size() - 1).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Type.oneofs")); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.Option options = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_options())); - } else { - goto handle_unusual; - } - break; - } - - // .google.protobuf.SourceContext source_context = 5; - case 5: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_source_context())); - } else { - goto handle_unusual; - } - break; - } - - // .google.protobuf.Syntax syntax = 6; - case 6: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { - int value = 0; - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_syntax(static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(value)); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.Type) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.Type) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Type::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.Type) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string name = 1; - if (this->name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Type.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // repeated .google.protobuf.Field fields = 2; - for (unsigned int i = 0, - n = static_cast(this->fields_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, - this->fields(static_cast(i)), - output); - } - - // repeated string oneofs = 3; - for (int i = 0, n = this->oneofs_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->oneofs(i).data(), static_cast(this->oneofs(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Type.oneofs"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( - 3, this->oneofs(i), output); - } - - // repeated .google.protobuf.Option options = 4; - for (unsigned int i = 0, - n = static_cast(this->options_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, - this->options(static_cast(i)), - output); - } - - // .google.protobuf.SourceContext source_context = 5; - if (this->has_source_context()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 5, HasBitSetters::source_context(this), output); - } - - // .google.protobuf.Syntax syntax = 6; - if (this->syntax() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( - 6, this->syntax(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.Type) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Type::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Type::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -753,56 +556,57 @@ void Type::SerializeWithCachedSizes( // string name = 1; if (this->name().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // repeated .google.protobuf.Field fields = 2; for (unsigned int i = 0, - n = static_cast(this->fields_size()); i < n; i++) { + n = static_cast(this->_internal_fields_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 2, this->fields(static_cast(i)), target); + InternalWriteMessage(2, this->_internal_fields(i), target, stream); } // repeated string oneofs = 3; - for (int i = 0, n = this->oneofs_size(); i < n; i++) { + for (int i = 0, n = this->_internal_oneofs_size(); i < n; i++) { + const auto& s = this->_internal_oneofs(i); ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->oneofs(i).data(), static_cast(this->oneofs(i).length()), + s.data(), static_cast(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.oneofs"); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteStringToArray(3, this->oneofs(i), target); + target = stream->WriteString(3, s, target); } // repeated .google.protobuf.Option options = 4; for (unsigned int i = 0, - n = static_cast(this->options_size()); i < n; i++) { + n = static_cast(this->_internal_options_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 4, this->options(static_cast(i)), target); + InternalWriteMessage(4, this->_internal_options(i), target, stream); } // .google.protobuf.SourceContext source_context = 5; if (this->has_source_context()) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 5, HasBitSetters::source_context(this), target); + InternalWriteMessage( + 5, _Internal::source_context(this), target, stream); } // .google.protobuf.Syntax syntax = 6; if (this->syntax() != 0) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 6, this->syntax(), target); + 6, this->_internal_syntax(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Type) return target; @@ -812,50 +616,37 @@ size_t Type::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Type) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.Field fields = 2; - { - unsigned int count = static_cast(this->fields_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->fields(static_cast(i))); - } + total_size += 1UL * this->_internal_fields_size(); + for (const auto& msg : this->fields_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated string oneofs = 3; total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->oneofs_size()); - for (int i = 0, n = this->oneofs_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(oneofs_.size()); + for (int i = 0, n = oneofs_.size(); i < n; i++) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->oneofs(i)); + oneofs_.Get(i)); } // repeated .google.protobuf.Option options = 4; - { - unsigned int count = static_cast(this->options_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->options(static_cast(i))); - } + total_size += 1UL * this->_internal_options_size(); + for (const auto& msg : this->options_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // string name = 1; if (this->name().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // .google.protobuf.SourceContext source_context = 5; @@ -868,9 +659,13 @@ size_t Type::ByteSizeLong() const { // .google.protobuf.Syntax syntax = 6; if (this->syntax() != 0) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->syntax()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_syntax()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -894,7 +689,7 @@ void Type::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Type::MergeFrom(const Type& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Type) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -902,13 +697,13 @@ void Type::MergeFrom(const Type& from) { oneofs_.MergeFrom(from.oneofs_); options_.MergeFrom(from.options_); if (from.name().size() > 0) { - set_name(from.name()); + _internal_set_name(from._internal_name()); } if (from.has_source_context()) { - mutable_source_context()->PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from.source_context()); + _internal_mutable_source_context()->PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context()); } if (from.syntax() != 0) { - set_syntax(from.syntax()); + _internal_set_syntax(from._internal_syntax()); } } @@ -930,35 +725,19 @@ bool Type::IsInitialized() const { return true; } -void Type::Swap(Type* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - Type* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void Type::UnsafeArenaSwap(Type* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void Type::InternalSwap(Type* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - CastToBase(&fields_)->InternalSwap(CastToBase(&other->fields_)); - oneofs_.InternalSwap(CastToBase(&other->oneofs_)); - CastToBase(&options_)->InternalSwap(CastToBase(&other->options_)); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(source_context_, other->source_context_); - swap(syntax_, other->syntax_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + fields_.InternalSwap(&other->fields_); + oneofs_.InternalSwap(&other->oneofs_); + options_.InternalSwap(&other->options_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Type, syntax_) + + sizeof(Type::syntax_) + - PROTOBUF_FIELD_OFFSET(Type, source_context_)>( + reinterpret_cast(&source_context_), + reinterpret_cast(&other->source_context_)); } ::PROTOBUF_NAMESPACE_ID::Metadata Type::GetMetadata() const { @@ -970,31 +749,12 @@ void Type::InternalSwap(Type* other) { void Field::InitAsDefaultInstance() { } -class Field::HasBitSetters { +class Field::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Field::kKindFieldNumber; -const int Field::kCardinalityFieldNumber; -const int Field::kNumberFieldNumber; -const int Field::kNameFieldNumber; -const int Field::kTypeUrlFieldNumber; -const int Field::kOneofIndexFieldNumber; -const int Field::kPackedFieldNumber; -const int Field::kOptionsFieldNumber; -const int Field::kJsonNameFieldNumber; -const int Field::kDefaultValueFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Field::Field() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.Field) -} Field::Field(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), options_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -1002,28 +762,27 @@ Field::Field(::PROTOBUF_NAMESPACE_ID::Arena* arena) } Field::Field(const Field& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), options_(from.options_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.name().size() > 0) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), - GetArenaNoVirtual()); + if (!from._internal_name().empty()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.type_url().size() > 0) { - type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.type_url(), - GetArenaNoVirtual()); + if (!from._internal_type_url().empty()) { + type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_type_url(), + GetArena()); } json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.json_name().size() > 0) { - json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.json_name(), - GetArenaNoVirtual()); + if (!from._internal_json_name().empty()) { + json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_json_name(), + GetArena()); } default_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.default_value().size() > 0) { - default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.default_value(), - GetArenaNoVirtual()); + if (!from._internal_default_value().empty()) { + default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_default_value(), + GetArena()); } ::memcpy(&kind_, &from.kind_, static_cast(reinterpret_cast(&packed_) - @@ -1045,10 +804,11 @@ void Field::SharedCtor() { Field::~Field() { // @@protoc_insertion_point(destructor:google.protobuf.Field) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Field::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); type_url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); json_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -1077,20 +837,19 @@ void Field::Clear() { (void) cached_has_bits; options_.Clear(); - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - type_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - json_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - default_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + type_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + json_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + default_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); ::memset(&kind_, 0, static_cast( reinterpret_cast(&packed_) - reinterpret_cast(&kind_)) + sizeof(packed_)); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -1099,51 +858,55 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte // .google.protobuf.Field.Kind kind = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - set_kind(static_cast(val)); + _internal_set_kind(static_cast(val)); } else goto handle_unusual; continue; // .google.protobuf.Field.Cardinality cardinality = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - set_cardinality(static_cast(val)); + _internal_set_cardinality(static_cast(val)); } else goto handle_unusual; continue; // int32 number = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // string name = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Field.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Field.name")); CHK_(ptr); } else goto handle_unusual; continue; // string type_url = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_type_url(), ptr, ctx, "google.protobuf.Field.type_url"); + auto str = _internal_mutable_type_url(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Field.type_url")); CHK_(ptr); } else goto handle_unusual; continue; // int32 oneof_index = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - oneof_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + oneof_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // bool packed = 8; case 8: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { - packed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + packed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -1153,23 +916,27 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_options(), ptr); + ptr = ctx->ParseMessage(_internal_add_options(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 74); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr)); } else goto handle_unusual; continue; // string json_name = 10; case 10: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_json_name(), ptr, ctx, "google.protobuf.Field.json_name"); + auto str = _internal_mutable_json_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Field.json_name")); CHK_(ptr); } else goto handle_unusual; continue; // string default_value = 11; case 11: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_default_value(), ptr, ctx, "google.protobuf.Field.default_value"); + auto str = _internal_mutable_default_value(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Field.default_value")); CHK_(ptr); } else goto handle_unusual; continue; @@ -1179,7 +946,9 @@ const char* Field::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -1192,353 +961,96 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Field::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.Field) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.protobuf.Field.Kind kind = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - int value = 0; - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_kind(static_cast< PROTOBUF_NAMESPACE_ID::Field_Kind >(value)); - } else { - goto handle_unusual; - } - break; - } - // .google.protobuf.Field.Cardinality cardinality = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - int value = 0; - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_cardinality(static_cast< PROTOBUF_NAMESPACE_ID::Field_Cardinality >(value)); - } else { - goto handle_unusual; - } - break; - } - - // int32 number = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &number_))); - } else { - goto handle_unusual; - } - break; - } - - // string name = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Field.name")); - } else { - goto handle_unusual; - } - break; - } - - // string type_url = 6; - case 6: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_type_url())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->type_url().data(), static_cast(this->type_url().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Field.type_url")); - } else { - goto handle_unusual; - } - break; - } - - // int32 oneof_index = 7; - case 7: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &oneof_index_))); - } else { - goto handle_unusual; - } - break; - } - - // bool packed = 8; - case 8: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (64 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &packed_))); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.Option options = 9; - case 9: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (74 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_options())); - } else { - goto handle_unusual; - } - break; - } - - // string json_name = 10; - case 10: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (82 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_json_name())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->json_name().data(), static_cast(this->json_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Field.json_name")); - } else { - goto handle_unusual; - } - break; - } - - // string default_value = 11; - case 11: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_default_value())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->default_value().data(), static_cast(this->default_value().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Field.default_value")); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.Field) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.Field) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Field::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.Field) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // .google.protobuf.Field.Kind kind = 1; - if (this->kind() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( - 1, this->kind(), output); - } - - // .google.protobuf.Field.Cardinality cardinality = 2; - if (this->cardinality() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( - 2, this->cardinality(), output); - } - - // int32 number = 3; - if (this->number() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->number(), output); - } - - // string name = 4; - if (this->name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Field.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 4, this->name(), output); - } - - // string type_url = 6; - if (this->type_url().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->type_url().data(), static_cast(this->type_url().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Field.type_url"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 6, this->type_url(), output); - } - - // int32 oneof_index = 7; - if (this->oneof_index() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(7, this->oneof_index(), output); - } - - // bool packed = 8; - if (this->packed() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(8, this->packed(), output); - } - - // repeated .google.protobuf.Option options = 9; - for (unsigned int i = 0, - n = static_cast(this->options_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 9, - this->options(static_cast(i)), - output); - } - - // string json_name = 10; - if (this->json_name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->json_name().data(), static_cast(this->json_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Field.json_name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 10, this->json_name(), output); - } - - // string default_value = 11; - if (this->default_value().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->default_value().data(), static_cast(this->default_value().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Field.default_value"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 11, this->default_value(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.Field) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Field::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Field::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Field) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .google.protobuf.Field.Kind kind = 1; if (this->kind() != 0) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 1, this->kind(), target); + 1, this->_internal_kind(), target); } // .google.protobuf.Field.Cardinality cardinality = 2; if (this->cardinality() != 0) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 2, this->cardinality(), target); + 2, this->_internal_cardinality(), target); } // int32 number = 3; if (this->number() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->number(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_number(), target); } // string name = 4; if (this->name().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 4, this->name(), target); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_name(), target); } // string type_url = 6; if (this->type_url().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->type_url().data(), static_cast(this->type_url().length()), + this->_internal_type_url().data(), static_cast(this->_internal_type_url().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.type_url"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 6, this->type_url(), target); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_type_url(), target); } // int32 oneof_index = 7; if (this->oneof_index() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->oneof_index(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_oneof_index(), target); } // bool packed = 8; if (this->packed() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->packed(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_packed(), target); } // repeated .google.protobuf.Option options = 9; for (unsigned int i = 0, - n = static_cast(this->options_size()); i < n; i++) { + n = static_cast(this->_internal_options_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 9, this->options(static_cast(i)), target); + InternalWriteMessage(9, this->_internal_options(i), target, stream); } // string json_name = 10; if (this->json_name().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->json_name().data(), static_cast(this->json_name().length()), + this->_internal_json_name().data(), static_cast(this->_internal_json_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.json_name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 10, this->json_name(), target); + target = stream->WriteStringMaybeAliased( + 10, this->_internal_json_name(), target); } // string default_value = 11; if (this->default_value().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->default_value().data(), static_cast(this->default_value().length()), + this->_internal_default_value().data(), static_cast(this->_internal_default_value().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Field.default_value"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 11, this->default_value(), target); + target = stream->WriteStringMaybeAliased( + 11, this->_internal_default_value(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Field) return target; @@ -1548,78 +1060,69 @@ size_t Field::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Field) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.Option options = 9; - { - unsigned int count = static_cast(this->options_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->options(static_cast(i))); - } + total_size += 1UL * this->_internal_options_size(); + for (const auto& msg : this->options_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // string name = 4; if (this->name().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // string type_url = 6; if (this->type_url().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->type_url()); + this->_internal_type_url()); } // string json_name = 10; if (this->json_name().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->json_name()); + this->_internal_json_name()); } // string default_value = 11; if (this->default_value().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->default_value()); + this->_internal_default_value()); } // .google.protobuf.Field.Kind kind = 1; if (this->kind() != 0) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->kind()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_kind()); } // .google.protobuf.Field.Cardinality cardinality = 2; if (this->cardinality() != 0) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->cardinality()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_cardinality()); } // int32 number = 3; if (this->number() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->number()); + this->_internal_number()); } // int32 oneof_index = 7; if (this->oneof_index() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->oneof_index()); + this->_internal_oneof_index()); } // bool packed = 8; @@ -1627,6 +1130,10 @@ size_t Field::ByteSizeLong() const { total_size += 1 + 1; } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -1650,37 +1157,37 @@ void Field::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Field::MergeFrom(const Field& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Field) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; options_.MergeFrom(from.options_); if (from.name().size() > 0) { - set_name(from.name()); + _internal_set_name(from._internal_name()); } if (from.type_url().size() > 0) { - set_type_url(from.type_url()); + _internal_set_type_url(from._internal_type_url()); } if (from.json_name().size() > 0) { - set_json_name(from.json_name()); + _internal_set_json_name(from._internal_json_name()); } if (from.default_value().size() > 0) { - set_default_value(from.default_value()); + _internal_set_default_value(from._internal_default_value()); } if (from.kind() != 0) { - set_kind(from.kind()); + _internal_set_kind(from._internal_kind()); } if (from.cardinality() != 0) { - set_cardinality(from.cardinality()); + _internal_set_cardinality(from._internal_cardinality()); } if (from.number() != 0) { - set_number(from.number()); + _internal_set_number(from._internal_number()); } if (from.oneof_index() != 0) { - set_oneof_index(from.oneof_index()); + _internal_set_oneof_index(from._internal_oneof_index()); } if (from.packed() != 0) { - set_packed(from.packed()); + _internal_set_packed(from._internal_packed()); } } @@ -1702,42 +1209,20 @@ bool Field::IsInitialized() const { return true; } -void Field::Swap(Field* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - Field* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void Field::UnsafeArenaSwap(Field* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void Field::InternalSwap(Field* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - CastToBase(&options_)->InternalSwap(CastToBase(&other->options_)); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - type_url_.Swap(&other->type_url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - json_name_.Swap(&other->json_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - default_value_.Swap(&other->default_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(kind_, other->kind_); - swap(cardinality_, other->cardinality_); - swap(number_, other->number_); - swap(oneof_index_, other->oneof_index_); - swap(packed_, other->packed_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + options_.InternalSwap(&other->options_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + type_url_.Swap(&other->type_url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + json_name_.Swap(&other->json_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + default_value_.Swap(&other->default_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Field, packed_) + + sizeof(Field::packed_) + - PROTOBUF_FIELD_OFFSET(Field, kind_)>( + reinterpret_cast(&kind_), + reinterpret_cast(&other->kind_)); } ::PROTOBUF_NAMESPACE_ID::Metadata Field::GetMetadata() const { @@ -1751,50 +1236,23 @@ void Enum::InitAsDefaultInstance() { PROTOBUF_NAMESPACE_ID::_Enum_default_instance_._instance.get_mutable()->source_context_ = const_cast< PROTOBUF_NAMESPACE_ID::SourceContext*>( PROTOBUF_NAMESPACE_ID::SourceContext::internal_default_instance()); } -class Enum::HasBitSetters { +class Enum::_Internal { public: static const PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Enum* msg); }; const PROTOBUF_NAMESPACE_ID::SourceContext& -Enum::HasBitSetters::source_context(const Enum* msg) { +Enum::_Internal::source_context(const Enum* msg) { return *msg->source_context_; } -void Enum::unsafe_arena_set_allocated_source_context( - PROTOBUF_NAMESPACE_ID::SourceContext* source_context) { - if (GetArenaNoVirtual() == nullptr) { - delete source_context_; - } - source_context_ = source_context; - if (source_context) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Enum.source_context) -} void Enum::clear_source_context() { - if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) { + if (GetArena() == nullptr && source_context_ != nullptr) { delete source_context_; } source_context_ = nullptr; } -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Enum::kNameFieldNumber; -const int Enum::kEnumvalueFieldNumber; -const int Enum::kOptionsFieldNumber; -const int Enum::kSourceContextFieldNumber; -const int Enum::kSyntaxFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Enum::Enum() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.Enum) -} Enum::Enum(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), enumvalue_(arena), options_(arena) { SharedCtor(); @@ -1803,16 +1261,15 @@ Enum::Enum(::PROTOBUF_NAMESPACE_ID::Arena* arena) } Enum::Enum(const Enum& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), enumvalue_(from.enumvalue_), options_(from.options_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.name().size() > 0) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), - GetArenaNoVirtual()); + if (!from._internal_name().empty()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } - if (from.has_source_context()) { + if (from._internal_has_source_context()) { source_context_ = new PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_); } else { source_context_ = nullptr; @@ -1832,10 +1289,11 @@ void Enum::SharedCtor() { Enum::~Enum() { // @@protoc_insertion_point(destructor:google.protobuf.Enum) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Enum::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete source_context_; } @@ -1863,19 +1321,18 @@ void Enum::Clear() { enumvalue_.Clear(); options_.Clear(); - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) { + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + if (GetArena() == nullptr && source_context_ != nullptr) { delete source_context_; } source_context_ = nullptr; syntax_ = 0; - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Enum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -1884,7 +1341,9 @@ const char* Enum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter // string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Enum.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Enum.name")); CHK_(ptr); } else goto handle_unusual; continue; @@ -1894,10 +1353,10 @@ const char* Enum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_enumvalue(), ptr); + ptr = ctx->ParseMessage(_internal_add_enumvalue(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); } else goto handle_unusual; continue; // repeated .google.protobuf.Option options = 3; @@ -1906,25 +1365,25 @@ const char* Enum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_options(), ptr); + ptr = ctx->ParseMessage(_internal_add_options(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); } else goto handle_unusual; continue; // .google.protobuf.SourceContext source_context = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr = ctx->ParseMessage(mutable_source_context(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_source_context(), ptr); CHK_(ptr); } else goto handle_unusual; continue; // .google.protobuf.Syntax syntax = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - set_syntax(static_cast(val)); + _internal_set_syntax(static_cast(val)); } else goto handle_unusual; continue; default: { @@ -1933,7 +1392,9 @@ const char* Enum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -1946,155 +1407,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Enum::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.Enum) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Enum.name")); - } else { - goto handle_unusual; - } - break; - } - // repeated .google.protobuf.EnumValue enumvalue = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_enumvalue())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.Option options = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_options())); - } else { - goto handle_unusual; - } - break; - } - - // .google.protobuf.SourceContext source_context = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_source_context())); - } else { - goto handle_unusual; - } - break; - } - - // .google.protobuf.Syntax syntax = 5; - case 5: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { - int value = 0; - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_syntax(static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(value)); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.Enum) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.Enum) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Enum::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.Enum) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string name = 1; - if (this->name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Enum.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // repeated .google.protobuf.EnumValue enumvalue = 2; - for (unsigned int i = 0, - n = static_cast(this->enumvalue_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, - this->enumvalue(static_cast(i)), - output); - } - - // repeated .google.protobuf.Option options = 3; - for (unsigned int i = 0, - n = static_cast(this->options_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, - this->options(static_cast(i)), - output); - } - - // .google.protobuf.SourceContext source_context = 4; - if (this->has_source_context()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, HasBitSetters::source_context(this), output); - } - - // .google.protobuf.Syntax syntax = 5; - if (this->syntax() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( - 5, this->syntax(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.Enum) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Enum::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Enum::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2102,46 +1417,47 @@ void Enum::SerializeWithCachedSizes( // string name = 1; if (this->name().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Enum.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // repeated .google.protobuf.EnumValue enumvalue = 2; for (unsigned int i = 0, - n = static_cast(this->enumvalue_size()); i < n; i++) { + n = static_cast(this->_internal_enumvalue_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 2, this->enumvalue(static_cast(i)), target); + InternalWriteMessage(2, this->_internal_enumvalue(i), target, stream); } // repeated .google.protobuf.Option options = 3; for (unsigned int i = 0, - n = static_cast(this->options_size()); i < n; i++) { + n = static_cast(this->_internal_options_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 3, this->options(static_cast(i)), target); + InternalWriteMessage(3, this->_internal_options(i), target, stream); } // .google.protobuf.SourceContext source_context = 4; if (this->has_source_context()) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 4, HasBitSetters::source_context(this), target); + InternalWriteMessage( + 4, _Internal::source_context(this), target, stream); } // .google.protobuf.Syntax syntax = 5; if (this->syntax() != 0) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 5, this->syntax(), target); + 5, this->_internal_syntax(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Enum) return target; @@ -2151,42 +1467,29 @@ size_t Enum::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Enum) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.EnumValue enumvalue = 2; - { - unsigned int count = static_cast(this->enumvalue_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->enumvalue(static_cast(i))); - } + total_size += 1UL * this->_internal_enumvalue_size(); + for (const auto& msg : this->enumvalue_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated .google.protobuf.Option options = 3; - { - unsigned int count = static_cast(this->options_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->options(static_cast(i))); - } + total_size += 1UL * this->_internal_options_size(); + for (const auto& msg : this->options_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // string name = 1; if (this->name().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // .google.protobuf.SourceContext source_context = 4; @@ -2199,9 +1502,13 @@ size_t Enum::ByteSizeLong() const { // .google.protobuf.Syntax syntax = 5; if (this->syntax() != 0) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->syntax()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_syntax()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -2225,20 +1532,20 @@ void Enum::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Enum::MergeFrom(const Enum& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Enum) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; enumvalue_.MergeFrom(from.enumvalue_); options_.MergeFrom(from.options_); if (from.name().size() > 0) { - set_name(from.name()); + _internal_set_name(from._internal_name()); } if (from.has_source_context()) { - mutable_source_context()->PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from.source_context()); + _internal_mutable_source_context()->PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from._internal_source_context()); } if (from.syntax() != 0) { - set_syntax(from.syntax()); + _internal_set_syntax(from._internal_syntax()); } } @@ -2260,34 +1567,18 @@ bool Enum::IsInitialized() const { return true; } -void Enum::Swap(Enum* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - Enum* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void Enum::UnsafeArenaSwap(Enum* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void Enum::InternalSwap(Enum* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - CastToBase(&enumvalue_)->InternalSwap(CastToBase(&other->enumvalue_)); - CastToBase(&options_)->InternalSwap(CastToBase(&other->options_)); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(source_context_, other->source_context_); - swap(syntax_, other->syntax_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + enumvalue_.InternalSwap(&other->enumvalue_); + options_.InternalSwap(&other->options_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Enum, syntax_) + + sizeof(Enum::syntax_) + - PROTOBUF_FIELD_OFFSET(Enum, source_context_)>( + reinterpret_cast(&source_context_), + reinterpret_cast(&other->source_context_)); } ::PROTOBUF_NAMESPACE_ID::Metadata Enum::GetMetadata() const { @@ -2299,24 +1590,12 @@ void Enum::InternalSwap(Enum* other) { void EnumValue::InitAsDefaultInstance() { } -class EnumValue::HasBitSetters { +class EnumValue::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int EnumValue::kNameFieldNumber; -const int EnumValue::kNumberFieldNumber; -const int EnumValue::kOptionsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -EnumValue::EnumValue() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.EnumValue) -} EnumValue::EnumValue(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena), + : ::PROTOBUF_NAMESPACE_ID::Message(arena), options_(arena) { SharedCtor(); RegisterArenaDtor(arena); @@ -2324,13 +1603,12 @@ EnumValue::EnumValue(::PROTOBUF_NAMESPACE_ID::Arena* arena) } EnumValue::EnumValue(const EnumValue& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), options_(from.options_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.name().size() > 0) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), - GetArenaNoVirtual()); + if (!from._internal_name().empty()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } number_ = from.number_; // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValue) @@ -2345,10 +1623,11 @@ void EnumValue::SharedCtor() { EnumValue::~EnumValue() { // @@protoc_insertion_point(destructor:google.protobuf.EnumValue) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void EnumValue::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } @@ -2374,15 +1653,14 @@ void EnumValue::Clear() { (void) cached_has_bits; options_.Clear(); - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); number_ = 0; - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* EnumValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -2391,14 +1669,16 @@ const char* EnumValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: // string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.EnumValue.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.EnumValue.name")); CHK_(ptr); } else goto handle_unusual; continue; // int32 number = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -2408,10 +1688,10 @@ const char* EnumValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(add_options(), ptr); + ptr = ctx->ParseMessage(_internal_add_options(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); } else goto handle_unusual; continue; default: { @@ -2420,7 +1700,9 @@ const char* EnumValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -2433,116 +1715,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool EnumValue::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.EnumValue) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.EnumValue.name")); - } else { - goto handle_unusual; - } - break; - } - // int32 number = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &number_))); - } else { - goto handle_unusual; - } - break; - } - - // repeated .google.protobuf.Option options = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_options())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.EnumValue) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValue) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void EnumValue::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValue) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string name = 1; - if (this->name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.EnumValue.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // int32 number = 2; - if (this->number() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->number(), output); - } - - // repeated .google.protobuf.Option options = 3; - for (unsigned int i = 0, - n = static_cast(this->options_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, - this->options(static_cast(i)), - output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValue) -} - -::PROTOBUF_NAMESPACE_ID::uint8* EnumValue::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* EnumValue::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2550,30 +1725,30 @@ void EnumValue::SerializeWithCachedSizes( // string name = 1; if (this->name().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.EnumValue.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // int32 number = 2; if (this->number() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->number(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_number(), target); } // repeated .google.protobuf.Option options = 3; for (unsigned int i = 0, - n = static_cast(this->options_size()); i < n; i++) { + n = static_cast(this->_internal_options_size()); i < n; i++) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 3, this->options(static_cast(i)), target); + InternalWriteMessage(3, this->_internal_options(i), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValue) return target; @@ -2583,40 +1758,35 @@ size_t EnumValue::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValue) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.Option options = 3; - { - unsigned int count = static_cast(this->options_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->options(static_cast(i))); - } + total_size += 1UL * this->_internal_options_size(); + for (const auto& msg : this->options_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // string name = 1; if (this->name().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // int32 number = 2; if (this->number() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->number()); + this->_internal_number()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -2640,16 +1810,16 @@ void EnumValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void EnumValue::MergeFrom(const EnumValue& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValue) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; options_.MergeFrom(from.options_); if (from.name().size() > 0) { - set_name(from.name()); + _internal_set_name(from._internal_name()); } if (from.number() != 0) { - set_number(from.number()); + _internal_set_number(from._internal_number()); } } @@ -2671,31 +1841,11 @@ bool EnumValue::IsInitialized() const { return true; } -void EnumValue::Swap(EnumValue* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - EnumValue* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void EnumValue::UnsafeArenaSwap(EnumValue* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void EnumValue::InternalSwap(EnumValue* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - CastToBase(&options_)->InternalSwap(CastToBase(&other->options_)); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + options_.InternalSwap(&other->options_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); swap(number_, other->number_); } @@ -2710,61 +1860,36 @@ void Option::InitAsDefaultInstance() { PROTOBUF_NAMESPACE_ID::_Option_default_instance_._instance.get_mutable()->value_ = const_cast< PROTOBUF_NAMESPACE_ID::Any*>( PROTOBUF_NAMESPACE_ID::Any::internal_default_instance()); } -class Option::HasBitSetters { +class Option::_Internal { public: static const PROTOBUF_NAMESPACE_ID::Any& value(const Option* msg); }; const PROTOBUF_NAMESPACE_ID::Any& -Option::HasBitSetters::value(const Option* msg) { +Option::_Internal::value(const Option* msg) { return *msg->value_; } -void Option::unsafe_arena_set_allocated_value( - PROTOBUF_NAMESPACE_ID::Any* value) { - if (GetArenaNoVirtual() == nullptr) { - delete value_; - } - value_ = value; - if (value) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Option.value) -} void Option::clear_value() { - if (GetArenaNoVirtual() == nullptr && value_ != nullptr) { + if (GetArena() == nullptr && value_ != nullptr) { delete value_; } value_ = nullptr; } -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Option::kNameFieldNumber; -const int Option::kValueFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Option::Option() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.Option) -} Option::Option(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Option) } Option::Option(const Option& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.name().size() > 0) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), - GetArenaNoVirtual()); + if (!from._internal_name().empty()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); } - if (from.has_value()) { + if (from._internal_has_value()) { value_ = new PROTOBUF_NAMESPACE_ID::Any(*from.value_); } else { value_ = nullptr; @@ -2781,10 +1906,11 @@ void Option::SharedCtor() { Option::~Option() { // @@protoc_insertion_point(destructor:google.protobuf.Option) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Option::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete value_; } @@ -2810,18 +1936,17 @@ void Option::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - if (GetArenaNoVirtual() == nullptr && value_ != nullptr) { + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + if (GetArena() == nullptr && value_ != nullptr) { delete value_; } value_ = nullptr; - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Option::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -2830,14 +1955,16 @@ const char* Option::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int // string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Option.name"); + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.Option.name")); CHK_(ptr); } else goto handle_unusual; continue; // .google.protobuf.Any value = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ctx->ParseMessage(mutable_value(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_value(), ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -2847,7 +1974,9 @@ const char* Option::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::int ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -2860,95 +1989,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Option::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.Option) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.Option.name")); - } else { - goto handle_unusual; - } - break; - } - // .google.protobuf.Any value = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_value())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.Option) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.Option) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Option::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.Option) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string name = 1; - if (this->name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.Option.name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // .google.protobuf.Any value = 2; - if (this->has_value()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, HasBitSetters::value(this), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.Option) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Option::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Option::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Option) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2956,24 +1999,24 @@ void Option::SerializeWithCachedSizes( // string name = 1; if (this->name().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), + this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Option.name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // .google.protobuf.Any value = 2; if (this->has_value()) { + target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 2, HasBitSetters::value(this), target); + InternalWriteMessage( + 2, _Internal::value(this), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Option) return target; @@ -2983,11 +2026,6 @@ size_t Option::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Option) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2996,7 +2034,7 @@ size_t Option::ByteSizeLong() const { if (this->name().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->name()); + this->_internal_name()); } // .google.protobuf.Any value = 2; @@ -3006,6 +2044,10 @@ size_t Option::ByteSizeLong() const { *value_); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -3029,15 +2071,15 @@ void Option::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Option::MergeFrom(const Option& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Option) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.name().size() > 0) { - set_name(from.name()); + _internal_set_name(from._internal_name()); } if (from.has_value()) { - mutable_value()->PROTOBUF_NAMESPACE_ID::Any::MergeFrom(from.value()); + _internal_mutable_value()->PROTOBUF_NAMESPACE_ID::Any::MergeFrom(from._internal_value()); } } @@ -3059,30 +2101,10 @@ bool Option::IsInitialized() const { return true; } -void Option::Swap(Option* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - Option* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void Option::UnsafeArenaSwap(Option* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void Option::InternalSwap(Option* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); swap(value_, other->value_); } diff --git a/third_party/protobuf/src/google/protobuf/type.pb.h b/third_party/protobuf/src/google/protobuf/type.pb.h index f1a8b3e2..a325e26b 100644 --- a/third_party/protobuf/src/google/protobuf/type.pb.h +++ b/third_party/protobuf/src/google/protobuf/type.pb.h @@ -8,12 +8,12 @@ #include #include -#if PROTOBUF_VERSION < 3008000 +#if PROTOBUF_VERSION < 3012000 #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 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3012004 < 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. @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include // IWYU pragma: export @@ -179,10 +179,10 @@ inline bool Syntax_Parse( } // =================================================================== -class PROTOBUF_EXPORT Type : +class PROTOBUF_EXPORT Type PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Type) */ { public: - Type(); + inline Type() : Type(nullptr) {}; virtual ~Type(); Type(const Type& from); @@ -196,7 +196,7 @@ class PROTOBUF_EXPORT Type : return *this; } inline Type& operator=(Type&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -204,12 +204,6 @@ class PROTOBUF_EXPORT Type : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -229,11 +223,22 @@ class PROTOBUF_EXPORT Type : static constexpr int kIndexInFileMessages = 0; - void UnsafeArenaSwap(Type* other); - void Swap(Type* other); friend void swap(Type& a, Type& b) { a.Swap(&b); } + inline void Swap(Type* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Type* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -252,16 +257,9 @@ class PROTOBUF_EXPORT Type : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -278,13 +276,6 @@ class PROTOBUF_EXPORT Type : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -300,13 +291,27 @@ class PROTOBUF_EXPORT Type : // accessors ------------------------------------------------------- + enum : int { + kFieldsFieldNumber = 2, + kOneofsFieldNumber = 3, + kOptionsFieldNumber = 4, + kNameFieldNumber = 1, + kSourceContextFieldNumber = 5, + kSyntaxFieldNumber = 6, + }; // repeated .google.protobuf.Field fields = 2; int fields_size() const; + private: + int _internal_fields_size() const; + public: void clear_fields(); - static const int kFieldsFieldNumber = 2; PROTOBUF_NAMESPACE_ID::Field* mutable_fields(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Field >* mutable_fields(); + private: + const PROTOBUF_NAMESPACE_ID::Field& _internal_fields(int index) const; + PROTOBUF_NAMESPACE_ID::Field* _internal_add_fields(); + public: const PROTOBUF_NAMESPACE_ID::Field& fields(int index) const; PROTOBUF_NAMESPACE_ID::Field* add_fields(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Field >& @@ -314,8 +319,10 @@ class PROTOBUF_EXPORT Type : // repeated string oneofs = 3; int oneofs_size() const; + private: + int _internal_oneofs_size() const; + public: void clear_oneofs(); - static const int kOneofsFieldNumber = 3; const std::string& oneofs(int index) const; std::string* mutable_oneofs(int index); void set_oneofs(int index, const std::string& value); @@ -329,14 +336,24 @@ class PROTOBUF_EXPORT Type : void add_oneofs(const char* value, size_t size); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& oneofs() const; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_oneofs(); + private: + const std::string& _internal_oneofs(int index) const; + std::string* _internal_add_oneofs(); + public: // repeated .google.protobuf.Option options = 4; int options_size() const; + private: + int _internal_options_size() const; + public: void clear_options(); - static const int kOptionsFieldNumber = 4; PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >* mutable_options(); + private: + const PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const; + PROTOBUF_NAMESPACE_ID::Option* _internal_add_options(); + public: const PROTOBUF_NAMESPACE_ID::Option& options(int index) const; PROTOBUF_NAMESPACE_ID::Option* add_options(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& @@ -344,7 +361,6 @@ class PROTOBUF_EXPORT Type : // string name = 1; void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -362,30 +378,43 @@ class PROTOBUF_EXPORT Type : " future release.") void unsafe_arena_set_allocated_name( std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // .google.protobuf.SourceContext source_context = 5; bool has_source_context() const; + private: + bool _internal_has_source_context() const; + public: void clear_source_context(); - static const int kSourceContextFieldNumber = 5; const PROTOBUF_NAMESPACE_ID::SourceContext& source_context() const; PROTOBUF_NAMESPACE_ID::SourceContext* release_source_context(); PROTOBUF_NAMESPACE_ID::SourceContext* mutable_source_context(); void set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context); + private: + const PROTOBUF_NAMESPACE_ID::SourceContext& _internal_source_context() const; + PROTOBUF_NAMESPACE_ID::SourceContext* _internal_mutable_source_context(); + public: void unsafe_arena_set_allocated_source_context( PROTOBUF_NAMESPACE_ID::SourceContext* source_context); PROTOBUF_NAMESPACE_ID::SourceContext* unsafe_arena_release_source_context(); // .google.protobuf.Syntax syntax = 6; void clear_syntax(); - static const int kSyntaxFieldNumber = 6; PROTOBUF_NAMESPACE_ID::Syntax syntax() const; void set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value); + private: + PROTOBUF_NAMESPACE_ID::Syntax _internal_syntax() const; + void _internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.Type) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -400,10 +429,10 @@ class PROTOBUF_EXPORT Type : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT Field : +class PROTOBUF_EXPORT Field PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Field) */ { public: - Field(); + inline Field() : Field(nullptr) {}; virtual ~Field(); Field(const Field& from); @@ -417,7 +446,7 @@ class PROTOBUF_EXPORT Field : return *this; } inline Field& operator=(Field&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -425,12 +454,6 @@ class PROTOBUF_EXPORT Field : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -450,11 +473,22 @@ class PROTOBUF_EXPORT Field : static constexpr int kIndexInFileMessages = 1; - void UnsafeArenaSwap(Field* other); - void Swap(Field* other); friend void swap(Field& a, Field& b) { a.Swap(&b); } + inline void Swap(Field* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Field* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -473,16 +507,9 @@ class PROTOBUF_EXPORT Field : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -499,13 +526,6 @@ class PROTOBUF_EXPORT Field : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -619,13 +639,31 @@ class PROTOBUF_EXPORT Field : // accessors ------------------------------------------------------- + enum : int { + kOptionsFieldNumber = 9, + kNameFieldNumber = 4, + kTypeUrlFieldNumber = 6, + kJsonNameFieldNumber = 10, + kDefaultValueFieldNumber = 11, + kKindFieldNumber = 1, + kCardinalityFieldNumber = 2, + kNumberFieldNumber = 3, + kOneofIndexFieldNumber = 7, + kPackedFieldNumber = 8, + }; // repeated .google.protobuf.Option options = 9; int options_size() const; + private: + int _internal_options_size() const; + public: void clear_options(); - static const int kOptionsFieldNumber = 9; PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >* mutable_options(); + private: + const PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const; + PROTOBUF_NAMESPACE_ID::Option* _internal_add_options(); + public: const PROTOBUF_NAMESPACE_ID::Option& options(int index) const; PROTOBUF_NAMESPACE_ID::Option* add_options(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& @@ -633,7 +671,6 @@ class PROTOBUF_EXPORT Field : // string name = 4; void clear_name(); - static const int kNameFieldNumber = 4; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -651,10 +688,14 @@ class PROTOBUF_EXPORT Field : " future release.") void unsafe_arena_set_allocated_name( std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // string type_url = 6; void clear_type_url(); - static const int kTypeUrlFieldNumber = 6; const std::string& type_url() const; void set_type_url(const std::string& value); void set_type_url(std::string&& value); @@ -672,10 +713,14 @@ class PROTOBUF_EXPORT Field : " future release.") void unsafe_arena_set_allocated_type_url( std::string* type_url); + private: + const std::string& _internal_type_url() const; + void _internal_set_type_url(const std::string& value); + std::string* _internal_mutable_type_url(); + public: // string json_name = 10; void clear_json_name(); - static const int kJsonNameFieldNumber = 10; const std::string& json_name() const; void set_json_name(const std::string& value); void set_json_name(std::string&& value); @@ -693,10 +738,14 @@ class PROTOBUF_EXPORT Field : " future release.") void unsafe_arena_set_allocated_json_name( std::string* json_name); + private: + const std::string& _internal_json_name() const; + void _internal_set_json_name(const std::string& value); + std::string* _internal_mutable_json_name(); + public: // string default_value = 11; void clear_default_value(); - static const int kDefaultValueFieldNumber = 11; const std::string& default_value() const; void set_default_value(const std::string& value); void set_default_value(std::string&& value); @@ -714,42 +763,61 @@ class PROTOBUF_EXPORT Field : " future release.") void unsafe_arena_set_allocated_default_value( std::string* default_value); + private: + const std::string& _internal_default_value() const; + void _internal_set_default_value(const std::string& value); + std::string* _internal_mutable_default_value(); + public: // .google.protobuf.Field.Kind kind = 1; void clear_kind(); - static const int kKindFieldNumber = 1; PROTOBUF_NAMESPACE_ID::Field_Kind kind() const; void set_kind(PROTOBUF_NAMESPACE_ID::Field_Kind value); + private: + PROTOBUF_NAMESPACE_ID::Field_Kind _internal_kind() const; + void _internal_set_kind(PROTOBUF_NAMESPACE_ID::Field_Kind value); + public: // .google.protobuf.Field.Cardinality cardinality = 2; void clear_cardinality(); - static const int kCardinalityFieldNumber = 2; PROTOBUF_NAMESPACE_ID::Field_Cardinality cardinality() const; void set_cardinality(PROTOBUF_NAMESPACE_ID::Field_Cardinality value); + private: + PROTOBUF_NAMESPACE_ID::Field_Cardinality _internal_cardinality() const; + void _internal_set_cardinality(PROTOBUF_NAMESPACE_ID::Field_Cardinality value); + public: // int32 number = 3; void clear_number(); - static const int kNumberFieldNumber = 3; ::PROTOBUF_NAMESPACE_ID::int32 number() const; void set_number(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_number() const; + void _internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // int32 oneof_index = 7; void clear_oneof_index(); - static const int kOneofIndexFieldNumber = 7; ::PROTOBUF_NAMESPACE_ID::int32 oneof_index() const; void set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_oneof_index() const; + void _internal_set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // bool packed = 8; void clear_packed(); - static const int kPackedFieldNumber = 8; bool packed() const; void set_packed(bool value); + private: + bool _internal_packed() const; + void _internal_set_packed(bool value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.Field) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -768,10 +836,10 @@ class PROTOBUF_EXPORT Field : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT Enum : +class PROTOBUF_EXPORT Enum PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Enum) */ { public: - Enum(); + inline Enum() : Enum(nullptr) {}; virtual ~Enum(); Enum(const Enum& from); @@ -785,7 +853,7 @@ class PROTOBUF_EXPORT Enum : return *this; } inline Enum& operator=(Enum&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -793,12 +861,6 @@ class PROTOBUF_EXPORT Enum : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -818,11 +880,22 @@ class PROTOBUF_EXPORT Enum : static constexpr int kIndexInFileMessages = 2; - void UnsafeArenaSwap(Enum* other); - void Swap(Enum* other); friend void swap(Enum& a, Enum& b) { a.Swap(&b); } + inline void Swap(Enum* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Enum* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -841,16 +914,9 @@ class PROTOBUF_EXPORT Enum : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -867,13 +933,6 @@ class PROTOBUF_EXPORT Enum : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -889,13 +948,26 @@ class PROTOBUF_EXPORT Enum : // accessors ------------------------------------------------------- + enum : int { + kEnumvalueFieldNumber = 2, + kOptionsFieldNumber = 3, + kNameFieldNumber = 1, + kSourceContextFieldNumber = 4, + kSyntaxFieldNumber = 5, + }; // repeated .google.protobuf.EnumValue enumvalue = 2; int enumvalue_size() const; + private: + int _internal_enumvalue_size() const; + public: void clear_enumvalue(); - static const int kEnumvalueFieldNumber = 2; PROTOBUF_NAMESPACE_ID::EnumValue* mutable_enumvalue(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValue >* mutable_enumvalue(); + private: + const PROTOBUF_NAMESPACE_ID::EnumValue& _internal_enumvalue(int index) const; + PROTOBUF_NAMESPACE_ID::EnumValue* _internal_add_enumvalue(); + public: const PROTOBUF_NAMESPACE_ID::EnumValue& enumvalue(int index) const; PROTOBUF_NAMESPACE_ID::EnumValue* add_enumvalue(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValue >& @@ -903,11 +975,17 @@ class PROTOBUF_EXPORT Enum : // repeated .google.protobuf.Option options = 3; int options_size() const; + private: + int _internal_options_size() const; + public: void clear_options(); - static const int kOptionsFieldNumber = 3; PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >* mutable_options(); + private: + const PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const; + PROTOBUF_NAMESPACE_ID::Option* _internal_add_options(); + public: const PROTOBUF_NAMESPACE_ID::Option& options(int index) const; PROTOBUF_NAMESPACE_ID::Option* add_options(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& @@ -915,7 +993,6 @@ class PROTOBUF_EXPORT Enum : // string name = 1; void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -933,30 +1010,43 @@ class PROTOBUF_EXPORT Enum : " future release.") void unsafe_arena_set_allocated_name( std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // .google.protobuf.SourceContext source_context = 4; bool has_source_context() const; + private: + bool _internal_has_source_context() const; + public: void clear_source_context(); - static const int kSourceContextFieldNumber = 4; const PROTOBUF_NAMESPACE_ID::SourceContext& source_context() const; PROTOBUF_NAMESPACE_ID::SourceContext* release_source_context(); PROTOBUF_NAMESPACE_ID::SourceContext* mutable_source_context(); void set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context); + private: + const PROTOBUF_NAMESPACE_ID::SourceContext& _internal_source_context() const; + PROTOBUF_NAMESPACE_ID::SourceContext* _internal_mutable_source_context(); + public: void unsafe_arena_set_allocated_source_context( PROTOBUF_NAMESPACE_ID::SourceContext* source_context); PROTOBUF_NAMESPACE_ID::SourceContext* unsafe_arena_release_source_context(); // .google.protobuf.Syntax syntax = 5; void clear_syntax(); - static const int kSyntaxFieldNumber = 5; PROTOBUF_NAMESPACE_ID::Syntax syntax() const; void set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value); + private: + PROTOBUF_NAMESPACE_ID::Syntax _internal_syntax() const; + void _internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.Enum) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -970,10 +1060,10 @@ class PROTOBUF_EXPORT Enum : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT EnumValue : +class PROTOBUF_EXPORT EnumValue PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumValue) */ { public: - EnumValue(); + inline EnumValue() : EnumValue(nullptr) {}; virtual ~EnumValue(); EnumValue(const EnumValue& from); @@ -987,7 +1077,7 @@ class PROTOBUF_EXPORT EnumValue : return *this; } inline EnumValue& operator=(EnumValue&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -995,12 +1085,6 @@ class PROTOBUF_EXPORT EnumValue : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -1020,11 +1104,22 @@ class PROTOBUF_EXPORT EnumValue : static constexpr int kIndexInFileMessages = 3; - void UnsafeArenaSwap(EnumValue* other); - void Swap(EnumValue* other); friend void swap(EnumValue& a, EnumValue& b) { a.Swap(&b); } + inline void Swap(EnumValue* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(EnumValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1043,16 +1138,9 @@ class PROTOBUF_EXPORT EnumValue : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -1069,13 +1157,6 @@ class PROTOBUF_EXPORT EnumValue : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -1091,13 +1172,24 @@ class PROTOBUF_EXPORT EnumValue : // accessors ------------------------------------------------------- + enum : int { + kOptionsFieldNumber = 3, + kNameFieldNumber = 1, + kNumberFieldNumber = 2, + }; // repeated .google.protobuf.Option options = 3; int options_size() const; + private: + int _internal_options_size() const; + public: void clear_options(); - static const int kOptionsFieldNumber = 3; PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >* mutable_options(); + private: + const PROTOBUF_NAMESPACE_ID::Option& _internal_options(int index) const; + PROTOBUF_NAMESPACE_ID::Option* _internal_add_options(); + public: const PROTOBUF_NAMESPACE_ID::Option& options(int index) const; PROTOBUF_NAMESPACE_ID::Option* add_options(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& @@ -1105,7 +1197,6 @@ class PROTOBUF_EXPORT EnumValue : // string name = 1; void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -1123,18 +1214,25 @@ class PROTOBUF_EXPORT EnumValue : " future release.") void unsafe_arena_set_allocated_name( std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // int32 number = 2; void clear_number(); - static const int kNumberFieldNumber = 2; ::PROTOBUF_NAMESPACE_ID::int32 number() const; void set_number(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_number() const; + void _internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.EnumValue) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -1146,10 +1244,10 @@ class PROTOBUF_EXPORT EnumValue : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT Option : +class PROTOBUF_EXPORT Option PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Option) */ { public: - Option(); + inline Option() : Option(nullptr) {}; virtual ~Option(); Option(const Option& from); @@ -1163,7 +1261,7 @@ class PROTOBUF_EXPORT Option : return *this; } inline Option& operator=(Option&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -1171,12 +1269,6 @@ class PROTOBUF_EXPORT Option : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -1196,11 +1288,22 @@ class PROTOBUF_EXPORT Option : static constexpr int kIndexInFileMessages = 4; - void UnsafeArenaSwap(Option* other); - void Swap(Option* other); friend void swap(Option& a, Option& b) { a.Swap(&b); } + inline void Swap(Option* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Option* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1219,16 +1322,9 @@ class PROTOBUF_EXPORT Option : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -1245,13 +1341,6 @@ class PROTOBUF_EXPORT Option : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -1267,9 +1356,12 @@ class PROTOBUF_EXPORT Option : // accessors ------------------------------------------------------- + enum : int { + kNameFieldNumber = 1, + kValueFieldNumber = 2, + }; // string name = 1; void clear_name(); - static const int kNameFieldNumber = 1; const std::string& name() const; void set_name(const std::string& value); void set_name(std::string&& value); @@ -1287,24 +1379,34 @@ class PROTOBUF_EXPORT Option : " future release.") void unsafe_arena_set_allocated_name( std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // .google.protobuf.Any value = 2; bool has_value() const; + private: + bool _internal_has_value() const; + public: void clear_value(); - static const int kValueFieldNumber = 2; const PROTOBUF_NAMESPACE_ID::Any& value() const; PROTOBUF_NAMESPACE_ID::Any* release_value(); PROTOBUF_NAMESPACE_ID::Any* mutable_value(); void set_allocated_value(PROTOBUF_NAMESPACE_ID::Any* value); + private: + const PROTOBUF_NAMESPACE_ID::Any& _internal_value() const; + PROTOBUF_NAMESPACE_ID::Any* _internal_mutable_value(); + public: void unsafe_arena_set_allocated_value( PROTOBUF_NAMESPACE_ID::Any* value); PROTOBUF_NAMESPACE_ID::Any* unsafe_arena_release_value(); // @@protoc_insertion_point(class_scope:google.protobuf.Option) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -1326,46 +1428,54 @@ class PROTOBUF_EXPORT Option : // string name = 1; inline void Type::clear_name() { - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Type::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Type.name) - return name_.Get(); + return _internal_name(); } inline void Type::set_name(const std::string& value) { - - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.Type.name) } +inline std::string* Type::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Type.name) + return _internal_mutable_name(); +} +inline const std::string& Type::_internal_name() const { + return name_.Get(); +} +inline void Type::_internal_set_name(const std::string& value) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Type::set_name(std::string&& value) { name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Type.name) } inline void Type::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Type.name) } inline void Type::set_name(const char* value, size_t size) { name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.name) } -inline std::string* Type::mutable_name() { +inline std::string* Type::_internal_mutable_name() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Type.name) - return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Type::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Type.name) - - return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Type::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -1374,33 +1484,36 @@ inline void Type::set_allocated_name(std::string* name) { } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.name) } inline std::string* Type::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Type.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void Type::unsafe_arena_set_allocated_name( std::string* name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (name != nullptr) { } else { } name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - name, GetArenaNoVirtual()); + name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Type.name) } // repeated .google.protobuf.Field fields = 2; -inline int Type::fields_size() const { +inline int Type::_internal_fields_size() const { return fields_.size(); } +inline int Type::fields_size() const { + return _internal_fields_size(); +} inline void Type::clear_fields() { fields_.Clear(); } @@ -1413,13 +1526,19 @@ Type::mutable_fields() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.fields) return &fields_; } +inline const PROTOBUF_NAMESPACE_ID::Field& Type::_internal_fields(int index) const { + return fields_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::Field& Type::fields(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Type.fields) - return fields_.Get(index); + return _internal_fields(index); +} +inline PROTOBUF_NAMESPACE_ID::Field* Type::_internal_add_fields() { + return fields_.Add(); } inline PROTOBUF_NAMESPACE_ID::Field* Type::add_fields() { // @@protoc_insertion_point(field_add:google.protobuf.Type.fields) - return fields_.Add(); + return _internal_add_fields(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Field >& Type::fields() const { @@ -1428,15 +1547,25 @@ Type::fields() const { } // repeated string oneofs = 3; -inline int Type::oneofs_size() const { +inline int Type::_internal_oneofs_size() const { return oneofs_.size(); } +inline int Type::oneofs_size() const { + return _internal_oneofs_size(); +} inline void Type::clear_oneofs() { oneofs_.Clear(); } +inline std::string* Type::add_oneofs() { + // @@protoc_insertion_point(field_add_mutable:google.protobuf.Type.oneofs) + return _internal_add_oneofs(); +} +inline const std::string& Type::_internal_oneofs(int index) const { + return oneofs_.Get(index); +} inline const std::string& Type::oneofs(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Type.oneofs) - return oneofs_.Get(index); + return _internal_oneofs(index); } inline std::string* Type::mutable_oneofs(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Type.oneofs) @@ -1460,8 +1589,7 @@ inline void Type::set_oneofs(int index, const char* value, size_t size) { reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.oneofs) } -inline std::string* Type::add_oneofs() { - // @@protoc_insertion_point(field_add_mutable:google.protobuf.Type.oneofs) +inline std::string* Type::_internal_add_oneofs() { return oneofs_.Add(); } inline void Type::add_oneofs(const std::string& value) { @@ -1493,9 +1621,12 @@ Type::mutable_oneofs() { } // repeated .google.protobuf.Option options = 4; -inline int Type::options_size() const { +inline int Type::_internal_options_size() const { return options_.size(); } +inline int Type::options_size() const { + return _internal_options_size(); +} inline void Type::clear_options() { options_.Clear(); } @@ -1508,13 +1639,19 @@ Type::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.options) return &options_; } +inline const PROTOBUF_NAMESPACE_ID::Option& Type::_internal_options(int index) const { + return options_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::Option& Type::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Type.options) - return options_.Get(index); + return _internal_options(index); +} +inline PROTOBUF_NAMESPACE_ID::Option* Type::_internal_add_options() { + return options_.Add(); } inline PROTOBUF_NAMESPACE_ID::Option* Type::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Type.options) - return options_.Add(); + return _internal_add_options(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& Type::options() const { @@ -1523,48 +1660,68 @@ Type::options() const { } // .google.protobuf.SourceContext source_context = 5; -inline bool Type::has_source_context() const { +inline bool Type::_internal_has_source_context() const { return this != internal_default_instance() && source_context_ != nullptr; } -inline const PROTOBUF_NAMESPACE_ID::SourceContext& Type::source_context() const { +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_; - // @@protoc_insertion_point(field_get:google.protobuf.Type.source_context) return p != nullptr ? *p : *reinterpret_cast( &PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_); } +inline const PROTOBUF_NAMESPACE_ID::SourceContext& Type::source_context() const { + // @@protoc_insertion_point(field_get:google.protobuf.Type.source_context) + return _internal_source_context(); +} +inline void Type::unsafe_arena_set_allocated_source_context( + PROTOBUF_NAMESPACE_ID::SourceContext* source_context) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_); + } + source_context_ = source_context; + if (source_context) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Type.source_context) +} inline PROTOBUF_NAMESPACE_ID::SourceContext* Type::release_source_context() { - // @@protoc_insertion_point(field_release:google.protobuf.Type.source_context) - - PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_; - if (GetArenaNoVirtual() != nullptr) { + auto temp = unsafe_arena_release_source_context(); + if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - source_context_ = nullptr; return temp; } inline PROTOBUF_NAMESPACE_ID::SourceContext* Type::unsafe_arena_release_source_context() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Type.source_context) + // @@protoc_insertion_point(field_release:google.protobuf.Type.source_context) PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_; source_context_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::SourceContext* Type::mutable_source_context() { +inline PROTOBUF_NAMESPACE_ID::SourceContext* Type::_internal_mutable_source_context() { if (source_context_ == nullptr) { - auto* p = CreateMaybeMessage(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArena()); source_context_ = p; } - // @@protoc_insertion_point(field_mutable:google.protobuf.Type.source_context) return source_context_; } +inline PROTOBUF_NAMESPACE_ID::SourceContext* Type::mutable_source_context() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Type.source_context) + return _internal_mutable_source_context(); +} inline void Type::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_); } if (source_context) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context)->GetArena(); if (message_arena != submessage_arena) { source_context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, source_context, submessage_arena); @@ -1581,13 +1738,19 @@ inline void Type::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceCont inline void Type::clear_syntax() { syntax_ = 0; } -inline PROTOBUF_NAMESPACE_ID::Syntax Type::syntax() const { - // @@protoc_insertion_point(field_get:google.protobuf.Type.syntax) +inline PROTOBUF_NAMESPACE_ID::Syntax Type::_internal_syntax() const { return static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(syntax_); } -inline void Type::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { +inline PROTOBUF_NAMESPACE_ID::Syntax Type::syntax() const { + // @@protoc_insertion_point(field_get:google.protobuf.Type.syntax) + return _internal_syntax(); +} +inline void Type::_internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { syntax_ = value; +} +inline void Type::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { + _internal_set_syntax(value); // @@protoc_insertion_point(field_set:google.protobuf.Type.syntax) } @@ -1599,13 +1762,19 @@ inline void Type::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { inline void Field::clear_kind() { kind_ = 0; } -inline PROTOBUF_NAMESPACE_ID::Field_Kind Field::kind() const { - // @@protoc_insertion_point(field_get:google.protobuf.Field.kind) +inline PROTOBUF_NAMESPACE_ID::Field_Kind Field::_internal_kind() const { return static_cast< PROTOBUF_NAMESPACE_ID::Field_Kind >(kind_); } -inline void Field::set_kind(PROTOBUF_NAMESPACE_ID::Field_Kind value) { +inline PROTOBUF_NAMESPACE_ID::Field_Kind Field::kind() const { + // @@protoc_insertion_point(field_get:google.protobuf.Field.kind) + return _internal_kind(); +} +inline void Field::_internal_set_kind(PROTOBUF_NAMESPACE_ID::Field_Kind value) { kind_ = value; +} +inline void Field::set_kind(PROTOBUF_NAMESPACE_ID::Field_Kind value) { + _internal_set_kind(value); // @@protoc_insertion_point(field_set:google.protobuf.Field.kind) } @@ -1613,13 +1782,19 @@ inline void Field::set_kind(PROTOBUF_NAMESPACE_ID::Field_Kind value) { inline void Field::clear_cardinality() { cardinality_ = 0; } -inline PROTOBUF_NAMESPACE_ID::Field_Cardinality Field::cardinality() const { - // @@protoc_insertion_point(field_get:google.protobuf.Field.cardinality) +inline PROTOBUF_NAMESPACE_ID::Field_Cardinality Field::_internal_cardinality() const { return static_cast< PROTOBUF_NAMESPACE_ID::Field_Cardinality >(cardinality_); } -inline void Field::set_cardinality(PROTOBUF_NAMESPACE_ID::Field_Cardinality value) { +inline PROTOBUF_NAMESPACE_ID::Field_Cardinality Field::cardinality() const { + // @@protoc_insertion_point(field_get:google.protobuf.Field.cardinality) + return _internal_cardinality(); +} +inline void Field::_internal_set_cardinality(PROTOBUF_NAMESPACE_ID::Field_Cardinality value) { cardinality_ = value; +} +inline void Field::set_cardinality(PROTOBUF_NAMESPACE_ID::Field_Cardinality value) { + _internal_set_cardinality(value); // @@protoc_insertion_point(field_set:google.protobuf.Field.cardinality) } @@ -1627,58 +1802,72 @@ inline void Field::set_cardinality(PROTOBUF_NAMESPACE_ID::Field_Cardinality valu inline void Field::clear_number() { number_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Field::number() const { - // @@protoc_insertion_point(field_get:google.protobuf.Field.number) +inline ::PROTOBUF_NAMESPACE_ID::int32 Field::_internal_number() const { return number_; } -inline void Field::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 Field::number() const { + // @@protoc_insertion_point(field_get:google.protobuf.Field.number) + return _internal_number(); +} +inline void Field::_internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value) { number_ = value; +} +inline void Field::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_number(value); // @@protoc_insertion_point(field_set:google.protobuf.Field.number) } // string name = 4; inline void Field::clear_name() { - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Field::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Field.name) - return name_.Get(); + return _internal_name(); } inline void Field::set_name(const std::string& value) { - - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.Field.name) } +inline std::string* Field::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Field.name) + return _internal_mutable_name(); +} +inline const std::string& Field::_internal_name() const { + return name_.Get(); +} +inline void Field::_internal_set_name(const std::string& value) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Field::set_name(std::string&& value) { name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Field.name) } inline void Field::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Field.name) } inline void Field::set_name(const char* value, size_t size) { name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.name) } -inline std::string* Field::mutable_name() { +inline std::string* Field::_internal_mutable_name() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Field.name) - return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Field::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Field.name) - - return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Field::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -1687,71 +1876,79 @@ inline void Field::set_allocated_name(std::string* name) { } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.name) } inline std::string* Field::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void Field::unsafe_arena_set_allocated_name( std::string* name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (name != nullptr) { } else { } name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - name, GetArenaNoVirtual()); + name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Field.name) } // string type_url = 6; inline void Field::clear_type_url() { - type_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + type_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Field::type_url() const { // @@protoc_insertion_point(field_get:google.protobuf.Field.type_url) - return type_url_.Get(); + return _internal_type_url(); } inline void Field::set_type_url(const std::string& value) { - - type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_type_url(value); // @@protoc_insertion_point(field_set:google.protobuf.Field.type_url) } +inline std::string* Field::mutable_type_url() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Field.type_url) + return _internal_mutable_type_url(); +} +inline const std::string& Field::_internal_type_url() const { + return type_url_.Get(); +} +inline void Field::_internal_set_type_url(const std::string& value) { + + type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Field::set_type_url(std::string&& value) { type_url_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Field.type_url) } inline void Field::set_type_url(const char* value) { GOOGLE_DCHECK(value != nullptr); type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Field.type_url) } inline void Field::set_type_url(const char* value, size_t size) { type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.type_url) } -inline std::string* Field::mutable_type_url() { +inline std::string* Field::_internal_mutable_type_url() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Field.type_url) - return type_url_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return type_url_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Field::release_type_url() { // @@protoc_insertion_point(field_release:google.protobuf.Field.type_url) - - return type_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return type_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Field::set_allocated_type_url(std::string* type_url) { if (type_url != nullptr) { @@ -1760,26 +1957,26 @@ inline void Field::set_allocated_type_url(std::string* type_url) { } type_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_url, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.type_url) } inline std::string* Field::unsafe_arena_release_type_url() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.type_url) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); return type_url_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void Field::unsafe_arena_set_allocated_type_url( std::string* type_url) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (type_url != nullptr) { } else { } type_url_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - type_url, GetArenaNoVirtual()); + type_url, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Field.type_url) } @@ -1787,13 +1984,19 @@ inline void Field::unsafe_arena_set_allocated_type_url( inline void Field::clear_oneof_index() { oneof_index_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Field::oneof_index() const { - // @@protoc_insertion_point(field_get:google.protobuf.Field.oneof_index) +inline ::PROTOBUF_NAMESPACE_ID::int32 Field::_internal_oneof_index() const { return oneof_index_; } -inline void Field::set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 Field::oneof_index() const { + // @@protoc_insertion_point(field_get:google.protobuf.Field.oneof_index) + return _internal_oneof_index(); +} +inline void Field::_internal_set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value) { oneof_index_ = value; +} +inline void Field::set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_oneof_index(value); // @@protoc_insertion_point(field_set:google.protobuf.Field.oneof_index) } @@ -1801,20 +2004,29 @@ inline void Field::set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value) { inline void Field::clear_packed() { packed_ = false; } -inline bool Field::packed() const { - // @@protoc_insertion_point(field_get:google.protobuf.Field.packed) +inline bool Field::_internal_packed() const { return packed_; } -inline void Field::set_packed(bool value) { +inline bool Field::packed() const { + // @@protoc_insertion_point(field_get:google.protobuf.Field.packed) + return _internal_packed(); +} +inline void Field::_internal_set_packed(bool value) { packed_ = value; +} +inline void Field::set_packed(bool value) { + _internal_set_packed(value); // @@protoc_insertion_point(field_set:google.protobuf.Field.packed) } // repeated .google.protobuf.Option options = 9; -inline int Field::options_size() const { +inline int Field::_internal_options_size() const { return options_.size(); } +inline int Field::options_size() const { + return _internal_options_size(); +} inline void Field::clear_options() { options_.Clear(); } @@ -1827,13 +2039,19 @@ Field::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Field.options) return &options_; } +inline const PROTOBUF_NAMESPACE_ID::Option& Field::_internal_options(int index) const { + return options_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::Option& Field::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Field.options) - return options_.Get(index); + return _internal_options(index); +} +inline PROTOBUF_NAMESPACE_ID::Option* Field::_internal_add_options() { + return options_.Add(); } inline PROTOBUF_NAMESPACE_ID::Option* Field::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Field.options) - return options_.Add(); + return _internal_add_options(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& Field::options() const { @@ -1843,46 +2061,54 @@ Field::options() const { // string json_name = 10; inline void Field::clear_json_name() { - json_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + json_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Field::json_name() const { // @@protoc_insertion_point(field_get:google.protobuf.Field.json_name) - return json_name_.Get(); + return _internal_json_name(); } inline void Field::set_json_name(const std::string& value) { - - json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_json_name(value); // @@protoc_insertion_point(field_set:google.protobuf.Field.json_name) } +inline std::string* Field::mutable_json_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Field.json_name) + return _internal_mutable_json_name(); +} +inline const std::string& Field::_internal_json_name() const { + return json_name_.Get(); +} +inline void Field::_internal_set_json_name(const std::string& value) { + + json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Field::set_json_name(std::string&& value) { json_name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Field.json_name) } inline void Field::set_json_name(const char* value) { GOOGLE_DCHECK(value != nullptr); json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Field.json_name) } inline void Field::set_json_name(const char* value, size_t size) { json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.json_name) } -inline std::string* Field::mutable_json_name() { +inline std::string* Field::_internal_mutable_json_name() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Field.json_name) - return json_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return json_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Field::release_json_name() { // @@protoc_insertion_point(field_release:google.protobuf.Field.json_name) - - return json_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return json_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Field::set_allocated_json_name(std::string* json_name) { if (json_name != nullptr) { @@ -1891,71 +2117,79 @@ inline void Field::set_allocated_json_name(std::string* json_name) { } json_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), json_name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.json_name) } inline std::string* Field::unsafe_arena_release_json_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.json_name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); return json_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void Field::unsafe_arena_set_allocated_json_name( std::string* json_name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (json_name != nullptr) { } else { } json_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - json_name, GetArenaNoVirtual()); + json_name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Field.json_name) } // string default_value = 11; inline void Field::clear_default_value() { - default_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + default_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Field::default_value() const { // @@protoc_insertion_point(field_get:google.protobuf.Field.default_value) - return default_value_.Get(); + return _internal_default_value(); } inline void Field::set_default_value(const std::string& value) { - - default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_default_value(value); // @@protoc_insertion_point(field_set:google.protobuf.Field.default_value) } +inline std::string* Field::mutable_default_value() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Field.default_value) + return _internal_mutable_default_value(); +} +inline const std::string& Field::_internal_default_value() const { + return default_value_.Get(); +} +inline void Field::_internal_set_default_value(const std::string& value) { + + default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Field::set_default_value(std::string&& value) { default_value_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Field.default_value) } inline void Field::set_default_value(const char* value) { GOOGLE_DCHECK(value != nullptr); default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Field.default_value) } inline void Field::set_default_value(const char* value, size_t size) { default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.default_value) } -inline std::string* Field::mutable_default_value() { +inline std::string* Field::_internal_mutable_default_value() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Field.default_value) - return default_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return default_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Field::release_default_value() { // @@protoc_insertion_point(field_release:google.protobuf.Field.default_value) - - return default_value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return default_value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Field::set_allocated_default_value(std::string* default_value) { if (default_value != nullptr) { @@ -1964,26 +2198,26 @@ inline void Field::set_allocated_default_value(std::string* default_value) { } default_value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), default_value, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.default_value) } inline std::string* Field::unsafe_arena_release_default_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.default_value) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); return default_value_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void Field::unsafe_arena_set_allocated_default_value( std::string* default_value) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (default_value != nullptr) { } else { } default_value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - default_value, GetArenaNoVirtual()); + default_value, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Field.default_value) } @@ -1993,46 +2227,54 @@ inline void Field::unsafe_arena_set_allocated_default_value( // string name = 1; inline void Enum::clear_name() { - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Enum::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Enum.name) - return name_.Get(); + return _internal_name(); } inline void Enum::set_name(const std::string& value) { - - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.Enum.name) } +inline std::string* Enum::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.name) + return _internal_mutable_name(); +} +inline const std::string& Enum::_internal_name() const { + return name_.Get(); +} +inline void Enum::_internal_set_name(const std::string& value) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Enum::set_name(std::string&& value) { name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Enum.name) } inline void Enum::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Enum.name) } inline void Enum::set_name(const char* value, size_t size) { name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Enum.name) } -inline std::string* Enum::mutable_name() { +inline std::string* Enum::_internal_mutable_name() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.name) - return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Enum::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Enum.name) - - return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Enum::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -2041,33 +2283,36 @@ inline void Enum::set_allocated_name(std::string* name) { } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.name) } inline std::string* Enum::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Enum.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void Enum::unsafe_arena_set_allocated_name( std::string* name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (name != nullptr) { } else { } name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - name, GetArenaNoVirtual()); + name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Enum.name) } // repeated .google.protobuf.EnumValue enumvalue = 2; -inline int Enum::enumvalue_size() const { +inline int Enum::_internal_enumvalue_size() const { return enumvalue_.size(); } +inline int Enum::enumvalue_size() const { + return _internal_enumvalue_size(); +} inline void Enum::clear_enumvalue() { enumvalue_.Clear(); } @@ -2080,13 +2325,19 @@ Enum::mutable_enumvalue() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.enumvalue) return &enumvalue_; } +inline const PROTOBUF_NAMESPACE_ID::EnumValue& Enum::_internal_enumvalue(int index) const { + return enumvalue_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::EnumValue& Enum::enumvalue(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Enum.enumvalue) - return enumvalue_.Get(index); + return _internal_enumvalue(index); +} +inline PROTOBUF_NAMESPACE_ID::EnumValue* Enum::_internal_add_enumvalue() { + return enumvalue_.Add(); } inline PROTOBUF_NAMESPACE_ID::EnumValue* Enum::add_enumvalue() { // @@protoc_insertion_point(field_add:google.protobuf.Enum.enumvalue) - return enumvalue_.Add(); + return _internal_add_enumvalue(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValue >& Enum::enumvalue() const { @@ -2095,9 +2346,12 @@ Enum::enumvalue() const { } // repeated .google.protobuf.Option options = 3; -inline int Enum::options_size() const { +inline int Enum::_internal_options_size() const { return options_.size(); } +inline int Enum::options_size() const { + return _internal_options_size(); +} inline void Enum::clear_options() { options_.Clear(); } @@ -2110,13 +2364,19 @@ Enum::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.options) return &options_; } +inline const PROTOBUF_NAMESPACE_ID::Option& Enum::_internal_options(int index) const { + return options_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::Option& Enum::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Enum.options) - return options_.Get(index); + return _internal_options(index); +} +inline PROTOBUF_NAMESPACE_ID::Option* Enum::_internal_add_options() { + return options_.Add(); } inline PROTOBUF_NAMESPACE_ID::Option* Enum::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Enum.options) - return options_.Add(); + return _internal_add_options(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& Enum::options() const { @@ -2125,48 +2385,68 @@ Enum::options() const { } // .google.protobuf.SourceContext source_context = 4; -inline bool Enum::has_source_context() const { +inline bool Enum::_internal_has_source_context() const { return this != internal_default_instance() && source_context_ != nullptr; } -inline const PROTOBUF_NAMESPACE_ID::SourceContext& Enum::source_context() const { +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_; - // @@protoc_insertion_point(field_get:google.protobuf.Enum.source_context) return p != nullptr ? *p : *reinterpret_cast( &PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_); } +inline const PROTOBUF_NAMESPACE_ID::SourceContext& Enum::source_context() const { + // @@protoc_insertion_point(field_get:google.protobuf.Enum.source_context) + return _internal_source_context(); +} +inline void Enum::unsafe_arena_set_allocated_source_context( + PROTOBUF_NAMESPACE_ID::SourceContext* source_context) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_); + } + source_context_ = source_context; + if (source_context) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Enum.source_context) +} inline PROTOBUF_NAMESPACE_ID::SourceContext* Enum::release_source_context() { - // @@protoc_insertion_point(field_release:google.protobuf.Enum.source_context) - - PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_; - if (GetArenaNoVirtual() != nullptr) { + auto temp = unsafe_arena_release_source_context(); + if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - source_context_ = nullptr; return temp; } inline PROTOBUF_NAMESPACE_ID::SourceContext* Enum::unsafe_arena_release_source_context() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Enum.source_context) + // @@protoc_insertion_point(field_release:google.protobuf.Enum.source_context) PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_; source_context_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::SourceContext* Enum::mutable_source_context() { +inline PROTOBUF_NAMESPACE_ID::SourceContext* Enum::_internal_mutable_source_context() { if (source_context_ == nullptr) { - auto* p = CreateMaybeMessage(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArena()); source_context_ = p; } - // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.source_context) return source_context_; } +inline PROTOBUF_NAMESPACE_ID::SourceContext* Enum::mutable_source_context() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.source_context) + return _internal_mutable_source_context(); +} inline void Enum::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_); } if (source_context) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context)->GetArena(); if (message_arena != submessage_arena) { source_context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, source_context, submessage_arena); @@ -2183,13 +2463,19 @@ inline void Enum::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceCont inline void Enum::clear_syntax() { syntax_ = 0; } -inline PROTOBUF_NAMESPACE_ID::Syntax Enum::syntax() const { - // @@protoc_insertion_point(field_get:google.protobuf.Enum.syntax) +inline PROTOBUF_NAMESPACE_ID::Syntax Enum::_internal_syntax() const { return static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(syntax_); } -inline void Enum::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { +inline PROTOBUF_NAMESPACE_ID::Syntax Enum::syntax() const { + // @@protoc_insertion_point(field_get:google.protobuf.Enum.syntax) + return _internal_syntax(); +} +inline void Enum::_internal_set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { syntax_ = value; +} +inline void Enum::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { + _internal_set_syntax(value); // @@protoc_insertion_point(field_set:google.protobuf.Enum.syntax) } @@ -2199,46 +2485,54 @@ inline void Enum::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { // string name = 1; inline void EnumValue::clear_name() { - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& EnumValue::name() const { // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.name) - return name_.Get(); + return _internal_name(); } inline void EnumValue::set_name(const std::string& value) { - - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.EnumValue.name) } +inline std::string* EnumValue::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValue.name) + return _internal_mutable_name(); +} +inline const std::string& EnumValue::_internal_name() const { + return name_.Get(); +} +inline void EnumValue::_internal_set_name(const std::string& value) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void EnumValue::set_name(std::string&& value) { name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.EnumValue.name) } inline void EnumValue::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.EnumValue.name) } inline void EnumValue::set_name(const char* value, size_t size) { name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValue.name) } -inline std::string* EnumValue::mutable_name() { +inline std::string* EnumValue::_internal_mutable_name() { - // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValue.name) - return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* EnumValue::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.EnumValue.name) - - return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void EnumValue::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -2247,26 +2541,26 @@ inline void EnumValue::set_allocated_name(std::string* name) { } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValue.name) } inline std::string* EnumValue::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumValue.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void EnumValue::unsafe_arena_set_allocated_name( std::string* name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (name != nullptr) { } else { } name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - name, GetArenaNoVirtual()); + name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.EnumValue.name) } @@ -2274,20 +2568,29 @@ inline void EnumValue::unsafe_arena_set_allocated_name( inline void EnumValue::clear_number() { number_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 EnumValue::number() const { - // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.number) +inline ::PROTOBUF_NAMESPACE_ID::int32 EnumValue::_internal_number() const { return number_; } -inline void EnumValue::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 EnumValue::number() const { + // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.number) + return _internal_number(); +} +inline void EnumValue::_internal_set_number(::PROTOBUF_NAMESPACE_ID::int32 value) { number_ = value; +} +inline void EnumValue::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_number(value); // @@protoc_insertion_point(field_set:google.protobuf.EnumValue.number) } // repeated .google.protobuf.Option options = 3; -inline int EnumValue::options_size() const { +inline int EnumValue::_internal_options_size() const { return options_.size(); } +inline int EnumValue::options_size() const { + return _internal_options_size(); +} inline void EnumValue::clear_options() { options_.Clear(); } @@ -2300,13 +2603,19 @@ EnumValue::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValue.options) return &options_; } +inline const PROTOBUF_NAMESPACE_ID::Option& EnumValue::_internal_options(int index) const { + return options_.Get(index); +} inline const PROTOBUF_NAMESPACE_ID::Option& EnumValue::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.options) - return options_.Get(index); + return _internal_options(index); +} +inline PROTOBUF_NAMESPACE_ID::Option* EnumValue::_internal_add_options() { + return options_.Add(); } inline PROTOBUF_NAMESPACE_ID::Option* EnumValue::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.EnumValue.options) - return options_.Add(); + return _internal_add_options(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& EnumValue::options() const { @@ -2320,46 +2629,54 @@ EnumValue::options() const { // string name = 1; inline void Option::clear_name() { - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Option::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Option.name) - return name_.Get(); + return _internal_name(); } inline void Option::set_name(const std::string& value) { - - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_name(value); // @@protoc_insertion_point(field_set:google.protobuf.Option.name) } +inline std::string* Option::mutable_name() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Option.name) + return _internal_mutable_name(); +} +inline const std::string& Option::_internal_name() const { + return name_.Get(); +} +inline void Option::_internal_set_name(const std::string& value) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void Option::set_name(std::string&& value) { name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Option.name) } inline void Option::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.Option.name) } inline void Option::set_name(const char* value, size_t size) { name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Option.name) } -inline std::string* Option::mutable_name() { +inline std::string* Option::_internal_mutable_name() { - // @@protoc_insertion_point(field_mutable:google.protobuf.Option.name) - return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Option::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Option.name) - - return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Option::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -2368,72 +2685,92 @@ inline void Option::set_allocated_name(std::string* name) { } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.name) } inline std::string* Option::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Option.name) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void Option::unsafe_arena_set_allocated_name( std::string* name) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (name != nullptr) { } else { } name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - name, GetArenaNoVirtual()); + name, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Option.name) } // .google.protobuf.Any value = 2; -inline bool Option::has_value() const { +inline bool Option::_internal_has_value() const { return this != internal_default_instance() && value_ != nullptr; } -inline const PROTOBUF_NAMESPACE_ID::Any& Option::value() const { +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_; - // @@protoc_insertion_point(field_get:google.protobuf.Option.value) return p != nullptr ? *p : *reinterpret_cast( &PROTOBUF_NAMESPACE_ID::_Any_default_instance_); } +inline const PROTOBUF_NAMESPACE_ID::Any& Option::value() const { + // @@protoc_insertion_point(field_get:google.protobuf.Option.value) + return _internal_value(); +} +inline void Option::unsafe_arena_set_allocated_value( + PROTOBUF_NAMESPACE_ID::Any* value) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(value_); + } + value_ = value; + if (value) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Option.value) +} inline PROTOBUF_NAMESPACE_ID::Any* Option::release_value() { - // @@protoc_insertion_point(field_release:google.protobuf.Option.value) - - PROTOBUF_NAMESPACE_ID::Any* temp = value_; - if (GetArenaNoVirtual() != nullptr) { + auto temp = unsafe_arena_release_value(); + if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - value_ = nullptr; return temp; } inline PROTOBUF_NAMESPACE_ID::Any* Option::unsafe_arena_release_value() { - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Option.value) + // @@protoc_insertion_point(field_release:google.protobuf.Option.value) PROTOBUF_NAMESPACE_ID::Any* temp = value_; value_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::Any* Option::mutable_value() { +inline PROTOBUF_NAMESPACE_ID::Any* Option::_internal_mutable_value() { if (value_ == nullptr) { - auto* p = CreateMaybeMessage(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArena()); value_ = p; } - // @@protoc_insertion_point(field_mutable:google.protobuf.Option.value) return value_; } +inline PROTOBUF_NAMESPACE_ID::Any* Option::mutable_value() { + // @@protoc_insertion_point(field_mutable:google.protobuf.Option.value) + return _internal_mutable_value(); +} inline void Option::set_allocated_value(PROTOBUF_NAMESPACE_ID::Any* value) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(value_); } if (value) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, value, submessage_arena); diff --git a/third_party/protobuf/src/google/protobuf/unittest.proto b/third_party/protobuf/src/google/protobuf/unittest.proto index 48703823..a4d50457 100644 --- a/third_party/protobuf/src/google/protobuf/unittest.proto +++ b/third_party/protobuf/src/google/protobuf/unittest.proto @@ -182,7 +182,7 @@ message TestAllTypes { } } -// This proto includes a recusively nested message. +// This proto includes a recursively nested message. message NestedTestAllTypes { optional NestedTestAllTypes child = 1; optional TestAllTypes payload = 2; @@ -441,6 +441,16 @@ message TestEmptyMessageWithExtensions { extensions 1 to max; } +// Needed for a Python test. +message TestPickleNestedMessage { + message NestedMessage { + optional int32 bb = 1; + message NestedNestedMessage { + optional int32 cc = 1; + } + } +} + message TestMultipleExtensionRanges { extensions 42; extensions 4143 to 4243; diff --git a/third_party/protobuf/src/google/protobuf/unittest_custom_options.proto b/third_party/protobuf/src/google/protobuf/unittest_custom_options.proto index 218447e9..50bb9960 100644 --- a/third_party/protobuf/src/google/protobuf/unittest_custom_options.proto +++ b/third_party/protobuf/src/google/protobuf/unittest_custom_options.proto @@ -38,8 +38,8 @@ syntax = "proto2"; // Some generic_services option(s) added automatically. // See: http://go/proto2-generic-services-default -option cc_generic_services = true; // auto-added -option java_generic_services = true; // auto-added +option cc_generic_services = true; // auto-added +option java_generic_services = true; // auto-added option py_generic_services = true; // A custom file option (defined below). @@ -51,7 +51,6 @@ import "google/protobuf/descriptor.proto"; // that the generated code doesn't depend on being in the proto2 namespace. package protobuf_unittest; - // Some simple test custom options of various types. extend google.protobuf.FileOptions { @@ -66,7 +65,7 @@ extend google.protobuf.FieldOptions { optional fixed64 field_opt1 = 7740936; // This is useful for testing that we correctly register default values for // extension options. - optional int32 field_opt2 = 7753913 [default=42]; + optional int32 field_opt2 = 7753913 [default = 42]; } extend google.protobuf.OneofOptions { @@ -98,14 +97,13 @@ extend google.protobuf.MethodOptions { // regular options, to make sure they interact nicely). message TestMessageWithCustomOptions { option message_set_wire_format = false; - option (message_opt1) = -56; - optional string field1 = 1 [ctype=CORD, - (field_opt1)=8765432109]; + optional string field1 = 1 [ctype = CORD, (field_opt1) = 8765432109]; oneof AnOneof { option (oneof_opt1) = -99; + int32 oneof_field = 2; } @@ -117,20 +115,15 @@ message TestMessageWithCustomOptions { } } - // A test RPC service with custom options at all possible locations (and also // some regular options, to make sure they interact nicely). -message CustomOptionFooRequest { -} +message CustomOptionFooRequest {} -message CustomOptionFooResponse { -} +message CustomOptionFooResponse {} -message CustomOptionFooClientMessage { -} +message CustomOptionFooClientMessage {} -message CustomOptionFooServerMessage { -} +message CustomOptionFooServerMessage {} service TestServiceWithCustomOptions { option (service_opt1) = -9876543210; @@ -140,8 +133,6 @@ service TestServiceWithCustomOptions { } } - - // Options of every possible field type, so we can test them all exhaustively. message DummyMessageContainingEnum { @@ -151,74 +142,73 @@ message DummyMessageContainingEnum { } } -message DummyMessageInvalidAsOptionType { -} +message DummyMessageInvalidAsOptionType {} extend google.protobuf.MessageOptions { - optional bool bool_opt = 7706090; - optional int32 int32_opt = 7705709; - optional int64 int64_opt = 7705542; - optional uint32 uint32_opt = 7704880; - optional uint64 uint64_opt = 7702367; - optional sint32 sint32_opt = 7701568; - optional sint64 sint64_opt = 7700863; - optional fixed32 fixed32_opt = 7700307; - optional fixed64 fixed64_opt = 7700194; - optional sfixed32 sfixed32_opt = 7698645; - optional sfixed64 sfixed64_opt = 7685475; - optional float float_opt = 7675390; - optional double double_opt = 7673293; - optional string string_opt = 7673285; - optional bytes bytes_opt = 7673238; + optional bool bool_opt = 7706090; + optional int32 int32_opt = 7705709; + optional int64 int64_opt = 7705542; + optional uint32 uint32_opt = 7704880; + optional uint64 uint64_opt = 7702367; + optional sint32 sint32_opt = 7701568; + optional sint64 sint64_opt = 7700863; + optional fixed32 fixed32_opt = 7700307; + optional fixed64 fixed64_opt = 7700194; + optional sfixed32 sfixed32_opt = 7698645; + optional sfixed64 sfixed64_opt = 7685475; + optional float float_opt = 7675390; + optional double double_opt = 7673293; + optional string string_opt = 7673285; + optional bytes bytes_opt = 7673238; optional DummyMessageContainingEnum.TestEnumType enum_opt = 7673233; optional DummyMessageInvalidAsOptionType message_type_opt = 7665967; } message CustomOptionMinIntegerValues { - option (bool_opt) = false; - option (int32_opt) = -0x80000000; - option (int64_opt) = -0x8000000000000000; - option (uint32_opt) = 0; - option (uint64_opt) = 0; - option (sint32_opt) = -0x80000000; - option (sint64_opt) = -0x8000000000000000; - option (fixed32_opt) = 0; - option (fixed64_opt) = 0; + option (bool_opt) = false; + option (int32_opt) = -0x80000000; + option (int64_opt) = -0x8000000000000000; + option (uint32_opt) = 0; + option (uint64_opt) = 0; + option (sint32_opt) = -0x80000000; + option (sint64_opt) = -0x8000000000000000; + option (fixed32_opt) = 0; + option (fixed64_opt) = 0; option (sfixed32_opt) = -0x80000000; option (sfixed64_opt) = -0x8000000000000000; } message CustomOptionMaxIntegerValues { - option (bool_opt) = true; - option (int32_opt) = 0x7FFFFFFF; - option (int64_opt) = 0x7FFFFFFFFFFFFFFF; - option (uint32_opt) = 0xFFFFFFFF; - option (uint64_opt) = 0xFFFFFFFFFFFFFFFF; - option (sint32_opt) = 0x7FFFFFFF; - option (sint64_opt) = 0x7FFFFFFFFFFFFFFF; - option (fixed32_opt) = 0xFFFFFFFF; - option (fixed64_opt) = 0xFFFFFFFFFFFFFFFF; + option (bool_opt) = true; + option (int32_opt) = 0x7FFFFFFF; + option (int64_opt) = 0x7FFFFFFFFFFFFFFF; + option (uint32_opt) = 0xFFFFFFFF; + option (uint64_opt) = 0xFFFFFFFFFFFFFFFF; + option (sint32_opt) = 0x7FFFFFFF; + option (sint64_opt) = 0x7FFFFFFFFFFFFFFF; + option (fixed32_opt) = 0xFFFFFFFF; + option (fixed64_opt) = 0xFFFFFFFFFFFFFFFF; option (sfixed32_opt) = 0x7FFFFFFF; option (sfixed64_opt) = 0x7FFFFFFFFFFFFFFF; } message CustomOptionOtherValues { - option (int32_opt) = -100; // To test sign-extension. - option (float_opt) = 12.3456789; + option (int32_opt) = -100; // To test sign-extension. + option (float_opt) = 12.3456789; option (double_opt) = 1.234567890123456789; option (string_opt) = "Hello, \"World\""; - option (bytes_opt) = "Hello\0World"; - option (enum_opt) = TEST_OPTION_ENUM_TYPE2; + option (bytes_opt) = "Hello\0World"; + option (enum_opt) = TEST_OPTION_ENUM_TYPE2; } message SettingRealsFromPositiveInts { - option (float_opt) = 12; + option (float_opt) = 12; option (double_opt) = 154; } message SettingRealsFromNegativeInts { - option (float_opt) = -12; - option (double_opt) = -154; + option (float_opt) = -12; + option (double_opt) = -154; } // Options of complex message types, themselves combined and extended in @@ -295,8 +285,12 @@ message VariousComplexOptions { option (complex_opt2).(protobuf_unittest.garply).(corge).qux = 2121; option (ComplexOptionType2.ComplexOptionType4.complex_opt4).waldo = 1971; option (complex_opt2).fred.waldo = 321; - option (complex_opt2).barney = { waldo: 101 }; - option (complex_opt2).barney = { waldo: 212 }; + option (complex_opt2).barney = { + waldo: 101 + }; + option (complex_opt2).barney = { + waldo: 212 + }; option (protobuf_unittest.complex_opt3).qux = 9; option (complex_opt3).complexoptiontype5.plugh = 22; option (complexopt6).xyzzy = 24; @@ -308,6 +302,7 @@ message VariousComplexOptions { message AggregateMessageSet { option message_set_wire_format = true; + extensions 4 to max; } @@ -337,29 +332,42 @@ message Aggregate { } // Allow Aggregate to be used as an option at all possible locations -// in the .proto grammer. -extend google.protobuf.FileOptions { optional Aggregate fileopt = 15478479; } -extend google.protobuf.MessageOptions { optional Aggregate msgopt = 15480088; } -extend google.protobuf.FieldOptions { optional Aggregate fieldopt = 15481374; } -extend google.protobuf.EnumOptions { optional Aggregate enumopt = 15483218; } -extend google.protobuf.EnumValueOptions { optional Aggregate enumvalopt = 15486921; } -extend google.protobuf.ServiceOptions { optional Aggregate serviceopt = 15497145; } -extend google.protobuf.MethodOptions { optional Aggregate methodopt = 15512713; } +// in the .proto grammar. +extend google.protobuf.FileOptions { + optional Aggregate fileopt = 15478479; +} +extend google.protobuf.MessageOptions { + optional Aggregate msgopt = 15480088; +} +extend google.protobuf.FieldOptions { + optional Aggregate fieldopt = 15481374; +} +extend google.protobuf.EnumOptions { + optional Aggregate enumopt = 15483218; +} +extend google.protobuf.EnumValueOptions { + optional Aggregate enumvalopt = 15486921; +} +extend google.protobuf.ServiceOptions { + optional Aggregate serviceopt = 15497145; +} +extend google.protobuf.MethodOptions { + optional Aggregate methodopt = 15512713; +} // Try using AggregateOption at different points in the proto grammar option (fileopt) = { s: 'FileAnnotation' // Also test the handling of comments - /* of both types */ i: 100 + /* of both types */ + i: 100 sub { s: 'NestedFileAnnotation' } // Include a google.protobuf.FileOptions and recursively extend it with // another fileopt. file { - [protobuf_unittest.fileopt] { - s:'FileExtensionAnnotation' - } + [protobuf_unittest.fileopt] { s: 'FileExtensionAnnotation' } } // A message set inside an option value @@ -371,30 +379,44 @@ option (fileopt) = { }; message AggregateMessage { - option (msgopt) = { i:101 s:'MessageAnnotation' }; - optional int32 fieldname = 1 [(fieldopt) = { s:'FieldAnnotation' }]; + option (msgopt) = { + i: 101 + s: 'MessageAnnotation' + }; + + optional int32 fieldname = 1 [(fieldopt) = { s: 'FieldAnnotation' }]; } service AggregateService { - option (serviceopt) = { s:'ServiceAnnotation' }; - rpc Method (AggregateMessage) returns (AggregateMessage) { - option (methodopt) = { s:'MethodAnnotation' }; + option (serviceopt) = { + s: 'ServiceAnnotation' + }; + + rpc Method(AggregateMessage) returns (AggregateMessage) { + option (methodopt) = { + s: 'MethodAnnotation' + }; } } enum AggregateEnum { - option (enumopt) = { s:'EnumAnnotation' }; - VALUE = 1 [(enumvalopt) = { s:'EnumValueAnnotation' }]; + option (enumopt) = { + s: 'EnumAnnotation' + }; + + VALUE = 1 [(enumvalopt) = { s: 'EnumValueAnnotation' }]; } // Test custom options for nested type. message NestedOptionType { message NestedMessage { option (message_opt1) = 1001; + optional int32 nested_field = 1 [(field_opt1) = 1002]; } enum NestedEnum { option (enum_opt1) = 1003; + NESTED_ENUM_VALUE = 1 [(enum_value_opt1) = 1004]; } extend google.protobuf.FileOptions { @@ -405,9 +427,7 @@ message NestedOptionType { // Custom message option that has a required enum field. // WARNING: this is strongly discouraged! message OldOptionType { - enum TestEnum { - OLD_VALUE = 0; - } + enum TestEnum { OLD_VALUE = 0; } required TestEnum value = 1; } @@ -426,5 +446,7 @@ extend google.protobuf.MessageOptions { // Test message using the "required_enum_opt" option defined above. message TestMessageWithRequiredEnumOption { - option (required_enum_opt) = { value: OLD_VALUE }; + option (required_enum_opt) = { + value: OLD_VALUE + }; } diff --git a/third_party/protobuf/src/google/protobuf/unittest_lite.proto b/third_party/protobuf/src/google/protobuf/unittest_lite.proto index f3ff2b5d..4c3d8458 100644 --- a/third_party/protobuf/src/google/protobuf/unittest_lite.proto +++ b/third_party/protobuf/src/google/protobuf/unittest_lite.proto @@ -33,17 +33,17 @@ // This is like unittest.proto but with optimize_for = LITE_RUNTIME. syntax = "proto2"; + package protobuf_unittest; import "google/protobuf/unittest_import_lite.proto"; +option cc_enable_arenas = false; option optimize_for = LITE_RUNTIME; - option java_package = "com.google.protobuf"; // Same as TestAllTypes but with the lite runtime. message TestAllTypesLite { - message NestedMessage { optional int32 bb = 1; optional int64 cc = 2; @@ -56,104 +56,105 @@ message TestAllTypesLite { } // Singular - optional int32 optional_int32 = 1; - optional int64 optional_int64 = 2; - optional uint32 optional_uint32 = 3; - optional uint64 optional_uint64 = 4; - optional sint32 optional_sint32 = 5; - optional sint64 optional_sint64 = 6; - optional fixed32 optional_fixed32 = 7; - optional fixed64 optional_fixed64 = 8; - optional sfixed32 optional_sfixed32 = 9; + optional int32 optional_int32 = 1; + optional int64 optional_int64 = 2; + optional uint32 optional_uint32 = 3; + optional uint64 optional_uint64 = 4; + optional sint32 optional_sint32 = 5; + optional sint64 optional_sint64 = 6; + optional fixed32 optional_fixed32 = 7; + optional fixed64 optional_fixed64 = 8; + optional sfixed32 optional_sfixed32 = 9; optional sfixed64 optional_sfixed64 = 10; - optional float optional_float = 11; - optional double optional_double = 12; - optional bool optional_bool = 13; - optional string optional_string = 14; - optional bytes optional_bytes = 15; + optional float optional_float = 11; + optional double optional_double = 12; + optional bool optional_bool = 13; + optional string optional_string = 14; + optional bytes optional_bytes = 15; optional group OptionalGroup = 16 { optional int32 a = 17; } - optional NestedMessage optional_nested_message = 18; + optional NestedMessage optional_nested_message = 18; optional ForeignMessageLite optional_foreign_message = 19; - optional protobuf_unittest_import.ImportMessageLite - optional_import_message = 20; + optional protobuf_unittest_import.ImportMessageLite optional_import_message = + 20; - optional NestedEnum optional_nested_enum = 21; - optional ForeignEnumLite optional_foreign_enum = 22; + optional NestedEnum optional_nested_enum = 21; + optional ForeignEnumLite optional_foreign_enum = 22; optional protobuf_unittest_import.ImportEnumLite optional_import_enum = 23; - optional string optional_string_piece = 24 [ctype=STRING_PIECE]; - optional string optional_cord = 25 [ctype=CORD]; + optional string optional_string_piece = 24 [ctype = STRING_PIECE]; + optional string optional_cord = 25 [ctype = CORD]; // Defined in unittest_import_public.proto optional protobuf_unittest_import.PublicImportMessageLite optional_public_import_message = 26; - optional NestedMessage optional_lazy_message = 27 [lazy=true]; + optional NestedMessage optional_lazy_message = 27 [lazy = true]; // Repeated - repeated int32 repeated_int32 = 31; - repeated int64 repeated_int64 = 32; - repeated uint32 repeated_uint32 = 33; - repeated uint64 repeated_uint64 = 34; - repeated sint32 repeated_sint32 = 35; - repeated sint64 repeated_sint64 = 36; - repeated fixed32 repeated_fixed32 = 37; - repeated fixed64 repeated_fixed64 = 38; + repeated int32 repeated_int32 = 31; + repeated int64 repeated_int64 = 32; + repeated uint32 repeated_uint32 = 33; + repeated uint64 repeated_uint64 = 34; + repeated sint32 repeated_sint32 = 35; + repeated sint64 repeated_sint64 = 36; + repeated fixed32 repeated_fixed32 = 37; + repeated fixed64 repeated_fixed64 = 38; repeated sfixed32 repeated_sfixed32 = 39; repeated sfixed64 repeated_sfixed64 = 40; - repeated float repeated_float = 41; - repeated double repeated_double = 42; - repeated bool repeated_bool = 43; - repeated string repeated_string = 44; - repeated bytes repeated_bytes = 45; + repeated float repeated_float = 41; + repeated double repeated_double = 42; + repeated bool repeated_bool = 43; + repeated string repeated_string = 44; + repeated bytes repeated_bytes = 45; repeated group RepeatedGroup = 46 { optional int32 a = 47; } - repeated NestedMessage repeated_nested_message = 48; + repeated NestedMessage repeated_nested_message = 48; repeated ForeignMessageLite repeated_foreign_message = 49; - repeated protobuf_unittest_import.ImportMessageLite - repeated_import_message = 50; + repeated protobuf_unittest_import.ImportMessageLite repeated_import_message = + 50; - repeated NestedEnum repeated_nested_enum = 51; + repeated NestedEnum repeated_nested_enum = 51; repeated ForeignEnumLite repeated_foreign_enum = 52; repeated protobuf_unittest_import.ImportEnumLite repeated_import_enum = 53; - repeated string repeated_string_piece = 54 [ctype=STRING_PIECE]; - repeated string repeated_cord = 55 [ctype=CORD]; + repeated string repeated_string_piece = 54 [ctype = STRING_PIECE]; + repeated string repeated_cord = 55 [ctype = CORD]; - repeated NestedMessage repeated_lazy_message = 57 [lazy=true]; + repeated NestedMessage repeated_lazy_message = 57 [lazy = true]; // Singular with defaults - optional int32 default_int32 = 61 [default = 41 ]; - optional int64 default_int64 = 62 [default = 42 ]; - optional uint32 default_uint32 = 63 [default = 43 ]; - optional uint64 default_uint64 = 64 [default = 44 ]; - optional sint32 default_sint32 = 65 [default = -45 ]; - optional sint64 default_sint64 = 66 [default = 46 ]; - optional fixed32 default_fixed32 = 67 [default = 47 ]; - optional fixed64 default_fixed64 = 68 [default = 48 ]; - optional sfixed32 default_sfixed32 = 69 [default = 49 ]; - optional sfixed64 default_sfixed64 = 70 [default = -50 ]; - optional float default_float = 71 [default = 51.5 ]; - optional double default_double = 72 [default = 52e3 ]; - optional bool default_bool = 73 [default = true ]; - optional string default_string = 74 [default = "hello"]; - optional bytes default_bytes = 75 [default = "world"]; + optional int32 default_int32 = 61 [default = 41]; + optional int64 default_int64 = 62 [default = 42]; + optional uint32 default_uint32 = 63 [default = 43]; + optional uint64 default_uint64 = 64 [default = 44]; + optional sint32 default_sint32 = 65 [default = -45]; + optional sint64 default_sint64 = 66 [default = 46]; + optional fixed32 default_fixed32 = 67 [default = 47]; + optional fixed64 default_fixed64 = 68 [default = 48]; + optional sfixed32 default_sfixed32 = 69 [default = 49]; + optional sfixed64 default_sfixed64 = 70 [default = -50]; + optional float default_float = 71 [default = 51.5]; + optional double default_double = 72 [default = 52e3]; + optional bool default_bool = 73 [default = true]; + optional string default_string = 74 [default = "hello"]; + optional bytes default_bytes = 75 [default = "world"]; optional NestedEnum default_nested_enum = 81 [default = BAR]; optional ForeignEnumLite default_foreign_enum = 82 [default = FOREIGN_LITE_BAR]; - optional protobuf_unittest_import.ImportEnumLite - default_import_enum = 83 [default = IMPORT_LITE_BAR]; + optional protobuf_unittest_import.ImportEnumLite default_import_enum = 83 + [default = IMPORT_LITE_BAR]; - optional string default_string_piece = 84 [ctype=STRING_PIECE,default="abc"]; - optional string default_cord = 85 [ctype=CORD,default="123"]; + optional string default_string_piece = 84 + [ctype = STRING_PIECE, default = "abc"]; + optional string default_cord = 85 [ctype = CORD, default = "123"]; // For oneof test oneof oneof_field { @@ -174,25 +175,25 @@ message ForeignMessageLite { enum ForeignEnumLite { FOREIGN_LITE_FOO = 4; - FOREIGN_LITE_BAR = 5; FOREIGN_LITE_BAZ = 6; + FOREIGN_LITE_BAR = 5; } message TestPackedTypesLite { - repeated int32 packed_int32 = 90 [packed = true]; - repeated int64 packed_int64 = 91 [packed = true]; - repeated uint32 packed_uint32 = 92 [packed = true]; - repeated uint64 packed_uint64 = 93 [packed = true]; - repeated sint32 packed_sint32 = 94 [packed = true]; - repeated sint64 packed_sint64 = 95 [packed = true]; - repeated fixed32 packed_fixed32 = 96 [packed = true]; - repeated fixed64 packed_fixed64 = 97 [packed = true]; - repeated sfixed32 packed_sfixed32 = 98 [packed = true]; - repeated sfixed64 packed_sfixed64 = 99 [packed = true]; - repeated float packed_float = 100 [packed = true]; - repeated double packed_double = 101 [packed = true]; - repeated bool packed_bool = 102 [packed = true]; - repeated ForeignEnumLite packed_enum = 103 [packed = true]; + repeated int32 packed_int32 = 90 [packed = true]; + repeated int64 packed_int64 = 91 [packed = true]; + repeated uint32 packed_uint32 = 92 [packed = true]; + repeated uint64 packed_uint64 = 93 [packed = true]; + repeated sint32 packed_sint32 = 94 [packed = true]; + repeated sint64 packed_sint64 = 95 [packed = true]; + repeated fixed32 packed_fixed32 = 96 [packed = true]; + repeated fixed64 packed_fixed64 = 97 [packed = true]; + repeated sfixed32 packed_sfixed32 = 98 [packed = true]; + repeated sfixed64 packed_sfixed64 = 99 [packed = true]; + repeated float packed_float = 100 [packed = true]; + repeated double packed_double = 101 [packed = true]; + repeated bool packed_bool = 102 [packed = true]; + repeated ForeignEnumLite packed_enum = 103 [packed = true]; } message TestAllExtensionsLite { @@ -201,117 +202,119 @@ message TestAllExtensionsLite { extend TestAllExtensionsLite { // Singular - optional int32 optional_int32_extension_lite = 1; - optional int64 optional_int64_extension_lite = 2; - optional uint32 optional_uint32_extension_lite = 3; - optional uint64 optional_uint64_extension_lite = 4; - optional sint32 optional_sint32_extension_lite = 5; - optional sint64 optional_sint64_extension_lite = 6; - optional fixed32 optional_fixed32_extension_lite = 7; - optional fixed64 optional_fixed64_extension_lite = 8; - optional sfixed32 optional_sfixed32_extension_lite = 9; + optional int32 optional_int32_extension_lite = 1; + optional int64 optional_int64_extension_lite = 2; + optional uint32 optional_uint32_extension_lite = 3; + optional uint64 optional_uint64_extension_lite = 4; + optional sint32 optional_sint32_extension_lite = 5; + optional sint64 optional_sint64_extension_lite = 6; + optional fixed32 optional_fixed32_extension_lite = 7; + optional fixed64 optional_fixed64_extension_lite = 8; + optional sfixed32 optional_sfixed32_extension_lite = 9; optional sfixed64 optional_sfixed64_extension_lite = 10; - optional float optional_float_extension_lite = 11; - optional double optional_double_extension_lite = 12; - optional bool optional_bool_extension_lite = 13; - optional string optional_string_extension_lite = 14; - optional bytes optional_bytes_extension_lite = 15; + optional float optional_float_extension_lite = 11; + optional double optional_double_extension_lite = 12; + optional bool optional_bool_extension_lite = 13; + optional string optional_string_extension_lite = 14; + optional bytes optional_bytes_extension_lite = 15; optional group OptionalGroup_extension_lite = 16 { optional int32 a = 17; } - optional TestAllTypesLite.NestedMessage optional_nested_message_extension_lite - = 18; + optional TestAllTypesLite.NestedMessage + optional_nested_message_extension_lite = 18; optional ForeignMessageLite optional_foreign_message_extension_lite = 19; optional protobuf_unittest_import.ImportMessageLite - optional_import_message_extension_lite = 20; + optional_import_message_extension_lite = 20; optional TestAllTypesLite.NestedEnum optional_nested_enum_extension_lite = 21; optional ForeignEnumLite optional_foreign_enum_extension_lite = 22; optional protobuf_unittest_import.ImportEnumLite - optional_import_enum_extension_lite = 23; + optional_import_enum_extension_lite = 23; optional string optional_string_piece_extension_lite = 24 - [ctype=STRING_PIECE]; - optional string optional_cord_extension_lite = 25 [ctype=CORD]; + [ctype = STRING_PIECE]; + optional string optional_cord_extension_lite = 25 [ctype = CORD]; optional protobuf_unittest_import.PublicImportMessageLite - optional_public_import_message_extension_lite = 26; + optional_public_import_message_extension_lite = 26; - optional TestAllTypesLite.NestedMessage - optional_lazy_message_extension_lite = 27 [lazy=true]; + optional TestAllTypesLite.NestedMessage optional_lazy_message_extension_lite = + 27 [lazy = true]; // Repeated - repeated int32 repeated_int32_extension_lite = 31; - repeated int64 repeated_int64_extension_lite = 32; - repeated uint32 repeated_uint32_extension_lite = 33; - repeated uint64 repeated_uint64_extension_lite = 34; - repeated sint32 repeated_sint32_extension_lite = 35; - repeated sint64 repeated_sint64_extension_lite = 36; - repeated fixed32 repeated_fixed32_extension_lite = 37; - repeated fixed64 repeated_fixed64_extension_lite = 38; + repeated int32 repeated_int32_extension_lite = 31; + repeated int64 repeated_int64_extension_lite = 32; + repeated uint32 repeated_uint32_extension_lite = 33; + repeated uint64 repeated_uint64_extension_lite = 34; + repeated sint32 repeated_sint32_extension_lite = 35; + repeated sint64 repeated_sint64_extension_lite = 36; + repeated fixed32 repeated_fixed32_extension_lite = 37; + repeated fixed64 repeated_fixed64_extension_lite = 38; repeated sfixed32 repeated_sfixed32_extension_lite = 39; repeated sfixed64 repeated_sfixed64_extension_lite = 40; - repeated float repeated_float_extension_lite = 41; - repeated double repeated_double_extension_lite = 42; - repeated bool repeated_bool_extension_lite = 43; - repeated string repeated_string_extension_lite = 44; - repeated bytes repeated_bytes_extension_lite = 45; + repeated float repeated_float_extension_lite = 41; + repeated double repeated_double_extension_lite = 42; + repeated bool repeated_bool_extension_lite = 43; + repeated string repeated_string_extension_lite = 44; + repeated bytes repeated_bytes_extension_lite = 45; repeated group RepeatedGroup_extension_lite = 46 { optional int32 a = 47; } - repeated TestAllTypesLite.NestedMessage repeated_nested_message_extension_lite - = 48; + repeated TestAllTypesLite.NestedMessage + repeated_nested_message_extension_lite = 48; repeated ForeignMessageLite repeated_foreign_message_extension_lite = 49; repeated protobuf_unittest_import.ImportMessageLite - repeated_import_message_extension_lite = 50; + repeated_import_message_extension_lite = 50; repeated TestAllTypesLite.NestedEnum repeated_nested_enum_extension_lite = 51; repeated ForeignEnumLite repeated_foreign_enum_extension_lite = 52; repeated protobuf_unittest_import.ImportEnumLite - repeated_import_enum_extension_lite = 53; + repeated_import_enum_extension_lite = 53; repeated string repeated_string_piece_extension_lite = 54 - [ctype=STRING_PIECE]; - repeated string repeated_cord_extension_lite = 55 [ctype=CORD]; + [ctype = STRING_PIECE]; + repeated string repeated_cord_extension_lite = 55 [ctype = CORD]; - repeated TestAllTypesLite.NestedMessage - repeated_lazy_message_extension_lite = 57 [lazy=true]; + repeated TestAllTypesLite.NestedMessage repeated_lazy_message_extension_lite = + 57 [lazy = true]; // Singular with defaults - optional int32 default_int32_extension_lite = 61 [default = 41 ]; - optional int64 default_int64_extension_lite = 62 [default = 42 ]; - optional uint32 default_uint32_extension_lite = 63 [default = 43 ]; - optional uint64 default_uint64_extension_lite = 64 [default = 44 ]; - optional sint32 default_sint32_extension_lite = 65 [default = -45 ]; - optional sint64 default_sint64_extension_lite = 66 [default = 46 ]; - optional fixed32 default_fixed32_extension_lite = 67 [default = 47 ]; - optional fixed64 default_fixed64_extension_lite = 68 [default = 48 ]; - optional sfixed32 default_sfixed32_extension_lite = 69 [default = 49 ]; - optional sfixed64 default_sfixed64_extension_lite = 70 [default = -50 ]; - optional float default_float_extension_lite = 71 [default = 51.5 ]; - optional double default_double_extension_lite = 72 [default = 52e3 ]; - optional bool default_bool_extension_lite = 73 [default = true ]; - optional string default_string_extension_lite = 74 [default = "hello"]; - optional bytes default_bytes_extension_lite = 75 [default = "world"]; + optional int32 default_int32_extension_lite = 61 [default = 41]; + optional int64 default_int64_extension_lite = 62 [default = 42]; + optional uint32 default_uint32_extension_lite = 63 [default = 43]; + optional uint64 default_uint64_extension_lite = 64 [default = 44]; + optional sint32 default_sint32_extension_lite = 65 [default = -45]; + optional sint64 default_sint64_extension_lite = 66 [default = 46]; + optional fixed32 default_fixed32_extension_lite = 67 [default = 47]; + optional fixed64 default_fixed64_extension_lite = 68 [default = 48]; + optional sfixed32 default_sfixed32_extension_lite = 69 [default = 49]; + optional sfixed64 default_sfixed64_extension_lite = 70 [default = -50]; + optional float default_float_extension_lite = 71 [default = 51.5]; + optional double default_double_extension_lite = 72 [default = 52e3]; + optional bool default_bool_extension_lite = 73 [default = true]; + optional string default_string_extension_lite = 74 [default = "hello"]; + optional bytes default_bytes_extension_lite = 75 [default = "world"]; - optional TestAllTypesLite.NestedEnum - default_nested_enum_extension_lite = 81 [default = BAR]; - optional ForeignEnumLite - default_foreign_enum_extension_lite = 82 [default = FOREIGN_LITE_BAR]; + optional TestAllTypesLite.NestedEnum default_nested_enum_extension_lite = 81 + [default = BAR]; + optional ForeignEnumLite default_foreign_enum_extension_lite = 82 + [default = FOREIGN_LITE_BAR]; optional protobuf_unittest_import.ImportEnumLite - default_import_enum_extension_lite = 83 [default = IMPORT_LITE_BAR]; + default_import_enum_extension_lite = 83 [default = IMPORT_LITE_BAR]; - optional string default_string_piece_extension_lite = 84 [ctype=STRING_PIECE, - default="abc"]; - optional string default_cord_extension_lite = 85 [ctype=CORD, default="123"]; + optional string default_string_piece_extension_lite = 84 + [ctype = STRING_PIECE, default = "abc"]; + optional string default_cord_extension_lite = 85 + [ctype = CORD, default = "123"]; // For oneof test optional uint32 oneof_uint32_extension_lite = 111; - optional TestAllTypesLite.NestedMessage oneof_nested_message_extension_lite = 112; + optional TestAllTypesLite.NestedMessage oneof_nested_message_extension_lite = + 112; optional string oneof_string_extension_lite = 113; optional bytes oneof_bytes_extension_lite = 114; } @@ -321,19 +324,19 @@ message TestPackedExtensionsLite { } extend TestPackedExtensionsLite { - repeated int32 packed_int32_extension_lite = 90 [packed = true]; - repeated int64 packed_int64_extension_lite = 91 [packed = true]; - repeated uint32 packed_uint32_extension_lite = 92 [packed = true]; - repeated uint64 packed_uint64_extension_lite = 93 [packed = true]; - repeated sint32 packed_sint32_extension_lite = 94 [packed = true]; - repeated sint64 packed_sint64_extension_lite = 95 [packed = true]; - repeated fixed32 packed_fixed32_extension_lite = 96 [packed = true]; - repeated fixed64 packed_fixed64_extension_lite = 97 [packed = true]; - repeated sfixed32 packed_sfixed32_extension_lite = 98 [packed = true]; - repeated sfixed64 packed_sfixed64_extension_lite = 99 [packed = true]; - repeated float packed_float_extension_lite = 100 [packed = true]; - repeated double packed_double_extension_lite = 101 [packed = true]; - repeated bool packed_bool_extension_lite = 102 [packed = true]; + repeated int32 packed_int32_extension_lite = 90 [packed = true]; + repeated int64 packed_int64_extension_lite = 91 [packed = true]; + repeated uint32 packed_uint32_extension_lite = 92 [packed = true]; + repeated uint64 packed_uint64_extension_lite = 93 [packed = true]; + repeated sint32 packed_sint32_extension_lite = 94 [packed = true]; + repeated sint64 packed_sint64_extension_lite = 95 [packed = true]; + repeated fixed32 packed_fixed32_extension_lite = 96 [packed = true]; + repeated fixed64 packed_fixed64_extension_lite = 97 [packed = true]; + repeated sfixed32 packed_sfixed32_extension_lite = 98 [packed = true]; + repeated sfixed64 packed_sfixed64_extension_lite = 99 [packed = true]; + repeated float packed_float_extension_lite = 100 [packed = true]; + repeated double packed_double_extension_lite = 101 [packed = true]; + repeated bool packed_bool_extension_lite = 102 [packed = true]; repeated ForeignEnumLite packed_enum_extension_lite = 103 [packed = true]; } @@ -347,6 +350,9 @@ message TestNestedExtensionLite { // point this failed). message TestDeprecatedLite { optional int32 deprecated_field = 1 [deprecated = true]; + required int32 deprecated_field2 = 2 [deprecated = true]; + optional string deprecated_field3 = 3 [deprecated = true]; + optional TestDeprecatedLite deprecated_field4 = 4 [deprecated = true]; } // See the comments of the same type in unittest.proto. @@ -381,8 +387,7 @@ message TestParsingMergeLite { } // TestEmptyMessageLite is used to test unknown fields support in lite mode. -message TestEmptyMessageLite{ -} +message TestEmptyMessageLite {} // Like above, but declare all field numbers as potential extensions. No // actual extensions should ever be defined for this type. @@ -390,23 +395,21 @@ message TestEmptyMessageWithExtensionsLite { extensions 1 to max; } -enum V1EnumLite { - V1_FIRST = 1; -} +enum V1EnumLite { V1_FIRST = 1; } enum V2EnumLite { - V2_FIRST = 1; - V2_SECOND = 2; + V2_FIRST = 1; + V2_SECOND = 2; } message V1MessageLite { - required int32 int_field = 1; - optional V1EnumLite enum_field = 2 [ default = V1_FIRST ]; + required int32 int_field = 1; + optional V1EnumLite enum_field = 2 [default = V1_FIRST]; } message V2MessageLite { - required int32 int_field = 1; - optional V2EnumLite enum_field = 2 [ default = V2_FIRST ]; + required int32 int_field = 1; + optional V2EnumLite enum_field = 2 [default = V2_FIRST]; } message TestHugeFieldNumbersLite { @@ -433,7 +436,7 @@ message TestHugeFieldNumbersLite { bytes oneof_bytes = 536870014; } - extensions 536860000 to 536869999; + extensions 536860000 to 536869999; } extend TestHugeFieldNumbersLite { @@ -473,3 +476,16 @@ message PackedFixed32 { message NonPackedFixed32 { repeated fixed32 repeated_fixed32 = 2048; } + +// Test an enum that has multiple values with the same number. +message DupEnum { + enum TestEnumWithDupValueLite { + option allow_alias = true; + + FOO1 = 1; + BAR1 = 2; + BAZ = 3; + FOO2 = 1; + BAR2 = 2; + } +} diff --git a/third_party/protobuf/src/google/protobuf/unittest_no_arena_import.proto b/third_party/protobuf/src/google/protobuf/unittest_no_arena_import.proto index 072af49e..6f3f04f5 100644 --- a/third_party/protobuf/src/google/protobuf/unittest_no_arena_import.proto +++ b/third_party/protobuf/src/google/protobuf/unittest_no_arena_import.proto @@ -32,6 +32,8 @@ syntax = "proto2"; package proto2_arena_unittest; +option cc_enable_arenas = false; + message ImportNoArenaNestedMessage { optional int32 d = 1; -}; +} diff --git a/third_party/protobuf/src/google/protobuf/unittest_no_arena_lite.proto b/third_party/protobuf/src/google/protobuf/unittest_no_arena_lite.proto index 34c7b7ce..58d85532 100644 --- a/third_party/protobuf/src/google/protobuf/unittest_no_arena_lite.proto +++ b/third_party/protobuf/src/google/protobuf/unittest_no_arena_lite.proto @@ -37,6 +37,8 @@ option optimize_for = LITE_RUNTIME; // In test_util.h we do "using namespace unittest = protobuf_unittest". package protobuf_unittest_no_arena; +option cc_enable_arenas = false; + message ForeignMessageLite { optional int32 c = 1; } diff --git a/third_party/protobuf/src/google/protobuf/unittest_proto3.proto b/third_party/protobuf/src/google/protobuf/unittest_proto3.proto index 1c3bf91d..89c8799a 100644 --- a/third_party/protobuf/src/google/protobuf/unittest_proto3.proto +++ b/third_party/protobuf/src/google/protobuf/unittest_proto3.proto @@ -30,11 +30,11 @@ syntax = "proto3"; -option optimize_for = SPEED; +package proto3_unittest; import "google/protobuf/unittest_import.proto"; -package proto3_unittest; +option optimize_for = SPEED; // This proto includes every type of field in both singular and repeated // forms. @@ -55,88 +55,88 @@ message TestAllTypes { } // Singular - int32 optional_int32 = 1; - int64 optional_int64 = 2; - uint32 optional_uint32 = 3; - uint64 optional_uint64 = 4; - sint32 optional_sint32 = 5; - sint64 optional_sint64 = 6; - fixed32 optional_fixed32 = 7; - fixed64 optional_fixed64 = 8; - sfixed32 optional_sfixed32 = 9; + int32 optional_int32 = 1; + int64 optional_int64 = 2; + uint32 optional_uint32 = 3; + uint64 optional_uint64 = 4; + sint32 optional_sint32 = 5; + sint64 optional_sint64 = 6; + fixed32 optional_fixed32 = 7; + fixed64 optional_fixed64 = 8; + sfixed32 optional_sfixed32 = 9; sfixed64 optional_sfixed64 = 10; - float optional_float = 11; - double optional_double = 12; - bool optional_bool = 13; - string optional_string = 14; - bytes optional_bytes = 15; + float optional_float = 11; + double optional_double = 12; + bool optional_bool = 13; + string optional_string = 14; + bytes optional_bytes = 15; // Groups are not allowed in proto3. // optional group OptionalGroup = 16 { // optional int32 a = 17; // } - NestedMessage optional_nested_message = 18; - ForeignMessage optional_foreign_message = 19; - protobuf_unittest_import.ImportMessage optional_import_message = 20; + NestedMessage optional_nested_message = 18; + ForeignMessage optional_foreign_message = 19; + protobuf_unittest_import.ImportMessage optional_import_message = 20; - NestedEnum optional_nested_enum = 21; - ForeignEnum optional_foreign_enum = 22; + NestedEnum optional_nested_enum = 21; + ForeignEnum optional_foreign_enum = 22; // Omitted (compared to unittest.proto) because proto2 enums are not allowed // inside proto2 messages. // // optional protobuf_unittest_import.ImportEnum optional_import_enum = 23; - string optional_string_piece = 24 [ctype=STRING_PIECE]; - string optional_cord = 25 [ctype=CORD]; + string optional_string_piece = 24 [ctype = STRING_PIECE]; + string optional_cord = 25 [ctype = CORD]; // Defined in unittest_import_public.proto - protobuf_unittest_import.PublicImportMessage - optional_public_import_message = 26; + protobuf_unittest_import.PublicImportMessage optional_public_import_message = + 26; - NestedMessage optional_lazy_message = 27 [lazy=true]; + NestedMessage optional_lazy_message = 27 [lazy = true]; protobuf_unittest_import.ImportMessage optional_lazy_import_message = 115 [lazy = true]; // Repeated - repeated int32 repeated_int32 = 31; - repeated int64 repeated_int64 = 32; - repeated uint32 repeated_uint32 = 33; - repeated uint64 repeated_uint64 = 34; - repeated sint32 repeated_sint32 = 35; - repeated sint64 repeated_sint64 = 36; - repeated fixed32 repeated_fixed32 = 37; - repeated fixed64 repeated_fixed64 = 38; + repeated int32 repeated_int32 = 31; + repeated int64 repeated_int64 = 32; + repeated uint32 repeated_uint32 = 33; + repeated uint64 repeated_uint64 = 34; + repeated sint32 repeated_sint32 = 35; + repeated sint64 repeated_sint64 = 36; + repeated fixed32 repeated_fixed32 = 37; + repeated fixed64 repeated_fixed64 = 38; repeated sfixed32 repeated_sfixed32 = 39; repeated sfixed64 repeated_sfixed64 = 40; - repeated float repeated_float = 41; - repeated double repeated_double = 42; - repeated bool repeated_bool = 43; - repeated string repeated_string = 44; - repeated bytes repeated_bytes = 45; + repeated float repeated_float = 41; + repeated double repeated_double = 42; + repeated bool repeated_bool = 43; + repeated string repeated_string = 44; + repeated bytes repeated_bytes = 45; // Groups are not allowed in proto3. // repeated group RepeatedGroup = 46 { // optional int32 a = 47; // } - repeated NestedMessage repeated_nested_message = 48; - repeated ForeignMessage repeated_foreign_message = 49; - repeated protobuf_unittest_import.ImportMessage repeated_import_message = 50; + repeated NestedMessage repeated_nested_message = 48; + repeated ForeignMessage repeated_foreign_message = 49; + repeated protobuf_unittest_import.ImportMessage repeated_import_message = 50; - repeated NestedEnum repeated_nested_enum = 51; - repeated ForeignEnum repeated_foreign_enum = 52; + repeated NestedEnum repeated_nested_enum = 51; + repeated ForeignEnum repeated_foreign_enum = 52; // Omitted (compared to unittest.proto) because proto2 enums are not allowed // inside proto2 messages. // // repeated protobuf_unittest_import.ImportEnum repeated_import_enum = 53; - repeated string repeated_string_piece = 54 [ctype=STRING_PIECE]; - repeated string repeated_cord = 55 [ctype=CORD]; + repeated string repeated_string_piece = 54 [ctype = STRING_PIECE]; + repeated string repeated_cord = 55 [ctype = CORD]; - repeated NestedMessage repeated_lazy_message = 57 [lazy=true]; + repeated NestedMessage repeated_lazy_message = 57 [lazy = true]; oneof oneof_field { uint32 oneof_uint32 = 111; @@ -149,41 +149,41 @@ message TestAllTypes { // Test messages for packed fields message TestPackedTypes { - repeated int32 packed_int32 = 90 [packed = true]; - repeated int64 packed_int64 = 91 [packed = true]; - repeated uint32 packed_uint32 = 92 [packed = true]; - repeated uint64 packed_uint64 = 93 [packed = true]; - repeated sint32 packed_sint32 = 94 [packed = true]; - repeated sint64 packed_sint64 = 95 [packed = true]; - repeated fixed32 packed_fixed32 = 96 [packed = true]; - repeated fixed64 packed_fixed64 = 97 [packed = true]; - repeated sfixed32 packed_sfixed32 = 98 [packed = true]; - repeated sfixed64 packed_sfixed64 = 99 [packed = true]; - repeated float packed_float = 100 [packed = true]; - repeated double packed_double = 101 [packed = true]; - repeated bool packed_bool = 102 [packed = true]; - repeated ForeignEnum packed_enum = 103 [packed = true]; + repeated int32 packed_int32 = 90 [packed = true]; + repeated int64 packed_int64 = 91 [packed = true]; + repeated uint32 packed_uint32 = 92 [packed = true]; + repeated uint64 packed_uint64 = 93 [packed = true]; + repeated sint32 packed_sint32 = 94 [packed = true]; + repeated sint64 packed_sint64 = 95 [packed = true]; + repeated fixed32 packed_fixed32 = 96 [packed = true]; + repeated fixed64 packed_fixed64 = 97 [packed = true]; + repeated sfixed32 packed_sfixed32 = 98 [packed = true]; + repeated sfixed64 packed_sfixed64 = 99 [packed = true]; + repeated float packed_float = 100 [packed = true]; + repeated double packed_double = 101 [packed = true]; + repeated bool packed_bool = 102 [packed = true]; + repeated ForeignEnum packed_enum = 103 [packed = true]; } // Explicitly set packed to false message TestUnpackedTypes { - repeated int32 repeated_int32 = 1 [packed = false]; - repeated int64 repeated_int64 = 2 [packed = false]; - repeated uint32 repeated_uint32 = 3 [packed = false]; - repeated uint64 repeated_uint64 = 4 [packed = false]; - repeated sint32 repeated_sint32 = 5 [packed = false]; - repeated sint64 repeated_sint64 = 6 [packed = false]; - repeated fixed32 repeated_fixed32 = 7 [packed = false]; - repeated fixed64 repeated_fixed64 = 8 [packed = false]; - repeated sfixed32 repeated_sfixed32 = 9 [packed = false]; + repeated int32 repeated_int32 = 1 [packed = false]; + repeated int64 repeated_int64 = 2 [packed = false]; + repeated uint32 repeated_uint32 = 3 [packed = false]; + repeated uint64 repeated_uint64 = 4 [packed = false]; + repeated sint32 repeated_sint32 = 5 [packed = false]; + repeated sint64 repeated_sint64 = 6 [packed = false]; + repeated fixed32 repeated_fixed32 = 7 [packed = false]; + repeated fixed64 repeated_fixed64 = 8 [packed = false]; + repeated sfixed32 repeated_sfixed32 = 9 [packed = false]; repeated sfixed64 repeated_sfixed64 = 10 [packed = false]; - repeated float repeated_float = 11 [packed = false]; - repeated double repeated_double = 12 [packed = false]; - repeated bool repeated_bool = 13 [packed = false]; + repeated float repeated_float = 11 [packed = false]; + repeated double repeated_double = 12 [packed = false]; + repeated bool repeated_bool = 13 [packed = false]; repeated TestAllTypes.NestedEnum repeated_nested_enum = 14 [packed = false]; } -// This proto includes a recusively nested message. +// This proto includes a recursively nested message. message NestedTestAllTypes { NestedTestAllTypes child = 1; TestAllTypes payload = 2; @@ -203,7 +203,13 @@ enum ForeignEnum { } // TestEmptyMessage is used to test behavior of unknown fields. -message TestEmptyMessage { +message TestEmptyMessage {} + +// TestMessageWithDummy is also used to test behavior of unknown fields. +message TestMessageWithDummy { + // This field is only here for triggering copy-on-write; it's not intended to + // be serialized. + bool dummy = 536870911; } // Same layout as TestOneof2 in unittest.proto to test unknown enum value diff --git a/third_party/protobuf/src/google/protobuf/unittest_proto3_arena.proto b/third_party/protobuf/src/google/protobuf/unittest_proto3_arena.proto index ea88ec90..fa26488d 100644 --- a/third_party/protobuf/src/google/protobuf/unittest_proto3_arena.proto +++ b/third_party/protobuf/src/google/protobuf/unittest_proto3_arena.proto @@ -183,7 +183,7 @@ message TestUnpackedTypes { repeated TestAllTypes.NestedEnum repeated_nested_enum = 14 [packed = false]; } -// This proto includes a recusively nested message. +// This proto includes a recursively nested message. message NestedTestAllTypes { NestedTestAllTypes child = 1; TestAllTypes payload = 2; @@ -206,3 +206,13 @@ enum ForeignEnum { // TestEmptyMessage is used to test behavior of unknown fields. message TestEmptyMessage { } + +// Needed for a Python test. +message TestPickleNestedMessage { + message NestedMessage { + int32 bb = 1; + message NestedNestedMessage { + int32 cc = 1; + } + } +} diff --git a/third_party/protobuf/src/google/protobuf/unittest_proto3_arena_lite.proto b/third_party/protobuf/src/google/protobuf/unittest_proto3_arena_lite.proto index 5a60b90f..0d4218b9 100644 --- a/third_party/protobuf/src/google/protobuf/unittest_proto3_arena_lite.proto +++ b/third_party/protobuf/src/google/protobuf/unittest_proto3_arena_lite.proto @@ -30,12 +30,12 @@ syntax = "proto3"; -option cc_enable_arenas = true; -option optimize_for = LITE_RUNTIME; +package proto3_arena_lite_unittest; import "google/protobuf/unittest_import.proto"; -package proto3_arena_lite_unittest; +option cc_enable_arenas = true; +option optimize_for = LITE_RUNTIME; // This proto includes every type of field in both singular and repeated // forms. @@ -56,86 +56,86 @@ message TestAllTypes { } // Singular - int32 optional_int32 = 1; - int64 optional_int64 = 2; - uint32 optional_uint32 = 3; - uint64 optional_uint64 = 4; - sint32 optional_sint32 = 5; - sint64 optional_sint64 = 6; - fixed32 optional_fixed32 = 7; - fixed64 optional_fixed64 = 8; - sfixed32 optional_sfixed32 = 9; + int32 optional_int32 = 1; + int64 optional_int64 = 2; + uint32 optional_uint32 = 3; + uint64 optional_uint64 = 4; + sint32 optional_sint32 = 5; + sint64 optional_sint64 = 6; + fixed32 optional_fixed32 = 7; + fixed64 optional_fixed64 = 8; + sfixed32 optional_sfixed32 = 9; sfixed64 optional_sfixed64 = 10; - float optional_float = 11; - double optional_double = 12; - bool optional_bool = 13; - string optional_string = 14; - bytes optional_bytes = 15; + float optional_float = 11; + double optional_double = 12; + bool optional_bool = 13; + string optional_string = 14; + bytes optional_bytes = 15; // Groups are not allowed in proto3. // optional group OptionalGroup = 16 { // optional int32 a = 17; // } - NestedMessage optional_nested_message = 18; - ForeignMessage optional_foreign_message = 19; - protobuf_unittest_import.ImportMessage optional_import_message = 20; + NestedMessage optional_nested_message = 18; + ForeignMessage optional_foreign_message = 19; + protobuf_unittest_import.ImportMessage optional_import_message = 20; - NestedEnum optional_nested_enum = 21; - ForeignEnum optional_foreign_enum = 22; + NestedEnum optional_nested_enum = 21; + ForeignEnum optional_foreign_enum = 22; // Omitted (compared to unittest.proto) because proto2 enums are not allowed // inside proto2 messages. // // optional protobuf_unittest_import.ImportEnum optional_import_enum = 23; - string optional_string_piece = 24 [ctype=STRING_PIECE]; - string optional_cord = 25 [ctype=CORD]; + string optional_string_piece = 24 [ctype = STRING_PIECE]; + string optional_cord = 25 [ctype = CORD]; // Defined in unittest_import_public.proto - protobuf_unittest_import.PublicImportMessage - optional_public_import_message = 26; + protobuf_unittest_import.PublicImportMessage optional_public_import_message = + 26; - NestedMessage optional_lazy_message = 27 [lazy=true]; + NestedMessage optional_lazy_message = 27 [lazy = true]; // Repeated - repeated int32 repeated_int32 = 31; - repeated int64 repeated_int64 = 32; - repeated uint32 repeated_uint32 = 33; - repeated uint64 repeated_uint64 = 34; - repeated sint32 repeated_sint32 = 35; - repeated sint64 repeated_sint64 = 36; - repeated fixed32 repeated_fixed32 = 37; - repeated fixed64 repeated_fixed64 = 38; + repeated int32 repeated_int32 = 31; + repeated int64 repeated_int64 = 32; + repeated uint32 repeated_uint32 = 33; + repeated uint64 repeated_uint64 = 34; + repeated sint32 repeated_sint32 = 35; + repeated sint64 repeated_sint64 = 36; + repeated fixed32 repeated_fixed32 = 37; + repeated fixed64 repeated_fixed64 = 38; repeated sfixed32 repeated_sfixed32 = 39; repeated sfixed64 repeated_sfixed64 = 40; - repeated float repeated_float = 41; - repeated double repeated_double = 42; - repeated bool repeated_bool = 43; - repeated string repeated_string = 44; - repeated bytes repeated_bytes = 45; + repeated float repeated_float = 41; + repeated double repeated_double = 42; + repeated bool repeated_bool = 43; + repeated string repeated_string = 44; + repeated bytes repeated_bytes = 45; // Groups are not allowed in proto3. // repeated group RepeatedGroup = 46 { // optional int32 a = 47; // } - repeated NestedMessage repeated_nested_message = 48; - repeated ForeignMessage repeated_foreign_message = 49; - repeated protobuf_unittest_import.ImportMessage repeated_import_message = 50; + repeated NestedMessage repeated_nested_message = 48; + repeated ForeignMessage repeated_foreign_message = 49; + repeated protobuf_unittest_import.ImportMessage repeated_import_message = 50; - repeated NestedEnum repeated_nested_enum = 51; - repeated ForeignEnum repeated_foreign_enum = 52; + repeated NestedEnum repeated_nested_enum = 51; + repeated ForeignEnum repeated_foreign_enum = 52; // Omitted (compared to unittest.proto) because proto2 enums are not allowed // inside proto2 messages. // // repeated protobuf_unittest_import.ImportEnum repeated_import_enum = 53; - repeated string repeated_string_piece = 54 [ctype=STRING_PIECE]; - repeated string repeated_cord = 55 [ctype=CORD]; + repeated string repeated_string_piece = 54 [ctype = STRING_PIECE]; + repeated string repeated_cord = 55 [ctype = CORD]; - repeated NestedMessage repeated_lazy_message = 57 [lazy=true]; + repeated NestedMessage repeated_lazy_message = 57 [lazy = true]; oneof oneof_field { uint32 oneof_uint32 = 111; @@ -148,41 +148,41 @@ message TestAllTypes { // Test messages for packed fields message TestPackedTypes { - repeated int32 packed_int32 = 90 [packed = true]; - repeated int64 packed_int64 = 91 [packed = true]; - repeated uint32 packed_uint32 = 92 [packed = true]; - repeated uint64 packed_uint64 = 93 [packed = true]; - repeated sint32 packed_sint32 = 94 [packed = true]; - repeated sint64 packed_sint64 = 95 [packed = true]; - repeated fixed32 packed_fixed32 = 96 [packed = true]; - repeated fixed64 packed_fixed64 = 97 [packed = true]; - repeated sfixed32 packed_sfixed32 = 98 [packed = true]; - repeated sfixed64 packed_sfixed64 = 99 [packed = true]; - repeated float packed_float = 100 [packed = true]; - repeated double packed_double = 101 [packed = true]; - repeated bool packed_bool = 102 [packed = true]; - repeated ForeignEnum packed_enum = 103 [packed = true]; + repeated int32 packed_int32 = 90 [packed = true]; + repeated int64 packed_int64 = 91 [packed = true]; + repeated uint32 packed_uint32 = 92 [packed = true]; + repeated uint64 packed_uint64 = 93 [packed = true]; + repeated sint32 packed_sint32 = 94 [packed = true]; + repeated sint64 packed_sint64 = 95 [packed = true]; + repeated fixed32 packed_fixed32 = 96 [packed = true]; + repeated fixed64 packed_fixed64 = 97 [packed = true]; + repeated sfixed32 packed_sfixed32 = 98 [packed = true]; + repeated sfixed64 packed_sfixed64 = 99 [packed = true]; + repeated float packed_float = 100 [packed = true]; + repeated double packed_double = 101 [packed = true]; + repeated bool packed_bool = 102 [packed = true]; + repeated ForeignEnum packed_enum = 103 [packed = true]; } // Explicitly set packed to false message TestUnpackedTypes { - repeated int32 repeated_int32 = 1 [packed = false]; - repeated int64 repeated_int64 = 2 [packed = false]; - repeated uint32 repeated_uint32 = 3 [packed = false]; - repeated uint64 repeated_uint64 = 4 [packed = false]; - repeated sint32 repeated_sint32 = 5 [packed = false]; - repeated sint64 repeated_sint64 = 6 [packed = false]; - repeated fixed32 repeated_fixed32 = 7 [packed = false]; - repeated fixed64 repeated_fixed64 = 8 [packed = false]; - repeated sfixed32 repeated_sfixed32 = 9 [packed = false]; + repeated int32 repeated_int32 = 1 [packed = false]; + repeated int64 repeated_int64 = 2 [packed = false]; + repeated uint32 repeated_uint32 = 3 [packed = false]; + repeated uint64 repeated_uint64 = 4 [packed = false]; + repeated sint32 repeated_sint32 = 5 [packed = false]; + repeated sint64 repeated_sint64 = 6 [packed = false]; + repeated fixed32 repeated_fixed32 = 7 [packed = false]; + repeated fixed64 repeated_fixed64 = 8 [packed = false]; + repeated sfixed32 repeated_sfixed32 = 9 [packed = false]; repeated sfixed64 repeated_sfixed64 = 10 [packed = false]; - repeated float repeated_float = 11 [packed = false]; - repeated double repeated_double = 12 [packed = false]; - repeated bool repeated_bool = 13 [packed = false]; + repeated float repeated_float = 11 [packed = false]; + repeated double repeated_double = 12 [packed = false]; + repeated bool repeated_bool = 13 [packed = false]; repeated TestAllTypes.NestedEnum repeated_nested_enum = 14 [packed = false]; } -// This proto includes a recusively nested message. +// This proto includes a recursively nested message. message NestedTestAllTypes { NestedTestAllTypes child = 1; TestAllTypes payload = 2; @@ -202,6 +202,4 @@ enum ForeignEnum { } // TestEmptyMessage is used to test behavior of unknown fields. -message TestEmptyMessage { -} - +message TestEmptyMessage {} diff --git a/third_party/protobuf/src/google/protobuf/unittest_proto3_lite.proto b/third_party/protobuf/src/google/protobuf/unittest_proto3_lite.proto index 874ade6c..837bb03c 100644 --- a/third_party/protobuf/src/google/protobuf/unittest_proto3_lite.proto +++ b/third_party/protobuf/src/google/protobuf/unittest_proto3_lite.proto @@ -30,11 +30,11 @@ syntax = "proto3"; -option optimize_for = LITE_RUNTIME; +package proto3_lite_unittest; import "google/protobuf/unittest_import.proto"; -package proto3_lite_unittest; +option optimize_for = LITE_RUNTIME; // This proto includes every type of field in both singular and repeated // forms. @@ -55,86 +55,86 @@ message TestAllTypes { } // Singular - int32 optional_int32 = 1; - int64 optional_int64 = 2; - uint32 optional_uint32 = 3; - uint64 optional_uint64 = 4; - sint32 optional_sint32 = 5; - sint64 optional_sint64 = 6; - fixed32 optional_fixed32 = 7; - fixed64 optional_fixed64 = 8; - sfixed32 optional_sfixed32 = 9; + int32 optional_int32 = 1; + int64 optional_int64 = 2; + uint32 optional_uint32 = 3; + uint64 optional_uint64 = 4; + sint32 optional_sint32 = 5; + sint64 optional_sint64 = 6; + fixed32 optional_fixed32 = 7; + fixed64 optional_fixed64 = 8; + sfixed32 optional_sfixed32 = 9; sfixed64 optional_sfixed64 = 10; - float optional_float = 11; - double optional_double = 12; - bool optional_bool = 13; - string optional_string = 14; - bytes optional_bytes = 15; + float optional_float = 11; + double optional_double = 12; + bool optional_bool = 13; + string optional_string = 14; + bytes optional_bytes = 15; // Groups are not allowed in proto3. // optional group OptionalGroup = 16 { // optional int32 a = 17; // } - NestedMessage optional_nested_message = 18; - ForeignMessage optional_foreign_message = 19; - protobuf_unittest_import.ImportMessage optional_import_message = 20; + NestedMessage optional_nested_message = 18; + ForeignMessage optional_foreign_message = 19; + protobuf_unittest_import.ImportMessage optional_import_message = 20; - NestedEnum optional_nested_enum = 21; - ForeignEnum optional_foreign_enum = 22; + NestedEnum optional_nested_enum = 21; + ForeignEnum optional_foreign_enum = 22; // Omitted (compared to unittest.proto) because proto2 enums are not allowed // inside proto2 messages. // // optional protobuf_unittest_import.ImportEnum optional_import_enum = 23; - string optional_string_piece = 24 [ctype=STRING_PIECE]; - string optional_cord = 25 [ctype=CORD]; + string optional_string_piece = 24 [ctype = STRING_PIECE]; + string optional_cord = 25 [ctype = CORD]; // Defined in unittest_import_public.proto - protobuf_unittest_import.PublicImportMessage - optional_public_import_message = 26; + protobuf_unittest_import.PublicImportMessage optional_public_import_message = + 26; - NestedMessage optional_lazy_message = 27 [lazy=true]; + NestedMessage optional_lazy_message = 27 [lazy = true]; // Repeated - repeated int32 repeated_int32 = 31; - repeated int64 repeated_int64 = 32; - repeated uint32 repeated_uint32 = 33; - repeated uint64 repeated_uint64 = 34; - repeated sint32 repeated_sint32 = 35; - repeated sint64 repeated_sint64 = 36; - repeated fixed32 repeated_fixed32 = 37; - repeated fixed64 repeated_fixed64 = 38; + repeated int32 repeated_int32 = 31; + repeated int64 repeated_int64 = 32; + repeated uint32 repeated_uint32 = 33; + repeated uint64 repeated_uint64 = 34; + repeated sint32 repeated_sint32 = 35; + repeated sint64 repeated_sint64 = 36; + repeated fixed32 repeated_fixed32 = 37; + repeated fixed64 repeated_fixed64 = 38; repeated sfixed32 repeated_sfixed32 = 39; repeated sfixed64 repeated_sfixed64 = 40; - repeated float repeated_float = 41; - repeated double repeated_double = 42; - repeated bool repeated_bool = 43; - repeated string repeated_string = 44; - repeated bytes repeated_bytes = 45; + repeated float repeated_float = 41; + repeated double repeated_double = 42; + repeated bool repeated_bool = 43; + repeated string repeated_string = 44; + repeated bytes repeated_bytes = 45; // Groups are not allowed in proto3. // repeated group RepeatedGroup = 46 { // optional int32 a = 47; // } - repeated NestedMessage repeated_nested_message = 48; - repeated ForeignMessage repeated_foreign_message = 49; - repeated protobuf_unittest_import.ImportMessage repeated_import_message = 50; + repeated NestedMessage repeated_nested_message = 48; + repeated ForeignMessage repeated_foreign_message = 49; + repeated protobuf_unittest_import.ImportMessage repeated_import_message = 50; - repeated NestedEnum repeated_nested_enum = 51; - repeated ForeignEnum repeated_foreign_enum = 52; + repeated NestedEnum repeated_nested_enum = 51; + repeated ForeignEnum repeated_foreign_enum = 52; // Omitted (compared to unittest.proto) because proto2 enums are not allowed // inside proto2 messages. // // repeated protobuf_unittest_import.ImportEnum repeated_import_enum = 53; - repeated string repeated_string_piece = 54 [ctype=STRING_PIECE]; - repeated string repeated_cord = 55 [ctype=CORD]; + repeated string repeated_string_piece = 54 [ctype = STRING_PIECE]; + repeated string repeated_cord = 55 [ctype = CORD]; - repeated NestedMessage repeated_lazy_message = 57 [lazy=true]; + repeated NestedMessage repeated_lazy_message = 57 [lazy = true]; oneof oneof_field { uint32 oneof_uint32 = 111; @@ -147,41 +147,41 @@ message TestAllTypes { // Test messages for packed fields message TestPackedTypes { - repeated int32 packed_int32 = 90 [packed = true]; - repeated int64 packed_int64 = 91 [packed = true]; - repeated uint32 packed_uint32 = 92 [packed = true]; - repeated uint64 packed_uint64 = 93 [packed = true]; - repeated sint32 packed_sint32 = 94 [packed = true]; - repeated sint64 packed_sint64 = 95 [packed = true]; - repeated fixed32 packed_fixed32 = 96 [packed = true]; - repeated fixed64 packed_fixed64 = 97 [packed = true]; - repeated sfixed32 packed_sfixed32 = 98 [packed = true]; - repeated sfixed64 packed_sfixed64 = 99 [packed = true]; - repeated float packed_float = 100 [packed = true]; - repeated double packed_double = 101 [packed = true]; - repeated bool packed_bool = 102 [packed = true]; - repeated ForeignEnum packed_enum = 103 [packed = true]; + repeated int32 packed_int32 = 90 [packed = true]; + repeated int64 packed_int64 = 91 [packed = true]; + repeated uint32 packed_uint32 = 92 [packed = true]; + repeated uint64 packed_uint64 = 93 [packed = true]; + repeated sint32 packed_sint32 = 94 [packed = true]; + repeated sint64 packed_sint64 = 95 [packed = true]; + repeated fixed32 packed_fixed32 = 96 [packed = true]; + repeated fixed64 packed_fixed64 = 97 [packed = true]; + repeated sfixed32 packed_sfixed32 = 98 [packed = true]; + repeated sfixed64 packed_sfixed64 = 99 [packed = true]; + repeated float packed_float = 100 [packed = true]; + repeated double packed_double = 101 [packed = true]; + repeated bool packed_bool = 102 [packed = true]; + repeated ForeignEnum packed_enum = 103 [packed = true]; } // Explicitly set packed to false message TestUnpackedTypes { - repeated int32 repeated_int32 = 1 [packed = false]; - repeated int64 repeated_int64 = 2 [packed = false]; - repeated uint32 repeated_uint32 = 3 [packed = false]; - repeated uint64 repeated_uint64 = 4 [packed = false]; - repeated sint32 repeated_sint32 = 5 [packed = false]; - repeated sint64 repeated_sint64 = 6 [packed = false]; - repeated fixed32 repeated_fixed32 = 7 [packed = false]; - repeated fixed64 repeated_fixed64 = 8 [packed = false]; - repeated sfixed32 repeated_sfixed32 = 9 [packed = false]; + repeated int32 repeated_int32 = 1 [packed = false]; + repeated int64 repeated_int64 = 2 [packed = false]; + repeated uint32 repeated_uint32 = 3 [packed = false]; + repeated uint64 repeated_uint64 = 4 [packed = false]; + repeated sint32 repeated_sint32 = 5 [packed = false]; + repeated sint64 repeated_sint64 = 6 [packed = false]; + repeated fixed32 repeated_fixed32 = 7 [packed = false]; + repeated fixed64 repeated_fixed64 = 8 [packed = false]; + repeated sfixed32 repeated_sfixed32 = 9 [packed = false]; repeated sfixed64 repeated_sfixed64 = 10 [packed = false]; - repeated float repeated_float = 11 [packed = false]; - repeated double repeated_double = 12 [packed = false]; - repeated bool repeated_bool = 13 [packed = false]; + repeated float repeated_float = 11 [packed = false]; + repeated double repeated_double = 12 [packed = false]; + repeated bool repeated_bool = 13 [packed = false]; repeated TestAllTypes.NestedEnum repeated_nested_enum = 14 [packed = false]; } -// This proto includes a recusively nested message. +// This proto includes a recursively nested message. message NestedTestAllTypes { NestedTestAllTypes child = 1; TestAllTypes payload = 2; @@ -201,6 +201,4 @@ enum ForeignEnum { } // TestEmptyMessage is used to test behavior of unknown fields. -message TestEmptyMessage { -} - +message TestEmptyMessage {} diff --git a/third_party/protobuf/src/google/protobuf/unittest_proto3_optional.proto b/third_party/protobuf/src/google/protobuf/unittest_proto3_optional.proto new file mode 100644 index 00000000..3c47f12e --- /dev/null +++ b/third_party/protobuf/src/google/protobuf/unittest_proto3_optional.proto @@ -0,0 +1,79 @@ +// 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. + +syntax = "proto3"; + +package protobuf_unittest; + +option java_multiple_files = true; +option java_package = "com.google.protobuf.testing.proto"; + +message TestProto3Optional { + message NestedMessage { + // The field name "b" fails to compile in proto1 because it conflicts with + // a local variable named "b" in one of the generated methods. Doh. + // This file needs to compile in proto1 to test backwards-compatibility. + optional int32 bb = 1; + } + + enum NestedEnum { + UNSPECIFIED = 0; + FOO = 1; + BAR = 2; + BAZ = 3; + NEG = -1; // Intentionally negative. + } + + // Singular + optional int32 optional_int32 = 1; + optional int64 optional_int64 = 2; + optional uint32 optional_uint32 = 3; + optional uint64 optional_uint64 = 4; + optional sint32 optional_sint32 = 5; + optional sint64 optional_sint64 = 6; + optional fixed32 optional_fixed32 = 7; + optional fixed64 optional_fixed64 = 8; + optional sfixed32 optional_sfixed32 = 9; + optional sfixed64 optional_sfixed64 = 10; + optional float optional_float = 11; + optional double optional_double = 12; + optional bool optional_bool = 13; + optional string optional_string = 14; + optional bytes optional_bytes = 15; + optional string optional_cord = 16 [ctype = CORD]; + + optional NestedMessage optional_nested_message = 18; + optional NestedMessage lazy_nested_message = 19 [lazy = true]; + optional NestedEnum optional_nested_enum = 21; + + // Add some non-optional fields to verify we can mix them. + int32 singular_int32 = 22; + int64 singular_int64 = 23; +} diff --git a/third_party/protobuf/src/google/protobuf/unknown_field_set.cc b/third_party/protobuf/src/google/protobuf/unknown_field_set.cc index 2f8b7636..451209c7 100644 --- a/third_party/protobuf/src/google/protobuf/unknown_field_set.cc +++ b/third_party/protobuf/src/google/protobuf/unknown_field_set.cc @@ -37,10 +37,10 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -49,9 +49,9 @@ namespace google { namespace protobuf { -const UnknownFieldSet* UnknownFieldSet::default_instance() { +const UnknownFieldSet& UnknownFieldSet::default_instance() { static auto instance = internal::OnShutdownDelete(new UnknownFieldSet()); - return instance; + return *instance; } void UnknownFieldSet::ClearFallback() { @@ -98,10 +98,9 @@ void UnknownFieldSet::MergeFromAndDestroy(UnknownFieldSet* other) { other->fields_.clear(); } -void UnknownFieldSet::MergeToInternalMetdata( - const UnknownFieldSet& other, - internal::InternalMetadataWithArena* metadata) { - metadata->mutable_unknown_fields()->MergeFrom(other); +void UnknownFieldSet::MergeToInternalMetadata( + const UnknownFieldSet& other, internal::InternalMetadata* metadata) { + metadata->mutable_unknown_fields()->MergeFrom(other); } size_t UnknownFieldSet::SpaceUsedExcludingSelfLong() const { @@ -268,50 +267,16 @@ void UnknownField::DeepCopy(const UnknownField& other) { } -void UnknownField::SerializeLengthDelimitedNoTag( - io::CodedOutputStream* output) const { - GOOGLE_DCHECK_EQ(TYPE_LENGTH_DELIMITED, type()); - const std::string& data = *data_.length_delimited_.string_value; - output->WriteVarint32(data.size()); - output->WriteRawMaybeAliased(data.data(), data.size()); -} - -uint8* UnknownField::SerializeLengthDelimitedNoTagToArray(uint8* target) const { +uint8* UnknownField::InternalSerializeLengthDelimitedNoTag( + uint8* target, io::EpsCopyOutputStream* stream) const { GOOGLE_DCHECK_EQ(TYPE_LENGTH_DELIMITED, type()); const std::string& data = *data_.length_delimited_.string_value; target = io::CodedOutputStream::WriteVarint32ToArray(data.size(), target); - target = io::CodedOutputStream::WriteStringToArray(data, target); + target = stream->WriteRaw(data.data(), data.size(), target); return target; } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER namespace internal { -const char* PackedEnumParser(void* object, const char* ptr, ParseContext* ctx, - bool (*is_valid)(int), UnknownFieldSet* unknown, - int field_num) { - return ctx->ReadPackedVarint( - ptr, [object, is_valid, unknown, field_num](uint64 val) { - if (is_valid(val)) { - static_cast*>(object)->Add(val); - } else { - WriteVarint(field_num, val, unknown); - } - }); -} -const char* PackedEnumParserArg(void* object, const char* ptr, - ParseContext* ctx, - bool (*is_valid)(const void*, int), - const void* data, UnknownFieldSet* unknown, - int field_num) { - return ctx->ReadPackedVarint( - ptr, [object, is_valid, data, unknown, field_num](uint64 val) { - if (is_valid(data, val)) { - static_cast*>(object)->Add(val); - } else { - WriteVarint(field_num, val, unknown); - } - }); -} class UnknownFieldParserHelper { public: @@ -357,13 +322,6 @@ const char* UnknownFieldParse(uint64 tag, UnknownFieldSet* unknown, return FieldParser(tag, field_parser, ptr, ctx); } -const char* UnknownFieldParse(uint32 tag, InternalMetadataWithArena* metadata, - const char* ptr, ParseContext* ctx) { - return UnknownFieldParse(tag, metadata->mutable_unknown_fields(), ptr, ctx); -} - } // namespace internal -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/unknown_field_set.h b/third_party/protobuf/src/google/protobuf/unknown_field_set.h index 4d5cc060..ab3633da 100644 --- a/third_party/protobuf/src/google/protobuf/unknown_field_set.h +++ b/third_party/protobuf/src/google/protobuf/unknown_field_set.h @@ -39,12 +39,15 @@ #define GOOGLE_PROTOBUF_UNKNOWN_FIELD_SET_H__ #include + #include #include + #include #include #include #include +#include #include #include @@ -56,13 +59,8 @@ namespace google { namespace protobuf { -namespace io { -class CodedInputStream; // coded_stream.h -class CodedOutputStream; // coded_stream.h -class ZeroCopyInputStream; // zero_copy_stream.h -} // namespace io namespace internal { -class InternalMetadataWithArena; // metadata.h +class InternalMetadata; // metadata_lite.h class WireFormat; // wire_format.h class MessageSetFieldSkipperUsingCord; // extension_set_heavy.cc @@ -106,9 +104,8 @@ class PROTOBUF_EXPORT UnknownFieldSet { // Merge the contents an UnknownFieldSet with the UnknownFieldSet in // *metadata, if there is one. If *metadata doesn't have an UnknownFieldSet // then add one to it and make it be a copy of the first arg. - static void MergeToInternalMetdata( - const UnknownFieldSet& other, - internal::InternalMetadataWithArena* metadata); + static void MergeToInternalMetadata(const UnknownFieldSet& other, + internal::InternalMetadata* metadata); // Swaps the contents of some other UnknownFieldSet with this one. inline void Swap(UnknownFieldSet* x); @@ -169,7 +166,13 @@ class PROTOBUF_EXPORT UnknownFieldSet { return ParseFromArray(data.data(), static_cast(data.size())); } - static const UnknownFieldSet* default_instance(); + // Merges this message's unknown field data (if any). This works whether + // the message is a lite or full proto (for legacy reasons, lite and full + // return different types for MessageType::unknown_fields()). + template + bool MergeFromMessage(const MessageType& message); + + static const UnknownFieldSet& default_instance(); private: // For InternalMergeFrom @@ -179,11 +182,31 @@ class PROTOBUF_EXPORT UnknownFieldSet { void InternalMergeFrom(const UnknownFieldSet& other); void ClearFallback(); + template ::value, int>::type = 0> + bool InternalMergeFromMessage(const MessageType& message) { + MergeFrom(message.GetReflection()->GetUnknownFields(message)); + return true; + } + + template ::value && + !std::is_base_of::value, + int>::type = 0> + bool InternalMergeFromMessage(const MessageType& message) { + const auto& unknown_fields = message.unknown_fields(); + io::ArrayInputStream array_stream(unknown_fields.data(), + unknown_fields.size()); + io::CodedInputStream coded_stream(&array_stream); + return MergeFromCodedStream(&coded_stream); + } + std::vector fields_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(UnknownFieldSet); }; -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER namespace internal { inline void WriteVarint(uint32 num, uint64 val, UnknownFieldSet* unknown) { @@ -194,29 +217,14 @@ inline void WriteLengthDelimited(uint32 num, StringPiece val, unknown->AddLengthDelimited(num)->assign(val.data(), val.size()); } -PROTOBUF_EXPORT -const char* PackedEnumParser(void* object, const char* ptr, ParseContext* ctx, - bool (*is_valid)(int), UnknownFieldSet* unknown, - int field_num); -PROTOBUF_EXPORT -const char* PackedEnumParserArg(void* object, const char* ptr, - ParseContext* ctx, - bool (*is_valid)(const void*, int), - const void* data, UnknownFieldSet* unknown, - int field_num); - PROTOBUF_EXPORT const char* UnknownGroupParse(UnknownFieldSet* unknown, const char* ptr, ParseContext* ctx); PROTOBUF_EXPORT const char* UnknownFieldParse(uint64 tag, UnknownFieldSet* unknown, const char* ptr, ParseContext* ctx); -PROTOBUF_EXPORT -const char* UnknownFieldParse(uint32 tag, InternalMetadataWithArena* metadata, - const char* ptr, ParseContext* ctx); } // namespace internal -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER // Represents one field in an UnknownFieldSet. class PROTOBUF_EXPORT UnknownField { @@ -255,10 +263,14 @@ class PROTOBUF_EXPORT UnknownField { // These methods can take advantage of the underlying implementation and may // archieve a better performance than using getters to retrieve the data and // do the serialization yourself. - void SerializeLengthDelimitedNoTag(io::CodedOutputStream* output) const; - uint8* SerializeLengthDelimitedNoTagToArray(uint8* target) const; + void SerializeLengthDelimitedNoTag(io::CodedOutputStream* output) const { + output->SetCur(InternalSerializeLengthDelimitedNoTag(output->Cur(), + output->EpsCopy())); + } inline size_t GetLengthDelimitedSize() const; + uint8* InternalSerializeLengthDelimitedNoTag( + uint8* target, io::EpsCopyOutputStream* stream) const; // If this UnknownField contains a pointer, delete it. @@ -375,6 +387,12 @@ inline UnknownFieldSet* UnknownField::mutable_group() { assert(type() == TYPE_GROUP); return data_.group_; } +template +bool UnknownFieldSet::MergeFromMessage(const MessageType& message) { + // SFINAE will route to the right version. + return InternalMergeFromMessage(message); +} + inline size_t UnknownField::GetLengthDelimitedSize() const { GOOGLE_DCHECK_EQ(TYPE_LENGTH_DELIMITED, type()); diff --git a/third_party/protobuf/src/google/protobuf/unknown_field_set_unittest.cc b/third_party/protobuf/src/google/protobuf/unknown_field_set_unittest.cc index 6d76b67b..0083208e 100644 --- a/third_party/protobuf/src/google/protobuf/unknown_field_set_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/unknown_field_set_unittest.cc @@ -36,21 +36,21 @@ // tests handling of unknown fields throughout the system. #include + +#include +#include +#include #include #include +#include #include #include #include #include #include - -#include -#include -#include #include #include - - +#include #include namespace google { @@ -308,6 +308,42 @@ TEST_F(UnknownFieldSetTest, MergeFrom) { destination.DebugString()); } +TEST_F(UnknownFieldSetTest, MergeFromMessage) { + unittest::TestEmptyMessage source, destination; + + destination.mutable_unknown_fields()->AddVarint(1, 1); + destination.mutable_unknown_fields()->AddVarint(3, 2); + source.mutable_unknown_fields()->AddVarint(2, 3); + source.mutable_unknown_fields()->AddVarint(3, 4); + + destination.mutable_unknown_fields()->MergeFromMessage(source); + + EXPECT_EQ( + // Note: The ordering of fields here depends on the ordering of adds + // and merging, above. + "1: 1\n" + "3: 2\n" + "2: 3\n" + "3: 4\n", + destination.DebugString()); +} + +TEST_F(UnknownFieldSetTest, MergeFromMessageLite) { + unittest::TestAllTypesLite source; + unittest::TestEmptyMessageLite destination; + + source.set_optional_fixed32(42); + destination.ParseFromString(source.SerializeAsString()); + + UnknownFieldSet unknown_field_set; + EXPECT_TRUE(unknown_field_set.MergeFromMessage(destination)); + EXPECT_EQ(unknown_field_set.field_count(), 1); + + const UnknownField& unknown_field = unknown_field_set.field(0); + EXPECT_EQ(unknown_field.number(), 7); + EXPECT_EQ(unknown_field.fixed32(), 42); +} + TEST_F(UnknownFieldSetTest, Clear) { // Clear the set. diff --git a/third_party/protobuf/src/google/protobuf/util/delimited_message_util.h b/third_party/protobuf/src/google/protobuf/util/delimited_message_util.h index 946bbc99..d3f7dbe8 100644 --- a/third_party/protobuf/src/google/protobuf/util/delimited_message_util.h +++ b/third_party/protobuf/src/google/protobuf/util/delimited_message_util.h @@ -34,6 +34,7 @@ #ifndef GOOGLE_PROTOBUF_UTIL_DELIMITED_MESSAGE_UTIL_H__ #define GOOGLE_PROTOBUF_UTIL_DELIMITED_MESSAGE_UTIL_H__ + #include #include diff --git a/third_party/protobuf/src/google/protobuf/util/field_comparator.cc b/third_party/protobuf/src/google/protobuf/util/field_comparator.cc index 3316506b..54abcd43 100644 --- a/third_party/protobuf/src/google/protobuf/util/field_comparator.cc +++ b/third_party/protobuf/src/google/protobuf/util/field_comparator.cc @@ -32,13 +32,13 @@ #include +#include #include #include #include #include #include -#include #include namespace google { @@ -175,14 +175,12 @@ bool DefaultFieldComparator::CompareDoubleOrFloat(const FieldDescriptor& field, // themselves), and is a shortcut for finite values. return true; } else if (float_comparison_ == EXACT) { - if (treat_nan_as_equal_ && MathLimits::IsNaN(value_1) && - MathLimits::IsNaN(value_2)) { + if (treat_nan_as_equal_ && std::isnan(value_1) && std::isnan(value_2)) { return true; } return false; } else { - if (treat_nan_as_equal_ && MathLimits::IsNaN(value_1) && - MathLimits::IsNaN(value_2)) { + if (treat_nan_as_equal_ && std::isnan(value_1) && std::isnan(value_2)) { return true; } // float_comparison_ == APPROXIMATE covers two use cases. diff --git a/third_party/protobuf/src/google/protobuf/util/field_comparator_test.cc b/third_party/protobuf/src/google/protobuf/util/field_comparator_test.cc index 6b7ee49a..90a5cafd 100644 --- a/third_party/protobuf/src/google/protobuf/util/field_comparator_test.cc +++ b/third_party/protobuf/src/google/protobuf/util/field_comparator_test.cc @@ -32,16 +32,13 @@ #include +#include + #include #include -#include -// This gtest header is put after mathutil.h intentionally. We have to do -// this because mathutil.h includes mathlimits.h which requires cmath not -// being included to compile on some versions of gcc: -// https://github.com/protocolbuffers/protobuf/blob/818c5eee08840355d70d2f3bdf1a2f17986a5e70/src/google/protobuf/stubs/mathlimits.h#L48 -// and the opensource version gtest.h header includes cmath transitively -// somehow. #include +#include + namespace google { namespace protobuf { namespace util { @@ -248,10 +245,10 @@ TEST_F(DefaultFieldComparatorTest, FloatingPointComparisonTreatNaNsAsEqual) { const FieldDescriptor* field_double = descriptor_->FindFieldByName("optional_double"); - message_1_.set_optional_float(MathLimits::kNaN); - message_2_.set_optional_float(MathLimits::kNaN); - message_1_.set_optional_double(MathLimits::kNaN); - message_2_.set_optional_double(MathLimits::kNaN); + message_1_.set_optional_float(std::numeric_limits::quiet_NaN()); + message_2_.set_optional_float(std::numeric_limits::quiet_NaN()); + message_1_.set_optional_double(std::numeric_limits::quiet_NaN()); + message_2_.set_optional_double(std::numeric_limits::quiet_NaN()); // DefaultFieldComparator's default float comparison mode is EXACT with // treating NaNs as different. @@ -388,6 +385,20 @@ TEST_F(DefaultFieldComparatorTest, EXPECT_EQ( FieldComparator::SAME, comparator_.Compare(message_1_, message_2_, field_double, -1, -1, NULL)); + + // Finite values and inf should not be equal, even for a positive fraction. + message_1_.set_optional_float(std::numeric_limits::infinity()); + message_2_.set_optional_float(0.0f); + message_1_.set_optional_double(std::numeric_limits::infinity()); + message_2_.set_optional_double(0.0); + comparator_.SetFractionAndMargin(field_float, 0.1, 0.0); + comparator_.SetFractionAndMargin(field_double, 0.1, 0.0); + EXPECT_EQ(FieldComparator::DIFFERENT, + comparator_.Compare(message_1_, message_2_, field_float, -1, -1, + nullptr)); + EXPECT_EQ(FieldComparator::DIFFERENT, + comparator_.Compare(message_1_, message_2_, field_double, -1, -1, + nullptr)); } TEST_F(DefaultFieldComparatorTest, diff --git a/third_party/protobuf/src/google/protobuf/util/field_mask_util.cc b/third_party/protobuf/src/google/protobuf/util/field_mask_util.cc index c4b2758b..547a4dcc 100644 --- a/third_party/protobuf/src/google/protobuf/util/field_mask_util.cc +++ b/third_party/protobuf/src/google/protobuf/util/field_mask_util.cc @@ -30,8 +30,8 @@ #include +#include #include - #include #include diff --git a/third_party/protobuf/src/google/protobuf/util/field_mask_util.h b/third_party/protobuf/src/google/protobuf/util/field_mask_util.h index 3e7a93e2..dce5bc93 100644 --- a/third_party/protobuf/src/google/protobuf/util/field_mask_util.h +++ b/third_party/protobuf/src/google/protobuf/util/field_mask_util.h @@ -37,8 +37,9 @@ #include #include -#include +#include +// Must be included last. #include namespace google { @@ -54,6 +55,26 @@ class PROTOBUF_EXPORT FieldMaskUtil { static std::string ToString(const FieldMask& mask); static void FromString(StringPiece str, FieldMask* out); + // Populates the FieldMask with the paths corresponding to the fields with the + // given numbers, after checking that all field numbers are valid. + template + static void FromFieldNumbers(const std::vector& field_numbers, + FieldMask* out) { + #if PROTOBUF_RTTI + #define PROTOBUF_RTTI_TYPENAME(T) typeid(T).name() + #else + #define PROTOBUF_RTTI_TYPENAME(T) #T + #endif + for (const auto field_number : field_numbers) { + const FieldDescriptor* field_desc = + T::descriptor()->FindFieldByNumber(field_number); + GOOGLE_CHECK(field_desc != nullptr) << "Invalid field number for " + << PROTOBUF_RTTI_TYPENAME(T) << ": " << field_number; + AddPathToFieldMask(field_desc->lowercase_name(), out); + } + #undef PROTOBUF_RTTI_TYPENAME + } + // Converts FieldMask to/from string, formatted according to proto3 JSON // spec for FieldMask (e.g., "fooBar,baz.quz"). If the field name is not // style conforming (i.e., not snake_case when converted to string, or not @@ -89,7 +110,7 @@ class PROTOBUF_EXPORT FieldMaskUtil { // This method check-fails if the path is not a valid path for type T. template static void AddPathToFieldMask(StringPiece path, FieldMask* mask) { - GOOGLE_CHECK(IsValidPath(path)); + GOOGLE_CHECK(IsValidPath(path)) << path; mask->add_paths(path); } @@ -179,8 +200,8 @@ class PROTOBUF_EXPORT FieldMaskUtil { static bool SnakeCaseToCamelCase(StringPiece input, std::string* output); // Converts a field name from camelCase to snake_case: - // 1. Every uppercase letter is converted to lowercase with a additional - // preceding "-". + // 1. Every uppercase letter is converted to lowercase with an additional + // preceding "_". // The conversion will fail if: // 1. The field name contains "_"s. // If the conversion succeeds, it's guaranteed that the resulted diff --git a/third_party/protobuf/src/google/protobuf/util/field_mask_util_test.cc b/third_party/protobuf/src/google/protobuf/util/field_mask_util_test.cc index 401a56a4..5fe9f65b 100644 --- a/third_party/protobuf/src/google/protobuf/util/field_mask_util_test.cc +++ b/third_party/protobuf/src/google/protobuf/util/field_mask_util_test.cc @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -161,6 +162,20 @@ TEST(FieldMaskUtilTest, JsonStringFormat) { EXPECT_EQ("baz_quz", mask.paths(1)); } +TEST(FieldMaskUtilTest, FromFieldNumbers) { + FieldMask mask; + std::vector field_numbers = { + TestAllTypes::kOptionalInt64FieldNumber, + TestAllTypes::kOptionalBoolFieldNumber, + TestAllTypes::kRepeatedStringFieldNumber, + }; + FieldMaskUtil::FromFieldNumbers(field_numbers, &mask); + ASSERT_EQ(3, mask.paths_size()); + EXPECT_EQ("optional_int64", mask.paths(0)); + EXPECT_EQ("optional_bool", mask.paths(1)); + EXPECT_EQ("repeated_string", mask.paths(2)); +} + TEST(FieldMaskUtilTest, GetFieldDescriptors) { std::vector field_descriptors; EXPECT_TRUE(FieldMaskUtil::GetFieldDescriptors( @@ -752,7 +767,7 @@ TEST(FieldMaskUtilTest, TrimMessageReturnValue) { // Field mask on optional field. FieldMaskUtil::FromString("optional_int32", &mask); - // Verify that if a message is updted by FieldMaskUtil::TrimMessage(), the + // Verify that if a message is updated by FieldMaskUtil::TrimMessage(), the // function returns true. // Test on primary field. trimed_msg.set_optional_string("abc"); @@ -793,7 +808,7 @@ TEST(FieldMaskUtilTest, TrimMessageReturnValue) { EXPECT_EQ(trimed_msg.optional_int32(), 123); trimed_msg.Clear(); - // Field mask on repated field. + // Field mask on repeated field. FieldMaskUtil::FromString("repeated_string", &mask); trimed_msg.add_repeated_string("abc"); trimed_msg.add_repeated_string("def"); diff --git a/third_party/protobuf/src/google/protobuf/util/internal/datapiece.cc b/third_party/protobuf/src/google/protobuf/util/internal/datapiece.cc index 55af434e..6ce7dbc1 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/datapiece.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/datapiece.cc @@ -30,13 +30,14 @@ #include +#include +#include + #include #include #include #include - #include -#include #include namespace google { @@ -44,9 +45,6 @@ namespace protobuf { namespace util { namespace converter { -; -; -; using util::Status; using util::StatusOr; using util::error::Code; @@ -100,9 +98,9 @@ StatusOr FloatToDouble(float before) { } StatusOr DoubleToFloat(double before) { - if (MathLimits::IsNaN(before)) { + if (std::isnan(before)) { return std::numeric_limits::quiet_NaN(); - } else if (!MathLimits::IsFinite(before)) { + } else if (!std::isfinite(before)) { // Converting a double +inf/-inf to float should just work. return static_cast(before); } else if (before > std::numeric_limits::max() || @@ -175,7 +173,7 @@ StatusOr DataPiece::ToDouble() const { if (str_ == "-Infinity") return -std::numeric_limits::infinity(); if (str_ == "NaN") return std::numeric_limits::quiet_NaN(); StatusOr value = StringToNumber(safe_strtod); - if (value.ok() && !MathLimits::IsFinite(value.ValueOrDie())) { + if (value.ok() && !std::isfinite(value.value())) { // safe_strtod converts out-of-range values to +inf/-inf, but we want // to report them as errors. return InvalidArgument(StrCat("\"", str_, "\"")); @@ -291,7 +289,7 @@ StatusOr DataPiece::ToEnum(const google::protobuf::Enum* enum_type, StatusOr int_value = ToInt32(); if (int_value.ok()) { if (const google::protobuf::EnumValue* enum_value = - FindEnumValueByNumberOrNull(enum_type, int_value.ValueOrDie())) { + FindEnumValueByNumberOrNull(enum_type, int_value.value())) { return enum_value->number(); } } @@ -319,7 +317,9 @@ StatusOr DataPiece::ToEnum(const google::protobuf::Enum* enum_type, // If ignore_unknown_enum_values is true an unknown enum value is ignored. if (ignore_unknown_enum_values) { *is_unknown_enum_value = true; - return enum_type->enumvalue(0).number(); + if (enum_type->enumvalue_size() > 0) { + return enum_type->enumvalue(0).number(); + } } } else { // We don't need to check whether the value is actually declared in the @@ -360,7 +360,7 @@ StatusOr DataPiece::StringToNumber(bool (*func)(StringPiece, } To result; if (func(str_, &result)) return result; - return InvalidArgument(StrCat("\"", string(str_), "\"")); + return InvalidArgument(StrCat("\"", std::string(str_), "\"")); } bool DataPiece::DecodeBase64(StringPiece src, std::string* dest) const { @@ -384,9 +384,8 @@ bool DataPiece::DecodeBase64(StringPiece src, std::string* dest) const { if (Base64Unescape(src, dest)) { if (use_strict_base64_decoding_) { std::string encoded; - Base64Escape( - reinterpret_cast(dest->data()), dest->length(), - &encoded, false); + Base64Escape(reinterpret_cast(dest->data()), + dest->length(), &encoded, false); StringPiece src_no_padding = StringPiece(src).substr( 0, HasSuffixString(src, "=") ? src.find_last_not_of('=') + 1 : src.length()); diff --git a/third_party/protobuf/src/google/protobuf/util/internal/datapiece.h b/third_party/protobuf/src/google/protobuf/util/internal/datapiece.h index e1e892b0..1b0ccfa2 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/datapiece.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/datapiece.h @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include @@ -54,7 +54,7 @@ class ProtoWriter; // // For string, a StringPiece is stored. For Cord, a pointer to Cord is stored. // Just like StringPiece, the DataPiece class does not own the storage for -// the actual string or Cord, so it is the user's responsiblity to guarantee +// the actual string or Cord, so it is the user's responsibility to guarantee // that the underlying storage is still valid when the DataPiece is accessed. class PROTOBUF_EXPORT DataPiece { public: diff --git a/third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc b/third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc index 6c3b58bf..a78a862e 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc @@ -52,7 +52,7 @@ T ConvertTo(StringPiece value, StatusOr (DataPiece::*converter_fn)() const, T default_value) { if (value.empty()) return default_value; StatusOr result = (DataPiece(value, true).*converter_fn)(); - return result.ok() ? result.ValueOrDie() : default_value; + return result.ok() ? result.value() : default_value; } } // namespace @@ -67,7 +67,6 @@ DefaultValueObjectWriter::DefaultValueObjectWriter( suppress_empty_list_(false), preserve_proto_field_names_(false), use_ints_for_enums_(false), - field_scrub_callback_(nullptr), ow_(ow) {} DefaultValueObjectWriter::~DefaultValueObjectWriter() { @@ -183,8 +182,8 @@ DefaultValueObjectWriter* DefaultValueObjectWriter::RenderNull( } void DefaultValueObjectWriter::RegisterFieldScrubCallBack( - FieldScrubCallBackPtr field_scrub_callback) { - field_scrub_callback_.reset(field_scrub_callback.release()); + FieldScrubCallBack field_scrub_callback) { + field_scrub_callback_ = std::move(field_scrub_callback); } DefaultValueObjectWriter::Node* DefaultValueObjectWriter::CreateNewNode( @@ -192,10 +191,10 @@ DefaultValueObjectWriter::Node* DefaultValueObjectWriter::CreateNewNode( const DataPiece& data, bool is_placeholder, const std::vector& path, bool suppress_empty_list, bool preserve_proto_field_names, bool use_ints_for_enums, - FieldScrubCallBack* field_scrub_callback) { + FieldScrubCallBack field_scrub_callback) { return new Node(name, type, kind, data, is_placeholder, path, suppress_empty_list, preserve_proto_field_names, - use_ints_for_enums, field_scrub_callback); + use_ints_for_enums, std::move(field_scrub_callback)); } DefaultValueObjectWriter::Node::Node( @@ -203,7 +202,7 @@ DefaultValueObjectWriter::Node::Node( const DataPiece& data, bool is_placeholder, const std::vector& path, bool suppress_empty_list, bool preserve_proto_field_names, bool use_ints_for_enums, - FieldScrubCallBack* field_scrub_callback) + FieldScrubCallBack field_scrub_callback) : name_(name), type_(type), kind_(kind), @@ -214,7 +213,7 @@ DefaultValueObjectWriter::Node::Node( suppress_empty_list_(suppress_empty_list), preserve_proto_field_names_(preserve_proto_field_names), use_ints_for_enums_(use_ints_for_enums), - field_scrub_callback_(field_scrub_callback) {} + field_scrub_callback_(std::move(field_scrub_callback)) {} DefaultValueObjectWriter::Node* DefaultValueObjectWriter::Node::FindChild( StringPiece name) { @@ -281,7 +280,7 @@ const google::protobuf::Type* DefaultValueObjectWriter::Node::GetMapValueType( if (sub_field.number() != 2) { continue; } - if (sub_field.kind() != google::protobuf::Field_Kind_TYPE_MESSAGE) { + if (sub_field.kind() != google::protobuf::Field::TYPE_MESSAGE) { // This map's value type is not a message type. We don't need to // get the field_type in this case. break; @@ -291,7 +290,7 @@ const google::protobuf::Type* DefaultValueObjectWriter::Node::GetMapValueType( if (!sub_type.ok()) { GOOGLE_LOG(WARNING) << "Cannot resolve type '" << sub_field.type_url() << "'."; } else { - return sub_type.ValueOrDie(); + return sub_type.value(); } break; } @@ -329,8 +328,7 @@ void DefaultValueObjectWriter::Node::PopulateChildren( path.insert(path.begin(), path_.begin(), path_.end()); } path.push_back(field.name()); - if (field_scrub_callback_ != nullptr && - field_scrub_callback_->Run(path, &field)) { + if (field_scrub_callback_ && field_scrub_callback_(path, &field)) { continue; } @@ -348,7 +346,7 @@ void DefaultValueObjectWriter::Node::PopulateChildren( bool is_map = false; NodeKind kind = PRIMITIVE; - if (field.kind() == google::protobuf::Field_Kind_TYPE_MESSAGE) { + if (field.kind() == google::protobuf::Field::TYPE_MESSAGE) { kind = OBJECT; util::StatusOr found_result = typeinfo->ResolveTypeUrl(field.type_url()); @@ -356,7 +354,7 @@ void DefaultValueObjectWriter::Node::PopulateChildren( // "field" is of an unknown type. GOOGLE_LOG(WARNING) << "Cannot resolve type '" << field.type_url() << "'."; } else { - const google::protobuf::Type* found_type = found_result.ValueOrDie(); + const google::protobuf::Type* found_type = found_result.value(); is_map = IsMap(field, *found_type); if (!is_map) { @@ -371,8 +369,7 @@ void DefaultValueObjectWriter::Node::PopulateChildren( } if (!is_map && - field.cardinality() == - google::protobuf::Field_Cardinality_CARDINALITY_REPEATED) { + field.cardinality() == google::protobuf::Field::CARDINALITY_REPEATED) { kind = LIST; } @@ -438,47 +435,47 @@ DataPiece DefaultValueObjectWriter::CreateDefaultDataPieceForField( const google::protobuf::Field& field, const TypeInfo* typeinfo, bool use_ints_for_enums) { switch (field.kind()) { - case google::protobuf::Field_Kind_TYPE_DOUBLE: { + case google::protobuf::Field::TYPE_DOUBLE: { return DataPiece(ConvertTo( field.default_value(), &DataPiece::ToDouble, static_cast(0))); } - case google::protobuf::Field_Kind_TYPE_FLOAT: { + case google::protobuf::Field::TYPE_FLOAT: { return DataPiece(ConvertTo( field.default_value(), &DataPiece::ToFloat, static_cast(0))); } - case google::protobuf::Field_Kind_TYPE_INT64: - case google::protobuf::Field_Kind_TYPE_SINT64: - case google::protobuf::Field_Kind_TYPE_SFIXED64: { + case google::protobuf::Field::TYPE_INT64: + case google::protobuf::Field::TYPE_SINT64: + case google::protobuf::Field::TYPE_SFIXED64: { return DataPiece(ConvertTo( field.default_value(), &DataPiece::ToInt64, static_cast(0))); } - case google::protobuf::Field_Kind_TYPE_UINT64: - case google::protobuf::Field_Kind_TYPE_FIXED64: { + case google::protobuf::Field::TYPE_UINT64: + case google::protobuf::Field::TYPE_FIXED64: { return DataPiece(ConvertTo( field.default_value(), &DataPiece::ToUint64, static_cast(0))); } - case google::protobuf::Field_Kind_TYPE_INT32: - case google::protobuf::Field_Kind_TYPE_SINT32: - case google::protobuf::Field_Kind_TYPE_SFIXED32: { + case google::protobuf::Field::TYPE_INT32: + case google::protobuf::Field::TYPE_SINT32: + case google::protobuf::Field::TYPE_SFIXED32: { return DataPiece(ConvertTo( field.default_value(), &DataPiece::ToInt32, static_cast(0))); } - case google::protobuf::Field_Kind_TYPE_BOOL: { + case google::protobuf::Field::TYPE_BOOL: { return DataPiece( ConvertTo(field.default_value(), &DataPiece::ToBool, false)); } - case google::protobuf::Field_Kind_TYPE_STRING: { + case google::protobuf::Field::TYPE_STRING: { return DataPiece(field.default_value(), true); } - case google::protobuf::Field_Kind_TYPE_BYTES: { + case google::protobuf::Field::TYPE_BYTES: { return DataPiece(field.default_value(), false, true); } - case google::protobuf::Field_Kind_TYPE_UINT32: - case google::protobuf::Field_Kind_TYPE_FIXED32: { + case google::protobuf::Field::TYPE_UINT32: + case google::protobuf::Field::TYPE_FIXED32: { return DataPiece(ConvertTo( field.default_value(), &DataPiece::ToUint32, static_cast(0))); } - case google::protobuf::Field_Kind_TYPE_ENUM: { + case google::protobuf::Field::TYPE_ENUM: { return FindEnumDefault(field, typeinfo, use_ints_for_enums); } default: { @@ -491,10 +488,10 @@ DefaultValueObjectWriter* DefaultValueObjectWriter::StartObject( StringPiece name) { if (current_ == nullptr) { std::vector path; - root_.reset(CreateNewNode( - std::string(name), &type_, OBJECT, DataPiece::NullData(), false, path, - suppress_empty_list_, preserve_proto_field_names_, use_ints_for_enums_, - field_scrub_callback_.get())); + root_.reset(CreateNewNode(std::string(name), &type_, OBJECT, + DataPiece::NullData(), false, path, + suppress_empty_list_, preserve_proto_field_names_, + use_ints_for_enums_, field_scrub_callback_)); root_->PopulateChildren(typeinfo_); current_ = root_.get(); return this; @@ -512,7 +509,7 @@ DefaultValueObjectWriter* DefaultValueObjectWriter::StartObject( OBJECT, DataPiece::NullData(), false, child == nullptr ? current_->path() : child->path(), suppress_empty_list_, preserve_proto_field_names_, - use_ints_for_enums_, field_scrub_callback_.get())); + use_ints_for_enums_, field_scrub_callback_)); child = node.get(); current_->AddChild(node.release()); } @@ -542,10 +539,10 @@ DefaultValueObjectWriter* DefaultValueObjectWriter::StartList( StringPiece name) { if (current_ == nullptr) { std::vector path; - root_.reset(CreateNewNode( - std::string(name), &type_, LIST, DataPiece::NullData(), false, path, - suppress_empty_list_, preserve_proto_field_names_, use_ints_for_enums_, - field_scrub_callback_.get())); + root_.reset(CreateNewNode(std::string(name), &type_, LIST, + DataPiece::NullData(), false, path, + suppress_empty_list_, preserve_proto_field_names_, + use_ints_for_enums_, field_scrub_callback_)); current_ = root_.get(); return this; } @@ -556,7 +553,7 @@ DefaultValueObjectWriter* DefaultValueObjectWriter::StartList( std::string(name), nullptr, LIST, DataPiece::NullData(), false, child == nullptr ? current_->path() : child->path(), suppress_empty_list_, preserve_proto_field_names_, use_ints_for_enums_, - field_scrub_callback_.get())); + field_scrub_callback_)); child = node.get(); current_->AddChild(node.release()); } @@ -590,7 +587,7 @@ void DefaultValueObjectWriter::RenderDataPiece(StringPiece name, name == "@type") { util::StatusOr data_string = data.ToString(); if (data_string.ok()) { - const std::string& string_value = data_string.ValueOrDie(); + const std::string& string_value = data_string.value(); // If the type of current_ is "Any" and its "@type" field is being set // here, sets the type of current_ to be the type specified by the // "@type". @@ -599,7 +596,7 @@ void DefaultValueObjectWriter::RenderDataPiece(StringPiece name, if (!found_type.ok()) { GOOGLE_LOG(WARNING) << "Failed to resolve type '" << string_value << "'."; } else { - current_->set_type(found_type.ValueOrDie()); + current_->set_type(found_type.value()); } current_->set_is_any(true); // If the "@type" field is placed after other fields, we should populate @@ -618,7 +615,7 @@ void DefaultValueObjectWriter::RenderDataPiece(StringPiece name, CreateNewNode(std::string(name), nullptr, PRIMITIVE, data, false, child == nullptr ? current_->path() : child->path(), suppress_empty_list_, preserve_proto_field_names_, - use_ints_for_enums_, field_scrub_callback_.get())); + use_ints_for_enums_, field_scrub_callback_)); current_->AddChild(node.release()); } else { child->set_data(data); diff --git a/third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h b/third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h index e3f34a7c..30c03043 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h @@ -31,19 +31,20 @@ #ifndef GOOGLE_PROTOBUF_UTIL_CONVERTER_DEFAULT_VALUE_OBJECTWRITER_H__ #define GOOGLE_PROTOBUF_UTIL_CONVERTER_DEFAULT_VALUE_OBJECTWRITER_H__ +#include #include #include #include -#include #include #include #include #include #include #include -#include +#include +// Must be included last. #include namespace google { @@ -70,14 +71,11 @@ class PROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { // "b", "c" }. // // The Field* should point to the google::protobuf::Field of "c". - typedef ResultCallback2& /*path of the field*/, - const google::protobuf::Field* /*field*/> + typedef std::function& /*path of the field*/, + const google::protobuf::Field* /*field*/)> FieldScrubCallBack; - // A unique pointer to a DefaultValueObjectWriter::FieldScrubCallBack. - typedef std::unique_ptr FieldScrubCallBackPtr; - DefaultValueObjectWriter(TypeResolver* type_resolver, const google::protobuf::Type& type, ObjectWriter* ow); @@ -119,11 +117,10 @@ class PROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { DefaultValueObjectWriter* RenderBytes(StringPiece name, StringPiece value) override; - virtual DefaultValueObjectWriter* RenderNull(StringPiece name); + DefaultValueObjectWriter* RenderNull(StringPiece name) override; - // Register the callback for scrubbing of fields. Owership of - // field_scrub_callback pointer is also transferred to this class - void RegisterFieldScrubCallBack(FieldScrubCallBackPtr field_scrub_callback); + // Register the callback for scrubbing of fields. + void RegisterFieldScrubCallBack(FieldScrubCallBack field_scrub_callback); // If set to true, empty lists are suppressed from output when default values // are written. @@ -154,7 +151,7 @@ class PROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { NodeKind kind, const DataPiece& data, bool is_placeholder, const std::vector& path, bool suppress_empty_list, bool preserve_proto_field_names, bool use_ints_for_enums, - FieldScrubCallBack* field_scrub_callback); + FieldScrubCallBack field_scrub_callback); virtual ~Node() { for (int i = 0; i < children_.size(); ++i) { delete children_[i]; @@ -239,9 +236,8 @@ class PROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { // Whether to always print enums as ints bool use_ints_for_enums_; - // Pointer to function for determining whether a field needs to be scrubbed - // or not. This callback is owned by the creator of this node. - FieldScrubCallBack* field_scrub_callback_; + // Function for determining whether a field needs to be scrubbed or not. + FieldScrubCallBack field_scrub_callback_; private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Node); @@ -255,7 +251,7 @@ class PROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { bool suppress_empty_list, bool preserve_proto_field_names, bool use_ints_for_enums, - FieldScrubCallBack* field_scrub_callback); + FieldScrubCallBack field_scrub_callback); // Creates a DataPiece containing the default value of the type of the field. static DataPiece CreateDefaultDataPieceForField( @@ -317,9 +313,8 @@ class PROTOBUF_EXPORT DefaultValueObjectWriter : public ObjectWriter { // Whether to always print enums as ints bool use_ints_for_enums_; - // Unique Pointer to function for determining whether a field needs to be - // scrubbed or not. - FieldScrubCallBackPtr field_scrub_callback_; + // Function for determining whether a field needs to be scrubbed or not. + FieldScrubCallBack field_scrub_callback_; ObjectWriter* ow_; diff --git a/third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter_test.cc b/third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter_test.cc index 6236d5b1..032d112f 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter_test.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter_test.cc @@ -166,7 +166,7 @@ INSTANTIATE_TEST_SUITE_P(DifferentTypeInfoSourceTest, testing::USE_TYPE_RESOLVER)); TEST_P(DefaultValueObjectWriterSuppressListTest, Empty) { - // Set expectation. Emtpy lists should be suppressed. + // Set expectation. Empty lists should be suppressed. expects_.StartObject("") ->RenderDouble("doubleValue", 0.0) ->RenderFloat("floatValue", 0.0) diff --git a/third_party/protobuf/src/google/protobuf/util/internal/error_listener.h b/third_party/protobuf/src/google/protobuf/util/internal/error_listener.h index c2b7560d..07cb9570 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/error_listener.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/error_listener.h @@ -40,8 +40,9 @@ #include #include #include -#include +#include +// Must be included last. #include namespace google { diff --git a/third_party/protobuf/src/google/protobuf/util/internal/expecting_objectwriter.h b/third_party/protobuf/src/google/protobuf/util/internal/expecting_objectwriter.h index 65961ade..71ecb1d7 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/expecting_objectwriter.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/expecting_objectwriter.h @@ -71,21 +71,27 @@ class MockObjectWriter : public ObjectWriter { public: MockObjectWriter() {} - MOCK_METHOD1(StartObject, ObjectWriter*(StringPiece)); - MOCK_METHOD0(EndObject, ObjectWriter*()); - MOCK_METHOD1(StartList, ObjectWriter*(StringPiece)); - MOCK_METHOD0(EndList, ObjectWriter*()); - MOCK_METHOD2(RenderBool, ObjectWriter*(StringPiece, bool)); - MOCK_METHOD2(RenderInt32, ObjectWriter*(StringPiece, int32)); - MOCK_METHOD2(RenderUint32, ObjectWriter*(StringPiece, uint32)); - MOCK_METHOD2(RenderInt64, ObjectWriter*(StringPiece, int64)); - MOCK_METHOD2(RenderUint64, ObjectWriter*(StringPiece, uint64)); - MOCK_METHOD2(RenderDouble, ObjectWriter*(StringPiece, double)); - MOCK_METHOD2(RenderFloat, ObjectWriter*(StringPiece, float)); - MOCK_METHOD2(RenderString, - ObjectWriter*(StringPiece, StringPiece)); - MOCK_METHOD2(RenderBytes, ObjectWriter*(StringPiece, StringPiece)); - MOCK_METHOD1(RenderNull, ObjectWriter*(StringPiece)); + MOCK_METHOD(ObjectWriter*, StartObject, (StringPiece), (override)); + MOCK_METHOD(ObjectWriter*, EndObject, (), (override)); + MOCK_METHOD(ObjectWriter*, StartList, (StringPiece), (override)); + MOCK_METHOD(ObjectWriter*, EndList, (), (override)); + MOCK_METHOD(ObjectWriter*, RenderBool, (StringPiece, bool), (override)); + MOCK_METHOD(ObjectWriter*, RenderInt32, (StringPiece, int32), + (override)); + MOCK_METHOD(ObjectWriter*, RenderUint32, (StringPiece, uint32), + (override)); + MOCK_METHOD(ObjectWriter*, RenderInt64, (StringPiece, int64), + (override)); + MOCK_METHOD(ObjectWriter*, RenderUint64, (StringPiece, uint64), + (override)); + MOCK_METHOD(ObjectWriter*, RenderDouble, (StringPiece, double), + (override)); + MOCK_METHOD(ObjectWriter*, RenderFloat, (StringPiece, float), + (override)); + MOCK_METHOD(ObjectWriter*, RenderString, + (StringPiece, StringPiece), (override)); + MOCK_METHOD(ObjectWriter*, RenderBytes, (StringPiece, StringPiece)); + MOCK_METHOD(ObjectWriter*, RenderNull, (StringPiece), (override)); }; class ExpectingObjectWriter : public ObjectWriter { diff --git a/third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc b/third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc index 27e5afa4..40e193e5 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc @@ -34,6 +34,7 @@ #include #include +// Must be included last. #include namespace google { @@ -185,7 +186,7 @@ util::Status DecodeCompactFieldMaskPaths(StringPiece paths, // Builds a prefix and save it into the stack. prefix.push(AppendPathSegmentToPrefix(current_prefix, segment)); } else if (!segment.empty()) { - // When the current charactor is ')', ',' or the current position has + // When the current character is ')', ',' or the current position has // passed the end of the input, builds and outputs a new paths by // concatenating the last prefix with the current segment. RETURN_IF_ERROR( diff --git a/third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.h b/third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.h index 4e369a65..7335af50 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.h @@ -38,7 +38,7 @@ #include #include -#include +#include #include namespace google { diff --git a/third_party/protobuf/src/google/protobuf/util/internal/json_escaping.cc b/third_party/protobuf/src/google/protobuf/util/internal/json_escaping.cc index 5347c7b2..c5c406f9 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/json_escaping.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/json_escaping.cc @@ -341,6 +341,28 @@ void JsonEscaping::Escape(strings::ByteSource* input, } } +void JsonEscaping::Escape(StringPiece input, strings::ByteSink* output) { + const size_t len = input.length(); + const char* p = input.data(); + + bool can_skip_escaping = true; + for (int i = 0; i < len; i++) { + char c = p[i]; + if (c < 0x20 || c >= 0x7F || c == '"' || c == '<' || c == '>' || + c == '\\') { + can_skip_escaping = false; + break; + } + } + + if (can_skip_escaping) { + output->Append(input.data(), input.length()); + } else { + strings::ArrayByteSource source(input); + Escape(&source, output); + } +} + } // namespace converter } // namespace util } // namespace protobuf diff --git a/third_party/protobuf/src/google/protobuf/util/internal/json_escaping.h b/third_party/protobuf/src/google/protobuf/util/internal/json_escaping.h index 07042f6f..d05c3359 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/json_escaping.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/json_escaping.h @@ -44,34 +44,34 @@ class JsonEscaping { // The minimum value of a unicode high-surrogate code unit in the utf-16 // encoding. A high-surrogate is also known as a leading-surrogate. // See http://www.unicode.org/glossary/#high_surrogate_code_unit - static const uint16 kMinHighSurrogate = 0xd800; + static constexpr uint16 kMinHighSurrogate = 0xd800; // The maximum value of a unicide high-surrogate code unit in the utf-16 // encoding. A high-surrogate is also known as a leading-surrogate. // See http://www.unicode.org/glossary/#high_surrogate_code_unit - static const uint16 kMaxHighSurrogate = 0xdbff; + static constexpr uint16 kMaxHighSurrogate = 0xdbff; // The minimum value of a unicode low-surrogate code unit in the utf-16 // encoding. A low-surrogate is also known as a trailing-surrogate. // See http://www.unicode.org/glossary/#low_surrogate_code_unit - static const uint16 kMinLowSurrogate = 0xdc00; + static constexpr uint16 kMinLowSurrogate = 0xdc00; // The maximum value of a unicode low-surrogate code unit in the utf-16 // encoding. A low-surrogate is also known as a trailing surrogate. // See http://www.unicode.org/glossary/#low_surrogate_code_unit - static const uint16 kMaxLowSurrogate = 0xdfff; + static constexpr uint16 kMaxLowSurrogate = 0xdfff; // The minimum value of a unicode supplementary code point. // See http://www.unicode.org/glossary/#supplementary_code_point - static const uint32 kMinSupplementaryCodePoint = 0x010000; + static constexpr uint32 kMinSupplementaryCodePoint = 0x010000; // The minimum value of a unicode code point. // See http://www.unicode.org/glossary/#code_point - static const uint32 kMinCodePoint = 0x000000; + static constexpr uint32 kMinCodePoint = 0x000000; // The maximum value of a unicode code point. // See http://www.unicode.org/glossary/#code_point - static const uint32 kMaxCodePoint = 0x10ffff; + static constexpr uint32 kMaxCodePoint = 0x10ffff; JsonEscaping() {} virtual ~JsonEscaping() {} @@ -79,6 +79,11 @@ class JsonEscaping { // Escape the given ByteSource to the given ByteSink. static void Escape(strings::ByteSource* input, strings::ByteSink* output); + // Escape the given ByteSource to the given ByteSink. + // This is optimized for the case where the string is all printable 7-bit + // ASCII and does not contain a few other characters (such as quotes). + static void Escape(StringPiece input, strings::ByteSink* output); + private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(JsonEscaping); }; diff --git a/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc b/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc index 04908c55..a98e7bad 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc @@ -30,24 +30,21 @@ #include -#include +#include +#include #include #include #include #include - #include #include -#include namespace google { namespace protobuf { namespace util { namespace converter { -using strings::ArrayByteSource; -; JsonObjectWriter::~JsonObjectWriter() { if (element_ && !element_->is_root()) { @@ -102,7 +99,7 @@ JsonObjectWriter* JsonObjectWriter::RenderInt64(StringPiece name, int64 value) { WritePrefix(name); WriteChar('"'); - stream_->WriteString(StrCat(value)); + WriteRawString(StrCat(value)); WriteChar('"'); return this; } @@ -111,14 +108,14 @@ JsonObjectWriter* JsonObjectWriter::RenderUint64(StringPiece name, uint64 value) { WritePrefix(name); WriteChar('"'); - stream_->WriteString(StrCat(value)); + WriteRawString(StrCat(value)); WriteChar('"'); return this; } JsonObjectWriter* JsonObjectWriter::RenderDouble(StringPiece name, double value) { - if (MathLimits::IsFinite(value)) { + if (std::isfinite(value)) { return RenderSimple(name, SimpleDtoa(value)); } @@ -128,7 +125,7 @@ JsonObjectWriter* JsonObjectWriter::RenderDouble(StringPiece name, JsonObjectWriter* JsonObjectWriter::RenderFloat(StringPiece name, float value) { - if (MathLimits::IsFinite(value)) { + if (std::isfinite(value)) { return RenderSimple(name, SimpleFtoa(value)); } @@ -140,8 +137,7 @@ JsonObjectWriter* JsonObjectWriter::RenderString(StringPiece name, StringPiece value) { WritePrefix(name); WriteChar('"'); - ArrayByteSource source(value); - JsonEscaping::Escape(&source, &sink_); + JsonEscaping::Escape(value, &sink_); WriteChar('"'); return this; } @@ -180,10 +176,9 @@ void JsonObjectWriter::WritePrefix(StringPiece name) { if (!name.empty() || element()->is_json_object()) { WriteChar('"'); if (!name.empty()) { - ArrayByteSource source(name); - JsonEscaping::Escape(&source, &sink_); + JsonEscaping::Escape(name, &sink_); } - stream_->WriteString("\":"); + WriteRawString("\":"); if (!indent_string_.empty()) WriteChar(' '); } } diff --git a/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.h b/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.h index 3a8cea94..9e007123 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.h @@ -38,13 +38,16 @@ #include #include +// clang-format off #include +// clang-format on namespace google { namespace protobuf { namespace util { namespace converter { + // An ObjectWriter implementation that outputs JSON. This ObjectWriter // supports writing a compact form or a pretty printed form. // @@ -91,25 +94,40 @@ class PROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter { stream_(out), sink_(out), indent_string_(indent_string), - use_websafe_base64_for_bytes_(false) {} + indent_char_('\0'), + indent_count_(0), + use_websafe_base64_for_bytes_(false) { + // See if we have a trivial sequence of indent characters. + if (!indent_string.empty()) { + indent_char_ = indent_string[0]; + indent_count_ = indent_string.length(); + for (int i = 1; i < indent_string.length(); i++) { + if (indent_char_ != indent_string_[i]) { + indent_char_ = '\0'; + indent_count_ = 0; + break; + } + } + } + } virtual ~JsonObjectWriter(); // ObjectWriter methods. - virtual JsonObjectWriter* StartObject(StringPiece name); - virtual JsonObjectWriter* EndObject(); - virtual JsonObjectWriter* StartList(StringPiece name); - virtual JsonObjectWriter* EndList(); - virtual JsonObjectWriter* RenderBool(StringPiece name, bool value); - virtual JsonObjectWriter* RenderInt32(StringPiece name, int32 value); - virtual JsonObjectWriter* RenderUint32(StringPiece name, uint32 value); - virtual JsonObjectWriter* RenderInt64(StringPiece name, int64 value); - virtual JsonObjectWriter* RenderUint64(StringPiece name, uint64 value); - virtual JsonObjectWriter* RenderDouble(StringPiece name, double value); - virtual JsonObjectWriter* RenderFloat(StringPiece name, float value); - virtual JsonObjectWriter* RenderString(StringPiece name, - StringPiece value); - virtual JsonObjectWriter* RenderBytes(StringPiece name, StringPiece value); - virtual JsonObjectWriter* RenderNull(StringPiece name); + JsonObjectWriter* StartObject(StringPiece name) override; + JsonObjectWriter* EndObject() override; + JsonObjectWriter* StartList(StringPiece name) override; + JsonObjectWriter* EndList() override; + JsonObjectWriter* RenderBool(StringPiece name, bool value) override; + JsonObjectWriter* RenderInt32(StringPiece name, int32 value) override; + JsonObjectWriter* RenderUint32(StringPiece name, uint32 value) override; + JsonObjectWriter* RenderInt64(StringPiece name, int64 value) override; + JsonObjectWriter* RenderUint64(StringPiece name, uint64 value) override; + JsonObjectWriter* RenderDouble(StringPiece name, double value) override; + JsonObjectWriter* RenderFloat(StringPiece name, float value) override; + JsonObjectWriter* RenderString(StringPiece name, + StringPiece value) override; + JsonObjectWriter* RenderBytes(StringPiece name, StringPiece value) override; + JsonObjectWriter* RenderNull(StringPiece name) override; virtual JsonObjectWriter* RenderNullAsEmpty(StringPiece name); void set_use_websafe_base64_for_bytes(bool value) { @@ -168,9 +186,9 @@ class PROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter { // methods convert their argument to a string and call this method. This // method can then be used to render the simple value without escaping it. JsonObjectWriter* RenderSimple(StringPiece name, - const std::string& value) { + StringPiece value) { WritePrefix(name); - stream_->WriteString(value); + WriteRawString(value); return this; } @@ -195,9 +213,25 @@ class PROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter { // followed by optional indentation. Otherwise this method is a noop. void NewLine() { if (!indent_string_.empty()) { - WriteChar('\n'); - for (int i = 0; i < element()->level(); i++) { - stream_->WriteString(indent_string_); + size_t len = sizeof('\n') + (indent_string_.size() * element()->level()); + + // Take the slow-path if we don't have sufficient characters remaining in + // our buffer or we have a non-trivial indent string which would prevent + // us from using memset. + uint8* out = nullptr; + if (indent_count_ > 0) { + out = stream_->GetDirectBufferForNBytesAndAdvance(len); + } + + if (out != nullptr) { + out[0] = '\n'; + memset(&out[1], indent_char_, len - 1); + } else { + // Slow path, no contiguous output buffer available. + WriteChar('\n'); + for (int i = 0; i < element()->level(); i++) { + stream_->WriteRaw(indent_string_.c_str(), indent_string_.length()); + } } } } @@ -210,11 +244,20 @@ class PROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter { // Writes an individual character to the output. void WriteChar(const char c) { stream_->WriteRaw(&c, sizeof(c)); } + // Writes a string to the output. + void WriteRawString(StringPiece s) { + stream_->WriteRaw(s.data(), s.length()); + } + std::unique_ptr element_; io::CodedOutputStream* stream_; ByteSinkWrapper sink_; const std::string indent_string_; + // For the common case of indent being a single character repeated. + char indent_char_; + int indent_count_; + // Whether to use regular or websafe base64 encoding for byte fields. Defaults // to regular base64 encoding. bool use_websafe_base64_for_bytes_; diff --git a/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter_test.cc b/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter_test.cc index 032977fe..e9f252b8 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter_test.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter_test.cc @@ -49,10 +49,12 @@ class JsonObjectWriterTest : public ::testing::Test { out_stream_(new CodedOutputStream(str_stream_)), ow_(nullptr) {} - virtual ~JsonObjectWriterTest() { - delete ow_; + ~JsonObjectWriterTest() override { delete ow_; } + + std::string CloseStreamAndGetString() { delete out_stream_; delete str_stream_; + return output_; } std::string output_; @@ -64,7 +66,7 @@ class JsonObjectWriterTest : public ::testing::Test { TEST_F(JsonObjectWriterTest, EmptyRootObject) { ow_ = new JsonObjectWriter("", out_stream_); ow_->StartObject("")->EndObject(); - EXPECT_EQ("{}", output_.substr(0, out_stream_->ByteCount())); + EXPECT_EQ("{}", CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, EmptyObject) { @@ -74,14 +76,13 @@ TEST_F(JsonObjectWriterTest, EmptyObject) { ->StartObject("empty") ->EndObject() ->EndObject(); - EXPECT_EQ("{\"test\":\"value\",\"empty\":{}}", - output_.substr(0, out_stream_->ByteCount())); + EXPECT_EQ("{\"test\":\"value\",\"empty\":{}}", CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, EmptyRootList) { ow_ = new JsonObjectWriter("", out_stream_); ow_->StartList("")->EndList(); - EXPECT_EQ("[]", output_.substr(0, out_stream_->ByteCount())); + EXPECT_EQ("[]", CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, EmptyList) { @@ -91,14 +92,13 @@ TEST_F(JsonObjectWriterTest, EmptyList) { ->StartList("empty") ->EndList() ->EndObject(); - EXPECT_EQ("{\"test\":\"value\",\"empty\":[]}", - output_.substr(0, out_stream_->ByteCount())); + EXPECT_EQ("{\"test\":\"value\",\"empty\":[]}", CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, EmptyObjectKey) { ow_ = new JsonObjectWriter("", out_stream_); ow_->StartObject("")->RenderString("", "value")->EndObject(); - EXPECT_EQ("{\"\":\"value\"}", output_.substr(0, out_stream_->ByteCount())); + EXPECT_EQ("{\"\":\"value\"}", CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, ObjectInObject) { @@ -108,8 +108,7 @@ TEST_F(JsonObjectWriterTest, ObjectInObject) { ->RenderString("field", "value") ->EndObject() ->EndObject(); - EXPECT_EQ("{\"nested\":{\"field\":\"value\"}}", - output_.substr(0, out_stream_->ByteCount())); + EXPECT_EQ("{\"nested\":{\"field\":\"value\"}}", CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, ListInObject) { @@ -119,8 +118,7 @@ TEST_F(JsonObjectWriterTest, ListInObject) { ->RenderString("", "value") ->EndList() ->EndObject(); - EXPECT_EQ("{\"nested\":[\"value\"]}", - output_.substr(0, out_stream_->ByteCount())); + EXPECT_EQ("{\"nested\":[\"value\"]}", CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, ObjectInList) { @@ -130,8 +128,7 @@ TEST_F(JsonObjectWriterTest, ObjectInList) { ->RenderString("field", "value") ->EndObject() ->EndList(); - EXPECT_EQ("[{\"field\":\"value\"}]", - output_.substr(0, out_stream_->ByteCount())); + EXPECT_EQ("[{\"field\":\"value\"}]", CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, ListInList) { @@ -141,7 +138,7 @@ TEST_F(JsonObjectWriterTest, ListInList) { ->RenderString("", "value") ->EndList() ->EndList(); - EXPECT_EQ("[[\"value\"]]", output_.substr(0, out_stream_->ByteCount())); + EXPECT_EQ("[[\"value\"]]", CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, RenderPrimitives) { @@ -155,7 +152,7 @@ TEST_F(JsonObjectWriterTest, RenderPrimitives) { ->RenderBytes("bytes", "abracadabra") ->RenderString("string", "string") ->RenderBytes("emptybytes", "") - ->RenderString("emptystring", string()) + ->RenderString("emptystring", std::string()) ->EndObject(); EXPECT_EQ( "{\"bool\":true," @@ -171,7 +168,7 @@ TEST_F(JsonObjectWriterTest, RenderPrimitives) { "\"string\":\"string\"," "\"emptybytes\":\"\"," "\"emptystring\":\"\"}", - output_.substr(0, out_stream_->ByteCount())); + CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, BytesEncodesAsNonWebSafeBase64) { @@ -181,8 +178,7 @@ TEST_F(JsonObjectWriterTest, BytesEncodesAsNonWebSafeBase64) { ow_ = new JsonObjectWriter("", out_stream_); ow_->StartObject("")->RenderBytes("bytes", s)->EndObject(); // Non-web-safe would encode this as "/+8=" - EXPECT_EQ("{\"bytes\":\"/+8=\"}", - output_.substr(0, out_stream_->ByteCount())); + EXPECT_EQ("{\"bytes\":\"/+8=\"}", CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, PrettyPrintList) { @@ -205,7 +201,7 @@ TEST_F(JsonObjectWriterTest, PrettyPrintList) { " ],\n" " \"empty\": []\n" "}\n", - output_.substr(0, out_stream_->ByteCount())); + CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, PrettyPrintObject) { @@ -228,7 +224,7 @@ TEST_F(JsonObjectWriterTest, PrettyPrintObject) { " },\n" " \"empty\": {}\n" "}\n", - output_.substr(0, out_stream_->ByteCount())); + CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, PrettyPrintEmptyObjectInEmptyList) { @@ -245,7 +241,7 @@ TEST_F(JsonObjectWriterTest, PrettyPrintEmptyObjectInEmptyList) { " {}\n" " ]\n" "}\n", - output_.substr(0, out_stream_->ByteCount())); + CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, PrettyPrintDoubleIndent) { @@ -259,14 +255,14 @@ TEST_F(JsonObjectWriterTest, PrettyPrintDoubleIndent) { " \"bool\": true,\n" " \"int\": 42\n" "}\n", - output_.substr(0, out_stream_->ByteCount())); + CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, StringsEscapedAndEnclosedInDoubleQuotes) { ow_ = new JsonObjectWriter("", out_stream_); ow_->StartObject("")->RenderString("string", "'<>&\\\"\r\n")->EndObject(); EXPECT_EQ("{\"string\":\"'\\u003c\\u003e&\\\\\\\"\\r\\n\"}", - output_.substr(0, out_stream_->ByteCount())); + CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, Stringification) { @@ -286,7 +282,7 @@ TEST_F(JsonObjectWriterTest, Stringification) { "\"float_pos\":\"Infinity\"," "\"double_neg\":\"-Infinity\"," "\"float_neg\":\"-Infinity\"}", - output_.substr(0, out_stream_->ByteCount())); + CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, TestRegularByteEncoding) { @@ -297,8 +293,7 @@ TEST_F(JsonObjectWriterTest, TestRegularByteEncoding) { // Test that we get regular (non websafe) base64 encoding on byte fields by // default. - EXPECT_EQ("{\"bytes\":\"A+/A\"}", - output_.substr(0, out_stream_->ByteCount())); + EXPECT_EQ("{\"bytes\":\"A+/A\"}", CloseStreamAndGetString()); } TEST_F(JsonObjectWriterTest, TestWebsafeByteEncoding) { @@ -309,8 +304,7 @@ TEST_F(JsonObjectWriterTest, TestWebsafeByteEncoding) { ->EndObject(); // Test that we get websafe base64 encoding when explicitly asked. - EXPECT_EQ("{\"bytes\":\"A-_AEA==\"}", - output_.substr(0, out_stream_->ByteCount())); + EXPECT_EQ("{\"bytes\":\"A-_AEA==\"}", CloseStreamAndGetString()); } } // namespace converter diff --git a/third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc b/third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc index b7a8c787..b94e3c2e 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc @@ -33,17 +33,17 @@ #include #include #include +#include #include #include +#include #include #include #include #include - #include #include -#include namespace google { @@ -66,10 +66,10 @@ static const int kUnicodeEscapedLength = 6; static const int kDefaultMaxRecursionDepth = 100; -// Length of the true, false, and null literals. -static const int true_len = strlen("true"); -static const int false_len = strlen("false"); -static const int null_len = strlen("null"); +// These cannot be constexpr for portability with VS2015. +static const StringPiece kKeywordTrue = "true"; +static const StringPiece kKeywordFalse = "false"; +static const StringPiece kKeywordNull = "null"; inline bool IsLetter(char c) { return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || (c == '_') || @@ -80,6 +80,32 @@ inline bool IsAlphanumeric(char c) { return IsLetter(c) || ('0' <= c && c <= '9'); } +// Indicates a character may not be part of an unquoted key. +inline bool IsKeySeparator(char c) { + return (ascii_isspace(c) || c == '"' || c == '\'' || c == '{' || c == '}' || + c == '[' || c == ']' || c == ':' || c == ','); +} + +inline void ReplaceInvalidCodePoints(StringPiece str, + const std::string& replacement, + std::string* dst) { + while (!str.empty()) { + int n_valid_bytes = internal::UTF8SpnStructurallyValid(str); + StringPiece valid_part = str.substr(0, n_valid_bytes); + StrAppend(dst, valid_part); + + if (n_valid_bytes == str.size()) { + break; + } + + // Append replacement value. + StrAppend(dst, replacement); + + // Move past valid bytes + one invalid byte. + str.remove_prefix(n_valid_bytes + 1); + } +} + static bool ConsumeKey(StringPiece* input, StringPiece* key) { if (input->empty() || !IsLetter((*input)[0])) return false; int len = 1; @@ -93,6 +119,21 @@ static bool ConsumeKey(StringPiece* input, StringPiece* key) { return true; } +// Same as 'ConsumeKey', but allows a widened set of key characters. +static bool ConsumeKeyPermissive(StringPiece* input, + StringPiece* key) { + if (input->empty() || !IsLetter((*input)[0])) return false; + int len = 1; + for (; len < input->size(); ++len) { + if (IsKeySeparator((*input)[len])) { + break; + } + } + *key = StringPiece(input->data(), len); + *input = StringPiece(input->data() + len, input->size() - len); + return true; +} + static bool MatchKey(StringPiece input) { return !input.empty() && IsLetter(input[0]); } @@ -111,7 +152,9 @@ JsonStreamParser::JsonStreamParser(ObjectWriter* ow) string_open_(0), chunk_storage_(), coerce_to_utf8_(false), + utf8_replacement_character_(" "), allow_empty_null_(false), + allow_permissive_key_naming_(false), loose_float_number_conversion_(false), recursion_depth_(0), max_recursion_depth_(kDefaultMaxRecursionDepth) { @@ -158,15 +201,20 @@ util::Status JsonStreamParser::FinishParse() { return util::Status(); } - // Storage for UTF8-coerced string. - std::unique_ptr utf8; - if (coerce_to_utf8_) { - utf8.reset(new char[leftover_.size()]); - char* coerced = internal::UTF8CoerceToStructurallyValid(leftover_, utf8.get(), ' '); - p_ = json_ = StringPiece(coerced, leftover_.size()); + // Lifetime needs to last until RunParser returns, so keep this variable + // outside of the coerce_to_utf8 block. + std::unique_ptr scratch; + + bool is_valid_utf8 = internal::IsStructurallyValidUTF8(leftover_); + if (coerce_to_utf8_ && !is_valid_utf8) { + scratch.reset(new std::string); + scratch->reserve(leftover_.size() * utf8_replacement_character_.size()); + ReplaceInvalidCodePoints(leftover_, utf8_replacement_character_, + scratch.get()); + p_ = json_ = *scratch; } else { p_ = json_ = leftover_; - if (!internal::IsStructurallyValidUTF8(leftover_)) { + if (!is_valid_utf8) { return ReportFailure("Encountered non UTF-8 code points."); } } @@ -293,7 +341,7 @@ util::Status JsonStreamParser::ParseValue(TokenType type) { // This handles things like 'fals' being at the end of the string, we // don't know if the next char would be e, completing it, or something // else, making it invalid. - if (!finishing_ && p_.length() < false_len) { + if (!finishing_ && p_.length() < kKeywordFalse.length()) { return util::Status(util::error::CANCELLED, ""); } return ReportFailure("Unexpected token."); @@ -506,8 +554,7 @@ util::Status JsonStreamParser::ParseDoubleHelper(const std::string& number, if (!safe_strtod(number, &result->double_val)) { return ReportFailure("Unable to parse number."); } - if (!loose_float_number_conversion_ && - !MathLimits::IsFinite(result->double_val)) { + if (!loose_float_number_conversion_ && !std::isfinite(result->double_val)) { return ReportFailure("Number exceeds the range of double."); } result->type = NumberResult::DOUBLE; @@ -660,6 +707,13 @@ util::Status JsonStreamParser::ParseEntry(TokenType type) { } else if (type == BEGIN_KEY) { // Key is a bare key (back compat), create a StringPiece pointing to it. result = ParseKey(); + } else if (type == BEGIN_NULL || type == BEGIN_TRUE || type == BEGIN_FALSE) { + // Key may be a bare key that begins with a reserved word. + result = ParseKey(); + if (result.ok() && (key_ == kKeywordNull || key_ == kKeywordTrue || + key_ == kKeywordFalse)) { + result = ReportFailure("Expected an object key or }."); + } } else { // Unknown key type, report an error. result = ReportFailure("Expected an object key or }."); @@ -741,21 +795,21 @@ util::Status JsonStreamParser::ParseArrayMid(TokenType type) { util::Status JsonStreamParser::ParseTrue() { ow_->RenderBool(key_, true); key_ = StringPiece(); - p_.remove_prefix(true_len); + p_.remove_prefix(kKeywordTrue.length()); return util::Status(); } util::Status JsonStreamParser::ParseFalse() { ow_->RenderBool(key_, false); key_ = StringPiece(); - p_.remove_prefix(false_len); + p_.remove_prefix(kKeywordFalse.length()); return util::Status(); } util::Status JsonStreamParser::ParseNull() { ow_->RenderNull(key_); key_ = StringPiece(); - p_.remove_prefix(null_len); + p_.remove_prefix(kKeywordNull.length()); return util::Status(); } @@ -822,9 +876,17 @@ void JsonStreamParser::Advance() { util::Status JsonStreamParser::ParseKey() { StringPiece original = p_; - if (!ConsumeKey(&p_, &key_)) { - return ReportFailure("Invalid key or variable name."); + + if (allow_permissive_key_naming_) { + if (!ConsumeKeyPermissive(&p_, &key_)) { + return ReportFailure("Invalid key or variable name."); + } + } else { + if (!ConsumeKey(&p_, &key_)) { + return ReportFailure("Invalid key or variable name."); + } } + // If we consumed everything but expect more data, reset p_ and cancel since // we can't know if the key was complete or not. if (!finishing_ && p_.empty()) { @@ -848,17 +910,21 @@ JsonStreamParser::TokenType JsonStreamParser::GetNextTokenType() { // TODO(sven): Split this method based on context since different contexts // support different tokens. Would slightly speed up processing? const char* data = p_.data(); + StringPiece data_view = StringPiece(data, size); if (*data == '\"' || *data == '\'') return BEGIN_STRING; if (*data == '-' || ('0' <= *data && *data <= '9')) { return BEGIN_NUMBER; } - if (size >= true_len && !strncmp(data, "true", true_len)) { + if (size >= kKeywordTrue.length() && + HasPrefixString(data_view, kKeywordTrue)) { return BEGIN_TRUE; } - if (size >= false_len && !strncmp(data, "false", false_len)) { + if (size >= kKeywordFalse.length() && + HasPrefixString(data_view, kKeywordFalse)) { return BEGIN_FALSE; } - if (size >= null_len && !strncmp(data, "null", null_len)) { + if (size >= kKeywordNull.length() && + HasPrefixString(data_view, kKeywordNull)) { return BEGIN_NULL; } if (*data == '{') return BEGIN_OBJECT; diff --git a/third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.h b/third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.h index f0f8d023..c2993e55 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.h @@ -35,15 +35,11 @@ #include #include -#include +#include #include #include -namespace util { -class Status; -} // namespace util - namespace google { namespace protobuf { namespace util { @@ -273,10 +269,17 @@ class PROTOBUF_EXPORT JsonStreamParser { // Whether to allow non UTF-8 encoded input and replace invalid code points. bool coerce_to_utf8_; + // Replacement character for invalid UTF-8 code points. + std::string utf8_replacement_character_; + // Whether allows empty string represented null array value or object entry // value. bool allow_empty_null_; + // Whether unquoted object keys can contain embedded non-alphanumeric + // characters when this is unambiguous for parsing. + bool allow_permissive_key_naming_; + // Whether allows out-of-range floating point numbers or reject them. bool loose_float_number_conversion_; diff --git a/third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser_test.cc b/third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser_test.cc index 7916085d..6638ce88 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser_test.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser_test.cc @@ -32,12 +32,10 @@ #include #include -#include #include #include -#include #include - +#include #include @@ -90,9 +88,9 @@ class JsonStreamParserTest : public ::testing::Test { virtual ~JsonStreamParserTest() {} util::Status RunTest(StringPiece json, int split, - bool coerce_utf8 = false, bool allow_empty_null = false, - bool loose_float_number_conversion = false) { + std::function setup) { JsonStreamParser parser(&mock_); + setup(&parser); // Special case for split == length, test parsing one character at a time. if (split == json.length()) { @@ -124,21 +122,22 @@ class JsonStreamParserTest : public ::testing::Test { return result; } - void DoTest(StringPiece json, int split, bool coerce_utf8 = false, - bool allow_empty_null = false, - bool loose_float_number_conversion = false) { - util::Status result = RunTest(json, split, coerce_utf8, allow_empty_null, - loose_float_number_conversion); + void DoTest( + StringPiece json, int split, + std::function setup = [](JsonStreamParser* p) { + }) { + util::Status result = RunTest(json, split, setup); if (!result.ok()) { GOOGLE_LOG(WARNING) << result; } - EXPECT_OK(result); + EXPECT_TRUE(result.ok()); } - void DoErrorTest(StringPiece json, int split, - StringPiece error_prefix, bool coerce_utf8 = false, - bool allow_empty_null = false) { - util::Status result = RunTest(json, split, coerce_utf8, allow_empty_null); + void DoErrorTest( + StringPiece json, int split, StringPiece error_prefix, + std::function setup = [](JsonStreamParser* p) { + }) { + util::Status result = RunTest(json, split, setup); EXPECT_EQ(util::error::INVALID_ARGUMENT, result.code()); StringPiece error_message(result.error_message()); EXPECT_EQ(error_prefix, error_message.substr(0, error_prefix.size())); @@ -326,6 +325,33 @@ TEST_F(JsonStreamParserTest, ObjectKeyTypes) { } } +TEST_F(JsonStreamParserTest, UnquotedObjectKeyWithReservedPrefxes) { + StringPiece str = "{ nullkey: \"a\", truekey: \"b\", falsekey: \"c\"}"; + for (int i = 0; i <= str.length(); ++i) { + ow_.StartObject("") + ->RenderString("nullkey", "a") + ->RenderString("truekey", "b") + ->RenderString("falsekey", "c") + ->EndObject(); + DoTest(str, i); + } +} + +TEST_F(JsonStreamParserTest, UnquotedObjectKeyWithReservedKeyword) { + StringPiece str = "{ null: \"a\", true: \"b\", false: \"c\"}"; + for (int i = 0; i <= str.length(); ++i) { + DoErrorTest(str, i, "Expected an object key or }."); + } +} + +TEST_F(JsonStreamParserTest, UnquotedObjectKeyWithEmbeddedNonAlphanumeric) { + StringPiece str = "{ foo-bar-baz: \"a\"}"; + for (int i = 0; i <= str.length(); ++i) { + DoErrorTest(str, i, "Expected : between key:value pair."); + } +} + + // - array containing primitive values (true, false, null, num, string) TEST_F(JsonStreamParserTest, ArrayPrimitiveValues) { StringPiece str = "[true, false, null, 'one', \"two\"]"; diff --git a/third_party/protobuf/src/google/protobuf/util/internal/mock_error_listener.h b/third_party/protobuf/src/google/protobuf/util/internal/mock_error_listener.h index 53e58768..4f5b0a22 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/mock_error_listener.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/mock_error_listener.h @@ -46,14 +46,18 @@ class MockErrorListener : public ErrorListener { MockErrorListener() {} virtual ~MockErrorListener() {} - MOCK_METHOD3(InvalidName, - void(const LocationTrackerInterface& loc, - StringPiece unknown_name, StringPiece message)); - MOCK_METHOD3(InvalidValue, - void(const LocationTrackerInterface& loc, - StringPiece type_name, StringPiece value)); - MOCK_METHOD2(MissingField, void(const LocationTrackerInterface& loc, - StringPiece missing_name)); + MOCK_METHOD(void, InvalidName, + (const LocationTrackerInterface& loc, + StringPiece unknown_name, StringPiece message), + (override)); + MOCK_METHOD(void, InvalidValue, + (const LocationTrackerInterface& loc, StringPiece type_name, + StringPiece value), + (override)); + MOCK_METHOD(void, MissingField, + (const LocationTrackerInterface& loc, + StringPiece missing_name), + (override)); }; } // namespace converter diff --git a/third_party/protobuf/src/google/protobuf/util/internal/object_source.h b/third_party/protobuf/src/google/protobuf/util/internal/object_source.h index c8ee36fb..28b1aaec 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/object_source.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/object_source.h @@ -32,9 +32,10 @@ #define GOOGLE_PROTOBUF_UTIL_CONVERTER_OBJECT_SOURCE_H__ #include -#include +#include #include +// Must be included last. #include namespace google { diff --git a/third_party/protobuf/src/google/protobuf/util/internal/object_writer.cc b/third_party/protobuf/src/google/protobuf/util/internal/object_writer.cc index bb1b3e57..b7667b6b 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/object_writer.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/object_writer.cc @@ -42,35 +42,35 @@ void ObjectWriter::RenderDataPieceTo(const DataPiece& data, StringPiece name, ObjectWriter* ow) { switch (data.type()) { case DataPiece::TYPE_INT32: { - ow->RenderInt32(name, data.ToInt32().ValueOrDie()); + ow->RenderInt32(name, data.ToInt32().value()); break; } case DataPiece::TYPE_INT64: { - ow->RenderInt64(name, data.ToInt64().ValueOrDie()); + ow->RenderInt64(name, data.ToInt64().value()); break; } case DataPiece::TYPE_UINT32: { - ow->RenderUint32(name, data.ToUint32().ValueOrDie()); + ow->RenderUint32(name, data.ToUint32().value()); break; } case DataPiece::TYPE_UINT64: { - ow->RenderUint64(name, data.ToUint64().ValueOrDie()); + ow->RenderUint64(name, data.ToUint64().value()); break; } case DataPiece::TYPE_DOUBLE: { - ow->RenderDouble(name, data.ToDouble().ValueOrDie()); + ow->RenderDouble(name, data.ToDouble().value()); break; } case DataPiece::TYPE_FLOAT: { - ow->RenderFloat(name, data.ToFloat().ValueOrDie()); + ow->RenderFloat(name, data.ToFloat().value()); break; } case DataPiece::TYPE_BOOL: { - ow->RenderBool(name, data.ToBool().ValueOrDie()); + ow->RenderBool(name, data.ToBool().value()); break; } case DataPiece::TYPE_STRING: { - ow->RenderString(name, data.ToString().ValueOrDie()); + ow->RenderString(name, data.ToString().value()); break; } case DataPiece::TYPE_BYTES: { @@ -86,6 +86,7 @@ void ObjectWriter::RenderDataPieceTo(const DataPiece& data, } } + } // namespace converter } // namespace util } // namespace protobuf diff --git a/third_party/protobuf/src/google/protobuf/util/internal/object_writer.h b/third_party/protobuf/src/google/protobuf/util/internal/object_writer.h index a4b509da..29b05c16 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/object_writer.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/object_writer.h @@ -32,8 +32,9 @@ #define GOOGLE_PROTOBUF_UTIL_CONVERTER_OBJECT_WRITER_H__ #include -#include +#include +// Must be included last. #include namespace google { @@ -41,6 +42,7 @@ namespace protobuf { namespace util { namespace converter { + class DataPiece; // An ObjectWriter is an interface for writing a stream of events @@ -88,9 +90,9 @@ class PROTOBUF_EXPORT ObjectWriter { // Renders an 64-bit unsigned integer value. virtual ObjectWriter* RenderUint64(StringPiece name, uint64 value) = 0; + // Renders a double value. virtual ObjectWriter* RenderDouble(StringPiece name, double value) = 0; - // Renders a float value. virtual ObjectWriter* RenderFloat(StringPiece name, float value) = 0; @@ -109,6 +111,7 @@ class PROTOBUF_EXPORT ObjectWriter { static void RenderDataPieceTo(const DataPiece& data, StringPiece name, ObjectWriter* ow); + // Indicates whether this ObjectWriter has completed writing the root message, // usually this means writing of one complete object. Subclasses must override // this behavior appropriately. diff --git a/third_party/protobuf/src/google/protobuf/util/internal/proto_writer.cc b/third_party/protobuf/src/google/protobuf/util/internal/proto_writer.cc index 74fe0f44..ea95932f 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/proto_writer.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/proto_writer.cc @@ -34,13 +34,13 @@ #include #include -#include #include #include #include #include #include #include +#include #include #include @@ -124,7 +124,7 @@ inline Status WriteInt32(int field_number, const DataPiece& data, CodedOutputStream* stream) { StatusOr i32 = data.ToInt32(); if (i32.ok()) { - WireFormatLite::WriteInt32(field_number, i32.ValueOrDie(), stream); + WireFormatLite::WriteInt32(field_number, i32.value(), stream); } return i32.status(); } @@ -134,7 +134,7 @@ inline Status WriteSFixed32(int field_number, const DataPiece& data, CodedOutputStream* stream) { StatusOr i32 = data.ToInt32(); if (i32.ok()) { - WireFormatLite::WriteSFixed32(field_number, i32.ValueOrDie(), stream); + WireFormatLite::WriteSFixed32(field_number, i32.value(), stream); } return i32.status(); } @@ -144,7 +144,7 @@ inline Status WriteSInt32(int field_number, const DataPiece& data, CodedOutputStream* stream) { StatusOr i32 = data.ToInt32(); if (i32.ok()) { - WireFormatLite::WriteSInt32(field_number, i32.ValueOrDie(), stream); + WireFormatLite::WriteSInt32(field_number, i32.value(), stream); } return i32.status(); } @@ -154,7 +154,7 @@ inline Status WriteFixed32(int field_number, const DataPiece& data, CodedOutputStream* stream) { StatusOr u32 = data.ToUint32(); if (u32.ok()) { - WireFormatLite::WriteFixed32(field_number, u32.ValueOrDie(), stream); + WireFormatLite::WriteFixed32(field_number, u32.value(), stream); } return u32.status(); } @@ -164,7 +164,7 @@ inline Status WriteUInt32(int field_number, const DataPiece& data, CodedOutputStream* stream) { StatusOr u32 = data.ToUint32(); if (u32.ok()) { - WireFormatLite::WriteUInt32(field_number, u32.ValueOrDie(), stream); + WireFormatLite::WriteUInt32(field_number, u32.value(), stream); } return u32.status(); } @@ -174,7 +174,7 @@ inline Status WriteInt64(int field_number, const DataPiece& data, CodedOutputStream* stream) { StatusOr i64 = data.ToInt64(); if (i64.ok()) { - WireFormatLite::WriteInt64(field_number, i64.ValueOrDie(), stream); + WireFormatLite::WriteInt64(field_number, i64.value(), stream); } return i64.status(); } @@ -184,7 +184,7 @@ inline Status WriteSFixed64(int field_number, const DataPiece& data, CodedOutputStream* stream) { StatusOr i64 = data.ToInt64(); if (i64.ok()) { - WireFormatLite::WriteSFixed64(field_number, i64.ValueOrDie(), stream); + WireFormatLite::WriteSFixed64(field_number, i64.value(), stream); } return i64.status(); } @@ -194,7 +194,7 @@ inline Status WriteSInt64(int field_number, const DataPiece& data, CodedOutputStream* stream) { StatusOr i64 = data.ToInt64(); if (i64.ok()) { - WireFormatLite::WriteSInt64(field_number, i64.ValueOrDie(), stream); + WireFormatLite::WriteSInt64(field_number, i64.value(), stream); } return i64.status(); } @@ -204,7 +204,7 @@ inline Status WriteFixed64(int field_number, const DataPiece& data, CodedOutputStream* stream) { StatusOr u64 = data.ToUint64(); if (u64.ok()) { - WireFormatLite::WriteFixed64(field_number, u64.ValueOrDie(), stream); + WireFormatLite::WriteFixed64(field_number, u64.value(), stream); } return u64.status(); } @@ -214,7 +214,7 @@ inline Status WriteUInt64(int field_number, const DataPiece& data, CodedOutputStream* stream) { StatusOr u64 = data.ToUint64(); if (u64.ok()) { - WireFormatLite::WriteUInt64(field_number, u64.ValueOrDie(), stream); + WireFormatLite::WriteUInt64(field_number, u64.value(), stream); } return u64.status(); } @@ -224,7 +224,7 @@ inline Status WriteDouble(int field_number, const DataPiece& data, CodedOutputStream* stream) { StatusOr d = data.ToDouble(); if (d.ok()) { - WireFormatLite::WriteDouble(field_number, d.ValueOrDie(), stream); + WireFormatLite::WriteDouble(field_number, d.value(), stream); } return d.status(); } @@ -234,7 +234,7 @@ inline Status WriteFloat(int field_number, const DataPiece& data, CodedOutputStream* stream) { StatusOr f = data.ToFloat(); if (f.ok()) { - WireFormatLite::WriteFloat(field_number, f.ValueOrDie(), stream); + WireFormatLite::WriteFloat(field_number, f.value(), stream); } return f.status(); } @@ -244,7 +244,7 @@ inline Status WriteBool(int field_number, const DataPiece& data, CodedOutputStream* stream) { StatusOr b = data.ToBool(); if (b.ok()) { - WireFormatLite::WriteBool(field_number, b.ValueOrDie(), stream); + WireFormatLite::WriteBool(field_number, b.value(), stream); } return b.status(); } @@ -264,7 +264,7 @@ inline Status WriteString(int field_number, const DataPiece& data, CodedOutputStream* stream) { StatusOr s = data.ToString(); if (s.ok()) { - WireFormatLite::WriteString(field_number, s.ValueOrDie(), stream); + WireFormatLite::WriteString(field_number, s.value(), stream); } return s.status(); } @@ -275,8 +275,7 @@ std::set GetRequiredFields( std::set required; for (int i = 0; i < type.fields_size(); i++) { const google::protobuf::Field& field = type.fields(i); - if (field.cardinality() == - google::protobuf::Field_Cardinality_CARDINALITY_REQUIRED) { + if (field.cardinality() == google::protobuf::Field::CARDINALITY_REQUIRED) { required.insert(&field); } } @@ -313,8 +312,8 @@ ProtoWriter::ProtoElement::ProtoElement(ProtoWriter::ProtoElement* parent, typeinfo_(this->parent()->typeinfo_), proto3_(type.syntax() == google::protobuf::SYNTAX_PROTO3), type_(type), - size_index_(!is_list && field->kind() == - google::protobuf::Field_Kind_TYPE_MESSAGE + size_index_(!is_list && + field->kind() == google::protobuf::Field::TYPE_MESSAGE ? ow_->size_insert_.size() : -1), array_index_(is_list ? 0 : -1), @@ -329,7 +328,7 @@ ProtoWriter::ProtoElement::ProtoElement(ProtoWriter::ProtoElement* parent, this->parent()->RegisterField(field); } - if (field->kind() == google::protobuf::Field_Kind_TYPE_MESSAGE) { + if (field->kind() == google::protobuf::Field::TYPE_MESSAGE) { if (!proto3_) { required_fields_ = GetRequiredFields(type_); } @@ -381,8 +380,7 @@ ProtoWriter::ProtoElement* ProtoWriter::ProtoElement::pop() { void ProtoWriter::ProtoElement::RegisterField( const google::protobuf::Field* field) { if (!required_fields_.empty() && - field->cardinality() == - google::protobuf::Field_Cardinality_CARDINALITY_REQUIRED) { + field->cardinality() == google::protobuf::Field::CARDINALITY_REQUIRED) { required_fields_.erase(field); } } @@ -439,7 +437,7 @@ void ProtoWriter::ProtoElement::TakeOneofIndex(int32 index) { void ProtoWriter::InvalidName(StringPiece unknown_name, StringPiece message) { - listener_->InvalidName(location(), ToSnakeCase(unknown_name), message); + listener_->InvalidName(location(), unknown_name, message); } void ProtoWriter::InvalidValue(StringPiece type_name, @@ -451,7 +449,8 @@ void ProtoWriter::MissingField(StringPiece missing_name) { listener_->MissingField(location(), missing_name); } -ProtoWriter* ProtoWriter::StartObject(StringPiece name) { +ProtoWriter* ProtoWriter::StartObject( + StringPiece name) { // Starting the root message. Create the root ProtoElement and return. if (element_ == nullptr) { if (!name.empty()) { @@ -461,8 +460,8 @@ ProtoWriter* ProtoWriter::StartObject(StringPiece name) { return this; } - const google::protobuf::Field* field = nullptr; - field = BeginNamed(name, false); + const google::protobuf::Field* field = BeginNamed(name, false); + if (field == nullptr) return this; // Check to see if this field is a oneof and that no oneof in that group has @@ -483,6 +482,7 @@ ProtoWriter* ProtoWriter::StartObject(StringPiece name) { return StartObjectField(*field, *type); } + ProtoWriter* ProtoWriter::EndObject() { if (invalid_depth_ > 0) { --invalid_depth_; @@ -502,8 +502,11 @@ ProtoWriter* ProtoWriter::EndObject() { return this; } -ProtoWriter* ProtoWriter::StartList(StringPiece name) { +ProtoWriter* ProtoWriter::StartList( + StringPiece name) { + const google::protobuf::Field* field = BeginNamed(name, true); + if (field == nullptr) return this; if (!ValidOneof(*field, name)) { @@ -522,6 +525,7 @@ ProtoWriter* ProtoWriter::StartList(StringPiece name) { return StartListField(*field, *type); } + ProtoWriter* ProtoWriter::EndList() { if (invalid_depth_ > 0) { --invalid_depth_; @@ -531,12 +535,13 @@ ProtoWriter* ProtoWriter::EndList() { return this; } -ProtoWriter* ProtoWriter::RenderDataPiece(StringPiece name, - const DataPiece& data) { +ProtoWriter* ProtoWriter::RenderDataPiece( + StringPiece name, const DataPiece& data) { Status status; if (invalid_depth_ > 0) return this; const google::protobuf::Field* field = Lookup(name); + if (field == nullptr) return this; if (!ValidOneof(*field, name)) return this; @@ -570,8 +575,7 @@ bool ProtoWriter::ValidOneof(const google::protobuf::Field& field, } bool ProtoWriter::IsRepeated(const google::protobuf::Field& field) { - return field.cardinality() == - google::protobuf::Field_Cardinality_CARDINALITY_REPEATED; + return field.cardinality() == google::protobuf::Field::CARDINALITY_REPEATED; } ProtoWriter* ProtoWriter::StartObjectField(const google::protobuf::Field& field, @@ -598,7 +602,7 @@ Status ProtoWriter::WriteEnum(int field_number, const DataPiece& data, case_insensitive_enum_parsing, ignore_unknown_values, &is_unknown_enum_value); if (e.ok() && !is_unknown_enum_value) { - WireFormatLite::WriteEnum(field_number, e.ValueOrDie(), stream); + WireFormatLite::WriteEnum(field_number, e.value(), stream); } return e.status(); } @@ -617,8 +621,8 @@ ProtoWriter* ProtoWriter::RenderPrimitiveField( element_.reset(new ProtoElement(element_.release(), &field, type, false)); } - if (field.kind() == google::protobuf::Field_Kind_TYPE_UNKNOWN || - field.kind() == google::protobuf::Field_Kind_TYPE_MESSAGE) { + if (field.kind() == google::protobuf::Field::TYPE_UNKNOWN || + field.kind() == google::protobuf::Field::TYPE_MESSAGE) { // Push a ProtoElement for location reporting purposes. if (element_->proto3()) { element_.reset(new ProtoElement(element_.release(), &field, type, false)); @@ -632,67 +636,67 @@ ProtoWriter* ProtoWriter::RenderPrimitiveField( } switch (field.kind()) { - case google::protobuf::Field_Kind_TYPE_INT32: { + case google::protobuf::Field::TYPE_INT32: { status = WriteInt32(field.number(), data, stream_.get()); break; } - case google::protobuf::Field_Kind_TYPE_SFIXED32: { + case google::protobuf::Field::TYPE_SFIXED32: { status = WriteSFixed32(field.number(), data, stream_.get()); break; } - case google::protobuf::Field_Kind_TYPE_SINT32: { + case google::protobuf::Field::TYPE_SINT32: { status = WriteSInt32(field.number(), data, stream_.get()); break; } - case google::protobuf::Field_Kind_TYPE_FIXED32: { + case google::protobuf::Field::TYPE_FIXED32: { status = WriteFixed32(field.number(), data, stream_.get()); break; } - case google::protobuf::Field_Kind_TYPE_UINT32: { + case google::protobuf::Field::TYPE_UINT32: { status = WriteUInt32(field.number(), data, stream_.get()); break; } - case google::protobuf::Field_Kind_TYPE_INT64: { + case google::protobuf::Field::TYPE_INT64: { status = WriteInt64(field.number(), data, stream_.get()); break; } - case google::protobuf::Field_Kind_TYPE_SFIXED64: { + case google::protobuf::Field::TYPE_SFIXED64: { status = WriteSFixed64(field.number(), data, stream_.get()); break; } - case google::protobuf::Field_Kind_TYPE_SINT64: { + case google::protobuf::Field::TYPE_SINT64: { status = WriteSInt64(field.number(), data, stream_.get()); break; } - case google::protobuf::Field_Kind_TYPE_FIXED64: { + case google::protobuf::Field::TYPE_FIXED64: { status = WriteFixed64(field.number(), data, stream_.get()); break; } - case google::protobuf::Field_Kind_TYPE_UINT64: { + case google::protobuf::Field::TYPE_UINT64: { status = WriteUInt64(field.number(), data, stream_.get()); break; } - case google::protobuf::Field_Kind_TYPE_DOUBLE: { + case google::protobuf::Field::TYPE_DOUBLE: { status = WriteDouble(field.number(), data, stream_.get()); break; } - case google::protobuf::Field_Kind_TYPE_FLOAT: { + case google::protobuf::Field::TYPE_FLOAT: { status = WriteFloat(field.number(), data, stream_.get()); break; } - case google::protobuf::Field_Kind_TYPE_BOOL: { + case google::protobuf::Field::TYPE_BOOL: { status = WriteBool(field.number(), data, stream_.get()); break; } - case google::protobuf::Field_Kind_TYPE_BYTES: { + case google::protobuf::Field::TYPE_BYTES: { status = WriteBytes(field.number(), data, stream_.get()); break; } - case google::protobuf::Field_Kind_TYPE_STRING: { + case google::protobuf::Field::TYPE_STRING: { status = WriteString(field.number(), data, stream_.get()); break; } - case google::protobuf::Field_Kind_TYPE_ENUM: { + case google::protobuf::Field::TYPE_ENUM: { status = WriteEnum( field.number(), data, typeinfo_->GetEnumByTypeUrl(field.type_url()), stream_.get(), use_lower_camel_for_enums_, @@ -700,8 +704,8 @@ ProtoWriter* ProtoWriter::RenderPrimitiveField( break; } default: // TYPE_GROUP or TYPE_MESSAGE - status = Status(util::error::INVALID_ARGUMENT, - data.ToString().ValueOrDie()); + status = + Status(util::error::INVALID_ARGUMENT, data.ToString().value()); } if (!status.ok()) { @@ -767,8 +771,8 @@ const google::protobuf::Field* ProtoWriter::Lookup( const google::protobuf::Type* ProtoWriter::LookupType( const google::protobuf::Field* field) { - return ((field->kind() == google::protobuf::Field_Kind_TYPE_MESSAGE || - field->kind() == google::protobuf::Field_Kind_TYPE_GROUP) + return ((field->kind() == google::protobuf::Field::TYPE_MESSAGE || + field->kind() == google::protobuf::Field::TYPE_GROUP) ? typeinfo_->GetTypeByTypeUrl(field->type_url()) : &element_->type()); } diff --git a/third_party/protobuf/src/google/protobuf/util/internal/proto_writer.h b/third_party/protobuf/src/google/protobuf/util/internal/proto_writer.h index 51d17a39..7e79ce31 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/proto_writer.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/proto_writer.h @@ -49,6 +49,7 @@ #include #include +// Must be included last. #include namespace google { @@ -56,6 +57,7 @@ namespace protobuf { namespace util { namespace converter { + class ObjectLocationTracker; // An ObjectWriter that can write protobuf bytes directly from writer events. @@ -102,10 +104,12 @@ class PROTOBUF_EXPORT ProtoWriter : public StructuredObjectWriter { return RenderDataPiece(name, DataPiece(value, use_strict_base64_decoding())); } + ProtoWriter* RenderBytes(StringPiece name, StringPiece value) override { return RenderDataPiece( name, DataPiece(value, false, use_strict_base64_decoding())); } + ProtoWriter* RenderNull(StringPiece name) override { return RenderDataPiece(name, DataPiece::NullData()); } @@ -114,7 +118,8 @@ class PROTOBUF_EXPORT ProtoWriter : public StructuredObjectWriter { // Renders a DataPiece 'value' into a field whose wire type is determined // from the given field 'name'. virtual ProtoWriter* RenderDataPiece(StringPiece name, - const DataPiece& value); + const DataPiece& data); + // Returns the location tracker to use for tracking locations for errors. const LocationTrackerInterface& location() { @@ -296,10 +301,10 @@ class PROTOBUF_EXPORT ProtoWriter : public StructuredObjectWriter { ProtoWriter* StartListField(const google::protobuf::Field& field, const google::protobuf::Type& type); - // Renders a primitve field given the field and the enclosing type. + // Renders a primitive field given the field and the enclosing type. ProtoWriter* RenderPrimitiveField(const google::protobuf::Field& field, const google::protobuf::Type& type, - const DataPiece& value); + const DataPiece& data); private: // Writes an ENUM field, including tag, to the stream. diff --git a/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc b/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc index db66c0a0..71e2d2ea 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -49,8 +48,7 @@ #include #include #include - - +#include #include #include @@ -93,20 +91,20 @@ const std::string FormatNanos(uint32 nanos, bool with_trailing_zeros); StatusOr MapKeyDefaultValueAsString( const google::protobuf::Field& field) { switch (field.kind()) { - case google::protobuf::Field_Kind_TYPE_BOOL: + case google::protobuf::Field::TYPE_BOOL: return std::string("false"); - case google::protobuf::Field_Kind_TYPE_INT32: - case google::protobuf::Field_Kind_TYPE_INT64: - case google::protobuf::Field_Kind_TYPE_UINT32: - case google::protobuf::Field_Kind_TYPE_UINT64: - case google::protobuf::Field_Kind_TYPE_SINT32: - case google::protobuf::Field_Kind_TYPE_SINT64: - case google::protobuf::Field_Kind_TYPE_SFIXED32: - case google::protobuf::Field_Kind_TYPE_SFIXED64: - case google::protobuf::Field_Kind_TYPE_FIXED32: - case google::protobuf::Field_Kind_TYPE_FIXED64: + case google::protobuf::Field::TYPE_INT32: + case google::protobuf::Field::TYPE_INT64: + case google::protobuf::Field::TYPE_UINT32: + case google::protobuf::Field::TYPE_UINT64: + case google::protobuf::Field::TYPE_SINT32: + case google::protobuf::Field::TYPE_SINT64: + case google::protobuf::Field::TYPE_SFIXED32: + case google::protobuf::Field::TYPE_SFIXED64: + case google::protobuf::Field::TYPE_FIXED32: + case google::protobuf::Field::TYPE_FIXED64: return std::string("0"); - case google::protobuf::Field_Kind_TYPE_STRING: + case google::protobuf::Field::TYPE_STRING: return std::string(); default: return Status(util::error::INTERNAL, "Invalid map key type."); @@ -130,7 +128,8 @@ ProtoStreamObjectSource::ProtoStreamObjectSource( render_unknown_fields_(false), render_unknown_enum_values_(true), add_trailing_zeros_for_timestamp_and_duration_(false), - suppress_empty_object_(false) { + suppress_empty_object_(false), + use_legacy_json_map_format_(false) { GOOGLE_LOG_IF(DFATAL, stream == nullptr) << "Input stream is nullptr."; } @@ -149,7 +148,8 @@ ProtoStreamObjectSource::ProtoStreamObjectSource( render_unknown_fields_(false), render_unknown_enum_values_(true), add_trailing_zeros_for_timestamp_and_duration_(false), - suppress_empty_object_(false) { + suppress_empty_object_(false), + use_legacy_json_map_format_(false) { GOOGLE_LOG_IF(DFATAL, stream == nullptr) << "Input stream is nullptr."; } @@ -201,14 +201,14 @@ Status ProtoStreamObjectSource::WriteMessage(const google::protobuf::Type& type, uint32 tag = stream_->ReadTag(), last_tag = tag + 1; UnknownFieldSet unknown_fields; - if (tag == end_tag && suppress_empty_object_) { + if (!name.empty() && tag == end_tag && suppress_empty_object_) { return util::Status(); } if (include_start_and_end) { ow->StartObject(name); } - while (tag != end_tag) { + while (tag != end_tag && tag != 0) { if (tag != last_tag) { // Update field only if tag is changed. last_tag = tag; field = FindAndVerifyField(type, tag); @@ -229,8 +229,7 @@ Status ProtoStreamObjectSource::WriteMessage(const google::protobuf::Type& type, continue; } - if (field->cardinality() == - google::protobuf::Field_Cardinality_CARDINALITY_REPEATED) { + if (field->cardinality() == google::protobuf::Field::CARDINALITY_REPEATED) { if (IsMap(*field)) { ow->StartObject(field_name); ASSIGN_OR_RETURN(tag, RenderMap(field, field_name, tag, ow)); @@ -332,7 +331,6 @@ Status ProtoStreamObjectSource::RenderPacked( return util::Status(); } - Status ProtoStreamObjectSource::RenderTimestamp( const ProtoStreamObjectSource* os, const google::protobuf::Type& type, StringPiece field_name, ObjectWriter* ow) { @@ -539,6 +537,11 @@ Status ProtoStreamObjectSource::RenderStruct(const ProtoStreamObjectSource* os, ow->StartObject(field_name); while (tag != 0) { field = os->FindAndVerifyField(type, tag); + if (field == nullptr) { + WireFormat::SkipField(os->stream_, tag, nullptr); + tag = os->stream_->ReadTag(); + continue; + } // google.protobuf.Struct has only one field that is a map. Hence we use // RenderMap to render that field. if (os->IsMap(*field)) { @@ -649,7 +652,7 @@ Status ProtoStreamObjectSource::RenderAny(const ProtoStreamObjectSource* os, resolved_type.status().message()); } // nested_type cannot be null at this time. - const google::protobuf::Type* nested_type = resolved_type.ValueOrDie(); + const google::protobuf::Type* nested_type = resolved_type.value(); io::ArrayInputStream zero_copy_stream(value.data(), value.size()); io::CodedInputStream in_stream(&zero_copy_stream); @@ -747,7 +750,6 @@ void ProtoStreamObjectSource::InitRendererMap() { ::google::protobuf::internal::OnShutdown(&DeleteRendererMap); } - void ProtoStreamObjectSource::DeleteRendererMap() { delete ProtoStreamObjectSource::renderers_; renderers_ = NULL; @@ -767,7 +769,7 @@ Status ProtoStreamObjectSource::RenderField( // Short-circuit message types as it tends to call WriteMessage recursively // and ends up using a lot of stack space. Keep the stack usage of this // message small in order to preserve stack space and not crash. - if (field->kind() == google::protobuf::Field_Kind_TYPE_MESSAGE) { + if (field->kind() == google::protobuf::Field::TYPE_MESSAGE) { uint32 buffer32; stream_->ReadVarint32(&buffer32); // message length int old_limit = stream_->PushLimit(buffer32); @@ -812,72 +814,72 @@ Status ProtoStreamObjectSource::RenderNonMessageField( uint64 buffer64; std::string strbuffer; switch (field->kind()) { - case google::protobuf::Field_Kind_TYPE_BOOL: { + case google::protobuf::Field::TYPE_BOOL: { stream_->ReadVarint64(&buffer64); ow->RenderBool(field_name, buffer64 != 0); break; } - case google::protobuf::Field_Kind_TYPE_INT32: { + case google::protobuf::Field::TYPE_INT32: { stream_->ReadVarint32(&buffer32); ow->RenderInt32(field_name, bit_cast(buffer32)); break; } - case google::protobuf::Field_Kind_TYPE_INT64: { + case google::protobuf::Field::TYPE_INT64: { stream_->ReadVarint64(&buffer64); ow->RenderInt64(field_name, bit_cast(buffer64)); break; } - case google::protobuf::Field_Kind_TYPE_UINT32: { + case google::protobuf::Field::TYPE_UINT32: { stream_->ReadVarint32(&buffer32); ow->RenderUint32(field_name, bit_cast(buffer32)); break; } - case google::protobuf::Field_Kind_TYPE_UINT64: { + case google::protobuf::Field::TYPE_UINT64: { stream_->ReadVarint64(&buffer64); ow->RenderUint64(field_name, bit_cast(buffer64)); break; } - case google::protobuf::Field_Kind_TYPE_SINT32: { + case google::protobuf::Field::TYPE_SINT32: { stream_->ReadVarint32(&buffer32); ow->RenderInt32(field_name, WireFormatLite::ZigZagDecode32(buffer32)); break; } - case google::protobuf::Field_Kind_TYPE_SINT64: { + case google::protobuf::Field::TYPE_SINT64: { stream_->ReadVarint64(&buffer64); ow->RenderInt64(field_name, WireFormatLite::ZigZagDecode64(buffer64)); break; } - case google::protobuf::Field_Kind_TYPE_SFIXED32: { + case google::protobuf::Field::TYPE_SFIXED32: { stream_->ReadLittleEndian32(&buffer32); ow->RenderInt32(field_name, bit_cast(buffer32)); break; } - case google::protobuf::Field_Kind_TYPE_SFIXED64: { + case google::protobuf::Field::TYPE_SFIXED64: { stream_->ReadLittleEndian64(&buffer64); ow->RenderInt64(field_name, bit_cast(buffer64)); break; } - case google::protobuf::Field_Kind_TYPE_FIXED32: { + case google::protobuf::Field::TYPE_FIXED32: { stream_->ReadLittleEndian32(&buffer32); ow->RenderUint32(field_name, bit_cast(buffer32)); break; } - case google::protobuf::Field_Kind_TYPE_FIXED64: { + case google::protobuf::Field::TYPE_FIXED64: { stream_->ReadLittleEndian64(&buffer64); ow->RenderUint64(field_name, bit_cast(buffer64)); break; } - case google::protobuf::Field_Kind_TYPE_FLOAT: { + case google::protobuf::Field::TYPE_FLOAT: { stream_->ReadLittleEndian32(&buffer32); ow->RenderFloat(field_name, bit_cast(buffer32)); break; } - case google::protobuf::Field_Kind_TYPE_DOUBLE: { + case google::protobuf::Field::TYPE_DOUBLE: { stream_->ReadLittleEndian64(&buffer64); ow->RenderDouble(field_name, bit_cast(buffer64)); break; } - case google::protobuf::Field_Kind_TYPE_ENUM: { + case google::protobuf::Field::TYPE_ENUM: { stream_->ReadVarint32(&buffer32); // If the field represents an explicit NULL value, render null. @@ -913,13 +915,13 @@ Status ProtoStreamObjectSource::RenderNonMessageField( } break; } - case google::protobuf::Field_Kind_TYPE_STRING: { + case google::protobuf::Field::TYPE_STRING: { stream_->ReadVarint32(&buffer32); // string size. stream_->ReadString(&strbuffer, buffer32); ow->RenderString(field_name, strbuffer); break; } - case google::protobuf::Field_Kind_TYPE_BYTES: { + case google::protobuf::Field::TYPE_BYTES: { stream_->ReadVarint32(&buffer32); // bytes size. stream_->ReadString(&strbuffer, buffer32); ow->RenderBytes(field_name, strbuffer); @@ -936,85 +938,85 @@ const std::string ProtoStreamObjectSource::ReadFieldValueAsString( const google::protobuf::Field& field) const { std::string result; switch (field.kind()) { - case google::protobuf::Field_Kind_TYPE_BOOL: { + case google::protobuf::Field::TYPE_BOOL: { uint64 buffer64; stream_->ReadVarint64(&buffer64); result = buffer64 != 0 ? "true" : "false"; break; } - case google::protobuf::Field_Kind_TYPE_INT32: { + case google::protobuf::Field::TYPE_INT32: { uint32 buffer32; stream_->ReadVarint32(&buffer32); result = StrCat(bit_cast(buffer32)); break; } - case google::protobuf::Field_Kind_TYPE_INT64: { + case google::protobuf::Field::TYPE_INT64: { uint64 buffer64; stream_->ReadVarint64(&buffer64); result = StrCat(bit_cast(buffer64)); break; } - case google::protobuf::Field_Kind_TYPE_UINT32: { + case google::protobuf::Field::TYPE_UINT32: { uint32 buffer32; stream_->ReadVarint32(&buffer32); result = StrCat(bit_cast(buffer32)); break; } - case google::protobuf::Field_Kind_TYPE_UINT64: { + case google::protobuf::Field::TYPE_UINT64: { uint64 buffer64; stream_->ReadVarint64(&buffer64); result = StrCat(bit_cast(buffer64)); break; } - case google::protobuf::Field_Kind_TYPE_SINT32: { + case google::protobuf::Field::TYPE_SINT32: { uint32 buffer32; stream_->ReadVarint32(&buffer32); result = StrCat(WireFormatLite::ZigZagDecode32(buffer32)); break; } - case google::protobuf::Field_Kind_TYPE_SINT64: { + case google::protobuf::Field::TYPE_SINT64: { uint64 buffer64; stream_->ReadVarint64(&buffer64); result = StrCat(WireFormatLite::ZigZagDecode64(buffer64)); break; } - case google::protobuf::Field_Kind_TYPE_SFIXED32: { + case google::protobuf::Field::TYPE_SFIXED32: { uint32 buffer32; stream_->ReadLittleEndian32(&buffer32); result = StrCat(bit_cast(buffer32)); break; } - case google::protobuf::Field_Kind_TYPE_SFIXED64: { + case google::protobuf::Field::TYPE_SFIXED64: { uint64 buffer64; stream_->ReadLittleEndian64(&buffer64); result = StrCat(bit_cast(buffer64)); break; } - case google::protobuf::Field_Kind_TYPE_FIXED32: { + case google::protobuf::Field::TYPE_FIXED32: { uint32 buffer32; stream_->ReadLittleEndian32(&buffer32); result = StrCat(bit_cast(buffer32)); break; } - case google::protobuf::Field_Kind_TYPE_FIXED64: { + case google::protobuf::Field::TYPE_FIXED64: { uint64 buffer64; stream_->ReadLittleEndian64(&buffer64); result = StrCat(bit_cast(buffer64)); break; } - case google::protobuf::Field_Kind_TYPE_FLOAT: { + case google::protobuf::Field::TYPE_FLOAT: { uint32 buffer32; stream_->ReadLittleEndian32(&buffer32); result = SimpleFtoa(bit_cast(buffer32)); break; } - case google::protobuf::Field_Kind_TYPE_DOUBLE: { + case google::protobuf::Field::TYPE_DOUBLE: { uint64 buffer64; stream_->ReadLittleEndian64(&buffer64); result = SimpleDtoa(bit_cast(buffer64)); break; } - case google::protobuf::Field_Kind_TYPE_ENUM: { + case google::protobuf::Field::TYPE_ENUM: { uint32 buffer32; stream_->ReadVarint32(&buffer32); // Get the nested enum type for this field. @@ -1032,13 +1034,13 @@ const std::string ProtoStreamObjectSource::ReadFieldValueAsString( } break; } - case google::protobuf::Field_Kind_TYPE_STRING: { + case google::protobuf::Field::TYPE_STRING: { uint32 buffer32; stream_->ReadVarint32(&buffer32); // string size. stream_->ReadString(&result, buffer32); break; } - case google::protobuf::Field_Kind_TYPE_BYTES: { + case google::protobuf::Field::TYPE_BYTES: { uint32 buffer32; stream_->ReadVarint32(&buffer32); // bytes size. stream_->ReadString(&result, buffer32); @@ -1056,7 +1058,7 @@ bool ProtoStreamObjectSource::IsMap( const google::protobuf::Field& field) const { const google::protobuf::Type* field_type = typeinfo_->GetTypeByTypeUrl(field.type_url()); - return field.kind() == google::protobuf::Field_Kind_TYPE_MESSAGE && + return field.kind() == google::protobuf::Field::TYPE_MESSAGE && util::converter::IsMap(field, *field_type); } @@ -1115,8 +1117,7 @@ const google::protobuf::Field* FindFieldByNumber( // TODO(skarvaje): Replace FieldDescriptor by implementing IsTypePackable() // using tech Field. bool IsPackable(const google::protobuf::Field& field) { - return field.cardinality() == - google::protobuf::Field_Cardinality_CARDINALITY_REPEATED && + return field.cardinality() == google::protobuf::Field::CARDINALITY_REPEATED && FieldDescriptor::IsTypePackable( static_cast(field.kind())); } diff --git a/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.h b/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.h index af51a27e..c3125ff6 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.h @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include @@ -160,6 +160,9 @@ class PROTOBUF_EXPORT ProtoStreamObjectSource : public ObjectSource { const google::protobuf::Field& field) const; + // Returns the input stream. + io::CodedInputStream* stream() const { return stream_; } + private: ProtoStreamObjectSource(io::CodedInputStream* stream, const TypeInfo* typeinfo, @@ -185,7 +188,6 @@ class PROTOBUF_EXPORT ProtoStreamObjectSource : public ObjectSource { util::Status RenderPacked(const google::protobuf::Field* field, ObjectWriter* ow) const; - // Renders a google.protobuf.Timestamp value to ObjectWriter static util::Status RenderTimestamp(const ProtoStreamObjectSource* os, const google::protobuf::Type& type, @@ -282,7 +284,7 @@ class PROTOBUF_EXPORT ProtoStreamObjectSource : public ObjectSource { StringPiece field_name) const; // Input stream to read from. Ownership rests with the caller. - io::CodedInputStream* stream_; + mutable io::CodedInputStream* stream_; // Type information for all the types used in the descriptor. Used to find // google::protobuf::Type of nested messages/enums. @@ -325,6 +327,8 @@ class PROTOBUF_EXPORT ProtoStreamObjectSource : public ObjectSource { // the fields of the message are filtered out by field mask. bool suppress_empty_object_; + bool use_legacy_json_map_format_; + GOOGLE_DISALLOW_IMPLICIT_CONSTRUCTORS(ProtoStreamObjectSource); }; diff --git a/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource_test.cc b/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource_test.cc index dc2875ab..22fc3f62 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource_test.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource_test.cc @@ -47,7 +47,6 @@ #include #include #include -#include #include #include @@ -57,6 +56,7 @@ namespace protobuf { namespace util { namespace converter { +using ::google::protobuf::Any; using io::ArrayInputStream; using io::CodedInputStream; using proto_util_converter::testing::AnyM; @@ -1157,6 +1157,7 @@ TEST_P(ProtostreamObjectSourceTimestampTest, TimestampDurationDefaultValue) { } + } // namespace converter } // namespace util } // namespace protobuf diff --git a/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc b/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc index 7865f785..527d5e70 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc @@ -35,7 +35,6 @@ #include #include -#include #include #include #include @@ -43,8 +42,7 @@ #include #include #include - - +#include #include #include @@ -336,7 +334,7 @@ void ProtoStreamObjectWriter::AnyWriter::StartAny(const DataPiece& value) { invalid_ = true; return; } - type_url_ = s.ValueOrDie(); + type_url_ = s.value(); } // Resolve the type url, and report an error if we failed to resolve it. StatusOr resolved_type = @@ -347,7 +345,7 @@ void ProtoStreamObjectWriter::AnyWriter::StartAny(const DataPiece& value) { return; } // At this point, type is never null. - const google::protobuf::Type* type = resolved_type.ValueOrDie(); + const google::protobuf::Type* type = resolved_type.value(); well_known_type_render_ = FindTypeRenderer(type_url_); if (well_known_type_render_ != nullptr || @@ -482,6 +480,7 @@ bool ProtoStreamObjectWriter::Item::InsertMapKeyIfNotPresent( return InsertIfNotPresent(map_keys_.get(), std::string(map_key)); } + ProtoStreamObjectWriter* ProtoStreamObjectWriter::StartObject( StringPiece name) { if (invalid_depth() > 0) { @@ -585,6 +584,7 @@ ProtoStreamObjectWriter* ProtoStreamObjectWriter::StartObject( } const google::protobuf::Field* field = BeginNamed(name, false); + if (field == nullptr) return this; if (IsStruct(*field)) { @@ -610,6 +610,12 @@ ProtoStreamObjectWriter* ProtoStreamObjectWriter::StartObject( return this; } + // Legacy JSON map is a list of key value pairs. Starts a map entry object. + if (options_.use_legacy_json_map_format && name.empty()) { + Push(name, IsAny(*field) ? Item::ANY : Item::MESSAGE, false, false); + return this; + } + if (IsMap(*field)) { // Begin a map. A map is triggered by a StartObject() call if the current // field has a map type. @@ -644,6 +650,7 @@ ProtoStreamObjectWriter* ProtoStreamObjectWriter::EndObject() { return this; } + ProtoStreamObjectWriter* ProtoStreamObjectWriter::StartList( StringPiece name) { if (invalid_depth() > 0) { @@ -792,6 +799,7 @@ ProtoStreamObjectWriter* ProtoStreamObjectWriter::StartList( // name is not empty const google::protobuf::Field* field = Lookup(name); + if (field == nullptr) { IncrementInvalidDepth(); return this; @@ -845,6 +853,10 @@ ProtoStreamObjectWriter* ProtoStreamObjectWriter::StartList( } if (IsMap(*field)) { + if (options_.use_legacy_json_map_format) { + Push(name, Item::MESSAGE, false, true); + return this; + } InvalidValue("Map", StrCat("Cannot bind a list to map for field '", name, "'.")); IncrementInvalidDepth(); @@ -879,7 +891,32 @@ Status ProtoStreamObjectWriter::RenderStructValue(ProtoStreamObjectWriter* ow, const DataPiece& data) { std::string struct_field_name; switch (data.type()) { - // Our JSON parser parses numbers as either int64, uint64, or double. + case DataPiece::TYPE_INT32: { + if (ow->options_.struct_integers_as_strings) { + StatusOr int_value = data.ToInt32(); + if (int_value.ok()) { + ow->ProtoWriter::RenderDataPiece( + "string_value", + DataPiece(SimpleDtoa(int_value.value()), true)); + return Status(); + } + } + struct_field_name = "number_value"; + break; + } + case DataPiece::TYPE_UINT32: { + if (ow->options_.struct_integers_as_strings) { + StatusOr int_value = data.ToUint32(); + if (int_value.ok()) { + ow->ProtoWriter::RenderDataPiece( + "string_value", + DataPiece(SimpleDtoa(int_value.value()), true)); + return Status(); + } + } + struct_field_name = "number_value"; + break; + } case DataPiece::TYPE_INT64: { // If the option to treat integers as strings is set, then render them as // strings. Otherwise, fallback to rendering them as double. @@ -887,8 +924,7 @@ Status ProtoStreamObjectWriter::RenderStructValue(ProtoStreamObjectWriter* ow, StatusOr int_value = data.ToInt64(); if (int_value.ok()) { ow->ProtoWriter::RenderDataPiece( - "string_value", - DataPiece(StrCat(int_value.ValueOrDie()), true)); + "string_value", DataPiece(StrCat(int_value.value()), true)); return Status(); } } @@ -901,9 +937,21 @@ Status ProtoStreamObjectWriter::RenderStructValue(ProtoStreamObjectWriter* ow, if (ow->options_.struct_integers_as_strings) { StatusOr int_value = data.ToUint64(); if (int_value.ok()) { + ow->ProtoWriter::RenderDataPiece( + "string_value", DataPiece(StrCat(int_value.value()), true)); + return Status(); + } + } + struct_field_name = "number_value"; + break; + } + case DataPiece::TYPE_FLOAT: { + if (ow->options_.struct_integers_as_strings) { + StatusOr float_value = data.ToFloat(); + if (float_value.ok()) { ow->ProtoWriter::RenderDataPiece( "string_value", - DataPiece(StrCat(int_value.ValueOrDie()), true)); + DataPiece(SimpleDtoa(float_value.value()), true)); return Status(); } } @@ -916,7 +964,7 @@ Status ProtoStreamObjectWriter::RenderStructValue(ProtoStreamObjectWriter* ow, if (double_value.ok()) { ow->ProtoWriter::RenderDataPiece( "string_value", - DataPiece(SimpleDtoa(double_value.ValueOrDie()), true)); + DataPiece(SimpleDtoa(double_value.value()), true)); return Status(); } } @@ -1171,7 +1219,7 @@ ProtoStreamObjectWriter* ProtoStreamObjectWriter::RenderDataPiece( // Map of functions that are responsible for rendering well known type // represented by the key. std::unordered_map* - ProtoStreamObjectWriter::renderers_ = NULL; + ProtoStreamObjectWriter::renderers_ = nullptr; PROTOBUF_NAMESPACE_ID::internal::once_flag writer_renderers_init_; void ProtoStreamObjectWriter::InitRendererMap() { @@ -1226,7 +1274,7 @@ void ProtoStreamObjectWriter::InitRendererMap() { void ProtoStreamObjectWriter::DeleteRendererMap() { delete ProtoStreamObjectWriter::renderers_; - renderers_ = NULL; + renderers_ = nullptr; } ProtoStreamObjectWriter::TypeRenderer* @@ -1250,9 +1298,9 @@ bool ProtoStreamObjectWriter::ValidMapKey(StringPiece unnormalized_name) { return true; } -void ProtoStreamObjectWriter::Push(StringPiece name, - Item::ItemType item_type, - bool is_placeholder, bool is_list) { +void ProtoStreamObjectWriter::Push( + StringPiece name, Item::ItemType item_type, bool is_placeholder, + bool is_list) { is_list ? ProtoWriter::StartList(name) : ProtoWriter::StartObject(name); // invalid_depth == 0 means it is a successful StartObject or StartList. @@ -1279,9 +1327,8 @@ void ProtoStreamObjectWriter::PopOneElement() { bool ProtoStreamObjectWriter::IsMap(const google::protobuf::Field& field) { if (field.type_url().empty() || - field.kind() != google::protobuf::Field_Kind_TYPE_MESSAGE || - field.cardinality() != - google::protobuf::Field_Cardinality_CARDINALITY_REPEATED) { + field.kind() != google::protobuf::Field::TYPE_MESSAGE || + field.cardinality() != google::protobuf::Field::CARDINALITY_REPEATED) { return false; } const google::protobuf::Type* field_type = diff --git a/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.h b/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.h index acbf5cc2..f3aeb61f 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.h @@ -97,13 +97,17 @@ class PROTOBUF_EXPORT ProtoStreamObjectWriter : public ProtoWriter { // value type is google.protobuf.NullType. bool ignore_null_value_map_entry; + // If true, accepts repeated key/value pair for a map proto field. + bool use_legacy_json_map_format; + Options() : struct_integers_as_strings(false), ignore_unknown_fields(false), ignore_unknown_enum_values(false), use_lower_camel_for_enums(false), case_insensitive_enum_parsing(false), - ignore_null_value_map_entry(false) {} + ignore_null_value_map_entry(false), + use_legacy_json_map_format(false) {} // Default instance of Options with all options set to defaults. static const Options& Defaults() { @@ -112,7 +116,7 @@ class PROTOBUF_EXPORT ProtoStreamObjectWriter : public ProtoWriter { } }; -// Constructor. Does not take ownership of any parameter passed in. + // Constructor. Does not take ownership of any parameter passed in. ProtoStreamObjectWriter(TypeResolver* type_resolver, const google::protobuf::Type& type, strings::ByteSink* output, ErrorListener* listener, @@ -237,7 +241,7 @@ class PROTOBUF_EXPORT ProtoStreamObjectWriter : public ProtoWriter { int depth_; // True if the type is a well-known type. Well-known types in Any - // has a special formating: + // has a special formatting: // { // "@type": "type.googleapis.com/google.protobuf.XXX", // "value": , @@ -343,24 +347,24 @@ class PROTOBUF_EXPORT ProtoStreamObjectWriter : public ProtoWriter { // Renders google.protobuf.Value in struct.proto. It picks the right oneof // type based on value's type. static util::Status RenderStructValue(ProtoStreamObjectWriter* ow, - const DataPiece& value); + const DataPiece& data); // Renders google.protobuf.Timestamp value. static util::Status RenderTimestamp(ProtoStreamObjectWriter* ow, - const DataPiece& value); + const DataPiece& data); // Renders google.protobuf.FieldMask value. static util::Status RenderFieldMask(ProtoStreamObjectWriter* ow, - const DataPiece& value); + const DataPiece& data); // Renders google.protobuf.Duration value. static util::Status RenderDuration(ProtoStreamObjectWriter* ow, - const DataPiece& value); + const DataPiece& data); // Renders wrapper message types for primitive types in // google/protobuf/wrappers.proto. static util::Status RenderWrapperType(ProtoStreamObjectWriter* ow, - const DataPiece& value); + const DataPiece& data); static void InitRendererMap(); static void DeleteRendererMap(); @@ -378,11 +382,12 @@ class PROTOBUF_EXPORT ProtoStreamObjectWriter : public ProtoWriter { // on the underlying ObjectWriter depending on whether is_list is false or // not. // is_placeholder conveys whether the item is a placeholder item or not. - // Placeholder items are pushed when adding auxillary types' StartObject or + // Placeholder items are pushed when adding auxiliary types' StartObject or // StartList calls. void Push(StringPiece name, Item::ItemType item_type, bool is_placeholder, bool is_list); + // Pops items from the stack. All placeholder items are popped until a // non-placeholder item is found. void Pop(); diff --git a/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter_test.cc b/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter_test.cc index c4baaedb..b1d76a5a 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter_test.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter_test.cc @@ -34,6 +34,7 @@ #include #include +#include #include #include #include @@ -53,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -63,6 +65,7 @@ namespace protobuf { namespace util { namespace converter { + using proto_util_converter::testing::AnyM; using proto_util_converter::testing::AnyOut; using proto_util_converter::testing::Author; @@ -278,10 +281,11 @@ TEST_P(ProtoStreamObjectWriterTest, ConflictingJsonName) { CheckOutput(message2); } + TEST_P(ProtoStreamObjectWriterTest, IntEnumValuesAreAccepted) { Book book; book.set_title("Some Book"); - book.set_type(proto_util_converter::testing::Book_Type_KIDS); + book.set_type(proto_util_converter::testing::Book::KIDS); Author* robert = book.mutable_author(); robert->set_name("robert"); @@ -317,7 +321,7 @@ TEST_P(ProtoStreamObjectWriterTest, EnumValuesWithDifferentCaseIsRejected) { TEST_P(ProtoStreamObjectWriterTest, EnumValuesWithSameCaseIsAccepted) { Book book; book.set_title("Some Book"); - book.set_type(proto_util_converter::testing::Book_Type_ACTION_AND_ADVENTURE); + book.set_type(proto_util_converter::testing::Book::ACTION_AND_ADVENTURE); Author* robert = book.mutable_author(); robert->set_name("robert"); @@ -337,7 +341,7 @@ TEST_P(ProtoStreamObjectWriterTest, EnumValuesWithSameCaseIsAccepted) { TEST_P(ProtoStreamObjectWriterTest, EnumValuesWithDifferentCaseIsAccepted) { Book book; book.set_title("Some Book"); - book.set_type(proto_util_converter::testing::Book_Type_ACTION_AND_ADVENTURE); + book.set_type(proto_util_converter::testing::Book::ACTION_AND_ADVENTURE); Author* robert = book.mutable_author(); robert->set_name("robert"); @@ -357,7 +361,7 @@ TEST_P(ProtoStreamObjectWriterTest, EnumValuesWithDifferentCaseIsAccepted) { TEST_P(ProtoStreamObjectWriterTest, EnumValuesWithoutUnderscoreAreAccepted) { Book book; book.set_title("Some Book"); - book.set_type(proto_util_converter::testing::Book_Type_ACTION_AND_ADVENTURE); + book.set_type(proto_util_converter::testing::Book::ACTION_AND_ADVENTURE); Author* robert = book.mutable_author(); robert->set_name("robert"); @@ -377,7 +381,7 @@ TEST_P(ProtoStreamObjectWriterTest, EnumValuesWithoutUnderscoreAreAccepted) { TEST_P(ProtoStreamObjectWriterTest, EnumValuesInCamelCaseAreAccepted) { Book book; book.set_title("Some Book"); - book.set_type(proto_util_converter::testing::Book_Type_ACTION_AND_ADVENTURE); + book.set_type(proto_util_converter::testing::Book::ACTION_AND_ADVENTURE); Author* robert = book.mutable_author(); robert->set_name("robert"); @@ -398,7 +402,7 @@ TEST_P(ProtoStreamObjectWriterTest, EnumValuesInCamelCaseRemoveDashAndUnderscoreAreAccepted) { Book book; book.set_title("Some Book"); - book.set_type(proto_util_converter::testing::Book_Type_ACTION_AND_ADVENTURE); + book.set_type(proto_util_converter::testing::Book::ACTION_AND_ADVENTURE); Author* robert = book.mutable_author(); robert->set_name("robert"); @@ -420,7 +424,7 @@ TEST_P(ProtoStreamObjectWriterTest, EnumValuesInCamelCaseWithNameNotUppercaseAreAccepted) { Book book; book.set_title("Some Book"); - book.set_type(proto_util_converter::testing::Book_Type_arts_and_photography); + book.set_type(proto_util_converter::testing::Book::arts_and_photography); Author* robert = book.mutable_author(); robert->set_name("robert"); @@ -1719,6 +1723,45 @@ TEST_P(ProtoStreamObjectWriterStructTest, OptionStructIntAsStringsTest) { CheckOutput(struct_type); } +TEST_P(ProtoStreamObjectWriterStructTest, Struct32BitIntsAndFloatsTest) { + StructType struct_type; + google::protobuf::Struct* s = struct_type.mutable_object(); + s->mutable_fields()->operator[]("k1").set_number_value(1.5); + s->mutable_fields()->operator[]("k2").set_number_value(100); + s->mutable_fields()->operator[]("k3").set_number_value(100); + ResetProtoWriter(); + + ow_->StartObject("") + ->StartObject("object") + ->RenderFloat("k1", 1.5) + ->RenderInt32("k2", 100) + ->RenderUint32("k3", 100) + ->EndObject() + ->EndObject(); + CheckOutput(struct_type); +} + +TEST_P(ProtoStreamObjectWriterStructTest, + Struct32BitIntsAndFloatsAsStringsTest) { + StructType struct_type; + google::protobuf::Struct* s = struct_type.mutable_object(); + s->mutable_fields()->operator[]("k1").set_string_value("1.5"); + s->mutable_fields()->operator[]("k2").set_string_value("100"); + s->mutable_fields()->operator[]("k3").set_string_value("100"); + + options_.struct_integers_as_strings = true; + ResetProtoWriter(); + + ow_->StartObject("") + ->StartObject("object") + ->RenderFloat("k1", 1.5) + ->RenderInt32("k2", 100) + ->RenderUint32("k3", 100) + ->EndObject() + ->EndObject(); + CheckOutput(struct_type); +} + TEST_P(ProtoStreamObjectWriterStructTest, ValuePreservesNull) { ValueWrapper value; value.mutable_value()->set_null_value(google::protobuf::NULL_VALUE); @@ -2498,7 +2541,7 @@ TEST_P(ProtoStreamObjectWriterFieldMaskTest, SimpleFieldMaskTest) { CheckOutput(expected); } -TEST_P(ProtoStreamObjectWriterFieldMaskTest, MutipleMasksInCompactForm) { +TEST_P(ProtoStreamObjectWriterFieldMaskTest, MultipleMasksInCompactForm) { FieldMaskTest expected; expected.set_id("1"); expected.mutable_single_mask()->add_paths("camel_case1"); diff --git a/third_party/protobuf/src/google/protobuf/util/internal/testdata/books.proto b/third_party/protobuf/src/google/protobuf/util/internal/testdata/books.proto index 4f02ae14..328c5ce0 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/testdata/books.proto +++ b/third_party/protobuf/src/google/protobuf/util/internal/testdata/books.proto @@ -34,6 +34,7 @@ // Some of the older enums don't use CAPITALS_WITH_UNDERSCORES for testing. // LINT: LEGACY_NAMES +// LINT: ALLOW_GROUPS syntax = "proto2"; @@ -212,3 +213,39 @@ message TestJsonName1 { message TestJsonName2 { optional int32 another_value = 1 [json_name = "value"]; } + +message TestPrimitiveFieldsWithSameJsonName { + optional string val_str1 = 1; + optional string val_str_1 = 2; + + optional int32 val_int321 = 3; + optional int32 val_int32_1 = 4; + + optional uint32 val_uint321 = 5; + optional uint32 val_uint32_1 = 6; + + optional int64 val_int641 = 7; + optional int64 val_int64_1 = 8; + + optional uint64 val_uint641 = 9; + optional uint64 val_uint64_1 = 10; + + optional bool val_bool1 = 11; + optional bool val_bool_1 = 12; + + optional double val_double1 = 13; + optional double val_double_1 = 14; + + optional float val_float1 = 15; + optional float val_float_1 = 16; +} + +message TestRepeatedFieldsWithSameJsonName { + repeated string rep_str1 = 1; + repeated string rep_str_1 = 2; +} + +message TestMessageFieldsWithSameJsonName { + optional Primitive prim1 = 1; + optional Primitive prim_1 = 2; +} diff --git a/third_party/protobuf/src/google/protobuf/util/internal/type_info.cc b/third_party/protobuf/src/google/protobuf/util/internal/type_info.cc index d9a59ca0..e8b21038 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/type_info.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/type_info.cc @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -81,7 +81,7 @@ class TypeInfoForTypeResolver : public TypeInfo { const google::protobuf::Type* GetTypeByTypeUrl( StringPiece type_url) const override { StatusOrType result = ResolveTypeUrl(type_url); - return result.ok() ? result.ValueOrDie() : NULL; + return result.ok() ? result.value() : NULL; } const google::protobuf::Enum* GetEnumByTypeUrl( @@ -89,7 +89,7 @@ class TypeInfoForTypeResolver : public TypeInfo { std::map::iterator it = cached_enums_.find(type_url); if (it != cached_enums_.end()) { - return it->second.ok() ? it->second.ValueOrDie() : NULL; + return it->second.ok() ? it->second.value() : NULL; } // Stores the string value so it can be referenced using StringPiece in the // cached_enums_ map. @@ -102,7 +102,7 @@ class TypeInfoForTypeResolver : public TypeInfo { StatusOrEnum result = status.ok() ? StatusOrEnum(enum_type.release()) : StatusOrEnum(status); cached_enums_[string_type_url] = result; - return result.ok() ? result.ValueOrDie() : NULL; + return result.ok() ? result.value() : NULL; } const google::protobuf::Field* FindField( @@ -134,7 +134,7 @@ class TypeInfoForTypeResolver : public TypeInfo { cached_types->begin(); it != cached_types->end(); ++it) { if (it->second.ok()) { - delete it->second.ValueOrDie(); + delete it->second.value(); } } } diff --git a/third_party/protobuf/src/google/protobuf/util/internal/type_info.h b/third_party/protobuf/src/google/protobuf/util/internal/type_info.h index b933b77a..eb5c8576 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/type_info.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/type_info.h @@ -34,10 +34,11 @@ #include #include #include -#include +#include #include #include +// Must be included last. #include namespace google { diff --git a/third_party/protobuf/src/google/protobuf/util/internal/utility.cc b/third_party/protobuf/src/google/protobuf/util/internal/utility.cc index 98d5eff3..e3cdbcb1 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/utility.cc +++ b/third_party/protobuf/src/google/protobuf/util/internal/utility.cc @@ -31,6 +31,8 @@ #include #include +#include +#include #include #include @@ -41,9 +43,10 @@ #include #include #include -#include +// clang-format off #include +// clang-format on namespace google { namespace protobuf { @@ -52,7 +55,7 @@ namespace converter { bool GetBoolOptionOrDefault( const RepeatedPtrField& options, - const std::string& option_name, bool default_value) { + StringPiece option_name, bool default_value) { const google::protobuf::Option* opt = FindOptionOrNull(options, option_name); if (opt == nullptr) { return default_value; @@ -62,7 +65,7 @@ bool GetBoolOptionOrDefault( int64 GetInt64OptionOrDefault( const RepeatedPtrField& options, - const std::string& option_name, int64 default_value) { + StringPiece option_name, int64 default_value) { const google::protobuf::Option* opt = FindOptionOrNull(options, option_name); if (opt == nullptr) { return default_value; @@ -72,7 +75,7 @@ int64 GetInt64OptionOrDefault( double GetDoubleOptionOrDefault( const RepeatedPtrField& options, - const std::string& option_name, double default_value) { + StringPiece option_name, double default_value) { const google::protobuf::Option* opt = FindOptionOrNull(options, option_name); if (opt == nullptr) { return default_value; @@ -82,10 +85,10 @@ double GetDoubleOptionOrDefault( std::string GetStringOptionOrDefault( const RepeatedPtrField& options, - const std::string& option_name, const std::string& default_value) { + StringPiece option_name, StringPiece default_value) { const google::protobuf::Option* opt = FindOptionOrNull(options, option_name); if (opt == nullptr) { - return default_value; + return std::string(default_value); } return GetStringFromAny(opt->value()); } @@ -139,7 +142,7 @@ const std::string GetFullTypeWithUrl(StringPiece simple_type) { const google::protobuf::Option* FindOptionOrNull( const RepeatedPtrField& options, - const std::string& option_name) { + StringPiece option_name) { for (int i = 0; i < options.size(); ++i) { const google::protobuf::Option& opt = options.Get(i); if (opt.name() == option_name) { @@ -240,14 +243,14 @@ const google::protobuf::EnumValue* FindEnumValueByNameWithoutUnderscoreOrNull( return nullptr; } -std::string EnumValueNameToLowerCamelCase(const StringPiece input) { +std::string EnumValueNameToLowerCamelCase(StringPiece input) { std::string input_string(input); std::transform(input_string.begin(), input_string.end(), input_string.begin(), ::tolower); return ToCamelCase(input_string); } -std::string ToCamelCase(const StringPiece input) { +std::string ToCamelCase(StringPiece input) { bool capitalize_next = false; bool was_cap = true; bool is_cap = false; @@ -352,15 +355,14 @@ bool IsWellKnownType(const std::string& type_name) { return ContainsKey(*well_known_types_, type_name); } -bool IsValidBoolString(const std::string& bool_string) { +bool IsValidBoolString(StringPiece bool_string) { return bool_string == "true" || bool_string == "false" || bool_string == "1" || bool_string == "0"; } bool IsMap(const google::protobuf::Field& field, const google::protobuf::Type& type) { - return field.cardinality() == - google::protobuf::Field_Cardinality_CARDINALITY_REPEATED && + return field.cardinality() == google::protobuf::Field::CARDINALITY_REPEATED && (GetBoolOptionOrDefault(type.options(), "map_entry", false) || GetBoolOptionOrDefault(type.options(), "google.protobuf.MessageOptions.map_entry", @@ -376,15 +378,15 @@ bool IsMessageSetWireFormat(const google::protobuf::Type& type) { } std::string DoubleAsString(double value) { - if (MathLimits::IsPosInf(value)) return "Infinity"; - if (MathLimits::IsNegInf(value)) return "-Infinity"; - if (MathLimits::IsNaN(value)) return "NaN"; + if (value == std::numeric_limits::infinity()) return "Infinity"; + if (value == -std::numeric_limits::infinity()) return "-Infinity"; + if (std::isnan(value)) return "NaN"; return SimpleDtoa(value); } std::string FloatAsString(float value) { - if (MathLimits::IsFinite(value)) return SimpleFtoa(value); + if (std::isfinite(value)) return SimpleFtoa(value); return DoubleAsString(value); } @@ -394,9 +396,7 @@ bool SafeStrToFloat(StringPiece str, float* value) { return false; } - if (MathLimits::IsInf(double_value) || - MathLimits::IsNaN(double_value)) - return false; + if (std::isinf(double_value) || std::isnan(double_value)) return false; // Fail if the value is not representable in float. if (double_value > std::numeric_limits::max() || diff --git a/third_party/protobuf/src/google/protobuf/util/internal/utility.h b/third_party/protobuf/src/google/protobuf/util/internal/utility.h index c960d9e8..6ce9023d 100644 --- a/third_party/protobuf/src/google/protobuf/util/internal/utility.h +++ b/third_party/protobuf/src/google/protobuf/util/internal/utility.h @@ -41,11 +41,10 @@ #include #include #include -#include - #include #include +// Must be included last. #include namespace google { @@ -61,25 +60,25 @@ static const int64 kTypeUrlSize = 19; // When the option with the given name is not found, default_value is returned. PROTOBUF_EXPORT bool GetBoolOptionOrDefault( const RepeatedPtrField& options, - const std::string& option_name, bool default_value); + StringPiece option_name, bool default_value); // Returns int64 option value. If the option isn't found, returns the // default_value. PROTOBUF_EXPORT int64 GetInt64OptionOrDefault( const RepeatedPtrField& options, - const std::string& option_name, int64 default_value); + StringPiece option_name, int64 default_value); // Returns double option value. If the option isn't found, returns the // default_value. PROTOBUF_EXPORT double GetDoubleOptionOrDefault( const RepeatedPtrField& options, - const std::string& option_name, double default_value); + StringPiece option_name, double default_value); // Returns string option value. If the option isn't found, returns the // default_value. PROTOBUF_EXPORT std::string GetStringOptionOrDefault( const RepeatedPtrField& options, - const std::string& option_name, const std::string& default_value); + StringPiece option_name, StringPiece default_value); // Returns a boolean value contained in Any type. // TODO(skarvaje): Make these utilities dealing with Any types more generic, @@ -114,7 +113,7 @@ PROTOBUF_EXPORT const std::string GetFullTypeWithUrl( // provided map. Returns nullptr if none found. const google::protobuf::Option* FindOptionOrNull( const RepeatedPtrField& options, - const std::string& option_name); + StringPiece option_name); // Finds and returns the field identified by field_name in the passed tech Type // object. Returns nullptr if none found. @@ -161,7 +160,7 @@ PROTOBUF_EXPORT bool IsWellKnownType(const std::string& type_name); // Returns true if 'bool_string' represents a valid boolean value. Only "true", // "false", "0" and "1" are allowed. -PROTOBUF_EXPORT bool IsValidBoolString(const std::string& bool_string); +PROTOBUF_EXPORT bool IsValidBoolString(StringPiece bool_string); // Returns true if "field" is a protobuf map field based on its type. PROTOBUF_EXPORT bool IsMap(const google::protobuf::Field& field, diff --git a/third_party/protobuf/src/google/protobuf/util/json_format.proto b/third_party/protobuf/src/google/protobuf/util/json_format.proto index d7732672..7434fc3e 100644 --- a/third_party/protobuf/src/google/protobuf/util/json_format.proto +++ b/third_party/protobuf/src/google/protobuf/util/json_format.proto @@ -117,3 +117,14 @@ message TestStringSerializer { repeated string repeated_string = 2; map string_map = 3; } + +message TestMessageWithExtension { + extensions 100 to max; +} + +message TestExtension { + extend TestMessageWithExtension { + optional TestExtension ext = 100; + } + optional string value = 1; +} diff --git a/third_party/protobuf/src/google/protobuf/util/json_format_proto3.proto b/third_party/protobuf/src/google/protobuf/util/json_format_proto3.proto index 1e72794d..b62487a5 100644 --- a/third_party/protobuf/src/google/protobuf/util/json_format_proto3.proto +++ b/third_party/protobuf/src/google/protobuf/util/json_format_proto3.proto @@ -113,6 +113,10 @@ message TestNestedMap { map map_map = 7; } +message TestStringMap { + map string_map = 1; +} + message TestWrapper { google.protobuf.BoolValue bool_value = 1; google.protobuf.Int32Value int32_value = 2; diff --git a/third_party/protobuf/src/google/protobuf/util/json_util.cc b/third_party/protobuf/src/google/protobuf/util/json_util.cc index 52ce3310..2f3e6c6b 100644 --- a/third_party/protobuf/src/google/protobuf/util/json_util.cc +++ b/third_party/protobuf/src/google/protobuf/util/json_util.cc @@ -43,7 +43,6 @@ #include #include #include - #include #include diff --git a/third_party/protobuf/src/google/protobuf/util/json_util_test.cc b/third_party/protobuf/src/google/protobuf/util/json_util_test.cc index 7258b727..9851cc5d 100644 --- a/third_party/protobuf/src/google/protobuf/util/json_util_test.cc +++ b/third_party/protobuf/src/google/protobuf/util/json_util_test.cc @@ -241,7 +241,7 @@ TEST_F(JsonUtilTest, TestPrintEnumsAsIntsWithDefaultValue) { } TEST_F(JsonUtilTest, ParseMessage) { - // Some random message but good enough to verify that the parsing warpper + // Some random message but good enough to verify that the parsing wrapper // functions are working properly. std::string input = "{\n" @@ -499,7 +499,7 @@ class SegmentedZeroCopyOutputStream : public io::ZeroCopyOutputStream { last_segment_(static_cast(NULL), 0), byte_count_(0) {} - virtual bool Next(void** buffer, int* length) { + bool Next(void** buffer, int* length) override { if (segments_.empty()) { return false; } @@ -511,7 +511,7 @@ class SegmentedZeroCopyOutputStream : public io::ZeroCopyOutputStream { return true; } - virtual void BackUp(int length) { + void BackUp(int length) override { GOOGLE_CHECK(length <= last_segment_.second); segments_.push_front( Segment(last_segment_.first + last_segment_.second - length, length)); @@ -519,7 +519,7 @@ class SegmentedZeroCopyOutputStream : public io::ZeroCopyOutputStream { byte_count_ -= length; } - virtual int64 ByteCount() const { return byte_count_; } + int64_t ByteCount() const override { return byte_count_; } private: std::list segments_; diff --git a/third_party/protobuf/src/google/protobuf/util/message_differencer.cc b/third_party/protobuf/src/google/protobuf/util/message_differencer.cc index d2418911..f5e0860c 100644 --- a/third_party/protobuf/src/google/protobuf/util/message_differencer.cc +++ b/third_party/protobuf/src/google/protobuf/util/message_differencer.cc @@ -35,14 +35,13 @@ #include #include +#include #include #include -#include -#include #include +#include #include -#include #include #include #include @@ -52,7 +51,6 @@ #include #include - // Always include as last one, otherwise it can break compilation #include @@ -310,6 +308,11 @@ void MessageDifferencer::set_repeated_field_comparison( repeated_field_comparison_ = comparison; } +MessageDifferencer::RepeatedFieldComparison +MessageDifferencer::repeated_field_comparison() { + return repeated_field_comparison_; +} + void MessageDifferencer::CheckRepeatedFieldComparisons( const FieldDescriptor* field, const RepeatedFieldComparison& new_comparison) { @@ -455,7 +458,7 @@ void MessageDifferencer::ReportDifferencesToString(std::string* output) { void MessageDifferencer::ReportDifferencesTo(Reporter* reporter) { // If an output string is set, clear it to prevent - // it superceding the specified reporter. + // it superseding the specified reporter. if (output_string_) { output_string_ = NULL; } @@ -573,15 +576,15 @@ bool MessageDifferencer::Compare(const Message& message1, bool unknown_compare_result = true; // Ignore unknown fields in EQUIVALENT mode if (message_field_comparison_ != EQUIVALENT) { - const UnknownFieldSet* unknown_field_set1 = - &reflection1->GetUnknownFields(message1); - const UnknownFieldSet* unknown_field_set2 = - &reflection2->GetUnknownFields(message2); - if (!CompareUnknownFields(message1, message2, *unknown_field_set1, - *unknown_field_set2, parent_fields)) { + const UnknownFieldSet& unknown_field_set1 = + reflection1->GetUnknownFields(message1); + const UnknownFieldSet& unknown_field_set2 = + reflection2->GetUnknownFields(message2); + if (!CompareUnknownFields(message1, message2, unknown_field_set1, + unknown_field_set2, parent_fields)) { if (reporter_ == NULL) { return false; - }; + } unknown_compare_result = false; } } @@ -810,7 +813,7 @@ bool MessageDifferencer::CompareWithFieldsInternal( continue; } - // By this point, field1 and field2 are guarenteed to point to the same + // By this point, field1 and field2 are guaranteed to point to the same // field, so we can now compare the values. if (IsIgnored(message1, message2, field1, *parent_fields)) { // Ignore this field. Report and move on. @@ -862,7 +865,7 @@ bool MessageDifferencer::CompareWithFieldsInternal( parent_fields->pop_back(); } } - // Increment the field indicies. + // Increment the field indices. ++field_index1; ++field_index2; } @@ -940,12 +943,23 @@ bool MessageDifferencer::CompareRepeatedField( std::vector match_list1; std::vector match_list2; - // Try to match indices of the repeated fields. Return false if match fails - // and there's no detailed report needed. - if (!MatchRepeatedFieldIndices(message1, message2, repeated_field, - *parent_fields, &match_list1, &match_list2) && - reporter_ == NULL) { - return false; + const MapKeyComparator* key_comparator = GetMapKeyComparator(repeated_field); + bool smart_list = IsTreatedAsSmartList(repeated_field); + bool simple_list = key_comparator == nullptr && + !IsTreatedAsSet(repeated_field) && + !IsTreatedAsSmartSet(repeated_field) && !smart_list; + + // For simple lists, we avoid matching repeated field indices, saving the + // memory allocations that would otherwise be needed for match_list1 and + // match_list2. + if (!simple_list) { + // Try to match indices of the repeated fields. Return false if match fails. + if (!MatchRepeatedFieldIndices(message1, message2, repeated_field, + key_comparator, *parent_fields, &match_list1, + &match_list2) && + reporter_ == nullptr) { + return false; + } } bool fieldDifferent = false; @@ -956,8 +970,11 @@ bool MessageDifferencer::CompareRepeatedField( // to be done later). Now to check if the paired elements are different. int next_unmatched_index = 0; for (int i = 0; i < count1; i++) { - if (match_list1[i] == -1) { - if (IsTreatedAsSmartList(repeated_field)) { + if (simple_list && i >= count2) { + break; + } + if (!simple_list && match_list1[i] == -1) { + if (smart_list) { if (reporter_ == nullptr) return false; specific_field.index = i; parent_fields->push_back(specific_field); @@ -969,7 +986,7 @@ bool MessageDifferencer::CompareRepeatedField( } continue; } - if (IsTreatedAsSmartList(repeated_field)) { + if (smart_list) { for (int j = next_unmatched_index; j < match_list1[i]; ++j) { GOOGLE_CHECK_LE(0, j); if (reporter_ == nullptr) return false; @@ -984,8 +1001,12 @@ bool MessageDifferencer::CompareRepeatedField( } } specific_field.index = i; - specific_field.new_index = match_list1[i]; - next_unmatched_index = match_list1[i] + 1; + if (simple_list) { + specific_field.new_index = i; + } else { + specific_field.new_index = match_list1[i]; + next_unmatched_index = match_list1[i] + 1; + } const bool result = CompareFieldValueUsingParentFields( message1, message2, repeated_field, i, specific_field.new_index, @@ -1015,7 +1036,8 @@ bool MessageDifferencer::CompareRepeatedField( // Report any remaining additions or deletions. for (int i = 0; i < count2; ++i) { - if (match_list2[i] != -1) continue; + if (!simple_list && match_list2[i] != -1) continue; + if (simple_list && i < count1) continue; if (!treated_as_subset) { fieldDifferent = true; } @@ -1029,7 +1051,8 @@ bool MessageDifferencer::CompareRepeatedField( } for (int i = 0; i < count1; ++i) { - if (match_list1[i] != -1) continue; + if (!simple_list && match_list1[i] != -1) continue; + if (simple_list && i < count2) continue; assert(reporter_ != NULL); specific_field.index = i; parent_fields->push_back(specific_field); @@ -1220,7 +1243,7 @@ bool MessageDifferencer::UnpackAny(const Message& any, } data->reset(dynamic_message_factory_->GetPrototype(desc)->New()); std::string serialized_value = reflection->GetString(any, value_field); - if (!(*data)->ParseFromString(serialized_value)) { + if (!(*data)->ParsePartialFromString(serialized_value)) { GOOGLE_DLOG(ERROR) << "Failed to parse value for " << full_type_name; return false; } @@ -1391,7 +1414,7 @@ bool MessageDifferencer::CompareUnknownFields( if (change_type == ADDITION || change_type == DELETION || change_type == MODIFICATION) { if (reporter_ == NULL) { - // We found a difference and we have no reproter. + // We found a difference and we have no reporter. return false; } is_different = true; @@ -1443,7 +1466,7 @@ namespace { // Find maximum bipartite matching using the argumenting path algorithm. class MaximumMatcher { public: - typedef ResultCallback2 NodeMatchCallback; + typedef std::function NodeMatchCallback; // MaximumMatcher takes ownership of the passed in callback and uses it to // determine whether a node on the left side of the bipartial graph matches // a node on the right side. count1 is the number of nodes on the left side @@ -1454,7 +1477,7 @@ class MaximumMatcher { // matched to the j-th node on the right side and match_list2[x] == y means // the x-th node on the right side is matched to y-th node on the left side. // match_list1[i] == -1 means the node is not matched. Same with match_list2. - MaximumMatcher(int count1, int count2, NodeMatchCallback* callback, + MaximumMatcher(int count1, int count2, NodeMatchCallback callback, std::vector* match_list1, std::vector* match_list2); // Find a maximum match and return the number of matched node pairs. // If early_return is true, this method will return 0 immediately when it @@ -1472,7 +1495,7 @@ class MaximumMatcher { int count1_; int count2_; - std::unique_ptr match_callback_; + NodeMatchCallback match_callback_; std::map, bool> cached_match_results_; std::vector* match_list1_; std::vector* match_list2_; @@ -1480,11 +1503,14 @@ class MaximumMatcher { }; MaximumMatcher::MaximumMatcher(int count1, int count2, - NodeMatchCallback* callback, + NodeMatchCallback callback, std::vector* match_list1, std::vector* match_list2) - : count1_(count1), count2_(count2), match_callback_(callback), - match_list1_(match_list1), match_list2_(match_list2) { + : count1_(count1), + count2_(count2), + match_callback_(std::move(callback)), + match_list1_(match_list1), + match_list2_(match_list2) { match_list1_->assign(count1, -1); match_list2_->assign(count2, -1); } @@ -1516,14 +1542,14 @@ bool MaximumMatcher::Match(int left, int right) { if (it != cached_match_results_.end()) { return it->second; } - cached_match_results_[p] = match_callback_->Run(left, right); + cached_match_results_[p] = match_callback_(left, right); return cached_match_results_[p]; } bool MaximumMatcher::FindArgumentPathDFS(int v, std::vector* visited) { (*visited)[v] = true; // We try to match those un-matched nodes on the right side first. This is - // the step that the navie greedy matching algorithm uses. In the best cases + // the step that the naive greedy matching algorithm uses. In the best cases // where the greedy algorithm can find a maximum matching, we will always // find a match in this step and the performance will be identical to the // greedy algorithm. @@ -1535,7 +1561,7 @@ bool MaximumMatcher::FindArgumentPathDFS(int v, std::vector* visited) { } } // Then we try those already matched nodes and see if we can find an - // alternaive match for the node matched to them. + // alternative match for the node matched to them. // The greedy algorithm will stop before this and fail to produce the // correct result. for (int i = 0; i < count2_; ++i) { @@ -1553,21 +1579,19 @@ bool MaximumMatcher::FindArgumentPathDFS(int v, std::vector* visited) { } // namespace bool MessageDifferencer::MatchRepeatedFieldIndices( - const Message& message1, - const Message& message2, + const Message& message1, const Message& message2, const FieldDescriptor* repeated_field, + const MapKeyComparator* key_comparator, const std::vector& parent_fields, - std::vector* match_list1, - std::vector* match_list2) { + std::vector* match_list1, std::vector* match_list2) { const int count1 = message1.GetReflection()->FieldSize(message1, repeated_field); const int count2 = message2.GetReflection()->FieldSize(message2, repeated_field); - const MapKeyComparator* key_comparator = GetMapKeyComparator(repeated_field); + const bool is_treated_as_smart_set = IsTreatedAsSmartSet(repeated_field); match_list1->assign(count1, -1); match_list2->assign(count2, -1); - // Ensure that we don't report differences during the matching process. Since // field comparators could potentially use this message differencer object to // perform further comparisons, turn off reporting here and re-enable it @@ -1576,114 +1600,108 @@ bool MessageDifferencer::MatchRepeatedFieldIndices( reporter_ = NULL; NumDiffsReporter num_diffs_reporter; std::vector num_diffs_list1; - if (IsTreatedAsSmartSet(repeated_field)) { + if (is_treated_as_smart_set) { num_diffs_list1.assign(count1, kint32max); } bool success = true; // Find potential match if this is a special repeated field. - if (key_comparator != nullptr || IsTreatedAsSet(repeated_field) || - IsTreatedAsSmartSet(repeated_field) || - IsTreatedAsSmartList(repeated_field)) { - if (scope_ == PARTIAL) { - // When partial matching is enabled, Compare(a, b) && Compare(a, c) - // doesn't necessarily imply Compare(b, c). Therefore a naive greedy - // algorithm will fail to find a maximum matching. - // Here we use the augmenting path algorithm. - MaximumMatcher::NodeMatchCallback* callback = ::google::protobuf::NewPermanentCallback( - this, &MessageDifferencer::IsMatch, repeated_field, key_comparator, - &message1, &message2, parent_fields, nullptr); - MaximumMatcher matcher(count1, count2, callback, match_list1, - match_list2); - // If diff info is not needed, we should end the matching process as - // soon as possible if not all items can be matched. - bool early_return = (reporter == NULL); - int match_count = matcher.FindMaximumMatch(early_return); - if (match_count != count1 && reporter == NULL) return false; - success = success && (match_count == count1); - } else { - int start_offset = 0; - const bool is_treated_as_smart_set = IsTreatedAsSmartSet(repeated_field); - // If the two repeated fields are treated as sets, optimize for the case - // where both start with same items stored in the same order. - if (IsTreatedAsSet(repeated_field) || is_treated_as_smart_set || - IsTreatedAsSmartList(repeated_field)) { - start_offset = std::min(count1, count2); - for (int i = 0; i < count1 && i < count2; i++) { - if (IsMatch(repeated_field, key_comparator, &message1, &message2, - parent_fields, nullptr, i, i)) { - match_list1->at(i) = i; - match_list2->at(i) = i; - } else { - start_offset = i; - break; - } + if (scope_ == PARTIAL) { + // When partial matching is enabled, Compare(a, b) && Compare(a, c) + // doesn't necessarily imply Compare(b, c). Therefore a naive greedy + // algorithm will fail to find a maximum matching. + // Here we use the augmenting path algorithm. + auto callback = [&](int i1, int i2) { + return IsMatch(repeated_field, key_comparator, &message1, &message2, + parent_fields, nullptr, i1, i2); + }; + MaximumMatcher matcher(count1, count2, std::move(callback), match_list1, + match_list2); + // If diff info is not needed, we should end the matching process as + // soon as possible if not all items can be matched. + bool early_return = (reporter == nullptr); + int match_count = matcher.FindMaximumMatch(early_return); + if (match_count != count1 && early_return) return false; + success = success && (match_count == count1); + } else { + int start_offset = 0; + // If the two repeated fields are treated as sets, optimize for the case + // where both start with same items stored in the same order. + if (IsTreatedAsSet(repeated_field) || is_treated_as_smart_set || + IsTreatedAsSmartList(repeated_field)) { + start_offset = std::min(count1, count2); + for (int i = 0; i < count1 && i < count2; i++) { + if (IsMatch(repeated_field, key_comparator, &message1, &message2, + parent_fields, nullptr, i, i)) { + match_list1->at(i) = i; + match_list2->at(i) = i; + } else { + start_offset = i; + break; } } - for (int i = start_offset; i < count1; ++i) { - // Indicates any matched elements for this repeated field. - bool match = false; - int matched_j = -1; + } + for (int i = start_offset; i < count1; ++i) { + // Indicates any matched elements for this repeated field. + bool match = false; + int matched_j = -1; - for (int j = start_offset; j < count2; j++) { - if (match_list2->at(j) != -1) { - if (!is_treated_as_smart_set || num_diffs_list1[i] == 0) { - continue; - } + for (int j = start_offset; j < count2; j++) { + if (match_list2->at(j) != -1) { + if (!is_treated_as_smart_set || num_diffs_list1[i] == 0 || + num_diffs_list1[match_list2->at(j)] == 0) { + continue; } + } - if (is_treated_as_smart_set) { - num_diffs_reporter.Reset(); - match = - IsMatch(repeated_field, key_comparator, &message1, &message2, - parent_fields, &num_diffs_reporter, i, j); - } else { - match = IsMatch(repeated_field, key_comparator, &message1, - &message2, parent_fields, nullptr, i, j); - } + if (is_treated_as_smart_set) { + num_diffs_reporter.Reset(); + match = IsMatch(repeated_field, key_comparator, &message1, &message2, + parent_fields, &num_diffs_reporter, i, j); + } else { + match = IsMatch(repeated_field, key_comparator, &message1, &message2, + parent_fields, nullptr, i, j); + } - if (is_treated_as_smart_set) { - if (match) { - num_diffs_list1[i] = 0; - } else if (repeated_field->cpp_type() == - FieldDescriptor::CPPTYPE_MESSAGE) { - // Replace with the one with fewer diffs. - const int32 num_diffs = num_diffs_reporter.GetNumDiffs(); - if (num_diffs < num_diffs_list1[i]) { + if (is_treated_as_smart_set) { + if (match) { + num_diffs_list1[i] = 0; + } else if (repeated_field->cpp_type() == + FieldDescriptor::CPPTYPE_MESSAGE) { + // Replace with the one with fewer diffs. + const int32 num_diffs = num_diffs_reporter.GetNumDiffs(); + if (num_diffs < num_diffs_list1[i]) { + // If j has been already matched to some element, ensure the + // current num_diffs is smaller. + if (match_list2->at(j) == -1 || + num_diffs < num_diffs_list1[match_list2->at(j)]) { num_diffs_list1[i] = num_diffs; match = true; } } } - - if (match) { - matched_j = j; - if (!is_treated_as_smart_set || num_diffs_list1[i] == 0) { - break; - } - } } - match = (matched_j != -1); if (match) { - if (is_treated_as_smart_set && - match_list2->at(matched_j) != -1) { - // This is to revert the previously matched index in list2. - match_list1->at(match_list2->at(matched_j)) = -1; - match = false; + matched_j = j; + if (!is_treated_as_smart_set || num_diffs_list1[i] == 0) { + break; } - match_list1->at(i) = matched_j; - match_list2->at(matched_j) = i; } - if (!match && reporter == NULL) return false; - success = success && match; } - } - } else { - // If this field should be treated as list, just label the match_list. - for (int i = 0; i < count1 && i < count2; i++) { - match_list1->at(i) = i; - match_list2->at(i) = i; + + match = (matched_j != -1); + if (match) { + if (is_treated_as_smart_set && match_list2->at(matched_j) != -1) { + // This is to revert the previously matched index in list2. + match_list1->at(match_list2->at(matched_j)) = -1; + match = false; + } + match_list1->at(i) = matched_j; + match_list2->at(matched_j) = i; + } + if (!match && reporter == nullptr) return false; + success = success && match; } } diff --git a/third_party/protobuf/src/google/protobuf/util/message_differencer.h b/third_party/protobuf/src/google/protobuf/util/message_differencer.h index 2e8a32ce..f7317c80 100644 --- a/third_party/protobuf/src/google/protobuf/util/message_differencer.h +++ b/third_party/protobuf/src/google/protobuf/util/message_differencer.h @@ -112,11 +112,11 @@ typedef std::vector FieldDescriptorArray; // unpacks Any::value into a Message and compares its individual fields. // Messages encoded in a repeated Any cannot be compared using TreatAsMap. // -// // Note on thread-safety: MessageDifferencer is *not* thread-safe. You need to // guard it with a lock to use the same MessageDifferencer instance from // multiple threads. Note that it's fine to call static comparison methods -// (like MessageDifferencer::Equals) concurrently. +// (like MessageDifferencer::Equals) concurrently, but it's not recommended for +// performance critical code as it leads to extra allocations. class PROTOBUF_EXPORT MessageDifferencer { public: // Determines whether the supplied messages are equal. Equality is defined as @@ -225,6 +225,19 @@ class PROTOBUF_EXPORT MessageDifferencer { // FieldDescriptors. The first will be the field of the embedded message // 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. + // foo { + // bar { + // baz: 1 + // quux: 2 + // } + // } + // ReportModified will be invoked with following order: + // 1. foo.bar.baz or foo.bar.quux + // 2. foo.bar.quux or foo.bar.baz + // 2. foo.bar + // 3. foo class PROTOBUF_EXPORT Reporter { public: Reporter(); @@ -570,6 +583,9 @@ class PROTOBUF_EXPORT MessageDifferencer { // differencer when compare repeated fields in messages. void set_repeated_field_comparison(RepeatedFieldComparison comparison); + // Returns the current repeated field comparison used by this differencer. + RepeatedFieldComparison repeated_field_comparison(); + // Compares the two specified messages, returning true if they are the same, // false otherwise. If this method returns false, any changes between the // two messages will be reported if a Reporter was specified via @@ -824,12 +840,14 @@ class PROTOBUF_EXPORT MessageDifferencer { // match. Clears output vectors and sets their values to indices of paired // messages, ie. if message1[0] matches message2[1], then match_list1[0] == 1 // and match_list2[1] == 0. The unmatched indices are indicated by -1. + // Assumes the repeated field is not treated as a simple list. // This method returns false if the match failed. However, it doesn't mean // that the comparison succeeds when this method returns true (you need to // double-check in this case). bool MatchRepeatedFieldIndices( const Message& message1, const Message& message2, const FieldDescriptor* repeated_field, + const MapKeyComparator* key_comparator, const std::vector& parent_fields, std::vector* match_list1, std::vector* match_list2); diff --git a/third_party/protobuf/src/google/protobuf/util/message_differencer_unittest.cc b/third_party/protobuf/src/google/protobuf/util/message_differencer_unittest.cc index 702f99fb..637d4d3c 100644 --- a/third_party/protobuf/src/google/protobuf/util/message_differencer_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/util/message_differencer_unittest.cc @@ -659,32 +659,32 @@ TEST(MessageDifferencerTest, WithinDefaultFractionOrMarginDoubleTest) { // Compare EXPECT_FALSE(differencer.Compare(msg1, msg2)); - // Set up a custom field comparitor, with a default fraction and margin for + // Set up a custom field comparator, with a default fraction and margin for // float and double comparison. - util::DefaultFieldComparator field_comparitor; - field_comparitor.SetDefaultFractionAndMargin(0.0, 10.0); - differencer.set_field_comparator(&field_comparitor); + util::DefaultFieldComparator field_comparator; + field_comparator.SetDefaultFractionAndMargin(0.0, 10.0); + differencer.set_field_comparator(&field_comparator); // Set comparison to exact, margin and fraction value should not matter. - field_comparitor.set_float_comparison(util::DefaultFieldComparator::EXACT); + field_comparator.set_float_comparison(util::DefaultFieldComparator::EXACT); EXPECT_FALSE(differencer.Compare(msg1, msg2)); // Margin and fraction comparison is activated when float comparison is // set to approximate. - field_comparitor.set_float_comparison( + field_comparator.set_float_comparison( util::DefaultFieldComparator::APPROXIMATE); EXPECT_TRUE(differencer.Compare(msg1, msg2)); // Test out comparison with fraction. - field_comparitor.SetDefaultFractionAndMargin(0.2, 0.0); + field_comparator.SetDefaultFractionAndMargin(0.2, 0.0); EXPECT_TRUE(differencer.Compare(msg1, msg2)); // Should fail since the fraction is smaller than error. - field_comparitor.SetDefaultFractionAndMargin(0.01, 0.0); + field_comparator.SetDefaultFractionAndMargin(0.01, 0.0); EXPECT_FALSE(differencer.Compare(msg1, msg2)); // Should pass if either fraction or margin are satisfied. - field_comparitor.SetDefaultFractionAndMargin(0.01, 10.0); + field_comparator.SetDefaultFractionAndMargin(0.01, 10.0); EXPECT_TRUE(differencer.Compare(msg1, msg2)); // Make sure that the default margin and fraction affects all fields @@ -1158,6 +1158,65 @@ TEST(MessageDifferencerTest, RepeatedFieldSmartSetTest) { diff_report); } +TEST(MessageDifferencerTest, RepeatedFieldSmartSetTest_IdenticalElements) { + // Create the testing protos + protobuf_unittest::TestDiffMessage msg1; + protobuf_unittest::TestDiffMessage msg2; + protobuf_unittest::TestField elem; + + elem.set_a(1); + elem.set_b(1); + elem.set_c(1); + + *msg1.add_rm() = elem; + *msg1.add_rm() = elem; + *msg2.add_rm() = elem; + *msg2.add_rm() = elem; + + util::MessageDifferencer differencer; + differencer.set_repeated_field_comparison( + util::MessageDifferencer::AS_SMART_SET); + EXPECT_TRUE(differencer.Compare(msg1, msg2)); +} + +TEST(MessageDifferencerTest, RepeatedFieldSmartSetTest_PreviouslyMatch) { + // Create the testing protos + protobuf_unittest::TestDiffMessage msg1; + protobuf_unittest::TestDiffMessage msg2; + protobuf_unittest::TestField elem1_1, elem1_2; + protobuf_unittest::TestField elem2_1, elem2_2; + + elem1_1.set_a(1); + elem1_1.set_b(1); + elem1_1.set_c(1); + elem1_2.set_a(1); + elem1_2.set_b(1); + elem1_2.set_c(0); + + elem2_1.set_a(1); + elem2_1.set_b(1); + elem2_1.set_c(1); + elem2_2.set_a(1); + elem2_2.set_b(0); + elem2_2.set_c(1); + + *msg1.add_rm() = elem1_1; + *msg1.add_rm() = elem2_1; + *msg2.add_rm() = elem1_2; + *msg2.add_rm() = elem2_2; + + string diff_report; + util::MessageDifferencer differencer; + differencer.ReportDifferencesToString(&diff_report); + differencer.set_repeated_field_comparison( + util::MessageDifferencer::AS_SMART_SET); + EXPECT_FALSE(differencer.Compare(msg1, msg2)); + EXPECT_EQ( + "modified: rm[0].c: 1 -> 0\n" + "modified: rm[1].b: 1 -> 0\n", + diff_report); +} + TEST(MessageDifferencerTest, RepeatedFieldSmartSet_MultipleMatches) { // Create the testing protos protobuf_unittest::TestDiffMessage msg1; @@ -3385,6 +3444,7 @@ TEST_F(MatchingTest, ReportMatchedForMovedFields) { RunWithResult(&differencer, msg1, msg2, true)); } + TEST_F(MatchingTest, MatchesAppearInPostTraversalOrderForMovedFields) { protobuf_unittest::TestDiffMessage msg1, msg2; protobuf_unittest::TestDiffMessage::Item* item; diff --git a/third_party/protobuf/src/google/protobuf/util/message_differencer_unittest.proto b/third_party/protobuf/src/google/protobuf/util/message_differencer_unittest.proto index fafd19cd..cbc36fa8 100644 --- a/third_party/protobuf/src/google/protobuf/util/message_differencer_unittest.proto +++ b/third_party/protobuf/src/google/protobuf/util/message_differencer_unittest.proto @@ -38,6 +38,8 @@ syntax = "proto2"; package protobuf_unittest; +import "google/protobuf/any.proto"; + option optimize_for = SPEED; message TestField { @@ -69,6 +71,8 @@ message TestDiffMessage { repeated int32 rv = 11; // Test for combinations repeated string rw = 10; // Test for combinations repeated TestField rm = 12 [deprecated = true]; // Test for combinations + repeated google.protobuf.Any rany = + 16; // Test for repeated Any type resolution extensions 100 to 199; } diff --git a/third_party/protobuf/src/google/protobuf/util/time_util.cc b/third_party/protobuf/src/google/protobuf/util/time_util.cc index 68a3e675..4b80e7ca 100644 --- a/third_party/protobuf/src/google/protobuf/util/time_util.cc +++ b/third_party/protobuf/src/google/protobuf/util/time_util.cc @@ -30,15 +30,14 @@ #include -#include #include #include -#include #include #include +#include +#include - - +// Must go after other includes. #include namespace google { diff --git a/third_party/protobuf/src/google/protobuf/util/time_util.h b/third_party/protobuf/src/google/protobuf/util/time_util.h index 756e23b3..95063fc4 100644 --- a/third_party/protobuf/src/google/protobuf/util/time_util.h +++ b/third_party/protobuf/src/google/protobuf/util/time_util.h @@ -37,7 +37,14 @@ #include #include #ifdef _MSC_VER +#ifdef _XBOX_ONE +struct timeval { + int64 tv_sec; /* seconds */ + int64 tv_usec; /* and microseconds */ +}; +#else #include +#endif // _XBOX_ONE #else #include #endif @@ -250,7 +257,7 @@ inline std::ostream& operator<<(std::ostream& out, const Duration& d) { // Overloaded operators for Timestamp // -// Assignement operators. +// Assignment operators. PROTOBUF_EXPORT Timestamp& operator+=(Timestamp& t, const Duration& d); // NOLINT PROTOBUF_EXPORT Timestamp& operator-=(Timestamp& t, diff --git a/third_party/protobuf/src/google/protobuf/util/time_util_test.cc b/third_party/protobuf/src/google/protobuf/util/time_util_test.cc index 9d6c564f..b6d38132 100644 --- a/third_party/protobuf/src/google/protobuf/util/time_util_test.cc +++ b/third_party/protobuf/src/google/protobuf/util/time_util_test.cc @@ -83,7 +83,7 @@ TEST(TimeUtilTest, TimestampStringFormat) { EXPECT_TRUE(TimeUtil::FromString("1970-01-01T00:00:00.0000001Z", &time)); EXPECT_EQ(100, TimeUtil::TimestampToNanoseconds(time)); - // Also accpets offsets. + // Also accepts offsets. EXPECT_TRUE(TimeUtil::FromString("1970-01-01T00:00:00-08:00", &time)); EXPECT_EQ(8 * 3600, TimeUtil::TimestampToSeconds(time)); } @@ -119,10 +119,10 @@ TEST(TimeUtilTest, DurationStringFormat) { // Duration must support range from -315,576,000,000s to +315576000000s // which includes negative values. EXPECT_TRUE(TimeUtil::FromString("315576000000.999999999s", &d)); - EXPECT_EQ(315576000000LL, d.seconds()); + EXPECT_EQ(int64{315576000000}, d.seconds()); EXPECT_EQ(999999999, d.nanos()); EXPECT_TRUE(TimeUtil::FromString("-315576000000.999999999s", &d)); - EXPECT_EQ(-315576000000LL, d.seconds()); + EXPECT_EQ(int64{-315576000000}, d.seconds()); EXPECT_EQ(-999999999, d.nanos()); } @@ -278,20 +278,22 @@ TEST(TimeUtilTest, DurationOperators) { // Multiplication should not overflow if the result fits into the supported // range of Duration (intermediate result may be larger than int64). EXPECT_EQ("315575999684.424s", - TimeUtil::ToString((one_second - one_nano) * 315576000000LL)); + TimeUtil::ToString((one_second - one_nano) * int64{315576000000})); EXPECT_EQ("-315575999684.424s", - TimeUtil::ToString((one_nano - one_second) * 315576000000LL)); - EXPECT_EQ("-315575999684.424s", - TimeUtil::ToString((one_second - one_nano) * (-315576000000LL))); + TimeUtil::ToString((one_nano - one_second) * int64{315576000000})); + EXPECT_EQ("-315575999684.424s", TimeUtil::ToString((one_second - one_nano) * + (int64{-315576000000}))); // Test / and % EXPECT_EQ("0.999999999s", TimeUtil::ToString(a / 2)); EXPECT_EQ("-0.999999999s", TimeUtil::ToString(b / 2)); - Duration large = TimeUtil::SecondsToDuration(315576000000LL) - one_nano; + Duration large = TimeUtil::SecondsToDuration(int64{315576000000}) - one_nano; // We have to handle division with values beyond 64 bits. - EXPECT_EQ("0.999999999s", TimeUtil::ToString(large / 315576000000LL)); - EXPECT_EQ("-0.999999999s", TimeUtil::ToString((-large) / 315576000000LL)); - EXPECT_EQ("-0.999999999s", TimeUtil::ToString(large / (-315576000000LL))); + EXPECT_EQ("0.999999999s", TimeUtil::ToString(large / int64{315576000000})); + EXPECT_EQ("-0.999999999s", + TimeUtil::ToString((-large) / int64{315576000000})); + EXPECT_EQ("-0.999999999s", + TimeUtil::ToString(large / (int64{-315576000000}))); Duration large2 = large + one_nano; EXPECT_EQ(large, large % large2); EXPECT_EQ(-large, (-large) % large2); diff --git a/third_party/protobuf/src/google/protobuf/util/type_resolver.h b/third_party/protobuf/src/google/protobuf/util/type_resolver.h index 732d390c..698441bc 100644 --- a/third_party/protobuf/src/google/protobuf/util/type_resolver.h +++ b/third_party/protobuf/src/google/protobuf/util/type_resolver.h @@ -46,7 +46,7 @@ namespace protobuf { class DescriptorPool; namespace util { -// Abstract interface for a type resovler. +// Abstract interface for a type resolver. // // Implementations of this interface must be thread-safe. class PROTOBUF_EXPORT TypeResolver { diff --git a/third_party/protobuf/src/google/protobuf/util/type_resolver_util.cc b/third_party/protobuf/src/google/protobuf/util/type_resolver_util.cc index b652f9fc..35736f10 100644 --- a/third_party/protobuf/src/google/protobuf/util/type_resolver_util.cc +++ b/third_party/protobuf/src/google/protobuf/util/type_resolver_util.cc @@ -37,7 +37,6 @@ #include #include #include - #include // clang-format off diff --git a/third_party/protobuf/src/google/protobuf/wire_format.cc b/third_party/protobuf/src/google/protobuf/wire_format.cc index fe0714b9..444510c5 100644 --- a/third_party/protobuf/src/google/protobuf/wire_format.cc +++ b/third_party/protobuf/src/google/protobuf/wire_format.cc @@ -32,16 +32,17 @@ // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. +#include + #include #include #include -#include - #include #include #include #include +#include #include #include #include @@ -49,6 +50,8 @@ #include #include #include +#include +#include #include @@ -188,53 +191,17 @@ bool WireFormat::ReadPackedEnumPreserveUnknowns(io::CodedInputStream* input, return true; } -void WireFormat::SerializeUnknownFields(const UnknownFieldSet& unknown_fields, - io::CodedOutputStream* output) { - for (int i = 0; i < unknown_fields.field_count(); i++) { - const UnknownField& field = unknown_fields.field(i); - switch (field.type()) { - case UnknownField::TYPE_VARINT: - output->WriteVarint32(WireFormatLite::MakeTag( - field.number(), WireFormatLite::WIRETYPE_VARINT)); - output->WriteVarint64(field.varint()); - break; - case UnknownField::TYPE_FIXED32: - output->WriteVarint32(WireFormatLite::MakeTag( - field.number(), WireFormatLite::WIRETYPE_FIXED32)); - output->WriteLittleEndian32(field.fixed32()); - break; - case UnknownField::TYPE_FIXED64: - output->WriteVarint32(WireFormatLite::MakeTag( - field.number(), WireFormatLite::WIRETYPE_FIXED64)); - output->WriteLittleEndian64(field.fixed64()); - break; - case UnknownField::TYPE_LENGTH_DELIMITED: - output->WriteVarint32(WireFormatLite::MakeTag( - field.number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED)); - output->WriteVarint32(field.length_delimited().size()); - output->WriteRawMaybeAliased(field.length_delimited().data(), - field.length_delimited().size()); - break; - case UnknownField::TYPE_GROUP: - output->WriteVarint32(WireFormatLite::MakeTag( - field.number(), WireFormatLite::WIRETYPE_START_GROUP)); - SerializeUnknownFields(field.group(), output); - output->WriteVarint32(WireFormatLite::MakeTag( - field.number(), WireFormatLite::WIRETYPE_END_GROUP)); - break; - } - } -} - -uint8* WireFormat::SerializeUnknownFieldsToArray( - const UnknownFieldSet& unknown_fields, uint8* target) { +uint8* WireFormat::InternalSerializeUnknownFieldsToArray( + const UnknownFieldSet& unknown_fields, uint8* target, + io::EpsCopyOutputStream* stream) { for (int i = 0; i < unknown_fields.field_count(); i++) { const UnknownField& field = unknown_fields.field(i); + target = stream->EnsureSpace(target); switch (field.type()) { case UnknownField::TYPE_VARINT: - target = WireFormatLite::WriteInt64ToArray(field.number(), - field.varint(), target); + target = WireFormatLite::WriteUInt64ToArray(field.number(), + field.varint(), target); break; case UnknownField::TYPE_FIXED32: target = WireFormatLite::WriteFixed32ToArray(field.number(), @@ -245,13 +212,15 @@ uint8* WireFormat::SerializeUnknownFieldsToArray( field.fixed64(), target); break; case UnknownField::TYPE_LENGTH_DELIMITED: - target = WireFormatLite::WriteBytesToArray( - field.number(), field.length_delimited(), target); + target = stream->WriteString(field.number(), field.length_delimited(), + target); break; case UnknownField::TYPE_GROUP: target = WireFormatLite::WriteTagToArray( field.number(), WireFormatLite::WIRETYPE_START_GROUP, target); - target = SerializeUnknownFieldsToArray(field.group(), target); + target = InternalSerializeUnknownFieldsToArray(field.group(), target, + stream); + target = stream->EnsureSpace(target); target = WireFormatLite::WriteTagToArray( field.number(), WireFormatLite::WIRETYPE_END_GROUP, target); break; @@ -260,38 +229,16 @@ uint8* WireFormat::SerializeUnknownFieldsToArray( return target; } -void WireFormat::SerializeUnknownMessageSetItems( - const UnknownFieldSet& unknown_fields, io::CodedOutputStream* output) { - for (int i = 0; i < unknown_fields.field_count(); i++) { - const UnknownField& field = unknown_fields.field(i); - // The only unknown fields that are allowed to exist in a MessageSet are - // messages, which are length-delimited. - if (field.type() == UnknownField::TYPE_LENGTH_DELIMITED) { - // Start group. - output->WriteVarint32(WireFormatLite::kMessageSetItemStartTag); - - // Write type ID. - output->WriteVarint32(WireFormatLite::kMessageSetTypeIdTag); - output->WriteVarint32(field.number()); - - // Write message. - output->WriteVarint32(WireFormatLite::kMessageSetMessageTag); - field.SerializeLengthDelimitedNoTag(output); - - // End group. - output->WriteVarint32(WireFormatLite::kMessageSetItemEndTag); - } - } -} - -uint8* WireFormat::SerializeUnknownMessageSetItemsToArray( - const UnknownFieldSet& unknown_fields, uint8* target) { +uint8* WireFormat::InternalSerializeUnknownMessageSetItemsToArray( + const UnknownFieldSet& unknown_fields, uint8* target, + io::EpsCopyOutputStream* stream) { for (int i = 0; i < unknown_fields.field_count(); i++) { const UnknownField& field = unknown_fields.field(i); // The only unknown fields that are allowed to exist in a MessageSet are // messages, which are length-delimited. if (field.type() == UnknownField::TYPE_LENGTH_DELIMITED) { + target = stream->EnsureSpace(target); // Start group. target = io::CodedOutputStream::WriteTagToArray( WireFormatLite::kMessageSetItemStartTag, target); @@ -305,8 +252,10 @@ uint8* WireFormat::SerializeUnknownMessageSetItemsToArray( // Write message. target = io::CodedOutputStream::WriteTagToArray( WireFormatLite::kMessageSetMessageTag, target); - target = field.SerializeLengthDelimitedNoTagToArray(target); + target = field.InternalSerializeLengthDelimitedNoTag(target, stream); + + target = stream->EnsureSpace(target); // End group. target = io::CodedOutputStream::WriteTagToArray( WireFormatLite::kMessageSetItemEndTag, target); @@ -706,13 +655,385 @@ bool WireFormat::ParseAndMergeMessageSetItem(io::CodedInputStream* input, input, MSReflective{message->GetReflection(), message}); } +struct WireFormat::MessageSetParser { + const char* _InternalParse(const char* ptr, internal::ParseContext* ctx) { + // Parse a MessageSetItem + auto metadata = reflection->MutableInternalMetadata(msg); + std::string payload; + uint32 type_id = 0; + while (!ctx->Done(&ptr)) { + // We use 64 bit tags in order to allow typeid's that span the whole + // range of 32 bit numbers. + uint32 tag = static_cast(*ptr++); + if (tag == WireFormatLite::kMessageSetTypeIdTag) { + uint64 tmp; + ptr = ParseBigVarint(ptr, &tmp); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + type_id = tmp; + if (!payload.empty()) { + const FieldDescriptor* field; + if (ctx->data().pool == nullptr) { + field = reflection->FindKnownExtensionByNumber(type_id); + } else { + field = + ctx->data().pool->FindExtensionByNumber(descriptor, type_id); + } + if (field == nullptr || field->message_type() == nullptr) { + WriteLengthDelimited( + type_id, payload, + metadata->mutable_unknown_fields()); + } else { + Message* value = + field->is_repeated() + ? reflection->AddMessage(msg, field, ctx->data().factory) + : reflection->MutableMessage(msg, field, + ctx->data().factory); + const char* p; + // We can't use regular parse from string as we have to track + // proper recursion depth and descriptor pools. + ParseContext tmp_ctx(ctx->depth(), false, &p, payload); + tmp_ctx.data().pool = ctx->data().pool; + tmp_ctx.data().factory = ctx->data().factory; + GOOGLE_PROTOBUF_PARSER_ASSERT(value->_InternalParse(p, &tmp_ctx) && + tmp_ctx.EndedAtLimit()); + } + type_id = 0; + } + continue; + } else if (tag == WireFormatLite::kMessageSetMessageTag) { + if (type_id == 0) { + int32 size = ReadSize(&ptr); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ptr = ctx->ReadString(ptr, size, &payload); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + } else { + // We're now parsing the payload + const FieldDescriptor* field = nullptr; + if (descriptor->IsExtensionNumber(type_id)) { + if (ctx->data().pool == nullptr) { + field = reflection->FindKnownExtensionByNumber(type_id); + } else { + field = + ctx->data().pool->FindExtensionByNumber(descriptor, type_id); + } + } + ptr = WireFormat::_InternalParseAndMergeField( + msg, ptr, ctx, static_cast(type_id) * 8 + 2, reflection, + field); + type_id = 0; + } + } else { + // An unknown field in MessageSetItem. + ptr = ReadTag(ptr - 1, &tag); + if (tag == 0 || (tag & 7) == WireFormatLite::WIRETYPE_END_GROUP) { + ctx->SetLastTag(tag); + return ptr; + } + // Skip field. + ptr = internal::UnknownFieldParse( + tag, static_cast(nullptr), ptr, ctx); + } + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + } + return ptr; + } + + const char* ParseMessageSet(const char* ptr, internal::ParseContext* ctx) { + while (!ctx->Done(&ptr)) { + uint32 tag; + ptr = ReadTag(ptr, &tag); + if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) return nullptr; + if (tag == 0 || (tag & 7) == WireFormatLite::WIRETYPE_END_GROUP) { + ctx->SetLastTag(tag); + break; + } + if (tag == WireFormatLite::kMessageSetItemStartTag) { + // A message set item starts + ptr = ctx->ParseGroup(this, ptr, tag); + } else { + // Parse other fields as normal extensions. + int field_number = WireFormatLite::GetTagFieldNumber(tag); + const FieldDescriptor* field = nullptr; + if (descriptor->IsExtensionNumber(field_number)) { + if (ctx->data().pool == nullptr) { + field = reflection->FindKnownExtensionByNumber(field_number); + } else { + field = ctx->data().pool->FindExtensionByNumber(descriptor, + field_number); + } + } + ptr = WireFormat::_InternalParseAndMergeField(msg, ptr, ctx, tag, + reflection, field); + } + if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) return nullptr; + } + return ptr; + } + + Message* msg; + const Descriptor* descriptor; + const Reflection* reflection; +}; + +const char* WireFormat::_InternalParse(Message* msg, const char* ptr, + internal::ParseContext* ctx) { + const Descriptor* descriptor = msg->GetDescriptor(); + const Reflection* reflection = msg->GetReflection(); + GOOGLE_DCHECK(descriptor); + GOOGLE_DCHECK(reflection); + if (descriptor->options().message_set_wire_format()) { + MessageSetParser message_set{msg, descriptor, reflection}; + return message_set.ParseMessageSet(ptr, ctx); + } + while (!ctx->Done(&ptr)) { + uint32 tag; + ptr = ReadTag(ptr, &tag); + if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) return nullptr; + if (tag == 0 || (tag & 7) == WireFormatLite::WIRETYPE_END_GROUP) { + ctx->SetLastTag(tag); + break; + } + const FieldDescriptor* field = nullptr; + + int field_number = WireFormatLite::GetTagFieldNumber(tag); + field = descriptor->FindFieldByNumber(field_number); + + // If that failed, check if the field is an extension. + if (field == nullptr && descriptor->IsExtensionNumber(field_number)) { + if (ctx->data().pool == nullptr) { + field = reflection->FindKnownExtensionByNumber(field_number); + } else { + field = + ctx->data().pool->FindExtensionByNumber(descriptor, field_number); + } + } + + ptr = _InternalParseAndMergeField(msg, ptr, ctx, tag, reflection, field); + if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) return nullptr; + } + return ptr; +} + +const char* WireFormat::_InternalParseAndMergeField( + Message* msg, const char* ptr, internal::ParseContext* ctx, uint64 tag, + const Reflection* reflection, const FieldDescriptor* field) { + if (field == nullptr) { + // unknown field set parser takes 64bit tags, because message set type ids + // span the full 32 bit range making the tag span [0, 2^35) range. + return internal::UnknownFieldParse( + tag, reflection->MutableUnknownFields(msg), ptr, ctx); + } + if (WireFormatLite::GetTagWireType(tag) != + WireTypeForFieldType(field->type())) { + if (field->is_packable() && WireFormatLite::GetTagWireType(tag) == + WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + switch (field->type()) { +#define HANDLE_PACKED_TYPE(TYPE, CPPTYPE, CPPTYPE_METHOD) \ + case FieldDescriptor::TYPE_##TYPE: { \ + ptr = internal::Packed##CPPTYPE_METHOD##Parser( \ + reflection->MutableRepeatedFieldInternal(msg, field), ptr, \ + ctx); \ + return ptr; \ + } + + HANDLE_PACKED_TYPE(INT32, int32, Int32) + HANDLE_PACKED_TYPE(INT64, int64, Int64) + HANDLE_PACKED_TYPE(SINT32, int32, SInt32) + HANDLE_PACKED_TYPE(SINT64, int64, SInt64) + HANDLE_PACKED_TYPE(UINT32, uint32, UInt32) + HANDLE_PACKED_TYPE(UINT64, uint64, UInt64) + + HANDLE_PACKED_TYPE(FIXED32, uint32, Fixed32) + HANDLE_PACKED_TYPE(FIXED64, uint64, Fixed64) + HANDLE_PACKED_TYPE(SFIXED32, int32, SFixed32) + HANDLE_PACKED_TYPE(SFIXED64, int64, SFixed64) + + HANDLE_PACKED_TYPE(FLOAT, float, Float) + HANDLE_PACKED_TYPE(DOUBLE, double, Double) + + HANDLE_PACKED_TYPE(BOOL, bool, Bool) +#undef HANDLE_PACKED_TYPE + + case FieldDescriptor::TYPE_ENUM: { + auto rep_enum = + reflection->MutableRepeatedFieldInternal(msg, field); + bool open_enum = false; + if (field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 || + open_enum) { + ptr = internal::PackedEnumParser(rep_enum, ptr, ctx); + } else { + return ctx->ReadPackedVarint( + ptr, [rep_enum, field, reflection, msg](uint64 val) { + if (field->enum_type()->FindValueByNumber(val) != nullptr) { + rep_enum->Add(val); + } else { + WriteVarint(field->number(), val, + reflection->MutableUnknownFields(msg)); + } + }); + } + return ptr; + } + + case FieldDescriptor::TYPE_STRING: + case FieldDescriptor::TYPE_GROUP: + case FieldDescriptor::TYPE_MESSAGE: + case FieldDescriptor::TYPE_BYTES: + GOOGLE_LOG(FATAL) << "Can't reach"; + return nullptr; + } + } else { + // mismatched wiretype; + return internal::UnknownFieldParse( + tag, reflection->MutableUnknownFields(msg), ptr, ctx); + } + } + + // Non-packed value + bool utf8_check = false; + bool strict_utf8_check = false; + switch (field->type()) { +#define HANDLE_TYPE(TYPE, CPPTYPE, CPPTYPE_METHOD) \ + case FieldDescriptor::TYPE_##TYPE: { \ + CPPTYPE value; \ + ptr = VarintParse(ptr, &value); \ + if (ptr == nullptr) return nullptr; \ + if (field->is_repeated()) { \ + reflection->Add##CPPTYPE_METHOD(msg, field, value); \ + } else { \ + reflection->Set##CPPTYPE_METHOD(msg, field, value); \ + } \ + return ptr; \ + } + + HANDLE_TYPE(BOOL, uint64, Bool) + HANDLE_TYPE(INT32, uint32, Int32) + HANDLE_TYPE(INT64, uint64, Int64) + HANDLE_TYPE(UINT32, uint32, UInt32) + HANDLE_TYPE(UINT64, uint64, UInt64) + + case FieldDescriptor::TYPE_SINT32: { + int32 value = ReadVarintZigZag32(&ptr); + if (ptr == nullptr) return nullptr; + if (field->is_repeated()) { + reflection->AddInt32(msg, field, value); + } else { + reflection->SetInt32(msg, field, value); + } + return ptr; + } + case FieldDescriptor::TYPE_SINT64: { + int64 value = ReadVarintZigZag64(&ptr); + if (ptr == nullptr) return nullptr; + if (field->is_repeated()) { + reflection->AddInt64(msg, field, value); + } else { + reflection->SetInt64(msg, field, value); + } + return ptr; + } +#undef HANDLE_TYPE +#define HANDLE_TYPE(TYPE, CPPTYPE, CPPTYPE_METHOD) \ + case FieldDescriptor::TYPE_##TYPE: { \ + CPPTYPE value; \ + value = UnalignedLoad(ptr); \ + ptr += sizeof(CPPTYPE); \ + if (field->is_repeated()) { \ + reflection->Add##CPPTYPE_METHOD(msg, field, value); \ + } else { \ + reflection->Set##CPPTYPE_METHOD(msg, field, value); \ + } \ + return ptr; \ + } + + HANDLE_TYPE(FIXED32, uint32, UInt32) + HANDLE_TYPE(FIXED64, uint64, UInt64) + HANDLE_TYPE(SFIXED32, int32, Int32) + HANDLE_TYPE(SFIXED64, int64, Int64) + + HANDLE_TYPE(FLOAT, float, Float) + HANDLE_TYPE(DOUBLE, double, Double) + +#undef HANDLE_TYPE + + case FieldDescriptor::TYPE_ENUM: { + uint32 value; + ptr = VarintParse(ptr, &value); + if (ptr == nullptr) return nullptr; + if (field->is_repeated()) { + reflection->AddEnumValue(msg, field, value); + } else { + reflection->SetEnumValue(msg, field, value); + } + return ptr; + } + + // Handle strings separately so that we can optimize the ctype=CORD case. + case FieldDescriptor::TYPE_STRING: + utf8_check = true; + strict_utf8_check = StrictUtf8Check(field); + PROTOBUF_FALLTHROUGH_INTENDED; + case FieldDescriptor::TYPE_BYTES: { + int size = ReadSize(&ptr); + if (ptr == nullptr) return nullptr; + std::string value; + ptr = ctx->ReadString(ptr, size, &value); + if (ptr == nullptr) return nullptr; + if (utf8_check) { + if (strict_utf8_check) { + if (!WireFormatLite::VerifyUtf8String(value.data(), value.length(), + WireFormatLite::PARSE, + field->full_name().c_str())) { + return nullptr; + } + } else { + VerifyUTF8StringNamedField(value.data(), value.length(), PARSE, + field->full_name().c_str()); + } + } + if (field->is_repeated()) { + reflection->AddString(msg, field, value); + } else { + reflection->SetString(msg, field, value); + } + return ptr; + } + + case FieldDescriptor::TYPE_GROUP: { + Message* sub_message; + if (field->is_repeated()) { + sub_message = reflection->AddMessage(msg, field, ctx->data().factory); + } else { + sub_message = + reflection->MutableMessage(msg, field, ctx->data().factory); + } + + return ctx->ParseGroup(sub_message, ptr, tag); + } + + case FieldDescriptor::TYPE_MESSAGE: { + Message* sub_message; + if (field->is_repeated()) { + sub_message = reflection->AddMessage(msg, field, ctx->data().factory); + } else { + sub_message = + reflection->MutableMessage(msg, field, ctx->data().factory); + } + return ctx->ParseMessage(sub_message, ptr); + } + } + + // GCC 8 complains about control reaching end of non-void function here. + // Let's keep it happy by returning a nullptr. + return nullptr; +} + // =================================================================== -void WireFormat::SerializeWithCachedSizes(const Message& message, int size, - io::CodedOutputStream* output) { +uint8* WireFormat::_InternalSerialize(const Message& message, uint8* target, + io::EpsCopyOutputStream* stream) { const Descriptor* descriptor = message.GetDescriptor(); const Reflection* message_reflection = message.GetReflection(); - int expected_endpoint = output->ByteCount() + size; std::vector fields; @@ -725,27 +1046,23 @@ void WireFormat::SerializeWithCachedSizes(const Message& message, int size, message_reflection->ListFields(message, &fields); } - for (int i = 0; i < fields.size(); i++) { - SerializeFieldWithCachedSizes(fields[i], message, output); + for (auto field : fields) { + target = InternalSerializeField(field, message, target, stream); } if (descriptor->options().message_set_wire_format()) { - SerializeUnknownMessageSetItems( - message_reflection->GetUnknownFields(message), output); + return InternalSerializeUnknownMessageSetItemsToArray( + message_reflection->GetUnknownFields(message), target, stream); } else { - SerializeUnknownFields(message_reflection->GetUnknownFields(message), - output); + return InternalSerializeUnknownFieldsToArray( + message_reflection->GetUnknownFields(message), target, stream); } - - GOOGLE_CHECK_EQ(output->ByteCount(), expected_endpoint) - << ": Protocol message serialized to a size different from what was " - "originally expected. Perhaps it was modified by another thread " - "during serialization?"; } -static void SerializeMapKeyWithCachedSizes(const FieldDescriptor* field, - const MapKey& value, - io::CodedOutputStream* output) { +static uint8* SerializeMapKeyWithCachedSizes(const FieldDescriptor* field, + const MapKey& value, uint8* target, + io::EpsCopyOutputStream* stream) { + target = stream->EnsureSpace(target); switch (field->type()) { case FieldDescriptor::TYPE_DOUBLE: case FieldDescriptor::TYPE_FLOAT: @@ -755,10 +1072,10 @@ static void SerializeMapKeyWithCachedSizes(const FieldDescriptor* field, case FieldDescriptor::TYPE_ENUM: GOOGLE_LOG(FATAL) << "Unsupported"; break; -#define CASE_TYPE(FieldType, CamelFieldType, CamelCppType) \ - case FieldDescriptor::TYPE_##FieldType: \ - WireFormatLite::Write##CamelFieldType(1, value.Get##CamelCppType##Value(), \ - output); \ +#define CASE_TYPE(FieldType, CamelFieldType, CamelCppType) \ + case FieldDescriptor::TYPE_##FieldType: \ + target = WireFormatLite::Write##CamelFieldType##ToArray( \ + 1, value.Get##CamelCppType##Value(), target); \ break; CASE_TYPE(INT64, Int64, Int64) CASE_TYPE(UINT64, UInt64, UInt64) @@ -771,19 +1088,23 @@ static void SerializeMapKeyWithCachedSizes(const FieldDescriptor* field, CASE_TYPE(SFIXED64, SFixed64, Int64) CASE_TYPE(SINT32, SInt32, Int32) CASE_TYPE(SINT64, SInt64, Int64) - CASE_TYPE(STRING, String, String) #undef CASE_TYPE + case FieldDescriptor::TYPE_STRING: + target = stream->WriteString(1, value.GetStringValue(), target); + break; } + return target; } -static void SerializeMapValueRefWithCachedSizes(const FieldDescriptor* field, - const MapValueRef& value, - io::CodedOutputStream* output) { +static uint8* SerializeMapValueRefWithCachedSizes( + const FieldDescriptor* field, const MapValueRef& value, uint8* target, + io::EpsCopyOutputStream* stream) { + target = stream->EnsureSpace(target); switch (field->type()) { -#define CASE_TYPE(FieldType, CamelFieldType, CamelCppType) \ - case FieldDescriptor::TYPE_##FieldType: \ - WireFormatLite::Write##CamelFieldType(2, value.Get##CamelCppType##Value(), \ - output); \ +#define CASE_TYPE(FieldType, CamelFieldType, CamelCppType) \ + case FieldDescriptor::TYPE_##FieldType: \ + target = WireFormatLite::Write##CamelFieldType##ToArray( \ + 2, value.Get##CamelCppType##Value(), target); \ break; CASE_TYPE(INT64, Int64, Int64) CASE_TYPE(UINT64, UInt64, UInt64) @@ -799,12 +1120,21 @@ static void SerializeMapValueRefWithCachedSizes(const FieldDescriptor* field, CASE_TYPE(ENUM, Enum, Enum) CASE_TYPE(DOUBLE, Double, Double) CASE_TYPE(FLOAT, Float, Float) - CASE_TYPE(STRING, String, String) - CASE_TYPE(BYTES, Bytes, String) - CASE_TYPE(MESSAGE, Message, Message) - CASE_TYPE(GROUP, Group, Message) #undef CASE_TYPE + case FieldDescriptor::TYPE_STRING: + case FieldDescriptor::TYPE_BYTES: + target = stream->WriteString(2, value.GetStringValue(), target); + break; + case FieldDescriptor::TYPE_MESSAGE: + target = WireFormatLite::InternalWriteMessage(2, value.GetMessageValue(), + target, stream); + break; + case FieldDescriptor::TYPE_GROUP: + target = WireFormatLite::InternalWriteGroup(2, value.GetMessageValue(), + target, stream); + break; } + return target; } class MapKeySorter { @@ -850,33 +1180,36 @@ class MapKeySorter { }; }; -static void SerializeMapEntry(const FieldDescriptor* field, const MapKey& key, - const MapValueRef& value, - io::CodedOutputStream* output) { +static uint8* InternalSerializeMapEntry(const FieldDescriptor* field, + const MapKey& key, + const MapValueRef& value, uint8* target, + io::EpsCopyOutputStream* stream) { const FieldDescriptor* key_field = field->message_type()->field(0); const FieldDescriptor* value_field = field->message_type()->field(1); - WireFormatLite::WriteTag(field->number(), - WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); size_t size = kMapEntryTagByteSize; size += MapKeyDataOnlyByteSize(key_field, key); size += MapValueRefDataOnlyByteSize(value_field, value); - output->WriteVarint32(size); - SerializeMapKeyWithCachedSizes(key_field, key, output); - SerializeMapValueRefWithCachedSizes(value_field, value, output); + target = stream->EnsureSpace(target); + target = WireFormatLite::WriteTagToArray( + field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); + target = io::CodedOutputStream::WriteVarint32ToArray(size, target); + target = SerializeMapKeyWithCachedSizes(key_field, key, target, stream); + target = + SerializeMapValueRefWithCachedSizes(value_field, value, target, stream); + return target; } -void WireFormat::SerializeFieldWithCachedSizes(const FieldDescriptor* field, - const Message& message, - io::CodedOutputStream* output) { +uint8* WireFormat::InternalSerializeField(const FieldDescriptor* field, + const Message& message, uint8* target, + io::EpsCopyOutputStream* stream) { const Reflection* message_reflection = message.GetReflection(); if (field->is_extension() && field->containing_type()->options().message_set_wire_format() && field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && !field->is_repeated()) { - SerializeMessageSetItemWithCachedSizes(field, message, output); - return; + return InternalSerializeMessageSetItem(field, message, target, stream); } // For map fields, we can use either repeated field reflection or map @@ -897,7 +1230,7 @@ void WireFormat::SerializeFieldWithCachedSizes(const FieldDescriptor* field, const MapFieldBase* map_field = message_reflection->GetMapData(message, field); if (map_field->IsMapValid()) { - if (output->IsSerializationDeterministic()) { + if (stream->IsSerializationDeterministic()) { std::vector sorted_key_list = MapKeySorter::SortKey(message, message_reflection, field); for (std::vector::iterator it = sorted_key_list.begin(); @@ -905,7 +1238,8 @@ void WireFormat::SerializeFieldWithCachedSizes(const FieldDescriptor* field, MapValueRef map_value; message_reflection->InsertOrLookupMapValue( const_cast(&message), field, *it, &map_value); - SerializeMapEntry(field, *it, map_value, output); + target = + InternalSerializeMapEntry(field, *it, map_value, target, stream); } } else { for (MapIterator it = message_reflection->MapBegin( @@ -913,14 +1247,14 @@ void WireFormat::SerializeFieldWithCachedSizes(const FieldDescriptor* field, it != message_reflection->MapEnd(const_cast(&message), field); ++it) { - SerializeMapEntry(field, it.GetKey(), it.GetValueRef(), output); + target = InternalSerializeMapEntry(field, it.GetKey(), + it.GetValueRef(), target, stream); } } - return; + return target; } } - int count = 0; if (field->is_repeated()) { @@ -934,20 +1268,59 @@ void WireFormat::SerializeFieldWithCachedSizes(const FieldDescriptor* field, // map_entries is for maps that'll be deterministically serialized. std::vector map_entries; - if (count > 1 && field->is_map() && output->IsSerializationDeterministic()) { + if (count > 1 && field->is_map() && stream->IsSerializationDeterministic()) { map_entries = DynamicMapSorter::Sort(message, count, message_reflection, field); } - const bool is_packed = field->is_packed(); - if (is_packed && count > 0) { - WireFormatLite::WriteTag(field->number(), - WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - const size_t data_size = FieldDataOnlyByteSize(field, message); - output->WriteVarint32(data_size); + if (field->is_packed()) { + if (count == 0) return target; + target = stream->EnsureSpace(target); + switch (field->type()) { +#define HANDLE_PRIMITIVE_TYPE(TYPE, CPPTYPE, TYPE_METHOD, CPPTYPE_METHOD) \ + case FieldDescriptor::TYPE_##TYPE: { \ + auto r = \ + message_reflection->GetRepeatedFieldInternal(message, field); \ + target = stream->Write##TYPE_METHOD##Packed( \ + field->number(), r, FieldDataOnlyByteSize(field, message), target); \ + break; \ + } + + HANDLE_PRIMITIVE_TYPE(INT32, int32, Int32, Int32) + HANDLE_PRIMITIVE_TYPE(INT64, int64, Int64, Int64) + HANDLE_PRIMITIVE_TYPE(SINT32, int32, SInt32, Int32) + HANDLE_PRIMITIVE_TYPE(SINT64, int64, SInt64, Int64) + HANDLE_PRIMITIVE_TYPE(UINT32, uint32, UInt32, UInt32) + HANDLE_PRIMITIVE_TYPE(UINT64, uint64, UInt64, UInt64) + HANDLE_PRIMITIVE_TYPE(ENUM, int, Enum, Enum) + +#undef HANDLE_PRIMITIVE_TYPE +#define HANDLE_PRIMITIVE_TYPE(TYPE, CPPTYPE, TYPE_METHOD, CPPTYPE_METHOD) \ + case FieldDescriptor::TYPE_##TYPE: { \ + auto r = \ + message_reflection->GetRepeatedFieldInternal(message, field); \ + target = stream->WriteFixedPacked(field->number(), r, target); \ + break; \ + } + + HANDLE_PRIMITIVE_TYPE(FIXED32, uint32, Fixed32, UInt32) + HANDLE_PRIMITIVE_TYPE(FIXED64, uint64, Fixed64, UInt64) + HANDLE_PRIMITIVE_TYPE(SFIXED32, int32, SFixed32, Int32) + HANDLE_PRIMITIVE_TYPE(SFIXED64, int64, SFixed64, Int64) + + HANDLE_PRIMITIVE_TYPE(FLOAT, float, Float, Float) + HANDLE_PRIMITIVE_TYPE(DOUBLE, double, Double, Double) + + HANDLE_PRIMITIVE_TYPE(BOOL, bool, Bool, Bool) +#undef HANDLE_PRIMITIVE_TYPE + default: + GOOGLE_LOG(FATAL) << "Invalid descriptor"; + } + return target; } for (int j = 0; j < count; j++) { + target = stream->EnsureSpace(target); switch (field->type()) { #define HANDLE_PRIMITIVE_TYPE(TYPE, CPPTYPE, TYPE_METHOD, CPPTYPE_METHOD) \ case FieldDescriptor::TYPE_##TYPE: { \ @@ -956,11 +1329,8 @@ void WireFormat::SerializeFieldWithCachedSizes(const FieldDescriptor* field, ? message_reflection->GetRepeated##CPPTYPE_METHOD(message, field, \ j) \ : message_reflection->Get##CPPTYPE_METHOD(message, field); \ - if (is_packed) { \ - WireFormatLite::Write##TYPE_METHOD##NoTag(value, output); \ - } else { \ - WireFormatLite::Write##TYPE_METHOD(field->number(), value, output); \ - } \ + target = WireFormatLite::Write##TYPE_METHOD##ToArray(field->number(), \ + value, target); \ break; \ } @@ -984,7 +1354,7 @@ void WireFormat::SerializeFieldWithCachedSizes(const FieldDescriptor* field, #define HANDLE_TYPE(TYPE, TYPE_METHOD, CPPTYPE_METHOD) \ case FieldDescriptor::TYPE_##TYPE: \ - WireFormatLite::Write##TYPE_METHOD( \ + target = WireFormatLite::InternalWrite##TYPE_METHOD( \ field->number(), \ field->is_repeated() \ ? (map_entries.empty() \ @@ -992,7 +1362,7 @@ void WireFormat::SerializeFieldWithCachedSizes(const FieldDescriptor* field, field, j) \ : *map_entries[j]) \ : message_reflection->Get##CPPTYPE_METHOD(message, field), \ - output); \ + target, stream); \ break; HANDLE_TYPE(GROUP, Group, Message) @@ -1004,11 +1374,8 @@ void WireFormat::SerializeFieldWithCachedSizes(const FieldDescriptor* field, field->is_repeated() ? message_reflection->GetRepeatedEnum(message, field, j) : message_reflection->GetEnum(message, field); - if (is_packed) { - WireFormatLite::WriteEnumNoTag(value->number(), output); - } else { - WireFormatLite::WriteEnum(field->number(), value->number(), output); - } + target = WireFormatLite::WriteEnumToArray(field->number(), + value->number(), target); break; } @@ -1031,7 +1398,7 @@ void WireFormat::SerializeFieldWithCachedSizes(const FieldDescriptor* field, VerifyUTF8StringNamedField(value.data(), value.length(), SERIALIZE, field->full_name().c_str()); } - WireFormatLite::WriteString(field->number(), value, output); + target = stream->WriteString(field->number(), value, target); break; } @@ -1043,34 +1410,35 @@ void WireFormat::SerializeFieldWithCachedSizes(const FieldDescriptor* field, j, &scratch) : message_reflection->GetStringReference(message, field, &scratch); - WireFormatLite::WriteBytes(field->number(), value, output); + target = stream->WriteString(field->number(), value, target); break; } } } + return target; } -void WireFormat::SerializeMessageSetItemWithCachedSizes( - const FieldDescriptor* field, const Message& message, - io::CodedOutputStream* output) { +uint8* WireFormat::InternalSerializeMessageSetItem( + const FieldDescriptor* field, const Message& message, uint8* target, + io::EpsCopyOutputStream* stream) { const Reflection* message_reflection = message.GetReflection(); + target = stream->EnsureSpace(target); // Start group. - output->WriteVarint32(WireFormatLite::kMessageSetItemStartTag); - + target = io::CodedOutputStream::WriteTagToArray( + WireFormatLite::kMessageSetItemStartTag, target); // Write type ID. - output->WriteVarint32(WireFormatLite::kMessageSetTypeIdTag); - output->WriteVarint32(field->number()); - + target = WireFormatLite::WriteUInt32ToArray( + WireFormatLite::kMessageSetTypeIdNumber, field->number(), target); // Write message. - output->WriteVarint32(WireFormatLite::kMessageSetMessageTag); - - const Message& sub_message = message_reflection->GetMessage(message, field); - output->WriteVarint32(sub_message.GetCachedSize()); - sub_message.SerializeWithCachedSizes(output); - + target = WireFormatLite::InternalWriteMessage( + WireFormatLite::kMessageSetMessageNumber, + message_reflection->GetMessage(message, field), target, stream); // End group. - output->WriteVarint32(WireFormatLite::kMessageSetItemEndTag); + target = stream->EnsureSpace(target); + target = io::CodedOutputStream::WriteTagToArray( + WireFormatLite::kMessageSetItemEndTag, target); + return target; } // =================================================================== @@ -1120,7 +1488,17 @@ size_t WireFormat::FieldByteSize(const FieldDescriptor* field, size_t count = 0; if (field->is_repeated()) { - count = FromIntSize(message_reflection->FieldSize(message, field)); + if (field->is_map()) { + const MapFieldBase* map_field = + message_reflection->GetMapData(message, field); + if (map_field->IsMapValid()) { + count = FromIntSize(map_field->size()); + } else { + count = FromIntSize(message_reflection->FieldSize(message, field)); + } + } else { + count = FromIntSize(message_reflection->FieldSize(message, field)); + } } else if (field->containing_type()->options().map_entry()) { // Map entry fields always need to be serialized. count = 1; @@ -1355,6 +1733,16 @@ size_t WireFormat::MessageSetItemByteSize(const FieldDescriptor* field, return our_size; } +// Compute the size of the UnknownFieldSet on the wire. +size_t ComputeUnknownFieldsSize(const InternalMetadata& metadata, + size_t total_size, CachedSize* cached_size) { + total_size += WireFormat::ComputeUnknownFieldsSize( + metadata.unknown_fields( + UnknownFieldSet::default_instance)); + cached_size->Set(ToCachedSize(total_size)); + return total_size; +} + } // namespace internal } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/wire_format.h b/third_party/protobuf/src/google/protobuf/wire_format.h index 1e031515..d42cefb6 100644 --- a/third_party/protobuf/src/google/protobuf/wire_format.h +++ b/third_party/protobuf/src/google/protobuf/wire_format.h @@ -40,9 +40,14 @@ #define GOOGLE_PROTOBUF_WIRE_FORMAT_H__ #include + #include +#include +#include #include +#include #include +#include #include #include @@ -54,10 +59,6 @@ namespace google { namespace protobuf { -namespace io { -class CodedInputStream; // coded_stream.h -class CodedOutputStream; // coded_stream.h -} // namespace io class UnknownFieldSet; // unknown_field_set.h } // namespace protobuf } // namespace google @@ -67,7 +68,7 @@ namespace protobuf { namespace internal { // This class is for internal use by the protocol buffer library and by -// protocol-complier-generated message classes. It must not be called +// protocol-compiler-generated message classes. It must not be called // directly by clients. // // This class contains code for implementing the binary protocol buffer @@ -108,6 +109,11 @@ class PROTOBUF_EXPORT WireFormat { static bool ParseAndMergePartial(io::CodedInputStream* input, Message* message); + // This is meant for internal protobuf use (WireFormat is an internal class). + // This is the reflective implementation of the _InternalParse functionality. + static const char* _InternalParse(Message* msg, const char* ptr, + internal::ParseContext* ctx); + // Serialize a message in protocol buffer wire format. // // Any embedded messages within the message must have their correct sizes @@ -116,7 +122,17 @@ class PROTOBUF_EXPORT WireFormat { // // These return false iff the underlying stream returns a write error. static void SerializeWithCachedSizes(const Message& message, int size, - io::CodedOutputStream* output); + io::CodedOutputStream* output) { + int expected_endpoint = output->ByteCount() + size; + output->SetCur( + _InternalSerialize(message, output->Cur(), output->EpsCopy())); + GOOGLE_CHECK_EQ(output->ByteCount(), expected_endpoint) + << ": Protocol message serialized to a size different from what was " + "originally expected. Perhaps it was modified by another thread " + "during serialization?"; + } + static uint8* _InternalSerialize(const Message& message, uint8* target, + io::EpsCopyOutputStream* stream); // Implements Message::ByteSize() via reflection. WARNING: The result // of this method is *not* cached anywhere. However, all embedded messages @@ -150,19 +166,34 @@ class PROTOBUF_EXPORT WireFormat { // Write the contents of an UnknownFieldSet to the output. static void SerializeUnknownFields(const UnknownFieldSet& unknown_fields, - io::CodedOutputStream* output); + io::CodedOutputStream* output) { + output->SetCur(InternalSerializeUnknownFieldsToArray( + unknown_fields, output->Cur(), output->EpsCopy())); + } // Same as above, except writing directly to the provided buffer. // Requires that the buffer have sufficient capacity for // ComputeUnknownFieldsSize(unknown_fields). // // Returns a pointer past the last written byte. static uint8* SerializeUnknownFieldsToArray( - const UnknownFieldSet& unknown_fields, uint8* target); + const UnknownFieldSet& unknown_fields, uint8* target) { + io::EpsCopyOutputStream stream( + target, static_cast(ComputeUnknownFieldsSize(unknown_fields)), + io::CodedOutputStream::IsDefaultSerializationDeterministic()); + return InternalSerializeUnknownFieldsToArray(unknown_fields, target, + &stream); + } + static uint8* InternalSerializeUnknownFieldsToArray( + const UnknownFieldSet& unknown_fields, uint8* target, + io::EpsCopyOutputStream* stream); // Same thing except for messages that have the message_set_wire_format // option. static void SerializeUnknownMessageSetItems( - const UnknownFieldSet& unknown_fields, io::CodedOutputStream* output); + const UnknownFieldSet& unknown_fields, io::CodedOutputStream* output) { + output->SetCur(InternalSerializeUnknownMessageSetItemsToArray( + unknown_fields, output->Cur(), output->EpsCopy())); + } // Same as above, except writing directly to the provided buffer. // Requires that the buffer have sufficient capacity for // ComputeUnknownMessageSetItemsSize(unknown_fields). @@ -170,6 +201,9 @@ class PROTOBUF_EXPORT WireFormat { // Returns a pointer past the last written byte. static uint8* SerializeUnknownMessageSetItemsToArray( const UnknownFieldSet& unknown_fields, uint8* target); + static uint8* InternalSerializeUnknownMessageSetItemsToArray( + const UnknownFieldSet& unknown_fields, uint8* target, + io::EpsCopyOutputStream* stream); // Compute the size of the UnknownFieldSet on the wire. static size_t ComputeUnknownFieldsSize(const UnknownFieldSet& unknown_fields); @@ -196,7 +230,13 @@ class PROTOBUF_EXPORT WireFormat { // Serialize a single field. static void SerializeFieldWithCachedSizes( const FieldDescriptor* field, // Cannot be NULL - const Message& message, io::CodedOutputStream* output); + const Message& message, io::CodedOutputStream* output) { + output->SetCur(InternalSerializeField(field, message, output->Cur(), + output->EpsCopy())); + } + static uint8* InternalSerializeField( + const FieldDescriptor* field, // Cannot be NULL + const Message& message, uint8* target, io::EpsCopyOutputStream* stream); // Compute size of a single field. If the field is a message type, this // will call ByteSize() for the embedded message, insuring that it caches @@ -205,12 +245,18 @@ class PROTOBUF_EXPORT WireFormat { const Message& message); // Parse/serialize a MessageSet::Item group. Used with messages that use - // opion message_set_wire_format = true. + // option message_set_wire_format = true. static bool ParseAndMergeMessageSetItem(io::CodedInputStream* input, Message* message); static void SerializeMessageSetItemWithCachedSizes( const FieldDescriptor* field, const Message& message, - io::CodedOutputStream* output); + io::CodedOutputStream* output) { + output->SetCur(InternalSerializeMessageSetItem( + field, message, output->Cur(), output->EpsCopy())); + } + static uint8* InternalSerializeMessageSetItem( + const FieldDescriptor* field, const Message& message, uint8* target, + io::EpsCopyOutputStream* stream); static size_t MessageSetItemByteSize(const FieldDescriptor* field, const Message& message); @@ -237,6 +283,7 @@ class PROTOBUF_EXPORT WireFormat { Operation op, const char* field_name); private: + struct MessageSetParser; // Skip a MessageSet field. static bool SkipMessageSetField(io::CodedInputStream* input, uint32 field_number, @@ -247,6 +294,12 @@ class PROTOBUF_EXPORT WireFormat { const FieldDescriptor* field, Message* message, io::CodedInputStream* input); + // Parses the value from the wire that belongs to tag. + static const char* _InternalParseAndMergeField(Message* msg, const char* ptr, + internal::ParseContext* ctx, + uint64 tag, + const Reflection* reflection, + const FieldDescriptor* field); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(WireFormat); }; @@ -328,9 +381,11 @@ inline void WireFormat::VerifyUTF8StringNamedField(const char* data, int size, } -inline void SerializeUnknownMessageSetItems( - const UnknownFieldSet& unknown_fields, io::CodedOutputStream* output) { - WireFormat::SerializeUnknownMessageSetItems(unknown_fields, output); +inline uint8* InternalSerializeUnknownMessageSetItemsToArray( + const UnknownFieldSet& unknown_fields, uint8* target, + io::EpsCopyOutputStream* stream) { + return WireFormat::InternalSerializeUnknownMessageSetItemsToArray( + unknown_fields, target, stream); } inline size_t ComputeUnknownMessageSetItemsSize( @@ -338,6 +393,11 @@ inline size_t ComputeUnknownMessageSetItemsSize( return WireFormat::ComputeUnknownMessageSetItemsSize(unknown_fields); } +// Compute the size of the UnknownFieldSet on the wire. +PROTOBUF_EXPORT +size_t ComputeUnknownFieldsSize(const InternalMetadata& metadata, size_t size, + CachedSize* cached_size); + } // namespace internal } // namespace protobuf } // namespace google diff --git a/third_party/protobuf/src/google/protobuf/wire_format_lite.cc b/third_party/protobuf/src/google/protobuf/wire_format_lite.cc index 5189a91c..47ad0f1e 100644 --- a/third_party/protobuf/src/google/protobuf/wire_format_lite.cc +++ b/third_party/protobuf/src/google/protobuf/wire_format_lite.cc @@ -37,15 +37,17 @@ #include #include #include + #include #include #include -#include +#include #include #include -#include +#include + namespace google { namespace protobuf { namespace internal { @@ -290,25 +292,6 @@ void CodedOutputStreamFieldSkipper::SkipUnknownEnum(int field_number, unknown_fields_->WriteVarint64(value); } -bool WireFormatLite::ReadPackedEnumNoInline(io::CodedInputStream* input, - bool (*is_valid)(int), - RepeatedField* values) { - uint32 length; - if (!input->ReadVarint32(&length)) return false; - io::CodedInputStream::Limit limit = input->PushLimit(length); - while (input->BytesUntilLimit() > 0) { - int value; - if (!ReadPrimitive(input, &value)) { - return false; - } - if (is_valid == NULL || is_valid(value)) { - values->Add(value); - } - } - input->PopLimit(limit); - return true; -} - bool WireFormatLite::ReadPackedEnumPreserveUnknowns( io::CodedInputStream* input, int field_number, bool (*is_valid)(int), io::CodedOutputStream* unknown_fields_stream, RepeatedField* values) { @@ -543,15 +526,7 @@ void WireFormatLite::WriteMessage(int field_number, const MessageLite& value, void WireFormatLite::WriteSubMessageMaybeToArray( int size, const MessageLite& value, io::CodedOutputStream* output) { - if (!output->IsSerializationDeterministic()) { - uint8* target = output->GetDirectBufferForNBytesAndAdvance(size); - if (target != nullptr) { - uint8* end = value.InternalSerializeWithCachedSizesToArray(target); - GOOGLE_DCHECK_EQ(end - target, size); - return; - } - } - value.SerializeWithCachedSizes(output); + output->SetCur(value._InternalSerialize(output->Cur(), output->EpsCopy())); } void WireFormatLite::WriteGroupMaybeToArray(int field_number, @@ -577,8 +552,7 @@ PROTOBUF_ALWAYS_INLINE static bool ReadBytesToString( inline static bool ReadBytesToString(io::CodedInputStream* input, std::string* value) { uint32 length; - return input->ReadVarint32(&length) && - input->InternalReadStringInline(value, length); + return input->ReadVarint32(&length) && input->ReadString(value, length); } bool WireFormatLite::ReadBytes(io::CodedInputStream* input, diff --git a/third_party/protobuf/src/google/protobuf/wire_format_lite.h b/third_party/protobuf/src/google/protobuf/wire_format_lite.h index c16cd276..c742fe86 100644 --- a/third_party/protobuf/src/google/protobuf/wire_format_lite.h +++ b/third_party/protobuf/src/google/protobuf/wire_format_lite.h @@ -49,6 +49,7 @@ #include #include #include +#include // Do UTF-8 validation on string type in Debug build only #ifndef NDEBUG @@ -73,7 +74,7 @@ namespace internal { #include // This class is for internal use by the protocol buffer library and by -// protocol-complier-generated message classes. It must not be called +// protocol-compiler-generated message classes. It must not be called // directly by clients. // // This class contains helpers for implementing the binary protocol buffer @@ -155,9 +156,9 @@ class PROTOBUF_EXPORT WireFormatLite { } // Number of bits in a tag which identify the wire type. - static const int kTagTypeBits = 3; + static constexpr int kTagTypeBits = 3; // Mask for those bits. - static const uint32 kTagTypeMask = (1 << kTagTypeBits) - 1; + static constexpr uint32 kTagTypeMask = (1 << kTagTypeBits) - 1; // Helper functions for encoding and decoding tags. (Inlined below and in // _inl.h) @@ -209,9 +210,9 @@ class PROTOBUF_EXPORT WireFormatLite { // required string message = 3; // } // } - static const int kMessageSetItemNumber = 1; - static const int kMessageSetTypeIdNumber = 2; - static const int kMessageSetMessageNumber = 3; + static constexpr int kMessageSetItemNumber = 1; + static constexpr int kMessageSetTypeIdNumber = 2; + static constexpr int kMessageSetMessageNumber = 3; static const int kMessageSetItemStartTag = GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG( kMessageSetItemNumber, WireFormatLite::WIRETYPE_START_GROUP); static const int kMessageSetItemEndTag = GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG( @@ -244,9 +245,7 @@ class PROTOBUF_EXPORT WireFormatLite { static int64 ZigZagDecode64(uint64 n); // ================================================================= - // Methods for reading/writing individual field. The implementations - // of these methods are defined in wire_format_lite_inl.h; you must #include - // that file to use these. + // Methods for reading/writing individual field. // Read fields, not including tags. The assumption is that you already // read the tag to determine what field to read. @@ -623,11 +622,13 @@ class PROTOBUF_EXPORT WireFormatLite { // have a CodedOutputStream available, so they get an additional parameter // telling them whether to serialize deterministically. template - PROTOBUF_ALWAYS_INLINE static uint8* InternalWriteGroupToArray( - int field_number, const MessageType& value, uint8* target); + PROTOBUF_ALWAYS_INLINE static uint8* InternalWriteGroup( + int field_number, const MessageType& value, uint8* target, + io::EpsCopyOutputStream* stream); template - PROTOBUF_ALWAYS_INLINE static uint8* InternalWriteMessageToArray( - int field_number, const MessageType& value, uint8* target); + PROTOBUF_ALWAYS_INLINE static uint8* InternalWriteMessage( + int field_number, const MessageType& value, uint8* target, + io::EpsCopyOutputStream* stream); // Like above, but de-virtualize the call to SerializeWithCachedSizes(). The // pointer must point at an instance of MessageType, *not* a subclass (or @@ -643,11 +644,24 @@ class PROTOBUF_EXPORT WireFormatLite { // that are non-deterministic always. PROTOBUF_ALWAYS_INLINE static uint8* WriteGroupToArray( int field_number, const MessageLite& value, uint8* target) { - return InternalWriteGroupToArray(field_number, value, target); + io::EpsCopyOutputStream stream( + target, + value.GetCachedSize() + + static_cast(2 * io::CodedOutputStream::VarintSize32( + static_cast(field_number) << 3)), + io::CodedOutputStream::IsDefaultSerializationDeterministic()); + return InternalWriteGroup(field_number, value, target, &stream); } PROTOBUF_ALWAYS_INLINE static uint8* WriteMessageToArray( int field_number, const MessageLite& value, uint8* target) { - return InternalWriteMessageToArray(field_number, value, target); + int size = value.GetCachedSize(); + io::EpsCopyOutputStream stream( + target, + size + static_cast(io::CodedOutputStream::VarintSize32( + static_cast(field_number) << 3) + + io::CodedOutputStream::VarintSize32(size)), + io::CodedOutputStream::IsDefaultSerializationDeterministic()); + return InternalWriteMessage(field_number, value, target, &stream); } // Compute the byte size of a field. The XxSize() functions do NOT include @@ -671,13 +685,13 @@ class PROTOBUF_EXPORT WireFormatLite { static size_t EnumSize(const RepeatedField& value); // These types always have the same size. - static const size_t kFixed32Size = 4; - static const size_t kFixed64Size = 8; - static const size_t kSFixed32Size = 4; - static const size_t kSFixed64Size = 8; - static const size_t kFloatSize = 4; - static const size_t kDoubleSize = 8; - static const size_t kBoolSize = 1; + static constexpr size_t kFixed32Size = 4; + static constexpr size_t kFixed64Size = 8; + static constexpr size_t kSFixed32Size = 4; + static constexpr size_t kSFixed64Size = 8; + static constexpr size_t kFloatSize = 4; + static constexpr size_t kDoubleSize = 8; + static constexpr size_t kBoolSize = 1; static inline size_t StringSize(const std::string& value); static inline size_t BytesSize(const std::string& value); @@ -793,39 +807,19 @@ inline size_t WireFormatLite::TagSize(int field_number, } inline uint32 WireFormatLite::EncodeFloat(float value) { - union { - float f; - uint32 i; - }; - f = value; - return i; + return bit_cast(value); } inline float WireFormatLite::DecodeFloat(uint32 value) { - union { - float f; - uint32 i; - }; - i = value; - return f; + return bit_cast(value); } inline uint64 WireFormatLite::EncodeDouble(double value) { - union { - double f; - uint64 i; - }; - f = value; - return i; + return bit_cast(value); } inline double WireFormatLite::DecodeDouble(uint64 value) { - union { - double f; - uint64 i; - }; - i = value; - return f; + return bit_cast(value); } // ZigZag Transform: Encodes signed integers so that they can be @@ -887,9 +881,11 @@ inline bool WireFormatLite::ReadString(io::CodedInputStream* input, return ReadBytes(input, p); } -inline void SerializeUnknownMessageSetItems(const std::string& unknown_fields, - io::CodedOutputStream* output) { - output->WriteString(unknown_fields); +inline uint8* InternalSerializeUnknownMessageSetItemsToArray( + const std::string& unknown_fields, uint8* target, + io::EpsCopyOutputStream* stream) { + return stream->WriteRaw(unknown_fields.data(), + static_cast(unknown_fields.size()), target); } inline size_t ComputeUnknownMessageSetItemsSize( @@ -1429,7 +1425,7 @@ inline uint8* WireFormatLite::WritePrimitiveNoTagToArray( const int n = value.size(); GOOGLE_DCHECK_GT(n, 0); - const T* ii = value.unsafe_data(); + const T* ii = value.data(); int i = 0; do { target = Writer(ii[i], target); @@ -1447,7 +1443,7 @@ inline uint8* WireFormatLite::WriteFixedNoTagToArray( const int n = value.size(); GOOGLE_DCHECK_GT(n, 0); - const T* ii = value.unsafe_data(); + const T* ii = value.data(); const int bytes = n * static_cast(sizeof(ii[0])); memcpy(target, ii, static_cast(bytes)); return target + bytes; @@ -1593,7 +1589,7 @@ inline uint8* WireFormatLite::WritePrimitiveToArray( return target; } - const T* ii = value.unsafe_data(); + const T* ii = value.data(); int i = 0; do { target = Writer(field_number, ii[i], target); @@ -1683,19 +1679,22 @@ inline uint8* WireFormatLite::WriteBytesToArray(int field_number, template -inline uint8* WireFormatLite::InternalWriteGroupToArray( - int field_number, const MessageType& value, uint8* target) { +inline uint8* WireFormatLite::InternalWriteGroup( + int field_number, const MessageType& value, uint8* target, + io::EpsCopyOutputStream* stream) { target = WriteTagToArray(field_number, WIRETYPE_START_GROUP, target); - target = value.InternalSerializeWithCachedSizesToArray(target); + target = value._InternalSerialize(target, stream); + target = stream->EnsureSpace(target); return WriteTagToArray(field_number, WIRETYPE_END_GROUP, target); } template -inline uint8* WireFormatLite::InternalWriteMessageToArray( - int field_number, const MessageType& value, uint8* target) { +inline uint8* WireFormatLite::InternalWriteMessage( + int field_number, const MessageType& value, uint8* target, + io::EpsCopyOutputStream* stream) { target = WriteTagToArray(field_number, WIRETYPE_LENGTH_DELIMITED, target); target = io::CodedOutputStream::WriteVarint32ToArray( static_cast(value.GetCachedSize()), target); - return value.InternalSerializeWithCachedSizesToArray(target); + return value._InternalSerialize(target, stream); } // See comment on ReadGroupNoVirtual to understand the need for this template @@ -1706,7 +1705,7 @@ inline uint8* WireFormatLite::InternalWriteGroupNoVirtualToArray( uint8* target) { target = WriteTagToArray(field_number, WIRETYPE_START_GROUP, target); target = value.MessageType_WorkAroundCppLookupDefect:: - InternalSerializeWithCachedSizesToArray(target); + SerializeWithCachedSizesToArray(target); return WriteTagToArray(field_number, WIRETYPE_END_GROUP, target); } template @@ -1718,8 +1717,9 @@ inline uint8* WireFormatLite::InternalWriteMessageNoVirtualToArray( static_cast( value.MessageType_WorkAroundCppLookupDefect::GetCachedSize()), target); - return value.MessageType_WorkAroundCppLookupDefect:: - InternalSerializeWithCachedSizesToArray(target); + return value + .MessageType_WorkAroundCppLookupDefect::SerializeWithCachedSizesToArray( + target); } // =================================================================== diff --git a/third_party/protobuf/src/google/protobuf/wire_format_unittest.cc b/third_party/protobuf/src/google/protobuf/wire_format_unittest.cc index cf0ccdcf..24cb58f6 100644 --- a/third_party/protobuf/src/google/protobuf/wire_format_unittest.cc +++ b/third_party/protobuf/src/google/protobuf/wire_format_unittest.cc @@ -33,6 +33,10 @@ // Sanjay Ghemawat, Jeff Dean, and others. #include + +#include +#include +#include #include #include #include @@ -40,11 +44,9 @@ #include #include #include +#include #include - -#include -#include -#include +#include #include #include #include @@ -961,8 +963,7 @@ class Proto3PrimitiveRepeatedWireFormatTest : public ::testing::Test { message->add_repeated_float(1.0); message->add_repeated_double(1.0); message->add_repeated_bool(true); - message->add_repeated_nested_enum( - proto3_arena_unittest::TestAllTypes_NestedEnum_FOO); + message->add_repeated_nested_enum(proto3_arena_unittest::TestAllTypes::FOO); } template @@ -980,7 +981,7 @@ class Proto3PrimitiveRepeatedWireFormatTest : public ::testing::Test { EXPECT_EQ(1.0, message.repeated_float(0)); EXPECT_EQ(1.0, message.repeated_double(0)); EXPECT_EQ(true, message.repeated_bool(0)); - EXPECT_EQ(proto3_arena_unittest::TestAllTypes_NestedEnum_FOO, + EXPECT_EQ(proto3_arena_unittest::TestAllTypes::FOO, message.repeated_nested_enum(0)); } diff --git a/third_party/protobuf/src/google/protobuf/wrappers.pb.cc b/third_party/protobuf/src/google/protobuf/wrappers.pb.cc index af6a90c6..be039b42 100644 --- a/third_party/protobuf/src/google/protobuf/wrappers.pb.cc +++ b/third_party/protobuf/src/google/protobuf/wrappers.pb.cc @@ -5,7 +5,6 @@ #include -#include #include #include #include @@ -65,7 +64,7 @@ static void InitDefaultsscc_info_BoolValue_google_2fprotobuf_2fwrappers_2eproto( } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_BoolValue_google_2fprotobuf_2fwrappers_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_BoolValue_google_2fprotobuf_2fwrappers_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_BoolValue_google_2fprotobuf_2fwrappers_2eproto}, {}}; static void InitDefaultsscc_info_BytesValue_google_2fprotobuf_2fwrappers_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -79,7 +78,7 @@ static void InitDefaultsscc_info_BytesValue_google_2fprotobuf_2fwrappers_2eproto } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_BytesValue_google_2fprotobuf_2fwrappers_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_BytesValue_google_2fprotobuf_2fwrappers_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_BytesValue_google_2fprotobuf_2fwrappers_2eproto}, {}}; static void InitDefaultsscc_info_DoubleValue_google_2fprotobuf_2fwrappers_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -93,7 +92,7 @@ static void InitDefaultsscc_info_DoubleValue_google_2fprotobuf_2fwrappers_2eprot } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DoubleValue_google_2fprotobuf_2fwrappers_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_DoubleValue_google_2fprotobuf_2fwrappers_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_DoubleValue_google_2fprotobuf_2fwrappers_2eproto}, {}}; static void InitDefaultsscc_info_FloatValue_google_2fprotobuf_2fwrappers_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -107,7 +106,7 @@ static void InitDefaultsscc_info_FloatValue_google_2fprotobuf_2fwrappers_2eproto } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FloatValue_google_2fprotobuf_2fwrappers_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_FloatValue_google_2fprotobuf_2fwrappers_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_FloatValue_google_2fprotobuf_2fwrappers_2eproto}, {}}; static void InitDefaultsscc_info_Int32Value_google_2fprotobuf_2fwrappers_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -121,7 +120,7 @@ static void InitDefaultsscc_info_Int32Value_google_2fprotobuf_2fwrappers_2eproto } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Int32Value_google_2fprotobuf_2fwrappers_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Int32Value_google_2fprotobuf_2fwrappers_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Int32Value_google_2fprotobuf_2fwrappers_2eproto}, {}}; static void InitDefaultsscc_info_Int64Value_google_2fprotobuf_2fwrappers_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -135,7 +134,7 @@ static void InitDefaultsscc_info_Int64Value_google_2fprotobuf_2fwrappers_2eproto } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Int64Value_google_2fprotobuf_2fwrappers_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Int64Value_google_2fprotobuf_2fwrappers_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Int64Value_google_2fprotobuf_2fwrappers_2eproto}, {}}; static void InitDefaultsscc_info_StringValue_google_2fprotobuf_2fwrappers_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -149,7 +148,7 @@ static void InitDefaultsscc_info_StringValue_google_2fprotobuf_2fwrappers_2eprot } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_StringValue_google_2fprotobuf_2fwrappers_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_StringValue_google_2fprotobuf_2fwrappers_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_StringValue_google_2fprotobuf_2fwrappers_2eproto}, {}}; static void InitDefaultsscc_info_UInt32Value_google_2fprotobuf_2fwrappers_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -163,7 +162,7 @@ static void InitDefaultsscc_info_UInt32Value_google_2fprotobuf_2fwrappers_2eprot } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_UInt32Value_google_2fprotobuf_2fwrappers_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_UInt32Value_google_2fprotobuf_2fwrappers_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_UInt32Value_google_2fprotobuf_2fwrappers_2eproto}, {}}; static void InitDefaultsscc_info_UInt64Value_google_2fprotobuf_2fwrappers_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -177,7 +176,7 @@ static void InitDefaultsscc_info_UInt64Value_google_2fprotobuf_2fwrappers_2eprot } PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_UInt64Value_google_2fprotobuf_2fwrappers_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_UInt64Value_google_2fprotobuf_2fwrappers_2eproto}, {}}; + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_UInt64Value_google_2fprotobuf_2fwrappers_2eproto}, {}}; static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fwrappers_2eproto[9]; static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fwrappers_2eproto = nullptr; @@ -263,7 +262,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_BytesValue_default_instance_), }; -const char descriptor_table_protodef_google_2fprotobuf_2fwrappers_2eproto[] = +const char descriptor_table_protodef_google_2fprotobuf_2fwrappers_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\036google/protobuf/wrappers.proto\022\017google" ".protobuf\"\034\n\013DoubleValue\022\r\n\005value\030\001 \001(\001\"" "\033\n\nFloatValue\022\r\n\005value\030\001 \001(\002\"\033\n\nInt64Val" @@ -291,46 +290,34 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_goo &scc_info_UInt64Value_google_2fprotobuf_2fwrappers_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fwrappers_2eproto_once; -static bool descriptor_table_google_2fprotobuf_2fwrappers_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fwrappers_2eproto = { - &descriptor_table_google_2fprotobuf_2fwrappers_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2fwrappers_2eproto, "google/protobuf/wrappers.proto", 447, + false, false, descriptor_table_protodef_google_2fprotobuf_2fwrappers_2eproto, "google/protobuf/wrappers.proto", 447, &descriptor_table_google_2fprotobuf_2fwrappers_2eproto_once, descriptor_table_google_2fprotobuf_2fwrappers_2eproto_sccs, descriptor_table_google_2fprotobuf_2fwrappers_2eproto_deps, 9, 0, schemas, file_default_instances, TableStruct_google_2fprotobuf_2fwrappers_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fwrappers_2eproto, 9, file_level_enum_descriptors_google_2fprotobuf_2fwrappers_2eproto, file_level_service_descriptors_google_2fprotobuf_2fwrappers_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_google_2fprotobuf_2fwrappers_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fwrappers_2eproto), true); +static bool dynamic_init_dummy_google_2fprotobuf_2fwrappers_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fwrappers_2eproto)), true); PROTOBUF_NAMESPACE_OPEN // =================================================================== void DoubleValue::InitAsDefaultInstance() { } -class DoubleValue::HasBitSetters { +class DoubleValue::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int DoubleValue::kValueFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -DoubleValue::DoubleValue() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.DoubleValue) -} DoubleValue::DoubleValue(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.DoubleValue) } DoubleValue::DoubleValue(const DoubleValue& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); value_ = from.value_; // @@protoc_insertion_point(copy_constructor:google.protobuf.DoubleValue) } @@ -342,10 +329,11 @@ void DoubleValue::SharedCtor() { DoubleValue::~DoubleValue() { // @@protoc_insertion_point(destructor:google.protobuf.DoubleValue) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void DoubleValue::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void DoubleValue::ArenaDtor(void* object) { @@ -370,13 +358,12 @@ void DoubleValue::Clear() { (void) cached_has_bits; value_ = 0; - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* DoubleValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -395,7 +382,9 @@ const char* DoubleValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -408,83 +397,22 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool DoubleValue::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.DoubleValue) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // double value = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (9 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( - input, &value_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.DoubleValue) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.DoubleValue) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void DoubleValue::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.DoubleValue) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // double value = 1; - if (!(this->value() <= 0 && this->value() >= 0)) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(1, this->value(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.DoubleValue) -} - -::PROTOBUF_NAMESPACE_ID::uint8* DoubleValue::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* DoubleValue::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DoubleValue) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // double value = 1; if (!(this->value() <= 0 && this->value() >= 0)) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(1, this->_internal_value(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DoubleValue) return target; @@ -494,11 +422,6 @@ size_t DoubleValue::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.DoubleValue) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -508,6 +431,10 @@ size_t DoubleValue::ByteSizeLong() const { total_size += 1 + 8; } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -531,12 +458,12 @@ void DoubleValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void DoubleValue::MergeFrom(const DoubleValue& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DoubleValue) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (!(from.value() <= 0 && from.value() >= 0)) { - set_value(from.value()); + _internal_set_value(from._internal_value()); } } @@ -558,28 +485,9 @@ bool DoubleValue::IsInitialized() const { return true; } -void DoubleValue::Swap(DoubleValue* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - DoubleValue* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void DoubleValue::UnsafeArenaSwap(DoubleValue* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void DoubleValue::InternalSwap(DoubleValue* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(value_, other->value_); } @@ -592,30 +500,19 @@ void DoubleValue::InternalSwap(DoubleValue* other) { void FloatValue::InitAsDefaultInstance() { } -class FloatValue::HasBitSetters { +class FloatValue::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int FloatValue::kValueFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -FloatValue::FloatValue() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.FloatValue) -} FloatValue::FloatValue(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.FloatValue) } FloatValue::FloatValue(const FloatValue& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); value_ = from.value_; // @@protoc_insertion_point(copy_constructor:google.protobuf.FloatValue) } @@ -627,10 +524,11 @@ void FloatValue::SharedCtor() { FloatValue::~FloatValue() { // @@protoc_insertion_point(destructor:google.protobuf.FloatValue) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void FloatValue::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void FloatValue::ArenaDtor(void* object) { @@ -655,13 +553,12 @@ void FloatValue::Clear() { (void) cached_has_bits; value_ = 0; - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* FloatValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -680,7 +577,9 @@ const char* FloatValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -693,83 +592,22 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool FloatValue::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.FloatValue) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // float value = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (13 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - float, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_FLOAT>( - input, &value_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.FloatValue) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.FloatValue) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void FloatValue::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.FloatValue) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // float value = 1; - if (!(this->value() <= 0 && this->value() >= 0)) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloat(1, this->value(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.FloatValue) -} - -::PROTOBUF_NAMESPACE_ID::uint8* FloatValue::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* FloatValue::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FloatValue) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // float value = 1; if (!(this->value() <= 0 && this->value() >= 0)) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->value(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_value(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FloatValue) return target; @@ -779,11 +617,6 @@ size_t FloatValue::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FloatValue) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -793,6 +626,10 @@ size_t FloatValue::ByteSizeLong() const { total_size += 1 + 4; } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -816,12 +653,12 @@ void FloatValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void FloatValue::MergeFrom(const FloatValue& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FloatValue) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (!(from.value() <= 0 && from.value() >= 0)) { - set_value(from.value()); + _internal_set_value(from._internal_value()); } } @@ -843,28 +680,9 @@ bool FloatValue::IsInitialized() const { return true; } -void FloatValue::Swap(FloatValue* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - FloatValue* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void FloatValue::UnsafeArenaSwap(FloatValue* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void FloatValue::InternalSwap(FloatValue* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(value_, other->value_); } @@ -877,30 +695,19 @@ void FloatValue::InternalSwap(FloatValue* other) { void Int64Value::InitAsDefaultInstance() { } -class Int64Value::HasBitSetters { +class Int64Value::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Int64Value::kValueFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Int64Value::Int64Value() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.Int64Value) -} Int64Value::Int64Value(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Int64Value) } Int64Value::Int64Value(const Int64Value& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); value_ = from.value_; // @@protoc_insertion_point(copy_constructor:google.protobuf.Int64Value) } @@ -912,10 +719,11 @@ void Int64Value::SharedCtor() { Int64Value::~Int64Value() { // @@protoc_insertion_point(destructor:google.protobuf.Int64Value) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Int64Value::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void Int64Value::ArenaDtor(void* object) { @@ -940,13 +748,12 @@ void Int64Value::Clear() { (void) cached_has_bits; value_ = PROTOBUF_LONGLONG(0); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Int64Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -955,7 +762,7 @@ const char* Int64Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: // int64 value = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -965,7 +772,9 @@ const char* Int64Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -978,83 +787,22 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Int64Value::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.Int64Value) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // int64 value = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - input, &value_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.Int64Value) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.Int64Value) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Int64Value::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.Int64Value) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // int64 value = 1; - if (this->value() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->value(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.Int64Value) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Int64Value::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Int64Value::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Int64Value) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // int64 value = 1; if (this->value() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->value(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_value(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Int64Value) return target; @@ -1064,11 +812,6 @@ size_t Int64Value::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Int64Value) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1077,9 +820,13 @@ size_t Int64Value::ByteSizeLong() const { if (this->value() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( - this->value()); + this->_internal_value()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -1103,12 +850,12 @@ void Int64Value::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Int64Value::MergeFrom(const Int64Value& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Int64Value) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.value() != 0) { - set_value(from.value()); + _internal_set_value(from._internal_value()); } } @@ -1130,28 +877,9 @@ bool Int64Value::IsInitialized() const { return true; } -void Int64Value::Swap(Int64Value* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - Int64Value* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void Int64Value::UnsafeArenaSwap(Int64Value* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void Int64Value::InternalSwap(Int64Value* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(value_, other->value_); } @@ -1164,30 +892,19 @@ void Int64Value::InternalSwap(Int64Value* other) { void UInt64Value::InitAsDefaultInstance() { } -class UInt64Value::HasBitSetters { +class UInt64Value::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int UInt64Value::kValueFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -UInt64Value::UInt64Value() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.UInt64Value) -} UInt64Value::UInt64Value(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.UInt64Value) } UInt64Value::UInt64Value(const UInt64Value& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); value_ = from.value_; // @@protoc_insertion_point(copy_constructor:google.protobuf.UInt64Value) } @@ -1199,10 +916,11 @@ void UInt64Value::SharedCtor() { UInt64Value::~UInt64Value() { // @@protoc_insertion_point(destructor:google.protobuf.UInt64Value) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void UInt64Value::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void UInt64Value::ArenaDtor(void* object) { @@ -1227,13 +945,12 @@ void UInt64Value::Clear() { (void) cached_has_bits; value_ = PROTOBUF_ULONGLONG(0); - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* UInt64Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -1242,7 +959,7 @@ const char* UInt64Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID // uint64 value = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -1252,7 +969,9 @@ const char* UInt64Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -1265,83 +984,22 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool UInt64Value::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.UInt64Value) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // uint64 value = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( - input, &value_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.UInt64Value) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.UInt64Value) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void UInt64Value::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.UInt64Value) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // uint64 value = 1; - if (this->value() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(1, this->value(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.UInt64Value) -} - -::PROTOBUF_NAMESPACE_ID::uint8* UInt64Value::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* UInt64Value::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UInt64Value) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // uint64 value = 1; if (this->value() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->value(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->_internal_value(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UInt64Value) return target; @@ -1351,11 +1009,6 @@ size_t UInt64Value::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.UInt64Value) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1364,9 +1017,13 @@ size_t UInt64Value::ByteSizeLong() const { if (this->value() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( - this->value()); + this->_internal_value()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -1390,12 +1047,12 @@ void UInt64Value::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void UInt64Value::MergeFrom(const UInt64Value& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UInt64Value) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.value() != 0) { - set_value(from.value()); + _internal_set_value(from._internal_value()); } } @@ -1417,28 +1074,9 @@ bool UInt64Value::IsInitialized() const { return true; } -void UInt64Value::Swap(UInt64Value* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - UInt64Value* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void UInt64Value::UnsafeArenaSwap(UInt64Value* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void UInt64Value::InternalSwap(UInt64Value* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(value_, other->value_); } @@ -1451,30 +1089,19 @@ void UInt64Value::InternalSwap(UInt64Value* other) { void Int32Value::InitAsDefaultInstance() { } -class Int32Value::HasBitSetters { +class Int32Value::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Int32Value::kValueFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -Int32Value::Int32Value() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.Int32Value) -} Int32Value::Int32Value(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Int32Value) } Int32Value::Int32Value(const Int32Value& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); value_ = from.value_; // @@protoc_insertion_point(copy_constructor:google.protobuf.Int32Value) } @@ -1486,10 +1113,11 @@ void Int32Value::SharedCtor() { Int32Value::~Int32Value() { // @@protoc_insertion_point(destructor:google.protobuf.Int32Value) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void Int32Value::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void Int32Value::ArenaDtor(void* object) { @@ -1514,13 +1142,12 @@ void Int32Value::Clear() { (void) cached_has_bits; value_ = 0; - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* Int32Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -1529,7 +1156,7 @@ const char* Int32Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: // int32 value = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -1539,7 +1166,9 @@ const char* Int32Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -1552,83 +1181,22 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Int32Value::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.Int32Value) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // int32 value = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &value_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.Int32Value) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.Int32Value) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Int32Value::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.Int32Value) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // int32 value = 1; - if (this->value() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->value(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.Int32Value) -} - -::PROTOBUF_NAMESPACE_ID::uint8* Int32Value::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Int32Value::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Int32Value) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // int32 value = 1; if (this->value() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->value(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_value(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Int32Value) return target; @@ -1638,11 +1206,6 @@ size_t Int32Value::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Int32Value) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1651,9 +1214,13 @@ size_t Int32Value::ByteSizeLong() const { if (this->value() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->value()); + this->_internal_value()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -1677,12 +1244,12 @@ void Int32Value::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void Int32Value::MergeFrom(const Int32Value& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Int32Value) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.value() != 0) { - set_value(from.value()); + _internal_set_value(from._internal_value()); } } @@ -1704,28 +1271,9 @@ bool Int32Value::IsInitialized() const { return true; } -void Int32Value::Swap(Int32Value* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - Int32Value* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void Int32Value::UnsafeArenaSwap(Int32Value* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void Int32Value::InternalSwap(Int32Value* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(value_, other->value_); } @@ -1738,30 +1286,19 @@ void Int32Value::InternalSwap(Int32Value* other) { void UInt32Value::InitAsDefaultInstance() { } -class UInt32Value::HasBitSetters { +class UInt32Value::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int UInt32Value::kValueFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -UInt32Value::UInt32Value() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.UInt32Value) -} UInt32Value::UInt32Value(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.UInt32Value) } UInt32Value::UInt32Value(const UInt32Value& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); value_ = from.value_; // @@protoc_insertion_point(copy_constructor:google.protobuf.UInt32Value) } @@ -1773,10 +1310,11 @@ void UInt32Value::SharedCtor() { UInt32Value::~UInt32Value() { // @@protoc_insertion_point(destructor:google.protobuf.UInt32Value) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void UInt32Value::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void UInt32Value::ArenaDtor(void* object) { @@ -1801,13 +1339,12 @@ void UInt32Value::Clear() { (void) cached_has_bits; value_ = 0u; - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* UInt32Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -1816,7 +1353,7 @@ const char* UInt32Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID // uint32 value = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -1826,7 +1363,9 @@ const char* UInt32Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -1839,83 +1378,22 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool UInt32Value::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.UInt32Value) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // uint32 value = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::uint32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32>( - input, &value_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.UInt32Value) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.UInt32Value) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void UInt32Value::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.UInt32Value) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // uint32 value = 1; - if (this->value() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32(1, this->value(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.UInt32Value) -} - -::PROTOBUF_NAMESPACE_ID::uint8* UInt32Value::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* UInt32Value::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UInt32Value) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // uint32 value = 1; if (this->value() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->value(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_value(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UInt32Value) return target; @@ -1925,11 +1403,6 @@ size_t UInt32Value::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.UInt32Value) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1938,9 +1411,13 @@ size_t UInt32Value::ByteSizeLong() const { if (this->value() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size( - this->value()); + this->_internal_value()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -1964,12 +1441,12 @@ void UInt32Value::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void UInt32Value::MergeFrom(const UInt32Value& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UInt32Value) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.value() != 0) { - set_value(from.value()); + _internal_set_value(from._internal_value()); } } @@ -1991,28 +1468,9 @@ bool UInt32Value::IsInitialized() const { return true; } -void UInt32Value::Swap(UInt32Value* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - UInt32Value* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void UInt32Value::UnsafeArenaSwap(UInt32Value* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void UInt32Value::InternalSwap(UInt32Value* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(value_, other->value_); } @@ -2025,30 +1483,19 @@ void UInt32Value::InternalSwap(UInt32Value* other) { void BoolValue::InitAsDefaultInstance() { } -class BoolValue::HasBitSetters { +class BoolValue::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int BoolValue::kValueFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -BoolValue::BoolValue() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.BoolValue) -} BoolValue::BoolValue(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.BoolValue) } BoolValue::BoolValue(const BoolValue& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); value_ = from.value_; // @@protoc_insertion_point(copy_constructor:google.protobuf.BoolValue) } @@ -2060,10 +1507,11 @@ void BoolValue::SharedCtor() { BoolValue::~BoolValue() { // @@protoc_insertion_point(destructor:google.protobuf.BoolValue) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void BoolValue::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); } void BoolValue::ArenaDtor(void* object) { @@ -2088,13 +1536,12 @@ void BoolValue::Clear() { (void) cached_has_bits; value_ = false; - _internal_metadata_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* BoolValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -2103,7 +1550,7 @@ const char* BoolValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: // bool value = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -2113,7 +1560,9 @@ const char* BoolValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -2126,83 +1575,22 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool BoolValue::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.BoolValue) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // bool value = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( - input, &value_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.BoolValue) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.BoolValue) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void BoolValue::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.BoolValue) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // bool value = 1; - if (this->value() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(1, this->value(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.BoolValue) -} - -::PROTOBUF_NAMESPACE_ID::uint8* BoolValue::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* BoolValue::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.BoolValue) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool value = 1; if (this->value() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->value(), target); + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_value(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.BoolValue) return target; @@ -2212,11 +1600,6 @@ size_t BoolValue::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.BoolValue) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2226,6 +1609,10 @@ size_t BoolValue::ByteSizeLong() const { total_size += 1 + 1; } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -2249,12 +1636,12 @@ void BoolValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void BoolValue::MergeFrom(const BoolValue& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.BoolValue) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.value() != 0) { - set_value(from.value()); + _internal_set_value(from._internal_value()); } } @@ -2276,28 +1663,9 @@ bool BoolValue::IsInitialized() const { return true; } -void BoolValue::Swap(BoolValue* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - BoolValue* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void BoolValue::UnsafeArenaSwap(BoolValue* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void BoolValue::InternalSwap(BoolValue* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(value_, other->value_); } @@ -2310,34 +1678,23 @@ void BoolValue::InternalSwap(BoolValue* other) { void StringValue::InitAsDefaultInstance() { } -class StringValue::HasBitSetters { +class StringValue::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int StringValue::kValueFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -StringValue::StringValue() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.StringValue) -} StringValue::StringValue(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.StringValue) } StringValue::StringValue(const StringValue& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.value().size() > 0) { - value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.value(), - GetArenaNoVirtual()); + if (!from._internal_value().empty()) { + value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_value(), + GetArena()); } // @@protoc_insertion_point(copy_constructor:google.protobuf.StringValue) } @@ -2350,10 +1707,11 @@ void StringValue::SharedCtor() { StringValue::~StringValue() { // @@protoc_insertion_point(destructor:google.protobuf.StringValue) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void StringValue::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } @@ -2378,14 +1736,13 @@ void StringValue::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - _internal_metadata_.Clear(); + value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* StringValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -2394,7 +1751,9 @@ const char* StringValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID // string value = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_value(), ptr, ctx, "google.protobuf.StringValue.value"); + auto str = _internal_mutable_value(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.StringValue.value")); CHK_(ptr); } else goto handle_unusual; continue; @@ -2404,7 +1763,9 @@ const char* StringValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -2417,78 +1778,9 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool StringValue::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.StringValue) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string value = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_value())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->value().data(), static_cast(this->value().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "google.protobuf.StringValue.value")); - } else { - goto handle_unusual; - } - break; - } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.StringValue) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.StringValue) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void StringValue::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.StringValue) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string value = 1; - if (this->value().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->value().data(), static_cast(this->value().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "google.protobuf.StringValue.value"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->value(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.StringValue) -} - -::PROTOBUF_NAMESPACE_ID::uint8* StringValue::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* StringValue::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.StringValue) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2496,17 +1788,16 @@ void StringValue::SerializeWithCachedSizes( // string value = 1; if (this->value().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->value().data(), static_cast(this->value().length()), + this->_internal_value().data(), static_cast(this->_internal_value().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.StringValue.value"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->value(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_value(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.StringValue) return target; @@ -2516,11 +1807,6 @@ size_t StringValue::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.StringValue) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2529,9 +1815,13 @@ size_t StringValue::ByteSizeLong() const { if (this->value().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->value()); + this->_internal_value()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -2555,12 +1845,12 @@ void StringValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void StringValue::MergeFrom(const StringValue& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.StringValue) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.value().size() > 0) { - set_value(from.value()); + _internal_set_value(from._internal_value()); } } @@ -2582,30 +1872,10 @@ bool StringValue::IsInitialized() const { return true; } -void StringValue::Swap(StringValue* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - StringValue* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void StringValue::UnsafeArenaSwap(StringValue* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void StringValue::InternalSwap(StringValue* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - value_.Swap(&other->value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + value_.Swap(&other->value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } ::PROTOBUF_NAMESPACE_ID::Metadata StringValue::GetMetadata() const { @@ -2617,34 +1887,23 @@ void StringValue::InternalSwap(StringValue* other) { void BytesValue::InitAsDefaultInstance() { } -class BytesValue::HasBitSetters { +class BytesValue::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int BytesValue::kValueFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -BytesValue::BytesValue() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:google.protobuf.BytesValue) -} BytesValue::BytesValue(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(arena) { + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.BytesValue) } BytesValue::BytesValue(const BytesValue& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr) { - _internal_metadata_.MergeFrom(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from.value().size() > 0) { - value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.value(), - GetArenaNoVirtual()); + if (!from._internal_value().empty()) { + value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_value(), + GetArena()); } // @@protoc_insertion_point(copy_constructor:google.protobuf.BytesValue) } @@ -2657,10 +1916,11 @@ void BytesValue::SharedCtor() { BytesValue::~BytesValue() { // @@protoc_insertion_point(destructor:google.protobuf.BytesValue) SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void BytesValue::SharedDtor() { - GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + GOOGLE_DCHECK(GetArena() == nullptr); value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } @@ -2685,14 +1945,13 @@ void BytesValue::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - _internal_metadata_.Clear(); + value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* BytesValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); @@ -2701,7 +1960,8 @@ const char* BytesValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: // bytes value = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_value(), ptr, ctx); + auto str = _internal_mutable_value(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); } else goto handle_unusual; continue; @@ -2711,7 +1971,9 @@ const char* BytesValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: ctx->SetLastTag(tag); goto success; } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); CHK_(ptr != nullptr); continue; } @@ -2724,84 +1986,22 @@ failure: goto success; #undef CHK_ } -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool BytesValue::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:google.protobuf.BytesValue) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // bytes value = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes( - input, this->mutable_value())); - } else { - goto handle_unusual; - } - break; - } - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:google.protobuf.BytesValue) - return true; -failure: - // @@protoc_insertion_point(parse_failure:google.protobuf.BytesValue) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void BytesValue::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.protobuf.BytesValue) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // bytes value = 1; - if (this->value().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased( - 1, this->value(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:google.protobuf.BytesValue) -} - -::PROTOBUF_NAMESPACE_ID::uint8* BytesValue::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* BytesValue::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.BytesValue) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // bytes value = 1; if (this->value().size() > 0) { - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray( - 1, this->value(), target); + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_value(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.BytesValue) return target; @@ -2811,11 +2011,6 @@ size_t BytesValue::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.BytesValue) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2824,9 +2019,13 @@ size_t BytesValue::ByteSizeLong() const { if (this->value().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->value()); + this->_internal_value()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -2850,12 +2049,12 @@ void BytesValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { void BytesValue::MergeFrom(const BytesValue& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.BytesValue) GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.value().size() > 0) { - set_value(from.value()); + _internal_set_value(from._internal_value()); } } @@ -2877,30 +2076,10 @@ bool BytesValue::IsInitialized() const { return true; } -void BytesValue::Swap(BytesValue* other) { - if (other == this) return; - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { - InternalSwap(other); - } else { - BytesValue* temp = New(GetArenaNoVirtual()); - temp->MergeFrom(*other); - other->CopyFrom(*this); - InternalSwap(temp); - if (GetArenaNoVirtual() == nullptr) { - delete temp; - } - } -} -void BytesValue::UnsafeArenaSwap(BytesValue* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); - InternalSwap(other); -} void BytesValue::InternalSwap(BytesValue* other) { using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - value_.Swap(&other->value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + value_.Swap(&other->value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } ::PROTOBUF_NAMESPACE_ID::Metadata BytesValue::GetMetadata() const { diff --git a/third_party/protobuf/src/google/protobuf/wrappers.pb.h b/third_party/protobuf/src/google/protobuf/wrappers.pb.h index 2d9a3669..6071478e 100644 --- a/third_party/protobuf/src/google/protobuf/wrappers.pb.h +++ b/third_party/protobuf/src/google/protobuf/wrappers.pb.h @@ -8,12 +8,12 @@ #include #include -#if PROTOBUF_VERSION < 3008000 +#if PROTOBUF_VERSION < 3012000 #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 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3012004 < 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. @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include // IWYU pragma: export @@ -98,10 +98,10 @@ PROTOBUF_NAMESPACE_OPEN // =================================================================== -class PROTOBUF_EXPORT DoubleValue : +class PROTOBUF_EXPORT DoubleValue PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DoubleValue) */ { public: - DoubleValue(); + inline DoubleValue() : DoubleValue(nullptr) {}; virtual ~DoubleValue(); DoubleValue(const DoubleValue& from); @@ -115,7 +115,7 @@ class PROTOBUF_EXPORT DoubleValue : return *this; } inline DoubleValue& operator=(DoubleValue&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -123,12 +123,6 @@ class PROTOBUF_EXPORT DoubleValue : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -148,11 +142,22 @@ class PROTOBUF_EXPORT DoubleValue : static constexpr int kIndexInFileMessages = 0; - void UnsafeArenaSwap(DoubleValue* other); - void Swap(DoubleValue* other); friend void swap(DoubleValue& a, DoubleValue& b) { a.Swap(&b); } + inline void Swap(DoubleValue* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DoubleValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -171,16 +176,9 @@ class PROTOBUF_EXPORT DoubleValue : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -197,13 +195,6 @@ class PROTOBUF_EXPORT DoubleValue : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -219,17 +210,22 @@ class PROTOBUF_EXPORT DoubleValue : // accessors ------------------------------------------------------- + enum : int { + kValueFieldNumber = 1, + }; // double value = 1; void clear_value(); - static const int kValueFieldNumber = 1; double value() const; void set_value(double value); + private: + double _internal_value() const; + void _internal_set_value(double value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.DoubleValue) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -239,10 +235,10 @@ class PROTOBUF_EXPORT DoubleValue : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT FloatValue : +class PROTOBUF_EXPORT FloatValue PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FloatValue) */ { public: - FloatValue(); + inline FloatValue() : FloatValue(nullptr) {}; virtual ~FloatValue(); FloatValue(const FloatValue& from); @@ -256,7 +252,7 @@ class PROTOBUF_EXPORT FloatValue : return *this; } inline FloatValue& operator=(FloatValue&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -264,12 +260,6 @@ class PROTOBUF_EXPORT FloatValue : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -289,11 +279,22 @@ class PROTOBUF_EXPORT FloatValue : static constexpr int kIndexInFileMessages = 1; - void UnsafeArenaSwap(FloatValue* other); - void Swap(FloatValue* other); friend void swap(FloatValue& a, FloatValue& b) { a.Swap(&b); } + inline void Swap(FloatValue* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FloatValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -312,16 +313,9 @@ class PROTOBUF_EXPORT FloatValue : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -338,13 +332,6 @@ class PROTOBUF_EXPORT FloatValue : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -360,17 +347,22 @@ class PROTOBUF_EXPORT FloatValue : // accessors ------------------------------------------------------- + enum : int { + kValueFieldNumber = 1, + }; // float value = 1; void clear_value(); - static const int kValueFieldNumber = 1; float value() const; void set_value(float value); + private: + float _internal_value() const; + void _internal_set_value(float value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.FloatValue) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -380,10 +372,10 @@ class PROTOBUF_EXPORT FloatValue : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT Int64Value : +class PROTOBUF_EXPORT Int64Value PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Int64Value) */ { public: - Int64Value(); + inline Int64Value() : Int64Value(nullptr) {}; virtual ~Int64Value(); Int64Value(const Int64Value& from); @@ -397,7 +389,7 @@ class PROTOBUF_EXPORT Int64Value : return *this; } inline Int64Value& operator=(Int64Value&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -405,12 +397,6 @@ class PROTOBUF_EXPORT Int64Value : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -430,11 +416,22 @@ class PROTOBUF_EXPORT Int64Value : static constexpr int kIndexInFileMessages = 2; - void UnsafeArenaSwap(Int64Value* other); - void Swap(Int64Value* other); friend void swap(Int64Value& a, Int64Value& b) { a.Swap(&b); } + inline void Swap(Int64Value* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Int64Value* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -453,16 +450,9 @@ class PROTOBUF_EXPORT Int64Value : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -479,13 +469,6 @@ class PROTOBUF_EXPORT Int64Value : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -501,17 +484,22 @@ class PROTOBUF_EXPORT Int64Value : // accessors ------------------------------------------------------- + enum : int { + kValueFieldNumber = 1, + }; // int64 value = 1; void clear_value(); - static const int kValueFieldNumber = 1; ::PROTOBUF_NAMESPACE_ID::int64 value() const; void set_value(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_value() const; + void _internal_set_value(::PROTOBUF_NAMESPACE_ID::int64 value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.Int64Value) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -521,10 +509,10 @@ class PROTOBUF_EXPORT Int64Value : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT UInt64Value : +class PROTOBUF_EXPORT UInt64Value PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UInt64Value) */ { public: - UInt64Value(); + inline UInt64Value() : UInt64Value(nullptr) {}; virtual ~UInt64Value(); UInt64Value(const UInt64Value& from); @@ -538,7 +526,7 @@ class PROTOBUF_EXPORT UInt64Value : return *this; } inline UInt64Value& operator=(UInt64Value&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -546,12 +534,6 @@ class PROTOBUF_EXPORT UInt64Value : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -571,11 +553,22 @@ class PROTOBUF_EXPORT UInt64Value : static constexpr int kIndexInFileMessages = 3; - void UnsafeArenaSwap(UInt64Value* other); - void Swap(UInt64Value* other); friend void swap(UInt64Value& a, UInt64Value& b) { a.Swap(&b); } + inline void Swap(UInt64Value* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UInt64Value* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -594,16 +587,9 @@ class PROTOBUF_EXPORT UInt64Value : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -620,13 +606,6 @@ class PROTOBUF_EXPORT UInt64Value : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -642,17 +621,22 @@ class PROTOBUF_EXPORT UInt64Value : // accessors ------------------------------------------------------- + enum : int { + kValueFieldNumber = 1, + }; // uint64 value = 1; void clear_value(); - static const int kValueFieldNumber = 1; ::PROTOBUF_NAMESPACE_ID::uint64 value() const; void set_value(::PROTOBUF_NAMESPACE_ID::uint64 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint64 _internal_value() const; + void _internal_set_value(::PROTOBUF_NAMESPACE_ID::uint64 value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.UInt64Value) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -662,10 +646,10 @@ class PROTOBUF_EXPORT UInt64Value : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT Int32Value : +class PROTOBUF_EXPORT Int32Value PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Int32Value) */ { public: - Int32Value(); + inline Int32Value() : Int32Value(nullptr) {}; virtual ~Int32Value(); Int32Value(const Int32Value& from); @@ -679,7 +663,7 @@ class PROTOBUF_EXPORT Int32Value : return *this; } inline Int32Value& operator=(Int32Value&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -687,12 +671,6 @@ class PROTOBUF_EXPORT Int32Value : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -712,11 +690,22 @@ class PROTOBUF_EXPORT Int32Value : static constexpr int kIndexInFileMessages = 4; - void UnsafeArenaSwap(Int32Value* other); - void Swap(Int32Value* other); friend void swap(Int32Value& a, Int32Value& b) { a.Swap(&b); } + inline void Swap(Int32Value* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Int32Value* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -735,16 +724,9 @@ class PROTOBUF_EXPORT Int32Value : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -761,13 +743,6 @@ class PROTOBUF_EXPORT Int32Value : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -783,17 +758,22 @@ class PROTOBUF_EXPORT Int32Value : // accessors ------------------------------------------------------- + enum : int { + kValueFieldNumber = 1, + }; // int32 value = 1; void clear_value(); - static const int kValueFieldNumber = 1; ::PROTOBUF_NAMESPACE_ID::int32 value() const; void set_value(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_value() const; + void _internal_set_value(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.Int32Value) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -803,10 +783,10 @@ class PROTOBUF_EXPORT Int32Value : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT UInt32Value : +class PROTOBUF_EXPORT UInt32Value PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UInt32Value) */ { public: - UInt32Value(); + inline UInt32Value() : UInt32Value(nullptr) {}; virtual ~UInt32Value(); UInt32Value(const UInt32Value& from); @@ -820,7 +800,7 @@ class PROTOBUF_EXPORT UInt32Value : return *this; } inline UInt32Value& operator=(UInt32Value&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -828,12 +808,6 @@ class PROTOBUF_EXPORT UInt32Value : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -853,11 +827,22 @@ class PROTOBUF_EXPORT UInt32Value : static constexpr int kIndexInFileMessages = 5; - void UnsafeArenaSwap(UInt32Value* other); - void Swap(UInt32Value* other); friend void swap(UInt32Value& a, UInt32Value& b) { a.Swap(&b); } + inline void Swap(UInt32Value* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UInt32Value* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -876,16 +861,9 @@ class PROTOBUF_EXPORT UInt32Value : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -902,13 +880,6 @@ class PROTOBUF_EXPORT UInt32Value : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -924,17 +895,22 @@ class PROTOBUF_EXPORT UInt32Value : // accessors ------------------------------------------------------- + enum : int { + kValueFieldNumber = 1, + }; // uint32 value = 1; void clear_value(); - static const int kValueFieldNumber = 1; ::PROTOBUF_NAMESPACE_ID::uint32 value() const; void set_value(::PROTOBUF_NAMESPACE_ID::uint32 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint32 _internal_value() const; + void _internal_set_value(::PROTOBUF_NAMESPACE_ID::uint32 value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.UInt32Value) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -944,10 +920,10 @@ class PROTOBUF_EXPORT UInt32Value : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT BoolValue : +class PROTOBUF_EXPORT BoolValue PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.BoolValue) */ { public: - BoolValue(); + inline BoolValue() : BoolValue(nullptr) {}; virtual ~BoolValue(); BoolValue(const BoolValue& from); @@ -961,7 +937,7 @@ class PROTOBUF_EXPORT BoolValue : return *this; } inline BoolValue& operator=(BoolValue&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -969,12 +945,6 @@ class PROTOBUF_EXPORT BoolValue : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -994,11 +964,22 @@ class PROTOBUF_EXPORT BoolValue : static constexpr int kIndexInFileMessages = 6; - void UnsafeArenaSwap(BoolValue* other); - void Swap(BoolValue* other); friend void swap(BoolValue& a, BoolValue& b) { a.Swap(&b); } + inline void Swap(BoolValue* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BoolValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1017,16 +998,9 @@ class PROTOBUF_EXPORT BoolValue : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -1043,13 +1017,6 @@ class PROTOBUF_EXPORT BoolValue : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -1065,17 +1032,22 @@ class PROTOBUF_EXPORT BoolValue : // accessors ------------------------------------------------------- + enum : int { + kValueFieldNumber = 1, + }; // bool value = 1; void clear_value(); - static const int kValueFieldNumber = 1; bool value() const; void set_value(bool value); + private: + bool _internal_value() const; + void _internal_set_value(bool value); + public: // @@protoc_insertion_point(class_scope:google.protobuf.BoolValue) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -1085,10 +1057,10 @@ class PROTOBUF_EXPORT BoolValue : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT StringValue : +class PROTOBUF_EXPORT StringValue PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.StringValue) */ { public: - StringValue(); + inline StringValue() : StringValue(nullptr) {}; virtual ~StringValue(); StringValue(const StringValue& from); @@ -1102,7 +1074,7 @@ class PROTOBUF_EXPORT StringValue : return *this; } inline StringValue& operator=(StringValue&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -1110,12 +1082,6 @@ class PROTOBUF_EXPORT StringValue : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -1135,11 +1101,22 @@ class PROTOBUF_EXPORT StringValue : static constexpr int kIndexInFileMessages = 7; - void UnsafeArenaSwap(StringValue* other); - void Swap(StringValue* other); friend void swap(StringValue& a, StringValue& b) { a.Swap(&b); } + inline void Swap(StringValue* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(StringValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1158,16 +1135,9 @@ class PROTOBUF_EXPORT StringValue : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -1184,13 +1154,6 @@ class PROTOBUF_EXPORT StringValue : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -1206,9 +1169,11 @@ class PROTOBUF_EXPORT StringValue : // accessors ------------------------------------------------------- + enum : int { + kValueFieldNumber = 1, + }; // string value = 1; void clear_value(); - static const int kValueFieldNumber = 1; const std::string& value() const; void set_value(const std::string& value); void set_value(std::string&& value); @@ -1226,12 +1191,16 @@ class PROTOBUF_EXPORT StringValue : " future release.") void unsafe_arena_set_allocated_value( std::string* value); + private: + const std::string& _internal_value() const; + void _internal_set_value(const std::string& value); + std::string* _internal_mutable_value(); + public: // @@protoc_insertion_point(class_scope:google.protobuf.StringValue) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -1241,10 +1210,10 @@ class PROTOBUF_EXPORT StringValue : }; // ------------------------------------------------------------------- -class PROTOBUF_EXPORT BytesValue : +class PROTOBUF_EXPORT BytesValue PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.BytesValue) */ { public: - BytesValue(); + inline BytesValue() : BytesValue(nullptr) {}; virtual ~BytesValue(); BytesValue(const BytesValue& from); @@ -1258,7 +1227,7 @@ class PROTOBUF_EXPORT BytesValue : return *this; } inline BytesValue& operator=(BytesValue&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); @@ -1266,12 +1235,6 @@ class PROTOBUF_EXPORT BytesValue : return *this; } - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { - return GetArenaNoVirtual(); - } - inline void* GetMaybeArenaPointer() const final { - return MaybeArenaPtr(); - } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } @@ -1291,11 +1254,22 @@ class PROTOBUF_EXPORT BytesValue : static constexpr int kIndexInFileMessages = 8; - void UnsafeArenaSwap(BytesValue* other); - void Swap(BytesValue* other); friend void swap(BytesValue& a, BytesValue& b) { a.Swap(&b); } + inline void Swap(BytesValue* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BytesValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1314,16 +1288,9 @@ class PROTOBUF_EXPORT BytesValue : bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -1340,13 +1307,6 @@ class PROTOBUF_EXPORT BytesValue : private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; @@ -1362,9 +1322,11 @@ class PROTOBUF_EXPORT BytesValue : // accessors ------------------------------------------------------- + enum : int { + kValueFieldNumber = 1, + }; // bytes value = 1; void clear_value(); - static const int kValueFieldNumber = 1; const std::string& value() const; void set_value(const std::string& value); void set_value(std::string&& value); @@ -1382,12 +1344,16 @@ class PROTOBUF_EXPORT BytesValue : " future release.") void unsafe_arena_set_allocated_value( std::string* value); + private: + const std::string& _internal_value() const; + void _internal_set_value(const std::string& value); + std::string* _internal_mutable_value(); + public: // @@protoc_insertion_point(class_scope:google.protobuf.BytesValue) private: - class HasBitSetters; + class _Internal; - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; @@ -1410,13 +1376,19 @@ class PROTOBUF_EXPORT BytesValue : inline void DoubleValue::clear_value() { value_ = 0; } -inline double DoubleValue::value() const { - // @@protoc_insertion_point(field_get:google.protobuf.DoubleValue.value) +inline double DoubleValue::_internal_value() const { return value_; } -inline void DoubleValue::set_value(double value) { +inline double DoubleValue::value() const { + // @@protoc_insertion_point(field_get:google.protobuf.DoubleValue.value) + return _internal_value(); +} +inline void DoubleValue::_internal_set_value(double value) { value_ = value; +} +inline void DoubleValue::set_value(double value) { + _internal_set_value(value); // @@protoc_insertion_point(field_set:google.protobuf.DoubleValue.value) } @@ -1428,13 +1400,19 @@ inline void DoubleValue::set_value(double value) { inline void FloatValue::clear_value() { value_ = 0; } -inline float FloatValue::value() const { - // @@protoc_insertion_point(field_get:google.protobuf.FloatValue.value) +inline float FloatValue::_internal_value() const { return value_; } -inline void FloatValue::set_value(float value) { +inline float FloatValue::value() const { + // @@protoc_insertion_point(field_get:google.protobuf.FloatValue.value) + return _internal_value(); +} +inline void FloatValue::_internal_set_value(float value) { value_ = value; +} +inline void FloatValue::set_value(float value) { + _internal_set_value(value); // @@protoc_insertion_point(field_set:google.protobuf.FloatValue.value) } @@ -1446,13 +1424,19 @@ inline void FloatValue::set_value(float value) { inline void Int64Value::clear_value() { value_ = PROTOBUF_LONGLONG(0); } -inline ::PROTOBUF_NAMESPACE_ID::int64 Int64Value::value() const { - // @@protoc_insertion_point(field_get:google.protobuf.Int64Value.value) +inline ::PROTOBUF_NAMESPACE_ID::int64 Int64Value::_internal_value() const { return value_; } -inline void Int64Value::set_value(::PROTOBUF_NAMESPACE_ID::int64 value) { +inline ::PROTOBUF_NAMESPACE_ID::int64 Int64Value::value() const { + // @@protoc_insertion_point(field_get:google.protobuf.Int64Value.value) + return _internal_value(); +} +inline void Int64Value::_internal_set_value(::PROTOBUF_NAMESPACE_ID::int64 value) { value_ = value; +} +inline void Int64Value::set_value(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_value(value); // @@protoc_insertion_point(field_set:google.protobuf.Int64Value.value) } @@ -1464,13 +1448,19 @@ inline void Int64Value::set_value(::PROTOBUF_NAMESPACE_ID::int64 value) { inline void UInt64Value::clear_value() { value_ = PROTOBUF_ULONGLONG(0); } -inline ::PROTOBUF_NAMESPACE_ID::uint64 UInt64Value::value() const { - // @@protoc_insertion_point(field_get:google.protobuf.UInt64Value.value) +inline ::PROTOBUF_NAMESPACE_ID::uint64 UInt64Value::_internal_value() const { return value_; } -inline void UInt64Value::set_value(::PROTOBUF_NAMESPACE_ID::uint64 value) { +inline ::PROTOBUF_NAMESPACE_ID::uint64 UInt64Value::value() const { + // @@protoc_insertion_point(field_get:google.protobuf.UInt64Value.value) + return _internal_value(); +} +inline void UInt64Value::_internal_set_value(::PROTOBUF_NAMESPACE_ID::uint64 value) { value_ = value; +} +inline void UInt64Value::set_value(::PROTOBUF_NAMESPACE_ID::uint64 value) { + _internal_set_value(value); // @@protoc_insertion_point(field_set:google.protobuf.UInt64Value.value) } @@ -1482,13 +1472,19 @@ inline void UInt64Value::set_value(::PROTOBUF_NAMESPACE_ID::uint64 value) { inline void Int32Value::clear_value() { value_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Int32Value::value() const { - // @@protoc_insertion_point(field_get:google.protobuf.Int32Value.value) +inline ::PROTOBUF_NAMESPACE_ID::int32 Int32Value::_internal_value() const { return value_; } -inline void Int32Value::set_value(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 Int32Value::value() const { + // @@protoc_insertion_point(field_get:google.protobuf.Int32Value.value) + return _internal_value(); +} +inline void Int32Value::_internal_set_value(::PROTOBUF_NAMESPACE_ID::int32 value) { value_ = value; +} +inline void Int32Value::set_value(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_value(value); // @@protoc_insertion_point(field_set:google.protobuf.Int32Value.value) } @@ -1500,13 +1496,19 @@ inline void Int32Value::set_value(::PROTOBUF_NAMESPACE_ID::int32 value) { inline void UInt32Value::clear_value() { value_ = 0u; } -inline ::PROTOBUF_NAMESPACE_ID::uint32 UInt32Value::value() const { - // @@protoc_insertion_point(field_get:google.protobuf.UInt32Value.value) +inline ::PROTOBUF_NAMESPACE_ID::uint32 UInt32Value::_internal_value() const { return value_; } -inline void UInt32Value::set_value(::PROTOBUF_NAMESPACE_ID::uint32 value) { +inline ::PROTOBUF_NAMESPACE_ID::uint32 UInt32Value::value() const { + // @@protoc_insertion_point(field_get:google.protobuf.UInt32Value.value) + return _internal_value(); +} +inline void UInt32Value::_internal_set_value(::PROTOBUF_NAMESPACE_ID::uint32 value) { value_ = value; +} +inline void UInt32Value::set_value(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _internal_set_value(value); // @@protoc_insertion_point(field_set:google.protobuf.UInt32Value.value) } @@ -1518,13 +1520,19 @@ inline void UInt32Value::set_value(::PROTOBUF_NAMESPACE_ID::uint32 value) { inline void BoolValue::clear_value() { value_ = false; } -inline bool BoolValue::value() const { - // @@protoc_insertion_point(field_get:google.protobuf.BoolValue.value) +inline bool BoolValue::_internal_value() const { return value_; } -inline void BoolValue::set_value(bool value) { +inline bool BoolValue::value() const { + // @@protoc_insertion_point(field_get:google.protobuf.BoolValue.value) + return _internal_value(); +} +inline void BoolValue::_internal_set_value(bool value) { value_ = value; +} +inline void BoolValue::set_value(bool value) { + _internal_set_value(value); // @@protoc_insertion_point(field_set:google.protobuf.BoolValue.value) } @@ -1534,46 +1542,54 @@ inline void BoolValue::set_value(bool value) { // string value = 1; inline void StringValue::clear_value() { - value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& StringValue::value() const { // @@protoc_insertion_point(field_get:google.protobuf.StringValue.value) - return value_.Get(); + return _internal_value(); } inline void StringValue::set_value(const std::string& value) { - - value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_value(value); // @@protoc_insertion_point(field_set:google.protobuf.StringValue.value) } +inline std::string* StringValue::mutable_value() { + // @@protoc_insertion_point(field_mutable:google.protobuf.StringValue.value) + return _internal_mutable_value(); +} +inline const std::string& StringValue::_internal_value() const { + return value_.Get(); +} +inline void StringValue::_internal_set_value(const std::string& value) { + + value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void StringValue::set_value(std::string&& value) { value_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.StringValue.value) } inline void StringValue::set_value(const char* value) { GOOGLE_DCHECK(value != nullptr); value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.StringValue.value) } inline void StringValue::set_value(const char* value, size_t size) { value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.StringValue.value) } -inline std::string* StringValue::mutable_value() { +inline std::string* StringValue::_internal_mutable_value() { - // @@protoc_insertion_point(field_mutable:google.protobuf.StringValue.value) - return value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* StringValue::release_value() { // @@protoc_insertion_point(field_release:google.protobuf.StringValue.value) - - return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void StringValue::set_allocated_value(std::string* value) { if (value != nullptr) { @@ -1582,26 +1598,26 @@ inline void StringValue::set_allocated_value(std::string* value) { } value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.StringValue.value) } inline std::string* StringValue::unsafe_arena_release_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.StringValue.value) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); return value_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void StringValue::unsafe_arena_set_allocated_value( std::string* value) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (value != nullptr) { } else { } value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - value, GetArenaNoVirtual()); + value, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.StringValue.value) } @@ -1611,46 +1627,54 @@ inline void StringValue::unsafe_arena_set_allocated_value( // bytes value = 1; inline void BytesValue::clear_value() { - value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& BytesValue::value() const { // @@protoc_insertion_point(field_get:google.protobuf.BytesValue.value) - return value_.Get(); + return _internal_value(); } inline void BytesValue::set_value(const std::string& value) { - - value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + _internal_set_value(value); // @@protoc_insertion_point(field_set:google.protobuf.BytesValue.value) } +inline std::string* BytesValue::mutable_value() { + // @@protoc_insertion_point(field_mutable:google.protobuf.BytesValue.value) + return _internal_mutable_value(); +} +inline const std::string& BytesValue::_internal_value() const { + return value_.Get(); +} +inline void BytesValue::_internal_set_value(const std::string& value) { + + value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} inline void BytesValue::set_value(std::string&& value) { value_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.BytesValue.value) } inline void BytesValue::set_value(const char* value) { GOOGLE_DCHECK(value != nullptr); value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_char:google.protobuf.BytesValue.value) } inline void BytesValue::set_value(const void* value, size_t size) { value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArenaNoVirtual()); + reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.BytesValue.value) } -inline std::string* BytesValue::mutable_value() { +inline std::string* BytesValue::_internal_mutable_value() { - // @@protoc_insertion_point(field_mutable:google.protobuf.BytesValue.value) - return value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* BytesValue::release_value() { // @@protoc_insertion_point(field_release:google.protobuf.BytesValue.value) - - return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void BytesValue::set_allocated_value(std::string* value) { if (value != nullptr) { @@ -1659,26 +1683,26 @@ inline void BytesValue::set_allocated_value(std::string* value) { } value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, - GetArenaNoVirtual()); + GetArena()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.BytesValue.value) } inline std::string* BytesValue::unsafe_arena_release_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.BytesValue.value) - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); return value_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + GetArena()); } inline void BytesValue::unsafe_arena_set_allocated_value( std::string* value) { - GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + GOOGLE_DCHECK(GetArena() != nullptr); if (value != nullptr) { } else { } value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - value, GetArenaNoVirtual()); + value, GetArena()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.BytesValue.value) } diff --git a/third_party/protobuf/test-driver b/third_party/protobuf/test-driver index 8e575b01..89dba1e0 100755 --- a/third_party/protobuf/test-driver +++ b/third_party/protobuf/test-driver @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2013-07-13.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# Copyright (C) 2011-2020 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ scriptversion=2013-07-13.22; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -140,9 +140,9 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/third_party/protobuf/third_party/googletest/Makefile.in b/third_party/protobuf/third_party/googletest/Makefile.in index ad449a77..6282edcc 100644 --- a/third_party/protobuf/third_party/googletest/Makefile.in +++ b/third_party/protobuf/third_party/googletest/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -131,7 +131,7 @@ am__recursive_targets = \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir dist dist-all distcheck + cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -310,8 +310,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -429,7 +429,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -509,6 +512,10 @@ dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -551,6 +558,8 @@ distcheck: dist eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -727,7 +736,7 @@ uninstall-am: am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-tags \ + dist-zstd distcheck distclean distclean-generic distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ diff --git a/third_party/protobuf/third_party/googletest/aclocal.m4 b/third_party/protobuf/third_party/googletest/aclocal.m4 index 9ad33976..a5dbd09e 100644 --- a/third_party/protobuf/third_party/googletest/aclocal.m4 +++ b/third_party/protobuf/third_party/googletest/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' +[am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15.1], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15.1])dnl +[AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -197,8 +197,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. @@ -265,7 +265,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -307,7 +307,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -328,7 +328,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2017 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -349,7 +349,7 @@ AC_SUBST([am__leading_dot])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -388,7 +388,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -419,7 +419,7 @@ AC_DEFUN([_AM_IF_OPTION], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -500,7 +500,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -560,7 +560,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -588,7 +588,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2017 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -607,7 +607,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2017 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/third_party/protobuf/third_party/googletest/build-aux/install-sh b/third_party/protobuf/third_party/googletest/build-aux/install-sh index 59990a10..20d8b2ea 100755 --- a/third_party/protobuf/third_party/googletest/build-aux/install-sh +++ b/third_party/protobuf/third_party/googletest/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2014-09-12.12; # UTC +scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -271,15 +271,18 @@ do fi dst=$dst_arg - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. + # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst - dst=$dstdir/`basename "$src"` + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac dstdir_status=0 else dstdir=`dirname "$dst"` @@ -288,6 +291,11 @@ do fi fi + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + obsolete_mkdir_used=false if test $dstdir_status != 0; then @@ -324,14 +332,16 @@ do # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) - # $RANDOM is not portable (e.g. dash); use it when possible to - # lower collision chance + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - # As "mkdir -p" follows symlinks and we work in /tmp possibly; so - # create the $tmpdir first (and fail if unsuccessful) to make sure - # that nobody tries to guess the $tmpdir name. + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 @@ -434,14 +444,25 @@ do else # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -500,9 +521,9 @@ do done # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/third_party/protobuf/third_party/googletest/build-aux/missing b/third_party/protobuf/third_party/googletest/build-aux/missing index f62bbae3..8d0eaad2 100755 --- a/third_party/protobuf/third_party/googletest/build-aux/missing +++ b/third_party/protobuf/third_party/googletest/build-aux/missing @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -101,9 +101,9 @@ else exit $st fi -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software program_details () { @@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/third_party/protobuf/third_party/googletest/configure b/third_party/protobuf/third_party/googletest/configure index cb86e347..dca46af5 100755 --- a/third_party/protobuf/third_party/googletest/configure +++ b/third_party/protobuf/third_party/googletest/configure @@ -1759,7 +1759,7 @@ ac_config_files="$ac_config_files Makefile" subdirs="$subdirs googletest googlemock" -am__api_version='1.15' +am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2275,8 +2275,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The @@ -2327,7 +2327,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM diff --git a/third_party/protobuf/third_party/googletest/googlemock/Makefile.in b/third_party/protobuf/third_party/googletest/googlemock/Makefile.in index c656f918..ae87016e 100644 --- a/third_party/protobuf/third_party/googletest/googlemock/Makefile.in +++ b/third_party/protobuf/third_party/googletest/googlemock/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -112,6 +112,7 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/build-aux/config.h CONFIG_CLEAN_FILES = scripts/gmock-config CONFIG_CLEAN_VPATH_FILES = +@HAVE_PYTHON_TRUE@am__EXEEXT_1 = test/gmock_fused_test$(EXEEXT) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -153,7 +154,6 @@ am__v_lt_1 = lib_libgmock_main_la_DEPENDENCIES = lib/libgmock.la am_lib_libgmock_main_la_OBJECTS = src/gmock_main.lo lib_libgmock_main_la_OBJECTS = $(am_lib_libgmock_main_la_OBJECTS) -@HAVE_PYTHON_TRUE@am__EXEEXT_1 = test/gmock_fused_test$(EXEEXT) am_test_gmock_spec_builders_test_OBJECTS = \ test/gmock-spec-builders_test.$(OBJEXT) test_gmock_spec_builders_test_OBJECTS = \ @@ -166,7 +166,7 @@ am__test_gmock_fused_test_SOURCES_DIST = fused-src/gmock-gtest-all.cc \ fused-src/gtest/gtest.h test/gmock_test.cc @HAVE_PYTHON_TRUE@am_test_gmock_fused_test_OBJECTS = fused-src/test_gmock_fused_test-gmock-gtest-all.$(OBJEXT) \ @HAVE_PYTHON_TRUE@ fused-src/test_gmock_fused_test-gmock_main.$(OBJEXT) \ -@HAVE_PYTHON_TRUE@ test/test_gmock_fused_test-gmock_test.$(OBJEXT) +@HAVE_PYTHON_TRUE@ test/gmock_fused_test-gmock_test.$(OBJEXT) test_gmock_fused_test_OBJECTS = $(am_test_gmock_fused_test_OBJECTS) test_gmock_fused_test_LDADD = $(LDADD) am_test_gmock_link_test_OBJECTS = test/gmock_link2_test.$(OBJEXT) \ @@ -188,7 +188,15 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/build-aux depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = \ + fused-src/$(DEPDIR)/test_gmock_fused_test-gmock-gtest-all.Po \ + fused-src/$(DEPDIR)/test_gmock_fused_test-gmock_main.Po \ + src/$(DEPDIR)/gmock-all.Plo src/$(DEPDIR)/gmock_main.Plo \ + test/$(DEPDIR)/gmock-spec-builders_test.Po \ + test/$(DEPDIR)/gmock_fused_test-gmock_test.Po \ + test/$(DEPDIR)/gmock_link2_test.Po \ + test/$(DEPDIR)/gmock_link_test.Po am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -256,7 +264,8 @@ am__recursive_targets = \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope check recheck distdir dist dist-all distcheck + cscope check recheck distdir distdir-am dist dist-all \ + distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -795,8 +804,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -825,6 +834,15 @@ distclean-hdr: scripts/gmock-config: $(top_builddir)/config.status $(top_srcdir)/scripts/gmock-config.in cd $(top_builddir) && $(SHELL) ./config.status $@ +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ @@ -876,15 +894,6 @@ src/gmock_main.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) lib/libgmock_main.la: $(lib_libgmock_main_la_OBJECTS) $(lib_libgmock_main_la_DEPENDENCIES) $(EXTRA_lib_libgmock_main_la_DEPENDENCIES) lib/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) -rpath $(libdir) $(lib_libgmock_main_la_OBJECTS) $(lib_libgmock_main_la_LIBADD) $(LIBS) - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list test/$(am__dirstamp): @$(MKDIR_P) test @: > test/$(am__dirstamp) @@ -907,7 +916,7 @@ fused-src/test_gmock_fused_test-gmock-gtest-all.$(OBJEXT): \ fused-src/$(am__dirstamp) fused-src/$(DEPDIR)/$(am__dirstamp) fused-src/test_gmock_fused_test-gmock_main.$(OBJEXT): \ fused-src/$(am__dirstamp) fused-src/$(DEPDIR)/$(am__dirstamp) -test/test_gmock_fused_test-gmock_test.$(OBJEXT): test/$(am__dirstamp) \ +test/gmock_fused_test-gmock_test.$(OBJEXT): test/$(am__dirstamp) \ test/$(DEPDIR)/$(am__dirstamp) test/gmock_fused_test$(EXEEXT): $(test_gmock_fused_test_OBJECTS) $(test_gmock_fused_test_DEPENDENCIES) $(EXTRA_test_gmock_fused_test_DEPENDENCIES) test/$(am__dirstamp) @@ -932,14 +941,20 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@fused-src/$(DEPDIR)/test_gmock_fused_test-gmock-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@fused-src/$(DEPDIR)/test_gmock_fused_test-gmock_main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gmock-all.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gmock_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/gmock-spec-builders_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/gmock_link2_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/gmock_link_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_gmock_fused_test-gmock_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@fused-src/$(DEPDIR)/test_gmock_fused_test-gmock-gtest-all.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@fused-src/$(DEPDIR)/test_gmock_fused_test-gmock_main.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gmock-all.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gmock_main.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/gmock-spec-builders_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/gmock_fused_test-gmock_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/gmock_link2_test.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/gmock_link_test.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -993,19 +1008,19 @@ fused-src/test_gmock_fused_test-gmock_main.obj: fused-src/gmock_main.cc @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fused-src/test_gmock_fused_test-gmock_main.obj `if test -f 'fused-src/gmock_main.cc'; then $(CYGPATH_W) 'fused-src/gmock_main.cc'; else $(CYGPATH_W) '$(srcdir)/fused-src/gmock_main.cc'; fi` -test/test_gmock_fused_test-gmock_test.o: test/gmock_test.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test/test_gmock_fused_test-gmock_test.o -MD -MP -MF test/$(DEPDIR)/test_gmock_fused_test-gmock_test.Tpo -c -o test/test_gmock_fused_test-gmock_test.o `test -f 'test/gmock_test.cc' || echo '$(srcdir)/'`test/gmock_test.cc -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_gmock_fused_test-gmock_test.Tpo test/$(DEPDIR)/test_gmock_fused_test-gmock_test.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test/gmock_test.cc' object='test/test_gmock_fused_test-gmock_test.o' libtool=no @AMDEPBACKSLASH@ +test/gmock_fused_test-gmock_test.o: test/gmock_test.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test/gmock_fused_test-gmock_test.o -MD -MP -MF test/$(DEPDIR)/gmock_fused_test-gmock_test.Tpo -c -o test/gmock_fused_test-gmock_test.o `test -f 'test/gmock_test.cc' || echo '$(srcdir)/'`test/gmock_test.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/gmock_fused_test-gmock_test.Tpo test/$(DEPDIR)/gmock_fused_test-gmock_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test/gmock_test.cc' object='test/gmock_fused_test-gmock_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test/test_gmock_fused_test-gmock_test.o `test -f 'test/gmock_test.cc' || echo '$(srcdir)/'`test/gmock_test.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test/gmock_fused_test-gmock_test.o `test -f 'test/gmock_test.cc' || echo '$(srcdir)/'`test/gmock_test.cc -test/test_gmock_fused_test-gmock_test.obj: test/gmock_test.cc -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test/test_gmock_fused_test-gmock_test.obj -MD -MP -MF test/$(DEPDIR)/test_gmock_fused_test-gmock_test.Tpo -c -o test/test_gmock_fused_test-gmock_test.obj `if test -f 'test/gmock_test.cc'; then $(CYGPATH_W) 'test/gmock_test.cc'; else $(CYGPATH_W) '$(srcdir)/test/gmock_test.cc'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_gmock_fused_test-gmock_test.Tpo test/$(DEPDIR)/test_gmock_fused_test-gmock_test.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test/gmock_test.cc' object='test/test_gmock_fused_test-gmock_test.obj' libtool=no @AMDEPBACKSLASH@ +test/gmock_fused_test-gmock_test.obj: test/gmock_test.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test/gmock_fused_test-gmock_test.obj -MD -MP -MF test/$(DEPDIR)/gmock_fused_test-gmock_test.Tpo -c -o test/gmock_fused_test-gmock_test.obj `if test -f 'test/gmock_test.cc'; then $(CYGPATH_W) 'test/gmock_test.cc'; else $(CYGPATH_W) '$(srcdir)/test/gmock_test.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/gmock_fused_test-gmock_test.Tpo test/$(DEPDIR)/gmock_fused_test-gmock_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test/gmock_test.cc' object='test/gmock_fused_test-gmock_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test/test_gmock_fused_test-gmock_test.obj `if test -f 'test/gmock_test.cc'; then $(CYGPATH_W) 'test/gmock_test.cc'; else $(CYGPATH_W) '$(srcdir)/test/gmock_test.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_gmock_fused_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test/gmock_fused_test-gmock_test.obj `if test -f 'test/gmock_test.cc'; then $(CYGPATH_W) 'test/gmock_test.cc'; else $(CYGPATH_W) '$(srcdir)/test/gmock_test.cc'; fi` mostlyclean-libtool: -rm -f *.lo @@ -1287,7 +1302,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) fi; \ $$success || exit 1 -check-TESTS: +check-TESTS: $(check_PROGRAMS) @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @@ -1344,7 +1359,10 @@ test/gmock_fused_test.log: test/gmock_fused_test$(EXEEXT) @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -1423,6 +1441,10 @@ dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -1464,6 +1486,8 @@ distcheck: dist eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -1590,7 +1614,14 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf fused-src/$(DEPDIR) src/$(DEPDIR) test/$(DEPDIR) + -rm -f fused-src/$(DEPDIR)/test_gmock_fused_test-gmock-gtest-all.Po + -rm -f fused-src/$(DEPDIR)/test_gmock_fused_test-gmock_main.Po + -rm -f src/$(DEPDIR)/gmock-all.Plo + -rm -f src/$(DEPDIR)/gmock_main.Plo + -rm -f test/$(DEPDIR)/gmock-spec-builders_test.Po + -rm -f test/$(DEPDIR)/gmock_fused_test-gmock_test.Po + -rm -f test/$(DEPDIR)/gmock_link2_test.Po + -rm -f test/$(DEPDIR)/gmock_link_test.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags @@ -1639,7 +1670,14 @@ installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf fused-src/$(DEPDIR) src/$(DEPDIR) test/$(DEPDIR) + -rm -f fused-src/$(DEPDIR)/test_gmock_fused_test-gmock-gtest-all.Po + -rm -f fused-src/$(DEPDIR)/test_gmock_fused_test-gmock_main.Po + -rm -f src/$(DEPDIR)/gmock-all.Plo + -rm -f src/$(DEPDIR)/gmock_main.Plo + -rm -f test/$(DEPDIR)/gmock-spec-builders_test.Po + -rm -f test/$(DEPDIR)/gmock_fused_test-gmock_test.Po + -rm -f test/$(DEPDIR)/gmock_link2_test.Po + -rm -f test/$(DEPDIR)/gmock_link_test.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local @@ -1663,12 +1701,12 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS \ .MAKE: $(am__recursive_targets) check-am install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ - am--refresh check check-TESTS check-am clean \ + am--depfiles am--refresh check check-TESTS check-am clean \ clean-checkPROGRAMS clean-cscope clean-generic \ clean-libLTLIBRARIES clean-libtool cscope cscopelist-am ctags \ ctags-am dist dist-all dist-bzip2 dist-gzip dist-lzip \ - dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ - distclean-compile distclean-generic distclean-hdr \ + dist-shar dist-tarZ dist-xz dist-zip dist-zstd distcheck \ + distclean distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ diff --git a/third_party/protobuf/third_party/googletest/googlemock/aclocal.m4 b/third_party/protobuf/third_party/googletest/googlemock/aclocal.m4 index ecf2c33a..7dec5af2 100644 --- a/third_party/protobuf/third_party/googletest/googlemock/aclocal.m4 +++ b/third_party/protobuf/third_party/googletest/googlemock/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1055,8 +1055,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1506,7 +1506,7 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) @@ -4077,7 +4077,8 @@ _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -4717,6 +4718,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + # flang / f18. f95 an alias for gfortran or flang on Debian + flang* | f18* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -6448,7 +6455,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no @@ -6823,7 +6830,7 @@ if test yes != "$_lt_caught_CXX_error"; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -6888,7 +6895,7 @@ if test yes != "$_lt_caught_CXX_error"; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -7227,7 +7234,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support @@ -7311,7 +7318,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -7322,7 +7329,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' @@ -9067,7 +9074,7 @@ m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) -# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9079,10 +9086,10 @@ m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' +[am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15.1], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -9098,14 +9105,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15.1])dnl +[AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9157,7 +9164,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9188,7 +9195,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9379,13 +9386,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. - # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], @@ -9393,49 +9399,43 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -9444,18 +9444,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9542,8 +9541,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. @@ -9610,7 +9609,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -9652,7 +9651,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9673,7 +9672,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2017 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9694,7 +9693,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9702,49 +9701,42 @@ AC_SUBST([am__leading_dot])]) # AM_MAKE_INCLUDE() # ----------------- -# Check to see how make treats includes. +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9783,7 +9775,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9812,7 +9804,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9859,7 +9851,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9892,10 +9884,12 @@ AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). - dnl FIXME: Remove the need to hard-code Python versions here. m4_define_default([_AM_PYTHON_INTERPRETER_LIST], -[python python2 python3 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 dnl - python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) +[python python2 python3 dnl + python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl + python3.2 python3.1 python3.0 dnl + python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl + python2.0]) AC_ARG_VAR([PYTHON], [the Python interpreter]) @@ -10095,7 +10089,7 @@ for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10114,7 +10108,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10195,7 +10189,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10255,7 +10249,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10283,7 +10277,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2017 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10302,7 +10296,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2017 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/third_party/protobuf/third_party/googletest/googlemock/build-aux/compile b/third_party/protobuf/third_party/googletest/googlemock/build-aux/compile index a85b723c..23fcba01 100755 --- a/third_party/protobuf/third_party/googletest/googlemock/build-aux/compile +++ b/third_party/protobuf/third_party/googletest/googlemock/build-aux/compile @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -53,7 +53,7 @@ func_file_conv () MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ func_file_conv () mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) @@ -255,7 +255,8 @@ EOF echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -339,9 +340,9 @@ exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/third_party/protobuf/third_party/googletest/googlemock/build-aux/depcomp b/third_party/protobuf/third_party/googletest/googlemock/build-aux/depcomp index b39f98f9..6b391623 100755 --- a/third_party/protobuf/third_party/googletest/googlemock/build-aux/depcomp +++ b/third_party/protobuf/third_party/googletest/googlemock/build-aux/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2016-01-11.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ scriptversion=2016-01-11.22; # UTC # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -783,7 +783,7 @@ exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/third_party/protobuf/third_party/googletest/googlemock/build-aux/install-sh b/third_party/protobuf/third_party/googletest/googlemock/build-aux/install-sh index 59990a10..20d8b2ea 100755 --- a/third_party/protobuf/third_party/googletest/googlemock/build-aux/install-sh +++ b/third_party/protobuf/third_party/googletest/googlemock/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2014-09-12.12; # UTC +scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -271,15 +271,18 @@ do fi dst=$dst_arg - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. + # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst - dst=$dstdir/`basename "$src"` + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac dstdir_status=0 else dstdir=`dirname "$dst"` @@ -288,6 +291,11 @@ do fi fi + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + obsolete_mkdir_used=false if test $dstdir_status != 0; then @@ -324,14 +332,16 @@ do # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) - # $RANDOM is not portable (e.g. dash); use it when possible to - # lower collision chance + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - # As "mkdir -p" follows symlinks and we work in /tmp possibly; so - # create the $tmpdir first (and fail if unsuccessful) to make sure - # that nobody tries to guess the $tmpdir name. + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 @@ -434,14 +444,25 @@ do else # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -500,9 +521,9 @@ do done # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/third_party/protobuf/third_party/googletest/googlemock/build-aux/ltmain.sh b/third_party/protobuf/third_party/googletest/googlemock/build-aux/ltmain.sh index a736cf99..0cb7f90d 100644 --- a/third_party/protobuf/third_party/googletest/googlemock/build-aux/ltmain.sh +++ b/third_party/protobuf/third_party/googletest/googlemock/build-aux/ltmain.sh @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-2" +VERSION="2.4.6 Debian-2.4.6-14" package_revision=2.4.6 @@ -387,7 +387,7 @@ EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # -# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: @@ -1370,7 +1370,7 @@ func_lt_ver () #! /bin/sh # Set a version string for this script. -scriptversion=2014-01-07.03; # UTC +scriptversion=2015-10-07.11; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 @@ -1530,6 +1530,8 @@ func_run_hooks () { $debug_cmd + _G_rc_run_hooks=false + case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; @@ -1538,16 +1540,16 @@ func_run_hooks () eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift + if eval $_G_hook '"$@"'; then + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + _G_rc_run_hooks=: + fi done - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result + $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result } @@ -1557,10 +1559,16 @@ func_run_hooks () ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed +# full positional parameter list in your hook function, you may remove/edit +# any options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for -# 'eval'. Like this: +# 'eval'. In this case you also must return $EXIT_SUCCESS to let the +# hook's caller know that it should pay attention to +# '_result'. Returning $EXIT_FAILURE signalizes that +# arguments are left untouched by the hook and therefore caller will ignore the +# result variable. +# +# Like this: # # my_options_prep () # { @@ -1570,9 +1578,11 @@ func_run_hooks () # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result +# # No change in '$@' (ignored completely by this hook). There is +# # no need to do the equivalent (but slower) action: +# # func_quote_for_eval ${1+"$@"} +# # my_options_prep_result=$func_quote_for_eval_result +# false # } # func_add_hook func_options_prep my_options_prep # @@ -1581,25 +1591,37 @@ func_run_hooks () # { # $debug_cmd # +# args_changed=false +# # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: ;; +# --silent|-s) opt_silent=: +# args_changed=: +# ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift +# args_changed=: # ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@", we could need that later +# # if $args_changed is true. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result +# if $args_changed; then +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# fi +# +# $args_changed # } # func_add_hook func_parse_options my_silent_option # @@ -1611,16 +1633,32 @@ func_run_hooks () # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result +# false # } # func_add_hook func_validate_options my_option_validation # -# You'll alse need to manually amend $usage_message to reflect the extra +# You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. +# func_options_finish [ARG]... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + _G_func_options_finish_exit=false + if func_run_hooks func_options ${1+"$@"}; then + func_options_finish_result=$func_run_hooks_result + _G_func_options_finish_exit=: + fi + + $_G_func_options_finish_exit +} + + # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1630,17 +1668,28 @@ func_options () { $debug_cmd - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} + _G_rc_options=false - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} + for my_func in options_prep parse_options validate_options options_finish + do + if eval func_$my_func '${1+"$@"}'; then + eval _G_res_var='$'"func_${my_func}_result" + eval set dummy "$_G_res_var" ; shift + _G_rc_options=: + fi + done - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result + # Save modified positional parameters for caller. As a top-level + # options-parser function we always need to set the 'func_options_result' + # variable (regardless the $_G_rc_options value). + if $_G_rc_options; then + func_options_result=$_G_res_var + else + func_quote_for_eval ${1+"$@"} + func_options_result=$func_quote_for_eval_result + fi + + $_G_rc_options } @@ -1649,9 +1698,9 @@ func_options () # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete +# needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before -# returning. +# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). func_hookable func_options_prep func_options_prep () { @@ -1661,10 +1710,14 @@ func_options_prep () opt_verbose=false opt_warning_types= - func_run_hooks func_options_prep ${1+"$@"} + _G_rc_options_prep=false + if func_run_hooks func_options_prep ${1+"$@"}; then + _G_rc_options_prep=: + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result + fi - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result + $_G_rc_options_prep } @@ -1678,18 +1731,20 @@ func_parse_options () func_parse_options_result= + _G_rc_parse_options=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift + if func_run_hooks func_parse_options ${1+"$@"}; then + eval set dummy "$func_run_hooks_result"; shift + _G_rc_parse_options=: + fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break + _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -1704,7 +1759,10 @@ func_parse_options () ;; --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break + if test $# = 0 && func_missing_arg $_G_opt; then + _G_rc_parse_options=: + break + fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1757,15 +1815,25 @@ func_parse_options () shift ;; - --) break ;; + --) _G_rc_parse_options=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; esac + + $_G_match_parse_options && _G_rc_parse_options=: done - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + + if $_G_rc_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result + fi + + $_G_rc_parse_options } @@ -1778,16 +1846,21 @@ func_validate_options () { $debug_cmd + _G_rc_validate_options=false + # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - func_run_hooks func_validate_options ${1+"$@"} + if func_run_hooks func_validate_options ${1+"$@"}; then + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result + _G_rc_validate_options=: + fi # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result + $_G_rc_validate_options } @@ -2068,7 +2141,7 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-2 + version: $progname $scriptversion Debian-2.4.6-14 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2270,6 +2343,8 @@ libtool_options_prep () nonopt= preserve_args= + _G_rc_lt_options_prep=: + # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2293,11 +2368,18 @@ libtool_options_prep () uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; + *) + _G_rc_lt_options_prep=false + ;; esac - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result + fi + + $_G_rc_lt_options_prep } func_add_hook func_options_prep libtool_options_prep @@ -2309,9 +2391,12 @@ libtool_parse_options () { $debug_cmd + _G_rc_lt_parse_options=false + # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do + _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2386,15 +2471,22 @@ libtool_parse_options () func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result + fi - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result + $_G_rc_lt_parse_options } func_add_hook func_parse_options libtool_parse_options @@ -7275,10 +7367,13 @@ func_mode_link () # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC + # -static-* direct GCC to link specific libraries statically + # -fcilkplus Cilk Plus language extension features for C/C++ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*) + -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" diff --git a/third_party/protobuf/third_party/googletest/googlemock/build-aux/missing b/third_party/protobuf/third_party/googletest/googlemock/build-aux/missing index f62bbae3..8d0eaad2 100755 --- a/third_party/protobuf/third_party/googletest/googlemock/build-aux/missing +++ b/third_party/protobuf/third_party/googletest/googlemock/build-aux/missing @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -101,9 +101,9 @@ else exit $st fi -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software program_details () { @@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/third_party/protobuf/third_party/googletest/googlemock/build-aux/test-driver b/third_party/protobuf/third_party/googletest/googlemock/build-aux/test-driver index 8e575b01..89dba1e0 100755 --- a/third_party/protobuf/third_party/googletest/googlemock/build-aux/test-driver +++ b/third_party/protobuf/third_party/googletest/googlemock/build-aux/test-driver @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2013-07-13.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# Copyright (C) 2011-2020 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ scriptversion=2013-07-13.22; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -140,9 +140,9 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/third_party/protobuf/third_party/googletest/googlemock/configure b/third_party/protobuf/third_party/googletest/googlemock/configure index e909b5a5..b1c87521 100755 --- a/third_party/protobuf/third_party/googletest/googlemock/configure +++ b/third_party/protobuf/third_party/googletest/googlemock/configure @@ -696,7 +696,6 @@ am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE -am__quote am__include DEPDIR OBJEXT @@ -771,7 +770,8 @@ PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR -SHELL' +SHELL +am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -2356,7 +2356,7 @@ ac_config_files="$ac_config_files scripts/gmock-config" # Initialize Automake with various options. We require at least v1.9, prevent # pedantic complaints about package files, and enable various distribution # targets. -am__api_version='1.15' +am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2872,8 +2872,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The @@ -2924,7 +2924,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -3788,45 +3788,45 @@ DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" - -am_make=${MAKE-make} -cat > confinc << 'END' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 + (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + case $?:`cat confinc.out 2>/dev/null` in #( + '0:this is the am__doit target') : + case $s in #( + BSD) : + am__include='.include' am__quote='"' ;; #( + *) : + am__include='include' am__quote='' ;; +esac ;; #( + *) : ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf +esac + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : @@ -6039,7 +6039,7 @@ esac fi : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr} @@ -6540,11 +6540,8 @@ _LT_EOF test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -7764,8 +7761,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 + echo "$AR cr libconftest.a conftest.o" >&5 + $AR cr libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -8900,6 +8897,12 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; + # flang / f18. f95 an alias for gfortran or flang on Debian + flang* | f18* | f95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -12842,7 +12845,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no @@ -13334,7 +13337,7 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -13399,7 +13402,7 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -13738,7 +13741,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support @@ -13822,7 +13825,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -13833,7 +13836,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' @@ -17272,7 +17275,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout @@ -18268,29 +18271,35 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + case $CONFIG_FILES in #( + *\'*) : + eval set x "$CONFIG_FILES" ;; #( + *) : + set x $CONFIG_FILES ;; #( + *) : + ;; +esac shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`$as_dirname -- "$am_mf" || +$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$am_mf" : 'X\(//\)[^/]' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -18308,53 +18317,50 @@ $as_echo X"$mf" | q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + am_filepart=`$as_basename -- "$am_mf" || +$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$am_mf" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } - /^X\(\/\/\)[^/].*/{ + /^X\/\(\/\/\)$/{ s//\1/ q } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ + /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + { echo "$as_me:$LINENO: cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles" >&5 + (cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } || am_rc=$? done + if test $am_rc -ne 0; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking). +See \`config.log' for more details" "$LINENO" 5; } + fi + { am_dirpart=; unset am_dirpart;} + { am_filepart=; unset am_filepart;} + { am_mf=; unset am_mf;} + { am_rc=; unset am_rc;} + rm -f conftest-deps.mk } ;; "libtool":C) diff --git a/third_party/protobuf/third_party/googletest/googletest/Makefile.in b/third_party/protobuf/third_party/googletest/googletest/Makefile.in index 0ee7b7dd..73a7195e 100644 --- a/third_party/protobuf/third_party/googletest/googletest/Makefile.in +++ b/third_party/protobuf/third_party/googletest/googletest/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -133,6 +133,7 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/build-aux/config.h CONFIG_CLEAN_FILES = scripts/gtest-config CONFIG_CLEAN_VPATH_FILES = +@HAVE_PYTHON_TRUE@am__EXEEXT_1 = test/fused_gtest_test$(EXEEXT) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -175,7 +176,6 @@ am__v_lt_1 = lib_libgtest_main_la_DEPENDENCIES = lib/libgtest.la am_lib_libgtest_main_la_OBJECTS = src/gtest_main.lo lib_libgtest_main_la_OBJECTS = $(am_lib_libgtest_main_la_OBJECTS) -@HAVE_PYTHON_TRUE@am__EXEEXT_1 = test/fused_gtest_test$(EXEEXT) am_samples_sample10_unittest_OBJECTS = \ samples/sample10_unittest.$(OBJEXT) samples_sample10_unittest_OBJECTS = \ @@ -263,7 +263,27 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/build-aux depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = \ + fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest-all.Po \ + fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest_main.Po \ + samples/$(DEPDIR)/sample1.Po \ + samples/$(DEPDIR)/sample10_unittest.Po \ + samples/$(DEPDIR)/sample1_unittest.Po \ + samples/$(DEPDIR)/sample2.Po \ + samples/$(DEPDIR)/sample2_unittest.Po \ + samples/$(DEPDIR)/sample3_unittest.Po \ + samples/$(DEPDIR)/sample4.Po \ + samples/$(DEPDIR)/sample4_unittest.Po \ + samples/$(DEPDIR)/sample5_unittest.Po \ + samples/$(DEPDIR)/sample6_unittest.Po \ + samples/$(DEPDIR)/sample7_unittest.Po \ + samples/$(DEPDIR)/sample8_unittest.Po \ + samples/$(DEPDIR)/sample9_unittest.Po \ + samples/$(DEPDIR)/test_fused_gtest_test-sample1.Po \ + samples/$(DEPDIR)/test_fused_gtest_test-sample1_unittest.Po \ + src/$(DEPDIR)/gtest-all.Plo src/$(DEPDIR)/gtest_main.Plo \ + test/$(DEPDIR)/gtest_all_test.Po am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -936,8 +956,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -966,6 +986,15 @@ distclean-hdr: scripts/gtest-config: $(top_builddir)/config.status $(top_srcdir)/scripts/gtest-config.in cd $(top_builddir) && $(SHELL) ./config.status $@ +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ @@ -1017,15 +1046,6 @@ src/gtest_main.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) lib/libgtest_main.la: $(lib_libgtest_main_la_OBJECTS) $(lib_libgtest_main_la_DEPENDENCIES) $(EXTRA_lib_libgtest_main_la_DEPENDENCIES) lib/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) -rpath $(libdir) $(lib_libgtest_main_la_OBJECTS) $(lib_libgtest_main_la_LIBADD) $(LIBS) - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list samples/$(am__dirstamp): @$(MKDIR_P) samples @: > samples/$(am__dirstamp) @@ -1142,26 +1162,32 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest_main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample10_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample1_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample2_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample3_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample4.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample4_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample5_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample6_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample7_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample8_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample9_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/test_fused_gtest_test-sample1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/test_fused_gtest_test-sample1_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gtest-all.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gtest_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/gtest_all_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest-all.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest_main.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample1.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample10_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample1_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample2.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample2_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample3_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample4.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample4_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample5_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample6_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample7_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample8_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/sample9_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/test_fused_gtest_test-sample1.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@samples/$(DEPDIR)/test_fused_gtest_test-sample1_unittest.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gtest-all.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gtest_main.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/gtest_all_test.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -1498,7 +1524,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) fi; \ $$success || exit 1 -check-TESTS: +check-TESTS: $(check_PROGRAMS) @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @@ -1618,7 +1644,10 @@ test/fused_gtest_test.log: test/fused_gtest_test$(EXEEXT) @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -1672,6 +1701,10 @@ dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -1713,6 +1746,8 @@ distcheck: dist eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -1839,7 +1874,26 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf fused-src/gtest/$(DEPDIR) samples/$(DEPDIR) src/$(DEPDIR) test/$(DEPDIR) + -rm -f fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest-all.Po + -rm -f fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest_main.Po + -rm -f samples/$(DEPDIR)/sample1.Po + -rm -f samples/$(DEPDIR)/sample10_unittest.Po + -rm -f samples/$(DEPDIR)/sample1_unittest.Po + -rm -f samples/$(DEPDIR)/sample2.Po + -rm -f samples/$(DEPDIR)/sample2_unittest.Po + -rm -f samples/$(DEPDIR)/sample3_unittest.Po + -rm -f samples/$(DEPDIR)/sample4.Po + -rm -f samples/$(DEPDIR)/sample4_unittest.Po + -rm -f samples/$(DEPDIR)/sample5_unittest.Po + -rm -f samples/$(DEPDIR)/sample6_unittest.Po + -rm -f samples/$(DEPDIR)/sample7_unittest.Po + -rm -f samples/$(DEPDIR)/sample8_unittest.Po + -rm -f samples/$(DEPDIR)/sample9_unittest.Po + -rm -f samples/$(DEPDIR)/test_fused_gtest_test-sample1.Po + -rm -f samples/$(DEPDIR)/test_fused_gtest_test-sample1_unittest.Po + -rm -f src/$(DEPDIR)/gtest-all.Plo + -rm -f src/$(DEPDIR)/gtest_main.Plo + -rm -f test/$(DEPDIR)/gtest_all_test.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags @@ -1888,7 +1942,26 @@ installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf fused-src/gtest/$(DEPDIR) samples/$(DEPDIR) src/$(DEPDIR) test/$(DEPDIR) + -rm -f fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest-all.Po + -rm -f fused-src/gtest/$(DEPDIR)/test_fused_gtest_test-gtest_main.Po + -rm -f samples/$(DEPDIR)/sample1.Po + -rm -f samples/$(DEPDIR)/sample10_unittest.Po + -rm -f samples/$(DEPDIR)/sample1_unittest.Po + -rm -f samples/$(DEPDIR)/sample2.Po + -rm -f samples/$(DEPDIR)/sample2_unittest.Po + -rm -f samples/$(DEPDIR)/sample3_unittest.Po + -rm -f samples/$(DEPDIR)/sample4.Po + -rm -f samples/$(DEPDIR)/sample4_unittest.Po + -rm -f samples/$(DEPDIR)/sample5_unittest.Po + -rm -f samples/$(DEPDIR)/sample6_unittest.Po + -rm -f samples/$(DEPDIR)/sample7_unittest.Po + -rm -f samples/$(DEPDIR)/sample8_unittest.Po + -rm -f samples/$(DEPDIR)/sample9_unittest.Po + -rm -f samples/$(DEPDIR)/test_fused_gtest_test-sample1.Po + -rm -f samples/$(DEPDIR)/test_fused_gtest_test-sample1_unittest.Po + -rm -f src/$(DEPDIR)/gtest-all.Plo + -rm -f src/$(DEPDIR)/gtest_main.Plo + -rm -f test/$(DEPDIR)/gtest_all_test.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local @@ -1912,18 +1985,18 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-m4dataDATA \ .MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \ - check-am clean clean-checkPROGRAMS clean-cscope clean-generic \ - clean-libLTLIBRARIES clean-libtool cscope cscopelist-am ctags \ - ctags-am dist dist-all dist-bzip2 dist-gzip dist-lzip \ - dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ - distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-data-local install-dvi install-dvi-am install-exec \ - install-exec-am install-exec-local install-html \ - install-html-am install-info install-info-am \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \ + check-TESTS check-am clean clean-checkPROGRAMS clean-cscope \ + clean-generic clean-libLTLIBRARIES clean-libtool cscope \ + cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ + dist-zstd distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-local install-dvi \ + install-dvi-am install-exec install-exec-am install-exec-local \ + install-html install-html-am install-info install-info-am \ install-libLTLIBRARIES install-m4dataDATA install-man \ install-pdf install-pdf-am install-pkgincludeHEADERS \ install-pkginclude_internalHEADERS install-ps install-ps-am \ diff --git a/third_party/protobuf/third_party/googletest/googletest/aclocal.m4 b/third_party/protobuf/third_party/googletest/googletest/aclocal.m4 index 6f479985..63f23522 100644 --- a/third_party/protobuf/third_party/googletest/googletest/aclocal.m4 +++ b/third_party/protobuf/third_party/googletest/googletest/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' +[am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15.1], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15.1])dnl +[AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,13 +332,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. - # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], @@ -346,49 +345,43 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -397,18 +390,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -495,8 +487,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. @@ -563,7 +555,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -605,7 +597,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -626,7 +618,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2017 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -647,7 +639,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -655,49 +647,42 @@ AC_SUBST([am__leading_dot])]) # AM_MAKE_INCLUDE() # ----------------- -# Check to see how make treats includes. +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -736,7 +721,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -765,7 +750,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -812,7 +797,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -845,10 +830,12 @@ AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). - dnl FIXME: Remove the need to hard-code Python versions here. m4_define_default([_AM_PYTHON_INTERPRETER_LIST], -[python python2 python3 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 dnl - python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) +[python python2 python3 dnl + python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl + python3.2 python3.1 python3.0 dnl + python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl + python2.0]) AC_ARG_VAR([PYTHON], [the Python interpreter]) @@ -1048,7 +1035,7 @@ for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1067,7 +1054,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1148,7 +1135,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1208,7 +1195,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1236,7 +1223,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2017 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1255,7 +1242,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2017 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/third_party/protobuf/third_party/googletest/googletest/build-aux/compile b/third_party/protobuf/third_party/googletest/googletest/build-aux/compile index a85b723c..23fcba01 100755 --- a/third_party/protobuf/third_party/googletest/googletest/build-aux/compile +++ b/third_party/protobuf/third_party/googletest/googletest/build-aux/compile @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -53,7 +53,7 @@ func_file_conv () MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ func_file_conv () mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) @@ -255,7 +255,8 @@ EOF echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -339,9 +340,9 @@ exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/third_party/protobuf/third_party/googletest/googletest/build-aux/depcomp b/third_party/protobuf/third_party/googletest/googletest/build-aux/depcomp index b39f98f9..6b391623 100755 --- a/third_party/protobuf/third_party/googletest/googletest/build-aux/depcomp +++ b/third_party/protobuf/third_party/googletest/googletest/build-aux/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2016-01-11.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ scriptversion=2016-01-11.22; # UTC # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -783,7 +783,7 @@ exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/third_party/protobuf/third_party/googletest/googletest/build-aux/install-sh b/third_party/protobuf/third_party/googletest/googletest/build-aux/install-sh index 59990a10..20d8b2ea 100755 --- a/third_party/protobuf/third_party/googletest/googletest/build-aux/install-sh +++ b/third_party/protobuf/third_party/googletest/googletest/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2014-09-12.12; # UTC +scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -271,15 +271,18 @@ do fi dst=$dst_arg - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. + # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst - dst=$dstdir/`basename "$src"` + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac dstdir_status=0 else dstdir=`dirname "$dst"` @@ -288,6 +291,11 @@ do fi fi + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + obsolete_mkdir_used=false if test $dstdir_status != 0; then @@ -324,14 +332,16 @@ do # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) - # $RANDOM is not portable (e.g. dash); use it when possible to - # lower collision chance + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - # As "mkdir -p" follows symlinks and we work in /tmp possibly; so - # create the $tmpdir first (and fail if unsuccessful) to make sure - # that nobody tries to guess the $tmpdir name. + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 @@ -434,14 +444,25 @@ do else # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -500,9 +521,9 @@ do done # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/third_party/protobuf/third_party/googletest/googletest/build-aux/ltmain.sh b/third_party/protobuf/third_party/googletest/googletest/build-aux/ltmain.sh index a736cf99..0cb7f90d 100644 --- a/third_party/protobuf/third_party/googletest/googletest/build-aux/ltmain.sh +++ b/third_party/protobuf/third_party/googletest/googletest/build-aux/ltmain.sh @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-2" +VERSION="2.4.6 Debian-2.4.6-14" package_revision=2.4.6 @@ -387,7 +387,7 @@ EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # -# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: @@ -1370,7 +1370,7 @@ func_lt_ver () #! /bin/sh # Set a version string for this script. -scriptversion=2014-01-07.03; # UTC +scriptversion=2015-10-07.11; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 @@ -1530,6 +1530,8 @@ func_run_hooks () { $debug_cmd + _G_rc_run_hooks=false + case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; @@ -1538,16 +1540,16 @@ func_run_hooks () eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift + if eval $_G_hook '"$@"'; then + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + _G_rc_run_hooks=: + fi done - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result + $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result } @@ -1557,10 +1559,16 @@ func_run_hooks () ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed +# full positional parameter list in your hook function, you may remove/edit +# any options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for -# 'eval'. Like this: +# 'eval'. In this case you also must return $EXIT_SUCCESS to let the +# hook's caller know that it should pay attention to +# '_result'. Returning $EXIT_FAILURE signalizes that +# arguments are left untouched by the hook and therefore caller will ignore the +# result variable. +# +# Like this: # # my_options_prep () # { @@ -1570,9 +1578,11 @@ func_run_hooks () # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result +# # No change in '$@' (ignored completely by this hook). There is +# # no need to do the equivalent (but slower) action: +# # func_quote_for_eval ${1+"$@"} +# # my_options_prep_result=$func_quote_for_eval_result +# false # } # func_add_hook func_options_prep my_options_prep # @@ -1581,25 +1591,37 @@ func_run_hooks () # { # $debug_cmd # +# args_changed=false +# # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: ;; +# --silent|-s) opt_silent=: +# args_changed=: +# ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift +# args_changed=: # ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@", we could need that later +# # if $args_changed is true. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result +# if $args_changed; then +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# fi +# +# $args_changed # } # func_add_hook func_parse_options my_silent_option # @@ -1611,16 +1633,32 @@ func_run_hooks () # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result +# false # } # func_add_hook func_validate_options my_option_validation # -# You'll alse need to manually amend $usage_message to reflect the extra +# You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. +# func_options_finish [ARG]... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + _G_func_options_finish_exit=false + if func_run_hooks func_options ${1+"$@"}; then + func_options_finish_result=$func_run_hooks_result + _G_func_options_finish_exit=: + fi + + $_G_func_options_finish_exit +} + + # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1630,17 +1668,28 @@ func_options () { $debug_cmd - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} + _G_rc_options=false - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} + for my_func in options_prep parse_options validate_options options_finish + do + if eval func_$my_func '${1+"$@"}'; then + eval _G_res_var='$'"func_${my_func}_result" + eval set dummy "$_G_res_var" ; shift + _G_rc_options=: + fi + done - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result + # Save modified positional parameters for caller. As a top-level + # options-parser function we always need to set the 'func_options_result' + # variable (regardless the $_G_rc_options value). + if $_G_rc_options; then + func_options_result=$_G_res_var + else + func_quote_for_eval ${1+"$@"} + func_options_result=$func_quote_for_eval_result + fi + + $_G_rc_options } @@ -1649,9 +1698,9 @@ func_options () # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete +# needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before -# returning. +# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). func_hookable func_options_prep func_options_prep () { @@ -1661,10 +1710,14 @@ func_options_prep () opt_verbose=false opt_warning_types= - func_run_hooks func_options_prep ${1+"$@"} + _G_rc_options_prep=false + if func_run_hooks func_options_prep ${1+"$@"}; then + _G_rc_options_prep=: + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result + fi - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result + $_G_rc_options_prep } @@ -1678,18 +1731,20 @@ func_parse_options () func_parse_options_result= + _G_rc_parse_options=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift + if func_run_hooks func_parse_options ${1+"$@"}; then + eval set dummy "$func_run_hooks_result"; shift + _G_rc_parse_options=: + fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break + _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -1704,7 +1759,10 @@ func_parse_options () ;; --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break + if test $# = 0 && func_missing_arg $_G_opt; then + _G_rc_parse_options=: + break + fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1757,15 +1815,25 @@ func_parse_options () shift ;; - --) break ;; + --) _G_rc_parse_options=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; esac + + $_G_match_parse_options && _G_rc_parse_options=: done - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + + if $_G_rc_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result + fi + + $_G_rc_parse_options } @@ -1778,16 +1846,21 @@ func_validate_options () { $debug_cmd + _G_rc_validate_options=false + # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - func_run_hooks func_validate_options ${1+"$@"} + if func_run_hooks func_validate_options ${1+"$@"}; then + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result + _G_rc_validate_options=: + fi # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result + $_G_rc_validate_options } @@ -2068,7 +2141,7 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-2 + version: $progname $scriptversion Debian-2.4.6-14 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2270,6 +2343,8 @@ libtool_options_prep () nonopt= preserve_args= + _G_rc_lt_options_prep=: + # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2293,11 +2368,18 @@ libtool_options_prep () uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; + *) + _G_rc_lt_options_prep=false + ;; esac - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result + fi + + $_G_rc_lt_options_prep } func_add_hook func_options_prep libtool_options_prep @@ -2309,9 +2391,12 @@ libtool_parse_options () { $debug_cmd + _G_rc_lt_parse_options=false + # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do + _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2386,15 +2471,22 @@ libtool_parse_options () func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result + fi - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result + $_G_rc_lt_parse_options } func_add_hook func_parse_options libtool_parse_options @@ -7275,10 +7367,13 @@ func_mode_link () # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC + # -static-* direct GCC to link specific libraries statically + # -fcilkplus Cilk Plus language extension features for C/C++ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*) + -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" diff --git a/third_party/protobuf/third_party/googletest/googletest/build-aux/missing b/third_party/protobuf/third_party/googletest/googletest/build-aux/missing index f62bbae3..8d0eaad2 100755 --- a/third_party/protobuf/third_party/googletest/googletest/build-aux/missing +++ b/third_party/protobuf/third_party/googletest/googletest/build-aux/missing @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -101,9 +101,9 @@ else exit $st fi -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software program_details () { @@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/third_party/protobuf/third_party/googletest/googletest/build-aux/test-driver b/third_party/protobuf/third_party/googletest/googletest/build-aux/test-driver index 8e575b01..89dba1e0 100755 --- a/third_party/protobuf/third_party/googletest/googletest/build-aux/test-driver +++ b/third_party/protobuf/third_party/googletest/googletest/build-aux/test-driver @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2013-07-13.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# Copyright (C) 2011-2020 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ scriptversion=2013-07-13.22; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -140,9 +140,9 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/third_party/protobuf/third_party/googletest/googletest/configure b/third_party/protobuf/third_party/googletest/googletest/configure index f0e726a3..4176b784 100755 --- a/third_party/protobuf/third_party/googletest/googletest/configure +++ b/third_party/protobuf/third_party/googletest/googletest/configure @@ -690,7 +690,6 @@ am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE -am__quote am__include DEPDIR OBJEXT @@ -765,7 +764,8 @@ PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR -SHELL' +SHELL +am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -2321,7 +2321,7 @@ ac_config_files="$ac_config_files scripts/gtest-config" # Initialize Automake with various options. We require at least v1.9, prevent # pedantic complaints about package files, and enable various distribution # targets. -am__api_version='1.15' +am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2837,8 +2837,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The @@ -2889,7 +2889,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -3753,45 +3753,45 @@ DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" - -am_make=${MAKE-make} -cat > confinc << 'END' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 + (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + case $?:`cat confinc.out 2>/dev/null` in #( + '0:this is the am__doit target') : + case $s in #( + BSD) : + am__include='.include' am__quote='"' ;; #( + *) : + am__include='include' am__quote='' ;; +esac ;; #( + *) : ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf +esac + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : @@ -6004,7 +6004,7 @@ esac fi : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr} @@ -6505,11 +6505,8 @@ _LT_EOF test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -7729,8 +7726,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 + echo "$AR cr libconftest.a conftest.o" >&5 + $AR cr libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -8869,6 +8866,12 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; + # flang / f18. f95 an alias for gfortran or flang on Debian + flang* | f18* | f95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -12811,7 +12814,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no @@ -13303,7 +13306,7 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -13368,7 +13371,7 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -13707,7 +13710,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support @@ -13791,7 +13794,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -13802,7 +13805,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' @@ -17109,7 +17112,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout @@ -18105,29 +18108,35 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + case $CONFIG_FILES in #( + *\'*) : + eval set x "$CONFIG_FILES" ;; #( + *) : + set x $CONFIG_FILES ;; #( + *) : + ;; +esac shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`$as_dirname -- "$am_mf" || +$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$am_mf" : 'X\(//\)[^/]' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -18145,53 +18154,50 @@ $as_echo X"$mf" | q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + am_filepart=`$as_basename -- "$am_mf" || +$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$am_mf" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } - /^X\(\/\/\)[^/].*/{ + /^X\/\(\/\/\)$/{ s//\1/ q } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ + /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + { echo "$as_me:$LINENO: cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles" >&5 + (cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } || am_rc=$? done + if test $am_rc -ne 0; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking). +See \`config.log' for more details" "$LINENO" 5; } + fi + { am_dirpart=; unset am_dirpart;} + { am_filepart=; unset am_filepart;} + { am_mf=; unset am_mf;} + { am_rc=; unset am_rc;} + rm -f conftest-deps.mk } ;; "libtool":C) diff --git a/third_party/protobuf/third_party/googletest/googletest/m4/libtool.m4 b/third_party/protobuf/third_party/googletest/googletest/m4/libtool.m4 index ee80844b..a6d21ae5 100644 --- a/third_party/protobuf/third_party/googletest/googletest/m4/libtool.m4 +++ b/third_party/protobuf/third_party/googletest/googletest/m4/libtool.m4 @@ -1041,8 +1041,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1492,7 +1492,7 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) @@ -4063,7 +4063,8 @@ _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -4703,6 +4704,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + # flang / f18. f95 an alias for gfortran or flang on Debian + flang* | f18* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -6438,7 +6445,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no @@ -6813,7 +6820,7 @@ if test yes != "$_lt_caught_CXX_error"; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -6878,7 +6885,7 @@ if test yes != "$_lt_caught_CXX_error"; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -7217,7 +7224,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support @@ -7301,7 +7308,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -7312,7 +7319,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' diff --git a/third_party/protobuf/third_party/six.BUILD b/third_party/protobuf/third_party/six.BUILD new file mode 100644 index 00000000..041c72c6 --- /dev/null +++ b/third_party/protobuf/third_party/six.BUILD @@ -0,0 +1,19 @@ +load("@rules_python//python:defs.bzl", "py_library") + +# Consume `six.py` as `__init__.py` for compatibility +# with `--incompatible_default_to_explicit_init_py`. +# https://github.com/protocolbuffers/protobuf/pull/6795#issuecomment-546060749 +# https://github.com/bazelbuild/bazel/issues/10076 +genrule( + name = "copy_six", + srcs = ["six-1.12.0/six.py"], + outs = ["__init__.py"], + cmd = "cp $< $(@)", +) + +py_library( + name = "six", + srcs = ["__init__.py"], + srcs_version = "PY2AND3", + visibility = ["//visibility:public"], +) diff --git a/third_party/protobuf/third_party/zlib.BUILD b/third_party/protobuf/third_party/zlib.BUILD index f9481174..093dee18 100644 --- a/third_party/protobuf/third_party/zlib.BUILD +++ b/third_party/protobuf/third_party/zlib.BUILD @@ -1,4 +1,4 @@ -package(default_visibility = ["//visibility:public"]) +load("@rules_cc//cc:defs.bzl", "cc_library") licenses(["notice"]) # BSD/MIT-like license (for zlib) @@ -26,7 +26,6 @@ genrule( srcs = _ZLIB_HEADERS, outs = _ZLIB_PREFIXED_HEADERS, cmd = "cp $(SRCS) $(@D)/zlib/include/", - visibility = ["//visibility:private"], ) cc_library( @@ -52,9 +51,13 @@ cc_library( # choice of <> or "" delimiter when including itself. ] + _ZLIB_HEADERS, hdrs = _ZLIB_PREFIXED_HEADERS, - copts = [ - "-Wno-unused-variable", - "-Wno-implicit-function-declaration", - ], + copts = select({ + "@bazel_tools//src/conditions:windows": [], + "//conditions:default": [ + "-Wno-unused-variable", + "-Wno-implicit-function-declaration", + ], + }), includes = ["zlib/include/"], + visibility = ["//visibility:public"], ) diff --git a/third_party/protobuf/update_file_lists.sh b/third_party/protobuf/update_file_lists.sh index 646c8ce3..e0b446f8 100755 --- a/third_party/protobuf/update_file_lists.sh +++ b/third_party/protobuf/update_file_lists.sh @@ -63,6 +63,7 @@ WKT_PROTOS=$(get_variable_value $MAKEFILE nobase_dist_proto_DATA) COMMON_TEST_SOURCES=$(get_source_files $MAKEFILE COMMON_TEST_SOURCES) COMMON_LITE_TEST_SOURCES=$(get_source_files $MAKEFILE COMMON_LITE_TEST_SOURCES) TEST_SOURCES=$(get_source_files $MAKEFILE protobuf_test_SOURCES) +NON_MSVC_TEST_SOURCES=$(get_source_files $MAKEFILE NON_MSVC_TEST_SOURCES) LITE_TEST_SOURCES=$(get_source_files $MAKEFILE protobuf_lite_test_SOURCES) LITE_ARENA_TEST_SOURCES=$(get_source_files $MAKEFILE protobuf_lite_arena_test_SOURCES) TEST_PLUGIN_SOURCES=$(get_source_files $MAKEFILE test_plugin_SOURCES) @@ -123,6 +124,7 @@ set_cmake_value $CMAKE_DIR/tests.cmake tests_protos "" $PROTOS_BLACKLISTED set_cmake_value $CMAKE_DIR/tests.cmake common_test_files $CMAKE_PREFIX $COMMON_TEST_SOURCES set_cmake_value $CMAKE_DIR/tests.cmake common_lite_test_files $CMAKE_PREFIX $COMMON_LITE_TEST_SOURCES set_cmake_value $CMAKE_DIR/tests.cmake tests_files $CMAKE_PREFIX $TEST_SOURCES +set_cmake_value $CMAKE_DIR/tests.cmake non_msvc_tests_files $CMAKE_PREFIX $NON_MSVC_TEST_SOURCES set_cmake_value $CMAKE_DIR/tests.cmake lite_test_files $CMAKE_PREFIX $LITE_TEST_SOURCES set_cmake_value $CMAKE_DIR/tests.cmake lite_arena_test_files $CMAKE_PREFIX $LITE_ARENA_TEST_SOURCES @@ -186,6 +188,7 @@ if [ -f "$BAZEL_BUILD" ]; then set_bazel_value $BAZEL_BUILD test_protos "" $PROTOS set_bazel_value $BAZEL_BUILD common_test_srcs $BAZEL_PREFIX $COMMON_TEST_SOURCES set_bazel_value $BAZEL_BUILD test_srcs $BAZEL_PREFIX $TEST_SOURCES + set_bazel_value $BAZEL_BUILD non_msvc_test_srcs $BAZEL_PREFIX $NON_MSVC_TEST_SOURCES set_bazel_value $BAZEL_BUILD test_plugin_srcs $BAZEL_PREFIX $TEST_PLUGIN_SOURCES else echo "Skipped BUILD file update." diff --git a/third_party/protobuf/util/python/BUILD b/third_party/protobuf/util/python/BUILD index 3ac03856..9ee56c87 100644 --- a/third_party/protobuf/util/python/BUILD +++ b/third_party/protobuf/util/python/BUILD @@ -1,3 +1,5 @@ +load("@rules_cc//cc:defs.bzl", "cc_library") + # This is a placeholder for python headers. Projects needing to use # fast cpp protos in protobuf's python interface should build with # --define=use_fast_cpp_protos=true, and in addition, provide @@ -9,7 +11,7 @@ # includes the following local_repository rule that points to this directory: # # new_local_repository( -# name = "python", +# name = "python_headers", # path = __workspace_dir__ + "/util/python", # ) cc_library( diff --git a/util/include/log.h b/util/include/log.h index 37706fa0..abc2829d 100644 --- a/util/include/log.h +++ b/util/include/log.h @@ -33,8 +33,18 @@ extern LogPriority g_cutoff; // unit tests. CORE_UTIL_EXPORT void InitLogging(); +// Only enable format specifier warnings on LP64 systems. There is +// no easy portable method to handle format specifiers for int64_t. +#if (defined(__gnuc__) || defined(__clang__)) && defined(__LP64__) +[[gnu::format(printf, 5, 6)]] CORE_UTIL_EXPORT void Log(const char* file, + const char* function, + int line, + LogPriority level, + const char* fmt, ...); +#else CORE_UTIL_EXPORT void Log(const char* file, const char* function, int line, LogPriority level, const char* fmt, ...); +#endif // Log APIs #ifndef LOGE diff --git a/util/test/test_sleep.cpp b/util/test/test_sleep.cpp index 1656381a..4893ca74 100644 --- a/util/test/test_sleep.cpp +++ b/util/test/test_sleep.cpp @@ -23,7 +23,7 @@ namespace wvcdm { bool TestSleep::real_sleep_ = true; TestSleep::CallBack* TestSleep::callback_ = nullptr; -int TestSleep::total_clock_rollback_ = 0; +int TestSleep::total_clock_rollback_seconds_ = 0; void TestSleep::Sleep(unsigned int seconds) { int64_t milliseconds = 1000 * seconds; @@ -33,11 +33,15 @@ void TestSleep::Sleep(unsigned int seconds) { // total since the start, and then compare to a running total of sleep // calls. We sleep for approximately x second, and then advance the clock by // the amount of time that has actually passed. - static auto start_real = std::chrono::system_clock().now(); - static int64_t fake_clock = 0; + static const auto start_real = std::chrono::system_clock().now(); sleep(seconds); - auto now_real = std::chrono::system_clock().now(); - int64_t total_real = (now_real - start_real) / std::chrono::milliseconds(1); + const auto now_real = std::chrono::system_clock().now(); + const int64_t rollback_adjustment = 1000 * total_clock_rollback_seconds_; + const int64_t total_real = + (now_real - start_real) / std::chrono::milliseconds(1) + + rollback_adjustment; + + static int64_t fake_clock = 0; // We want to advance the fake clock by the difference between the real // clock, and the previous value on the fake clock. milliseconds = total_real - fake_clock; @@ -90,7 +94,7 @@ bool TestSleep::RollbackSystemTime(int seconds) { // For both real and fake sleep we still update the callback and we still keep // track of the total amount of time slept. - total_clock_rollback_ += seconds; + total_clock_rollback_seconds_ += seconds; if (callback_ != nullptr) callback_->ElapseTime(-1000 * seconds); return true; } @@ -98,7 +102,6 @@ bool TestSleep::RollbackSystemTime(int seconds) { bool TestSleep::CanChangeSystemTime() { // If we are using a fake clock, then we can move the clock backwards by // just going backwards. - // ElapseTime. if (!real_sleep_) { return true; } diff --git a/util/test/test_sleep.h b/util/test/test_sleep.h index 34c4b3f6..35dcdc70 100644 --- a/util/test/test_sleep.h +++ b/util/test/test_sleep.h @@ -44,8 +44,8 @@ class TestSleep { // Roll the system clock forward to undo all previous calls to // RollBackSystemTime. Returns true on success. static bool ResetRollback() { - return total_clock_rollback_ == 0 || - RollbackSystemTime(-total_clock_rollback_); + return total_clock_rollback_seconds_ == 0 || + RollbackSystemTime(-total_clock_rollback_seconds_); } // Returns true if the system time can be rolled back. This is true on some @@ -67,7 +67,7 @@ class TestSleep { static CallBack* callback_; // The sum of all calls to RollBackSystemTime. Kept so we can undo all changes // at the end of a test. - static int total_clock_rollback_; + static int total_clock_rollback_seconds_; }; } // namespace wvcdm

#oY0SN3Warr zfj8DT!G~7Pf70B)q!P9M+^YaGA)Q&=BPCjqxo%kt@;Ku=@mTjIO?RjHA5^_m3^LbYN@Zv0t#>}Y=9rQZD!&yW z)}PpjVL+_-(obu*rf#RCrf2I*;NPn&I?oMGf>!ZGxg?^@UfI=l9kb><@o{$*=R6Hk z8CO#8ceGB5ji?U~r@(kCriG&%su1O8PihinUG3RaE#0`6OtAglQERVmlY|7Esb2kO&V&|`_ z0iM=o8b2E?43O`h_U3=*SyYar3AruO(6kE>d~HAbQ(Vn?`n@V?Jb8eR_9B~48yc@u zOkx{>ru4VK42Cc0y4tvtYVZ0BG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PQ5mF*P)0WjQ%v zG-EbpK0GoqH83+XFk><^GBz_|Gh}3CFgId3IWRajG%;f|I50k4FH&!BbRaV@GaxV^ zQZGzpZfA68AU8ELFH>oHWgs&!H9kIbbaG{3Z3=jtHPly3R6!KR@i}+zUJD??svw|( zqNu2diem5Bd+!YqD`M}xgS~;hfxRO(Y}lfSB{7g;MJG{tq5A^LI=xWAO>T3^oXP<>fB0biy81%D{e7C z;hIZ{$^59fw3tC-HJ250KUZ^rnAyEG2Z?zZt+||-;wa4_B37Q}P%*DMYOWxXR;0P2 zh@GT448yT9PR9EfiLqD*>sdxTCQhU%%=iC1FZTJOudWt>QCJ15Vl|A$7_5#puqM{R zIIN9zF&^t<18j(i*ch8&5;nzVn2gP_1-8Q0*cRJid+dN6u@k0X7wn4Nusim^p4ba} zV;}5?{c!*e#KAZOhvG0Cjw5gsj>a)K7RTXuOvQGx!9cMBK4>LK ztduF+|5JGhtjF+uF;eLCvF3K)j|-O@aR$!B zOq_+YaSqPKc{m>z;6hx4i*X4q#bvl0SK=yMjcaf%uEX`X0XO0%%))Hkf?IJLZpWRt z3wPrl%)wmThx_pW9>ha<7?0plJch?H5A*RPp2E|32G8O-ynq++5?;nDconZCrezfbDiQsR93uDKSL#Q-cPR;RBz8Z4G)tMB}J!n6`1uG9j} zq2h}F;XBJRP%9P19{NplCGW+buQ@{Oy|pz*ikWN%_>3UhQ}a&&ldWo8OAH8?piFbX9lMNdWw`j42@ literal 0 HcmV?d00001 diff --git a/build.py b/build.py index 3c95b3be..1c31e28c 100755 --- a/build.py +++ b/build.py @@ -24,8 +24,8 @@ import gyp # pylint: enable=C6204 PLATFORMS_DIR_PATH = os.path.join(CDM_TOP_PATH, 'platforms') -OEMCRYPTO_FUZZTEST_DIR_PATH = os.path.join( - CDM_TOP_PATH, 'oemcrypto', 'test', 'fuzz_tests') +OEMCRYPTO_FUZZTEST_DIR_PATH = os.path.join(CDM_TOP_PATH, 'oemcrypto', 'test', + 'fuzz_tests') # Exit status for script if failure arises. EXIT_FAILURE = 1 @@ -38,8 +38,8 @@ def LoadFields(path): specified at the given |path|. Args: - path: The path (absolute to relative) to the source file containing - module to be loaded. + path: The path (absolute to relative) to the source file containing module + to be loaded. Returns: The fields dictionary if it is successfully loaded. Otherwise @@ -59,7 +59,8 @@ def IsNinjaInstalled(): dev_null = subprocess.DEVNULL else: dev_null = open(os.devnull, 'w') - subprocess.check_call(['ninja', '--version'], stdout=dev_null, + subprocess.check_call(['ninja', '--version'], + stdout=dev_null, stderr=dev_null) return True except subprocess.CalledProcessError: @@ -75,9 +76,9 @@ def PlatformExists(platform, print_details=False): Args: platform: Name of the platform (ex. "x86-64") - print_details: An optional flag to enable printing of the reason - the platform was determined to not exist. Does not print - anything if the platform is valid. + print_details: An optional flag to enable printing of the reason the + platform was determined to not exist. Does not print anything if the + platform is valid. Returns: True if the there exists configuration files for the specified |platform|, @@ -100,8 +101,9 @@ def PlatformExists(platform, print_details=False): .format(platform_gypi_path)) return False if not os.path.isfile(platform_environment_path): - vprint(' Target platform is missing environment.py file: env_path = {}' - .format(platform_environment_path)) + vprint( + ' Target platform is missing environment.py file: env_path = {}'.format( + platform_environment_path)) return False return True @@ -113,8 +115,10 @@ def RetrieveListOfPlatforms(): A list of strings containing the name of the platform """ if not os.path.isdir(PLATFORMS_DIR_PATH): - print('Cannot find platforms directory: expected_path = {}' - .format(PLATFORMS_DIR_PATH), file=sys.stderr) + print( + 'Cannot find platforms directory: expected_path = {}'.format( + PLATFORMS_DIR_PATH), + file=sys.stderr) return [] return sorted(filter(PlatformExists, os.listdir(PLATFORMS_DIR_PATH))) @@ -149,8 +153,7 @@ def RunNinja(output_path, build_config, job_limit, verbose): if job_limit is not None: if math.isinf(job_limit): - print('Ninja cannot run an infinite number of jobs', - file=sys.stderr) + print('Ninja cannot run an infinite number of jobs', file=sys.stderr) print('Running at most 1000 jobs') job_limit = 1000 job_args = ['-j', str(job_limit)] @@ -163,11 +166,15 @@ def RunNinja(output_path, build_config, job_limit, verbose): return VerboseSubprocess(['ninja', '-C', build_path] + job_args) +# Map from generator name to generator invocation function. +BUILDERS = { + 'make': RunMake, + 'ninja': RunNinja, +} + + def GetBuilder(generator): - return { - 'make': RunMake, - 'ninja': RunNinja, - }.get(generator) + return BUILDERS.get(generator) def ImportPlatform(platform, gyp_args, build_fuzz_tests): @@ -196,10 +203,10 @@ def ImportPlatform(platform, gyp_args, build_fuzz_tests): gyp_args.append('--include=' + platform_gypi_path) if build_fuzz_tests: - fuzzer_settings_path = os.path.join( - OEMCRYPTO_FUZZTEST_DIR_PATH, 'platforms/x86-64') - fuzzer_settings_gypi_path = os.path.join( - fuzzer_settings_path, 'fuzzer_settings.gypi') + fuzzer_settings_path = os.path.join(OEMCRYPTO_FUZZTEST_DIR_PATH, + 'platforms/x86-64') + fuzzer_settings_gypi_path = os.path.join(fuzzer_settings_path, + 'fuzzer_settings.gypi') gyp_args.append('--include=' + fuzzer_settings_gypi_path) gyp_args.append('-Goutput_dir=' + output_path) @@ -217,44 +224,83 @@ def ImportPlatform(platform, gyp_args, build_fuzz_tests): def main(args): if IsNinjaInstalled(): - print('ninja is installed - use ninja for generator') + print('ninja is installed - use ninja for default generator') default_generator = 'ninja' else: - print('ninja is not installed - use make for generator') + print('ninja is not installed - use make for default generator') default_generator = 'make' parser = argparse.ArgumentParser() - parser.add_argument('platform', - help=('The platform configuration to use (x86-64). ' - 'Should be one of the folder names inside ' - 'platforms/'), - choices=RetrieveListOfPlatforms()) - parser.add_argument('-r', '--release', - dest='build_config', default='Debug', - action='store_const', const='Release', - help='Builds a release build (equivalent to -c Release)') - parser.add_argument('-c', '--config', - dest='build_config', default='Debug', - help='Select a build config (Debug, Release). ' - 'Defaults to Debug.') - parser.add_argument('-g', '--generator', default=default_generator, - help='Which build system to use (make, ninja, ...). ' - 'Defaults to ninja when available, make otherwise.') - parser.add_argument('-j', '--jobs', nargs='?', const=float('inf'), type=int, - help='When building, run up to this many jobs in ' - 'parallel. The default is the default for your chosen ' - 'generator. If this flag is specified without a value, ' - 'jobs will spawn without limit.') - parser.add_argument('-D', action='append', default=[], - help='Pass variable definitions to gyp.') - parser.add_argument('-e', '--extra_gyp', action='append', default=[], - help='External gyp file that are processed after the ' - 'standard gyp files. (Maybe be specified multiple times)') - parser.add_argument('-ft', '--fuzz_tests', default=False, - action='store_true', - help='Set this flag if you want to build fuzz tests.') - parser.add_argument('-v', '--verbose', action='store_true', - help='Print verbose output.') + parser.add_argument( + 'platform', + help=('The platform to target. To add a new platform, create a new ' + 'platform directory with "environment.py" and "settings.gypi" ' + 'files under platforms/.'), + choices=RetrieveListOfPlatforms()) + + build_config_group = parser.add_mutually_exclusive_group(required=True) + build_config_group.add_argument( + '-d', + '--debug', + dest='build_config', + action='store_const', + const='debug', + help='Build a debug build. This is shorthand for "--config debug".') + build_config_group.add_argument( + '-r', + '--release', + dest='build_config', + action='store_const', + const='release', + help='Build a release build. This is shorthand for "--config release".') + build_config_group.add_argument( + '-c', + '--config', + dest='build_config', + help=('Select a build configuration to use. Any configuration defined in ' + 'the chosen platform\'s "settings.gypi" file may be used.')) + + parser.add_argument( + '-g', + '--generator', + default=default_generator, + help='Which build system to use. Defaults to {}.'.format( + default_generator), + choices=BUILDERS.keys()) + parser.add_argument( + '-j', + '--jobs', + nargs='?', + const=float('inf'), + type=int, + help=('When building, run up to this many jobs in parallel. The default ' + 'is the default for your chosen generator. If this flag is ' + 'specified without a value, jobs will spawn without limit.')) + parser.add_argument( + '-D', + '--define', + action='append', + default=[], + help=('Pass variable definitions to GYP. (May be specified multiple ' + 'times.)')) + parser.add_argument( + '-e', + '--extra_gyp', + action='append', + default=[], + help=('External GYP file that is processed after the standard GYP files. ' + '(May be specified multiple times.)')) + parser.add_argument( + '-ft', + '--fuzz_tests', + action='store_true', + help='Set this flag if you want to build fuzz tests.') + parser.add_argument( + '-v', + '--verbose', + action='store_true', + help=('Print verbose build output, including verbose output from the ' + 'generator.')) options = parser.parse_args(args) @@ -273,14 +319,14 @@ def main(args): os.path.join(OEMCRYPTO_FUZZTEST_DIR_PATH, 'oemcrypto_fuzztests.gyp')) else: gyp_args.append(os.path.join(CDM_TOP_PATH, 'cdm', 'cdm_unittests.gyp')) + for var in options.extra_gyp: gyp_args.append(var) - for var in options.D: + for var in options.define: gyp_args.append('-D' + var) - output_path = ImportPlatform( - options.platform, gyp_args, options.fuzz_tests) + output_path = ImportPlatform(options.platform, gyp_args, options.fuzz_tests) print(' Running: {}'.format(' '.join(['gyp'] + gyp_args))) retval = gyp.main(gyp_args) @@ -295,8 +341,8 @@ def main(args): print(' Cannot automatically build with this generator', file=sys.stderr) print(' Please start the build manually', file=sys.stderr) return EXIT_FAILURE - return builder( - output_path, options.build_config, options.jobs, options.verbose) + return builder(output_path, options.build_config, options.jobs, + options.verbose) if __name__ == '__main__': diff --git a/cdm/cdm.gyp b/cdm/cdm.gyp index 0e788716..adea015c 100644 --- a/cdm/cdm.gyp +++ b/cdm/cdm.gyp @@ -47,7 +47,7 @@ 'type': 'static_library', 'standalone_static_library': 1, 'includes': ['../third_party/protoc.gypi'], - 'sources': ['../metrics/src/metrics.proto',], + 'sources': ['../metrics/src/wv_metrics.proto',], 'variables': { 'proto_in_dir': '../metrics/src', }, diff --git a/cdm/core_unittests.gypi b/cdm/core_unittests.gypi index 172e80c8..67eaac4d 100644 --- a/cdm/core_unittests.gypi +++ b/cdm/core_unittests.gypi @@ -24,11 +24,13 @@ '../core/test/parallel_operations_test.cpp', '../core/test/policy_engine_constraints_unittest.cpp', '../core/test/policy_engine_unittest.cpp', + '../core/test/policy_integration_test.cpp', '../core/test/rw_lock_test.cpp', '../core/test/service_certificate_unittest.cpp', '../core/test/test_base.cpp', '../core/test/test_printers.cpp', '../core/test/url_request.cpp', + '../core/test/url_request_unittest.cpp', '../core/test/usage_table_header_unittest.cpp', '../metrics/test/counter_metric_unittest.cpp', '../metrics/test/distribution_unittest.cpp', diff --git a/cdm/include/cdm.h b/cdm/include/cdm.h index c8193d92..c6e9d57a 100644 --- a/cdm/include/cdm.h +++ b/cdm/include/cdm.h @@ -42,25 +42,25 @@ class CDM_EXPORT ITimerClient { class CDM_EXPORT Cdm : public ITimerClient { public: // Session types defined by EME. - typedef enum { + enum SessionType : int32_t { kTemporary = 0, kPersistentLicense = 1, kPersistent = kPersistentLicense, // deprecated name from June 1 draft kPersistentUsageRecord = 2, - } SessionType; + }; // Message types defined by EME. - typedef enum { + enum MessageType : int32_t { kLicenseRequest = 0, kLicenseRenewal = 1, kLicenseRelease = 2, kIndividualizationRequest = 3, // Not used. Direct Individualization // is used instead of App-Assisted - } MessageType; + }; // Status codes returned by CDM functions. // - typedef enum { + enum Status : int32_t { kSuccess = 0, // These are analogous to the exceptions defined in the EME specification. @@ -94,27 +94,27 @@ class CDM_EXPORT Cdm : public ITimerClient { // This covers errors that we do not expect (see logs for details): kUnexpectedError = 99999, - } Status; + }; // These are the init data types defined by EME. - typedef enum { + enum InitDataType : int32_t { kCenc = 0, kKeyIds = 1, // NOTE: not supported by Widevine at this time kWebM = 2, // This type is not defined by EME but is supported by Widevine kHls = 10000, - } InitDataType; + }; // These are the crypto schemes supported by CENC 3.0. - typedef enum { + enum EncryptionScheme : int32_t { kClear = 0, kAesCtr = 1, // AES-CTR, for use with the "cenc" schema kAesCbc = 2, // AES-CBC, for use with the "cbcs" schema - } EncryptionScheme; + }; // These are key statuses defined by EME. - typedef enum { + enum KeyStatus : int32_t { kUsable = 0, kExpired = 1, kOutputRestricted = 2, @@ -122,18 +122,18 @@ class CDM_EXPORT Cdm : public ITimerClient { kStatusPending = 3, kInternalError = 4, kReleased = 5, - } KeyStatus; + }; // These are the possible HDCP levels supported by Widevine. // For ease of comparison, these values are kept in ascending order by version // number. - typedef enum { + enum HdcpVersion : int32_t { kHdcp1_x = 0, kHdcp2_0 = 1, kHdcp2_1 = 2, kHdcp2_2 = 3, kHdcp2_3 = 4, - } HdcpVersion; + }; // Permissible usages for a key. Returned as a set of flags; multiple // flags may be set. The specific settings are defined in the license @@ -150,7 +150,7 @@ class CDM_EXPORT Cdm : public ITimerClient { // These are defined by Widevine. The CDM can be configured to decrypt in // three modes (dependent on OEMCrypto support). - typedef enum { + enum SecureOutputType : int32_t { // Data is decrypted to an opaque handle. // Translates to OEMCrypto's OEMCrypto_BufferType_Secure. kOpaqueHandle = 0, @@ -164,35 +164,35 @@ class CDM_EXPORT Cdm : public ITimerClient { // clear buffer in main memory. // Translates to OEMCrypto's OEMCrypto_BufferType_Clear. kNoSecureOutput = 2, - } SecureOutputType; + }; // Logging levels defined by Widevine. // See Cdm::initialize(). - typedef enum { + enum LogLevel : int32_t { kSilent = -1, kErrors = 0, kWarnings = 1, kInfo = 2, kDebug = 3, kVerbose = 4, - } LogLevel; + }; // Types of service defined by Widevine. // The service certificate installation methods - Cdm::setServiceCertificate() // and Cdm::parseAndLoadServiceCertificateResponse() - use these to identify // which service the certificate is intended for. - typedef enum { + enum ServiceRole : int32_t { kAllServices = 0, kProvisioningService = 1, kLicensingService = 2, - } ServiceRole; + }; // These are the available Widevine robustness levels. - typedef enum { + enum RobustnessLevel : int32_t { kL1 = 1, kL2 = 2, kL3 = 3, - } RobustnessLevel; + }; // A map of key statuses. // See Cdm::getKeyStatuses(). @@ -788,15 +788,15 @@ class CDM_EXPORT Cdm : public ITimerClient { // Generic crypto - functions for applying crypto operations to // app-level data (outside the content stream). - typedef enum { + enum GenericEncryptionAlgorithmType : int32_t { kEncryptionAlgorithmUnknown, kEncryptionAlgorithmAesCbc128, - } GenericEncryptionAlgorithmType; + }; - typedef enum { + enum GenericSigningAlgorithmType : int32_t { kSigningAlgorithmUnknown, kSigningAlgorithmHmacSha256 - } GenericSigningAlgorithmType; + }; // Encrypts a buffer of app-level data. virtual Status genericEncrypt(const std::string& session_id, diff --git a/cdm/include/cdm_version.h b/cdm/include/cdm_version.h index b0a71283..2fb94a6d 100644 --- a/cdm/include/cdm_version.h +++ b/cdm/include/cdm_version.h @@ -1,5 +1,5 @@ // Widevine CE CDM Version #ifndef CDM_VERSION -# define CDM_VERSION "16.3.0" +# define CDM_VERSION "16.4.0" #endif #define EME_VERSION "https://www.w3.org/TR/2017/REC-encrypted-media-20170918" diff --git a/cdm/src/cdm.cpp b/cdm/src/cdm.cpp index e388462e..02262e1a 100644 --- a/cdm/src/cdm.cpp +++ b/cdm/src/cdm.cpp @@ -22,13 +22,13 @@ #include "file_store.h" #include "license.h" #include "log.h" -#include "metrics.pb.h" #include "properties.h" #include "service_certificate.h" #include "string_conversions.h" #include "wv_cdm_constants.h" #include "wv_cdm_event_listener.h" #include "wv_cdm_types.h" +#include "wv_metrics.pb.h" // CE: #include "cdm_version.h" @@ -367,7 +367,8 @@ Cdm::Status CdmImpl::setServiceCertificate(ServiceRole role, // Verify that the certificate is properly signed and well-formed. CdmResponseType status = cdm_engine_->ValidateServiceCertificate(certificate); if (status != NO_ERROR) { - LOGE("Invalid service certificate! Error code = %d", status); + LOGE("Invalid service certificate! Error code = %d", + static_cast(status)); return kTypeError; } @@ -421,13 +422,13 @@ Cdm::Status CdmImpl::getRobustnessLevel(RobustnessLevel* level) { } std::string level_string; - CdmResponseType result = cdm_engine_->QueryStatus( + const CdmResponseType result = cdm_engine_->QueryStatus( kLevelDefault, QUERY_KEY_SECURITY_LEVEL, &level_string); if (result == SYSTEM_INVALIDATED_ERROR) { LOGE("System invalidated"); return kSystemStateLost; } else if (result != NO_ERROR) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } @@ -452,19 +453,19 @@ Cdm::Status CdmImpl::getResourceRatingTier(uint32_t* tier) { } std::string tier_string; - CdmResponseType result = cdm_engine_->QueryStatus( + const CdmResponseType result = cdm_engine_->QueryStatus( kLevelDefault, QUERY_KEY_RESOURCE_RATING_TIER, &tier_string); if (result == SYSTEM_INVALIDATED_ERROR) { LOGE("System invalidated"); return kSystemStateLost; } else if (result != NO_ERROR) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } - uint32_t parsed_tier = static_cast(std::stoul(tier_string)); + const uint32_t parsed_tier = static_cast(std::stoul(tier_string)); if (parsed_tier <= 0) { - LOGE("Invalid resource rating tier %lu", parsed_tier); + LOGE("Invalid resource rating tier %u", parsed_tier); return kUnexpectedError; } @@ -484,7 +485,7 @@ Cdm::Status CdmImpl::getOemCryptoBuildInfo(std::string* build_info) { LOGE("System invalidated"); return kSystemStateLost; } else if (result != NO_ERROR) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } @@ -508,7 +509,7 @@ Cdm::Status CdmImpl::getProvisioningRequest(std::string* request) { LOGE("System invalidated"); return kSystemStateLost; } else if (result != NO_ERROR) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } return kSuccess; @@ -524,7 +525,7 @@ Cdm::Status CdmImpl::handleProvisioningResponse(const std::string& response) { LOGE("System invalidated"); return kSystemStateLost; } else if (result != NO_ERROR) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } @@ -537,7 +538,7 @@ Cdm::Status CdmImpl::removeProvisioning() { LOGE("System invalidated"); return kSystemStateLost; } else if (result != NO_ERROR) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } return kSuccess; @@ -554,7 +555,7 @@ Cdm::Status CdmImpl::listStoredLicenses(std::vector* key_set_ids) { LOGE("System invalidated"); return kSystemStateLost; } else if (result != NO_ERROR) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } return kSuccess; @@ -571,7 +572,7 @@ Cdm::Status CdmImpl::listUsageRecords(std::vector* ksids) { LOGE("System invalidated"); return kSystemStateLost; } else if (result != NO_ERROR) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } return kSuccess; @@ -584,7 +585,7 @@ Cdm::Status CdmImpl::deleteUsageRecord(const std::string& key_set_id) { LOGE("System invalidated"); return kSystemStateLost; } else if (result != NO_ERROR) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } return kSuccess; @@ -597,7 +598,7 @@ Cdm::Status CdmImpl::deleteAllUsageRecords() { LOGE("System invalidated"); return kSystemStateLost; } else if (result != NO_ERROR) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } return kSuccess; @@ -643,7 +644,7 @@ Cdm::Status CdmImpl::createSession(SessionType session_type, case kPersistentUsageRecord: break; default: - LOGE("Unsupported session type: %d", session_type); + LOGE("Unsupported session type: %d", static_cast(session_type)); return kNotSupported; } @@ -663,7 +664,7 @@ Cdm::Status CdmImpl::createSession(SessionType session_type, LOGE("System invalidated"); return kSystemStateLost; default: - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } } @@ -681,7 +682,7 @@ Cdm::Status CdmImpl::generateRequest(const std::string& session_id, return kInvalidState; } - SessionType session_type = sessions_[session_id].type; + const SessionType session_type = sessions_[session_id].type; CdmLicenseType license_type; switch (session_type) { case kTemporary: @@ -694,7 +695,7 @@ Cdm::Status CdmImpl::generateRequest(const std::string& session_id, license_type = kLicenseTypeStreaming; break; default: - LOGE("Unexpected session type: %d", session_type); + LOGE("Unexpected session type: %d", static_cast(session_type)); return kUnexpectedError; } @@ -713,7 +714,7 @@ Cdm::Status CdmImpl::generateRequest(const std::string& session_id, init_data_type_name = HLS_INIT_DATA_FORMAT; break; default: - LOGE("Invalid init data type: %d", init_data_type); + LOGE("Invalid init data type: %d", static_cast(init_data_type)); return kTypeError; } @@ -739,7 +740,7 @@ Cdm::Status CdmImpl::generateRequest(const std::string& session_id, CdmKeyRequest key_request; - CdmResponseType result = cdm_engine_->GenerateKeyRequest( + const CdmResponseType result = cdm_engine_->GenerateKeyRequest( session_id, session_id, init_data_obj, license_type, app_parameters_, &key_request); @@ -760,14 +761,14 @@ Cdm::Status CdmImpl::generateRequest(const std::string& session_id, LOGE("No licensing service certificate installed"); return kNeedsServiceCertificate; } else if (result != KEY_MESSAGE) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } sessions_[session_id].callable = true; assert(key_request.type == kKeyRequestTypeInitial); - LOGI("A license request has been generated."); + LOGI("A license request has been generated"); listener_->onMessage(session_id, kLicenseRequest, key_request.message); return kSuccess; } @@ -794,7 +795,7 @@ Cdm::Status CdmImpl::load(const std::string& session_id) { case NEED_PROVISIONING: return kNeedsDeviceCertificate; default: - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } @@ -818,7 +819,7 @@ Cdm::Status CdmImpl::load(const std::string& session_id) { LOGE("Unable to load license: %s", session_id.c_str()); return kSessionNotFound; } else { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } } @@ -836,7 +837,7 @@ Cdm::Status CdmImpl::load(const std::string& session_id) { LOGE("System invalidated"); return kSystemStateLost; } else if (result != KEY_ADDED) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } @@ -871,8 +872,8 @@ Cdm::Status CdmImpl::update(const std::string& session_id, // NOTE: If the CdmSession object recognizes that this is not the first // AddKey(), it will internally delegate to RenewKey(). CdmKeySetId key_set_id = session_id; - CdmLicenseType license_type; // Required for AddKey. Unused otherwise. - CdmResponseType result = + CdmLicenseType license_type = {}; // Required for AddKey. Unused otherwise. + const CdmResponseType result = cdm_engine_->AddKey(session_id, response, &license_type, &key_set_id); // result should only be NEED_KEY after server certificate provisioning, which @@ -894,7 +895,7 @@ Cdm::Status CdmImpl::update(const std::string& session_id, LOGE("The device needs to reprovision."); return kNeedsDeviceCertificate; } else if (result != KEY_ADDED) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } @@ -921,7 +922,7 @@ Cdm::Status CdmImpl::loadEmbeddedKeys(const std::string& session_id, } if (init_data_type != kCenc) { - LOGE("Invalid init data type: %d", init_data_type); + LOGE("Invalid init data type: %d", static_cast(init_data_type)); return kTypeError; } @@ -942,7 +943,7 @@ Cdm::Status CdmImpl::loadEmbeddedKeys(const std::string& session_id, } CdmKeyRequest key_request; - CdmResponseType result = cdm_engine_->GenerateKeyRequest( + const CdmResponseType result = cdm_engine_->GenerateKeyRequest( session_id, session_id, init_data_obj, kLicenseTypeEmbeddedKeyData, app_parameters_, &key_request); @@ -956,7 +957,8 @@ Cdm::Status CdmImpl::loadEmbeddedKeys(const std::string& session_id, LOGE("Nonce quota exceeded"); return kResourceContention; } else if (result != KEY_ADDED) { - LOGE("Unexpected Failure: GenerateKeyRequest() returned %lu", result); + LOGE("Unexpected Failure: GenerateKeyRequest() returned %d", + static_cast(result)); return kUnexpectedError; } return kSuccess; @@ -1019,7 +1021,7 @@ Cdm::Status CdmImpl::getKeyAllowedUsages(const std::string& session_id, LOGE("Session invalidated"); return kSessionStateLost; } else { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } } @@ -1036,7 +1038,7 @@ Cdm::Status CdmImpl::getKeyAllowedUsages(const std::string& key_id, } CdmKeyAllowedUsage usage_for_key; - CdmResponseType result = + const CdmResponseType result = cdm_engine_->QueryKeyAllowedUsage(key_id, &usage_for_key); if (result != NO_ERROR) { if (result == KEY_NOT_FOUND_1 || result == KEY_NOT_FOUND_2) { @@ -1050,7 +1052,7 @@ Cdm::Status CdmImpl::getKeyAllowedUsages(const std::string& key_id, } else if (result == KEY_CONFLICT_1) { return kTypeError; } else { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } } @@ -1101,12 +1103,12 @@ Cdm::Status CdmImpl::close(const std::string& session_id) { return kSessionNotFound; } - CdmResponseType result = cdm_engine_->CloseSession(session_id); + const CdmResponseType result = cdm_engine_->CloseSession(session_id); if (result == SYSTEM_INVALIDATED_ERROR) { LOGE("System invalidated"); return kSystemStateLost; } else if (result != NO_ERROR) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } sessions_.erase(session_id); @@ -1140,7 +1142,7 @@ Cdm::Status CdmImpl::remove(const std::string& session_id) { it->second = kReleased; } - CdmResponseType result = cdm_engine_->GenerateKeyRequest( + const CdmResponseType result = cdm_engine_->GenerateKeyRequest( session_id, session_id, empty_initialization_data, kLicenseTypeRelease, app_parameters_, &key_request); @@ -1154,7 +1156,7 @@ Cdm::Status CdmImpl::remove(const std::string& session_id) { LOGE("Nonce quota exceeded"); return kResourceContention; } else if (result != KEY_MESSAGE) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); cdm_engine_->CloseSession(session_id); return kUnexpectedError; } @@ -1181,7 +1183,7 @@ Cdm::Status CdmImpl::forceRemove(const std::string& session_id) { return kRangeError; } - CdmResponseType result = cdm_engine_->RemoveLicense(session_id); + const CdmResponseType result = cdm_engine_->RemoveLicense(session_id); if (result == SYSTEM_INVALIDATED_ERROR) { LOGE("System invalidated"); @@ -1190,7 +1192,7 @@ Cdm::Status CdmImpl::forceRemove(const std::string& session_id) { LOGE("Session invalidated"); return kSessionStateLost; } else if (result != NO_ERROR) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } @@ -1285,7 +1287,8 @@ Cdm::Status CdmImpl::decrypt(const std::string& session_id, return cdm_sample; }); - CdmResponseType result = cdm_engine_->DecryptV16(session_id, parameters); + const CdmResponseType result = + cdm_engine_->DecryptV16(session_id, parameters); if (result == NO_ERROR) { return kSuccess; @@ -1317,7 +1320,7 @@ Cdm::Status CdmImpl::decrypt(const std::string& session_id, return kKeyUsageBlockedByPolicy; } - LOGE("Decrypt error: %d", result); + LOGE("Decrypt error: %d", static_cast(result)); return kDecryptError; } @@ -1327,9 +1330,11 @@ Cdm::Status CdmImpl::genericEncrypt(const std::string& session_id, const std::string& iv, GenericEncryptionAlgorithmType algorithm, std::string* out_buffer) { - CdmEncryptionAlgorithm cdm_algorithm = ConvertEncryptionAlgorithm(algorithm); + const CdmEncryptionAlgorithm cdm_algorithm = + ConvertEncryptionAlgorithm(algorithm); if (cdm_algorithm == wvcdm::kEncryptionAlgorithmUnknown) { - LOGE("Unrecognized encryption algorithm: %d.", cdm_algorithm); + LOGE("Unrecognized encryption algorithm: %d.", + static_cast(cdm_algorithm)); return kNotSupported; } @@ -1358,7 +1363,7 @@ Cdm::Status CdmImpl::genericEncrypt(const std::string& session_id, LOGE("Key Error: %s", session_id.c_str()); return kNoKey; } - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } @@ -1368,13 +1373,15 @@ Cdm::Status CdmImpl::genericDecrypt(const std::string& session_id, const std::string& iv, GenericEncryptionAlgorithmType algorithm, std::string* out_buffer) { - CdmEncryptionAlgorithm cdm_algorithm = ConvertEncryptionAlgorithm(algorithm); + const CdmEncryptionAlgorithm cdm_algorithm = + ConvertEncryptionAlgorithm(algorithm); if (cdm_algorithm == wvcdm::kEncryptionAlgorithmUnknown) { - LOGE("Unrecognized encryption algorithm: %d.", cdm_algorithm); + LOGE("Unrecognized encryption algorithm: %d.", + static_cast(cdm_algorithm)); return kNotSupported; } - CdmResponseType result = cdm_engine_->GenericDecrypt( + const CdmResponseType result = cdm_engine_->GenericDecrypt( session_id, in_buffer, key_id, iv, cdm_algorithm, out_buffer); if (result == NO_ERROR) { return kSuccess; @@ -1399,7 +1406,7 @@ Cdm::Status CdmImpl::genericDecrypt(const std::string& session_id, LOGE("Key Error: %s", session_id.c_str()); return kNoKey; } - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } @@ -1408,14 +1415,14 @@ Cdm::Status CdmImpl::genericSign(const std::string& session_id, const std::string& key_id, GenericSigningAlgorithmType algorithm, std::string* signature) { - CdmSigningAlgorithm cdm_algorithm = ConvertSigningAlgorithm(algorithm); + const CdmSigningAlgorithm cdm_algorithm = ConvertSigningAlgorithm(algorithm); if (cdm_algorithm == wvcdm::kSigningAlgorithmUnknown) { - LOGE("Unrecognized signing algorithm: %d.", cdm_algorithm); + LOGE("Unrecognized signing algorithm: %d", static_cast(cdm_algorithm)); return kNotSupported; } - CdmResponseType result = cdm_engine_->GenericSign(session_id, message, key_id, - cdm_algorithm, signature); + const CdmResponseType result = cdm_engine_->GenericSign( + session_id, message, key_id, cdm_algorithm, signature); if (result == NO_ERROR) { return kSuccess; } @@ -1435,7 +1442,7 @@ Cdm::Status CdmImpl::genericSign(const std::string& session_id, LOGE("Key Error: %s", session_id.c_str()); return kNoKey; } - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } @@ -1444,13 +1451,13 @@ Cdm::Status CdmImpl::genericVerify(const std::string& session_id, const std::string& key_id, GenericSigningAlgorithmType algorithm, const std::string& signature) { - CdmSigningAlgorithm cdm_algorithm = ConvertSigningAlgorithm(algorithm); + const CdmSigningAlgorithm cdm_algorithm = ConvertSigningAlgorithm(algorithm); if (cdm_algorithm == wvcdm::kSigningAlgorithmUnknown) { - LOGE("Unrecognized signing algorithm: %d.", cdm_algorithm); + LOGE("Unrecognized signing algorithm: %d", static_cast(cdm_algorithm)); return kNotSupported; } - CdmResponseType result = cdm_engine_->GenericVerify( + const CdmResponseType result = cdm_engine_->GenericVerify( session_id, message, key_id, cdm_algorithm, signature); if (result == NO_ERROR) { return kSuccess; @@ -1471,18 +1478,19 @@ Cdm::Status CdmImpl::genericVerify(const std::string& session_id, LOGE("Key Error: %s", session_id.c_str()); return kNoKey; } - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return kUnexpectedError; } Cdm::Status CdmImpl::setVideoResolution(const std::string& session_id, uint32_t width, uint32_t height) { + constexpr uint64_t kMaxUint32 = std::numeric_limits::max(); // Verify that width * height will fit into a 32-bit quantity. // This is done to be compatible with the video resolution in the // license policy settings. - uint64_t pixels = width; - pixels *= height; - if (pixels >= (1ULL << 32)) return kRangeError; + const uint64_t pixels = + static_cast(width) * static_cast(height); + if (pixels > kMaxUint32) return kRangeError; if (cdm_engine_->NotifyResolution(session_id, width, height)) { return kSuccess; } else { @@ -1516,7 +1524,7 @@ void CdmImpl::onTimerExpired(void* context) { void CdmImpl::OnSessionRenewalNeeded(const CdmSessionId& session_id) { CdmKeyRequest key_request; - CdmResponseType result = + const CdmResponseType result = cdm_engine_->GenerateRenewalRequest(session_id, &key_request); if (result == LICENSE_RENEWAL_NONCE_GENERATION_ERROR) { // TODO(b/73606893): this error should be recoverable. Rather @@ -1526,7 +1534,7 @@ void CdmImpl::OnSessionRenewalNeeded(const CdmSessionId& session_id) { return; } if (result != KEY_MESSAGE) { - LOGE("Unexpected error %d", result); + LOGE("Unexpected error %d", static_cast(result)); return; } @@ -1574,7 +1582,8 @@ void CdmImpl::OnSessionKeysChange(const CdmSessionId& session_id, // compiler will flag if someone fails to add a case for new enum members, // while still handling the possibility of an invalid value sneaking into // the map at runtime. - LOGE("Invalid key status %d. Reporting internal error.", it->second); + LOGE("Internal error: Invalid key status: %d", + static_cast(it->second)); map[it->first] = kInternalError; } @@ -1608,7 +1617,7 @@ CdmEncryptionAlgorithm CdmImpl::ConvertEncryptionAlgorithm( if (algorithm == Cdm::kEncryptionAlgorithmAesCbc128) { return wvcdm::kEncryptionAlgorithmAesCbc128; } else { - LOGW("Unknown encryption algorithm: %d", algorithm); + LOGW("Unknown encryption algorithm: %d", static_cast(algorithm)); return wvcdm::kEncryptionAlgorithmUnknown; } } @@ -1618,7 +1627,7 @@ CdmSigningAlgorithm CdmImpl::ConvertSigningAlgorithm( if (algorithm == Cdm::kSigningAlgorithmHmacSha256) { return wvcdm::kSigningAlgorithmHmacSha256; } else { - LOGW("Unknown signing algorithm: %d", algorithm); + LOGW("Unknown signing algorithm: %d", static_cast(algorithm)); return wvcdm::kSigningAlgorithmUnknown; } } diff --git a/cdm/test/cdm_test.cpp b/cdm/test/cdm_test.cpp index 8cd047b3..d3311ee8 100644 --- a/cdm/test/cdm_test.cpp +++ b/cdm/test/cdm_test.cpp @@ -45,6 +45,8 @@ const int kRenewalTestDelayMs = 3 * 60 * 1000; const int kExpirationTestDelayMs = 5 * 60 * 1000; const int kOfflineLicenseDurationMs = 604800 * 1000; +constexpr size_t kMaxFetchAttempts = 5; + const std::string kDeviceCertFileName = "cert.bin"; const Cdm::SessionType kBogusSessionType = static_cast(-1); @@ -243,19 +245,26 @@ class CdmTest : public WvCdmTestBase, public Cdm::IEventListener { bool Fetch(const std::string& url, const std::string& message, std::string* response, int* status_code) { - UrlRequest url_request(url); - EXPECT_TRUE(url_request.is_connected()); - if (!url_request.is_connected()) { - return false; - } - url_request.PostRequest(message); std::string http_response; - url_request.GetResponse(&http_response); + for (size_t attempt = 1; attempt <= kMaxFetchAttempts; ++attempt) { + UrlRequest url_request(url); + if (!url_request.is_connected()) { + sleep(1); + continue; + } + url_request.PostRequest(message); + + if (!url_request.GetResponse(&http_response)) { + sleep(1); + continue; + } + break; + } // Some license servers return 400 for invalid message, some // return 500; treat anything other than 200 as an invalid message. - int http_status_code = url_request.GetStatusCode(http_response); + int http_status_code = UrlRequest::GetStatusCode(http_response); if (status_code) { *status_code = http_status_code; } @@ -310,11 +319,20 @@ class CdmTest : public WvCdmTestBase, public Cdm::IEventListener { void FetchLicense(const std::string& license_server, const std::string& message, std::string* response) { int status_code; - bool ok = Fetch(license_server, message, response, &status_code); + const bool ok = Fetch(license_server, message, response, &status_code); ASSERT_TRUE(ok); - if (ok) + if (!ok) return; + if (kHttpOk != status_code) { + std::map fields; + if (UrlRequest::GetDebugHeaderFields(*response, &fields)) { + LOGD("Unexpected status code: code = %d", status_code); + for (auto field : fields) { + LOGD("- %s: %s", field.first.c_str(), field.second.c_str()); + } + } ASSERT_EQ(kHttpOk, status_code) << "Error response: " << *response << "\n" << "license_server: " << license_server; + } } void FetchLicenseFailure(const std::string& message, @@ -682,7 +700,7 @@ TEST_F(CdmTest, ServiceCertificateRequestResponseUat) { std::string response; ASSERT_TRUE(FetchServiceCertificate(uat_config.license_server(), &response)); - LOGV("response size=%d", response.size()); + LOGV("Response size = %zu", response.size()); #if 0 // enable to extract the service certificate in byte form size_t done = 0; while (done < response.size()) { @@ -705,7 +723,7 @@ TEST_F(CdmTest, ServiceCertificateRequestResponseStaging) { std::string response; ASSERT_TRUE( FetchServiceCertificate(staging_config.license_server(), &response)); - LOGV("response size=%d", response.size()); + LOGV("Response: size = %zu", response.size()); #if 0 // enable to extract the service certificate in byte form size_t done = 0; while (done < response.size()) { @@ -789,21 +807,21 @@ TEST_F(CdmTest, OpenSessionWithoutServiceCertificate) { TEST_F(CdmTest, GetRobustnessLevel) { Cdm::RobustnessLevel level; - Cdm::Status status = cdm_->getRobustnessLevel(&level); + const Cdm::Status status = cdm_->getRobustnessLevel(&level); ASSERT_EQ(Cdm::kSuccess, status); - LOGI("Got robustness level %d", level); + LOGI("Got robustness level %d", static_cast(level)); } TEST_F(CdmTest, GetResourceRatingTier) { uint32_t tier; - Cdm::Status status = cdm_->getResourceRatingTier(&tier); + const Cdm::Status status = cdm_->getResourceRatingTier(&tier); ASSERT_EQ(Cdm::kSuccess, status); - LOGI("Got resource rating tier %lu", tier); + LOGI("Got resource rating tier %u", tier); } TEST_F(CdmTest, GetOemCryptoBuildInfo) { std::string build_info; - Cdm::Status status = cdm_->getOemCryptoBuildInfo(&build_info); + const Cdm::Status status = cdm_->getOemCryptoBuildInfo(&build_info); ASSERT_EQ(Cdm::kSuccess, status); LOGI("Got OEMCrypto build info: %s", build_info.c_str()); } diff --git a/cdm/test/test_host.cpp b/cdm/test/test_host.cpp index 2d25db4b..cc31fd6d 100644 --- a/cdm/test/test_host.cpp +++ b/cdm/test/test_host.cpp @@ -40,22 +40,28 @@ void TestHost::Reset() { } void TestHost::ElapseTime(int64_t milliseconds) { + // Note that, during the time rollback tests, milliseconds will be negative, + // so we cannot assume goal_time > now_. int64_t goal_time = now_ + milliseconds; - while (now_ < goal_time) { - if (timers_.empty()) { - now_ = goal_time; + + // Walk forward from now_ to goal_time, stepping at each timer along the way + // to fire its callback. + while (!timers_.empty() && now_ < goal_time) { + Timer t = timers_.top(); + ASSERT_GE(t.expiry_time(), now_); + if (t.expiry_time() <= goal_time) { + timers_.pop(); + now_ = t.expiry_time(); + t.client()->onTimerExpired(t.context()); } else { - Timer t = timers_.top(); - ASSERT_GE(t.expiry_time(), now_); - if (t.expiry_time() <= goal_time) { - timers_.pop(); - now_ = t.expiry_time(); - t.client()->onTimerExpired(t.context()); - } else { - now_ = goal_time; - } + // The next timer is further in the future than goal_time, so we are done + // processing the timers. + break; } } + + // No matter what happened with the timers, update now_ to the goal_time. + now_ = goal_time; } int TestHost::NumTimers() const { return timers_.size(); } diff --git a/core/include/cdm_engine.h b/core/include/cdm_engine.h index 16a4e1f1..95ff40f6 100644 --- a/core/include/cdm_engine.h +++ b/core/include/cdm_engine.h @@ -347,11 +347,6 @@ class CdmEngine { protected: friend class CdmEngineFactory; - friend class ParallelCdmTest; - friend class WvCdmEnginePreProvTest; - friend class WvCdmTestBase; - friend class WvGenericCryptoTest; - friend class TestLicenseHolder; CdmEngine(FileSystem* file_system, std::shared_ptr metrics); diff --git a/core/include/cdm_session.h b/core/include/cdm_session.h index 6325e49e..e173e8a4 100644 --- a/core/include/cdm_session.h +++ b/core/include/cdm_session.h @@ -239,6 +239,12 @@ class CdmSession { // true otherwise. bool VerifyOfflineUsageEntry(); + // On android, we previously permitted a license to be loaded and restored + // in the same session. This method releases resources so that + // CdmSession::Init can safely be invoked before a new license is restored. + // TODO(b/161865160): Investigate whether we can dispense with this scenario. + virtual CdmResponseType ReleaseOfflineResources(); + // These setters are for testing only. Takes ownership of the pointers. void set_license_parser(CdmLicense* license_parser); void set_crypto_session(CryptoSession* crypto_session); @@ -294,6 +300,21 @@ class CdmSession { // license type release and offline related information CdmKeySetId key_set_id_; + // TODO(b/161865160): Use these variables to cache Init parameters. Remove + // when b/ has been addressed. + // |cdm_client_property_set_| and |event_listener_| point to a data + // member of WVDrmPlugin or WVDrmPlugin itself. It is safe for CdmSession + // to make use of these objects without taking ownership since WVDrmPlugin + // lifetime exceeds CdmSession (WVDrmPlugin indirectly owns CdmSession + // objects). These pointers if set, should be valid till CdmSession + // destruction. + CdmClientPropertySet* cdm_client_property_set_ = nullptr; + CdmSessionId* forced_session_id_ = nullptr; + CdmSessionId forced_session_id_value_; + WvCdmEventListener* event_listener_ = nullptr; + bool has_license_been_loaded_ = false; + bool has_license_been_restored_ = false; + bool mock_license_parser_in_use_; bool mock_policy_engine_in_use_; diff --git a/core/include/license.h b/core/include/license.h index 9d566803..98a139d9 100644 --- a/core/include/license.h +++ b/core/include/license.h @@ -58,9 +58,9 @@ class CdmLicense { CdmSession* cdm_session, CdmKeyMessage* signed_request, std::string* server_url); virtual CdmResponseType HandleKeyResponse( - const CdmKeyResponse& license_response); + bool is_restore, const CdmKeyResponse& license_response); virtual CdmResponseType HandleKeyUpdateResponse( - bool is_renewal, const CdmKeyResponse& license_response); + bool is_renewal, bool is_restore, const CdmKeyResponse& license_response); virtual CdmResponseType HandleEmbeddedKeyData( const InitializationData& init_data); @@ -109,7 +109,7 @@ class CdmLicense { video_widevine::LicenseRequest* license_request); CdmResponseType HandleContentKeyResponse( - const std::string& msg, const std::string& core_message, + bool is_restore, const std::string& msg, const std::string& core_message, const std::string& signature, const std::string& mac_key_iv, const std::string& mac_key, const std::vector& key_array, const video_widevine::License& license); @@ -118,11 +118,16 @@ class CdmLicense { // the crypto session. In addition, it also extracts content keys from // |wrapped_keys_| and loads them for use. CdmResponseType HandleEntitlementKeyResponse( - const std::string& msg, const std::string& core_message, + bool is_restore, const std::string& msg, const std::string& core_message, const std::string& signature, const std::string& mac_key_iv, const std::string& mac_key, const std::vector& key_array, const video_widevine::License& license); + // Prepare to reload a key update message. Some special code is needed to work + // around b/166010609. + // TODO(b/166007195): Remove this. + CdmResponseType PrepareKeyUpdateReload(CdmSession* cdm_session); + CdmResponseType HandleNewEntitledKeys( const std::vector& wrapped_keys); diff --git a/core/include/policy_engine.h b/core/include/policy_engine.h index 0e89df64..d71c2387 100644 --- a/core/include/policy_engine.h +++ b/core/include/policy_engine.h @@ -56,10 +56,13 @@ class PolicyEngine { // SetLicense is used in handling the initial license response. It stores // an exact copy of the policy information stored in the license. - // The license state transitions to kLicenseStateCanPlay if the license - // permits playback. + // License state transitions and notifications may occur if + // |defer_license_state_update| is not set. If set, the license is likely + // being restored and transitions and notifications will be deferred until + // stored playback times are restored. virtual void SetLicense(const video_widevine::License& license, - bool supports_core_messages); + bool supports_core_messages, + bool defer_license_state_update); // Used to update the currently loaded entitled content keys. virtual void SetEntitledLicenseKeys( @@ -78,9 +81,17 @@ class PolicyEngine { // UpdateLicense is used in handling a license response for a renewal request. // The response may only contain any policy fields that have changed. In this // case an exact copy is not what we want to happen. We also will receive an - // updated license_start_time from the server. The license will transition to - // kLicenseStateCanPlay if the license permits playback. - virtual void UpdateLicense(const video_widevine::License& license); + // updated license_start_time from the server. + // License state transitions and notifications may occur if + // |defer_license_state_update| is not set. If set, the license is likely + // being restored and transitions and notifications will be deferred until + // stored playback times are restored. + virtual void UpdateLicense(const video_widevine::License& license, + bool defer_license_state_update); + + // This method updates license state and sends appropriate notifications + // to event listeners. + virtual void UpdateLicenseState(int64_t current_time); // Used for notifying the Policy Engine of resolution changes virtual void NotifyResolution(uint32_t width, uint32_t height); @@ -101,6 +112,9 @@ class PolicyEngine { int64_t GetPlaybackStartTime(); int64_t GetLastPlaybackTime(); int64_t GetGracePeriodEndTime(); + + // This method will also update license state and sends appropriate + // notifications to event listeners. void RestorePlaybackTimes(int64_t playback_start_time, int64_t last_playback_time, int64_t grace_period_end_time); @@ -153,6 +167,7 @@ class PolicyEngine { void SetSecurityLevelForTest(CdmSecurityLevel security_level); LicenseState license_state_; + int64_t license_state_update_deadline_; // This is the license id field from server response. This data gets passed // back to the server in each renewal request. When we get a renewal response diff --git a/core/include/policy_timers_v16.h b/core/include/policy_timers_v16.h index 8f21bb6d..924b5ea1 100644 --- a/core/include/policy_timers_v16.h +++ b/core/include/policy_timers_v16.h @@ -84,6 +84,8 @@ class PolicyTimersV16 : public PolicyTimers { return GetRentalDurationRemaining(current_time); }; + bool HasRenewalDelayExpired(int64_t current_time) override; + protected: // Gets the clock time that the license expires based on whether we have // started playing. This takes into account GetHardLicenseExpiryTime. diff --git a/core/include/wv_cdm_types.h b/core/include/wv_cdm_types.h index 3517005f..5d6f8b9a 100644 --- a/core/include/wv_cdm_types.h +++ b/core/include/wv_cdm_types.h @@ -34,7 +34,7 @@ using CdmProvisioningResponse = std::string; using CdmUsageTableHeader = std::string; using CdmUsageEntry = std::string; -enum CdmKeyRequestType { +enum CdmKeyRequestType : uint32_t { kKeyRequestTypeUnknown, kKeyRequestTypeInitial, kKeyRequestTypeRenewal, @@ -43,13 +43,13 @@ enum CdmKeyRequestType { kKeyRequestTypeUpdate, }; -enum CdmOfflineLicenseState { +enum CdmOfflineLicenseState : int32_t { kLicenseStateActive, kLicenseStateReleasing, kLicenseStateUnknown, }; -enum CdmResponseType { +enum CdmResponseType : int32_t { NO_ERROR = 0, UNKNOWN_ERROR = 1, KEY_ADDED = 2, @@ -414,13 +414,15 @@ enum CdmResponseType { SHRINK_USAGE_TABLE_HEADER_ENTRY_IN_USE = 359, LICENSE_USAGE_ENTRY_MISSING = 360, LOAD_USAGE_ENTRY_INVALID_SESSION = 361, + RESTORE_OFFLINE_LICENSE_ERROR_3 = 362, + NO_SRM_VERSION = 363, // Don't forget to add new values to // * core/test/test_printers.cpp. // * android/include/mapErrors-inl.h // * android/include_hidl/mapErrors-inl.h }; -enum CdmKeyStatus { +enum CdmKeyStatus : int32_t { kKeyStatusKeyUnknown, kKeyStatusUsable, kKeyStatusExpired, @@ -431,7 +433,7 @@ enum CdmKeyStatus { }; using CdmKeyStatusMap = std::map; -enum CdmLicenseType { +enum CdmLicenseType : int32_t { kLicenseTypeOffline, kLicenseTypeStreaming, kLicenseTypeRelease, @@ -445,48 +447,51 @@ enum CdmLicenseType { // on code review comments from go/wvgerrit/41860 this license type should not // be added. This type can be removed once it is no longer needed by // GenerateKeyRequest. - kLicenseTypeEmbeddedKeyData + kLicenseTypeEmbeddedKeyData, }; -enum CdmLicenseKeyType { kLicenseKeyTypeContent, kLicenseKeyTypeEntitlement }; +enum CdmLicenseKeyType : int32_t { + kLicenseKeyTypeContent, + kLicenseKeyTypeEntitlement, +}; -enum SecurityLevel { kLevelDefault, kLevel3 }; +enum SecurityLevel : uint32_t { kLevelDefault, kLevel3 }; -enum CdmSecurityLevel { +enum CdmSecurityLevel : int32_t { kSecurityLevelUninitialized, kSecurityLevelL1, kSecurityLevelL2, kSecurityLevelL3, - kSecurityLevelUnknown + kSecurityLevelUnknown, }; -enum CdmCertificateType { +enum CdmCertificateType : int32_t { kCertificateWidevine, kCertificateX509, }; -enum CdmHlsMethod { +enum CdmHlsMethod : int32_t { kHlsMethodNone, kHlsMethodAes128, kHlsMethodSampleAes, }; -enum CdmCipherMode { +enum CdmCipherMode : int32_t { kCipherModeCtr, kCipherModeCbc, }; -enum CdmEncryptionAlgorithm { +enum CdmEncryptionAlgorithm : int32_t { kEncryptionAlgorithmUnknown, - kEncryptionAlgorithmAesCbc128 + kEncryptionAlgorithmAesCbc128, }; -enum CdmSigningAlgorithm { +enum CdmSigningAlgorithm : int32_t { kSigningAlgorithmUnknown, - kSigningAlgorithmHmacSha256 + kSigningAlgorithmHmacSha256, }; -enum CdmClientTokenType { +enum CdmClientTokenType : int32_t { kClientTokenKeybox, kClientTokenDrmCert, kClientTokenOemCert, @@ -499,13 +504,13 @@ enum CdmClientTokenType { // persisted in non-secure storage but are loaded and unloaded from // the TEE during use (OEMCrypto v13+) // kUnknownUsageSupport - usage support type is uninitialized or unavailable -enum CdmUsageSupportType { +enum CdmUsageSupportType : int32_t { kNonSecureUsageSupport, kUsageEntrySupport, kUnknownUsageSupport, }; -enum CdmUsageEntryStorageType { +enum CdmUsageEntryStorageType : int32_t { kStorageLicense, kStorageUsageInfo, kStorageTypeUnknown, @@ -545,7 +550,7 @@ struct CdmUsageEntryInfo { } }; -enum CdmKeySecurityLevel { +enum CdmKeySecurityLevel : int32_t { kKeySecurityLevelUnset, kSoftwareSecureCrypto, kSoftwareSecureDecode, diff --git a/core/src/cdm_engine.cpp b/core/src/cdm_engine.cpp index e9f4bd09..ec6fdc78 100644 --- a/core/src/cdm_engine.cpp +++ b/core/src/cdm_engine.cpp @@ -617,17 +617,22 @@ CdmResponseType CdmEngine::QueryStatus(SecurityLevel security_level, } else if (query_token == QUERY_KEY_CURRENT_SRM_VERSION) { uint16_t current_srm_version; status = crypto_session->GetSrmVersion(¤t_srm_version); - if (status == NOT_IMPLEMENTED_ERROR) { - *query_response = QUERY_VALUE_NONE; - return NO_ERROR; - } else if (status != NO_ERROR) { - LOGW("GetCurrentSRMVersion failed: status = %d", - static_cast(status)); - return status; + switch (status) { + case NO_ERROR: { + *query_response = std::to_string(current_srm_version); + return NO_ERROR; + } + case NO_SRM_VERSION: { + // SRM is not supported or not applicable (ex. local display only). + *query_response = QUERY_VALUE_NONE; + return NO_ERROR; + } + default: { + LOGW("GetCurrentSRMVersion failed: status = %d", + static_cast(status)); + return status; + } } - - *query_response = std::to_string(current_srm_version); - return NO_ERROR; } else if (query_token == QUERY_KEY_SRM_UPDATE_SUPPORT) { bool is_srm_update_supported = crypto_session->IsSrmUpdateSupported(); *query_response = diff --git a/core/src/cdm_session.cpp b/core/src/cdm_session.cpp index 29a9f2f0..42066141 100644 --- a/core/src/cdm_session.cpp +++ b/core/src/cdm_session.cpp @@ -111,6 +111,18 @@ CdmResponseType CdmSession::Init(CdmClientPropertySet* cdm_client_property_set, return REINIT_ERROR; } + // Save parameters in case Init needs to be called again (load and restore + // offline license) + if (cdm_client_property_set) + cdm_client_property_set_ = cdm_client_property_set; + + if (forced_session_id) { + forced_session_id_value_ = *forced_session_id; + forced_session_id_ = &forced_session_id_value_; + } + + if (event_listener) event_listener_ = event_listener; + if (cdm_client_property_set && cdm_client_property_set->security_level() == QUERY_VALUE_SECURITY_LEVEL_L3) { requested_security_level_ = kLevel3; @@ -229,6 +241,24 @@ CdmResponseType CdmSession::Init(CdmClientPropertySet* cdm_client_property_set, return NO_ERROR; } +CdmResponseType CdmSession::ReleaseOfflineResources() { + // |license_parser_| and |policy_engine_| are reset in Init. No need to + // deallocate here. + if (usage_support_type_ == kUsageEntrySupport && + has_provider_session_token() && usage_table_header_ != nullptr && + !is_release_) { + UpdateUsageEntryInformation(); + } + + if (!key_set_id_.empty()) { + // Unreserve the license ID. + file_handle_->UnreserveLicenseId(key_set_id_); + } + crypto_session_.reset(CryptoSession::MakeCryptoSession(crypto_metrics_)); + initialized_ = false; + return NO_ERROR; +} + CdmResponseType CdmSession::RestoreOfflineSession(const CdmKeySetId& key_set_id, CdmLicenseType license_type, int* error_detail) { @@ -239,6 +269,31 @@ CdmResponseType CdmSession::RestoreOfflineSession(const CdmKeySetId& key_set_id, if (!key_set_id_.empty()) { file_handle_->UnreserveLicenseId(key_set_id_); } + + // On android, we previously permitted an offline license to be loaded and + // restored in the same session. OEMCrypto v16+ disallows it so we need to + // release and initialize an OEMCrypto session. We will still prohibit + // multiple restore attempts on the same session. + // TODO(b/161865160): reevalute this scenario. Should we also + // (a) only allow a restore for the same key set ID that was loaded + // (b) if (a) is true, indicate success and do nothing else rather than + // release resources and reinitialize. + // We need to investigate the conditions that caused an app failure and + // led us to add a test to support this use case as there were multiple + // related issues. + if (!has_license_been_loaded_ && has_license_been_restored_) { + LOGE("Disallow multiple offline license restores"); + return RESTORE_OFFLINE_LICENSE_ERROR_3; + } + + if (has_license_been_loaded_) { + CdmResponseType status = ReleaseOfflineResources(); + if (status != NO_ERROR) return status; + status = + Init(cdm_client_property_set_, forced_session_id_, event_listener_); + if (status != NO_ERROR) return status; + } + has_license_been_restored_ = true; key_set_id_ = key_set_id; DeviceFiles::CdmLicenseData license_data; @@ -281,19 +336,13 @@ CdmResponseType CdmSession::RestoreOfflineSession(const CdmKeySetId& key_set_id, } std::string provider_session_token; + bool sign_fake_request = false; // TODO(b/169483174): remove this variable. if (usage_support_type_ == kUsageEntrySupport) { if (!license_parser_->ExtractProviderSessionToken( key_response_, &provider_session_token) || usage_table_header_ == nullptr) { provider_session_token.clear(); - std::string fake_message("empty message"); - std::string core_message; - std::string license_request_signature; - // Sign a fake message so that OEMCrypto will start the rental clock. The - // signature and generated core message are ignored. - CdmResponseType status = crypto_session_->PrepareAndSignLicenseRequest( - fake_message, &core_message, &license_request_signature); - if (status != NO_ERROR) return status; + sign_fake_request = true; // TODO(b/169483174): remove this line. } else if (!VerifyOfflineUsageEntry()) { LOGE("License usage entry is invalid, cannot restore"); return LICENSE_USAGE_ENTRY_MISSING; @@ -306,6 +355,24 @@ CdmResponseType CdmSession::RestoreOfflineSession(const CdmKeySetId& key_set_id, return sts; } } + } else { + sign_fake_request = true; // TODO(b/169483174): remove this block. + } + // TODO(b/169483174): remove this code in v17. For OEMCrypto v16, an offline + // license would not work because the rental clock in OEMCrypto is only + // started when the license request is signed. We will sign a fake license + // request if the device does not support usage tables, or if the license does + // not have a usage entry. + if (sign_fake_request) { + std::string fake_message("empty message"); + std::string core_message; + std::string license_request_signature; + // Sign a fake message so that OEMCrypto will start the rental clock. The + // signature and generated core message are ignored. + const CdmResponseType status = + crypto_session_->PrepareAndSignLicenseRequest( + fake_message, &core_message, &license_request_signature); + if (status != NO_ERROR) return status; } CdmResponseType result; @@ -429,6 +496,7 @@ CdmResponseType CdmSession::GenerateKeyRequestInternal( switch (license_type) { case kLicenseTypeTemporary: is_temporary_ = true; + is_offline_ = false; break; case kLicenseTypeStreaming: is_offline_ = false; @@ -536,7 +604,8 @@ CdmResponseType CdmSession::AddKeyInternal(const CdmKeyResponse& key_response) { if (sts != NO_ERROR) return sts; } } - sts = license_parser_->HandleKeyResponse(key_response); + sts = license_parser_->HandleKeyResponse(/* is restore */ false, + key_response); // Update the license sdk and service versions. const VersionInfo& version_info = license_parser_->GetServiceVersion(); @@ -569,7 +638,7 @@ CdmResponseType CdmSession::AddKeyInternal(const CdmKeyResponse& key_response) { license_parser_->provider_session_token().c_str(), license_parser_->provider_session_token().size()); - if (is_offline_ || has_provider_session_token()) { + if ((is_offline_ || has_provider_session_token()) && !is_temporary_) { if (has_provider_session_token() && usage_support_type_ == kUsageEntrySupport && usage_table_header_ != nullptr) { @@ -584,6 +653,7 @@ CdmResponseType CdmSession::AddKeyInternal(const CdmKeyResponse& key_response) { sts = StoreLicense(); if (sts != NO_ERROR) return sts; } + has_license_been_loaded_ = true; return KEY_ADDED; } @@ -732,8 +802,9 @@ CdmResponseType CdmSession::RenewKey(const CdmKeyResponse& key_response) { LOGE("CDM session not initialized"); return NOT_INITIALIZED_ERROR; } - CdmResponseType sts = - license_parser_->HandleKeyUpdateResponse(true, key_response); + CdmResponseType sts = license_parser_->HandleKeyUpdateResponse( + /* is renewal */ true, + /* is restore */ false, key_response); // Record the timing on success. UpdateRequestLatencyTiming(sts); @@ -797,8 +868,9 @@ CdmResponseType CdmSession::ReleaseKey(const CdmKeyResponse& key_response) { LOGE("CDM session not initialized"); return NOT_INITIALIZED_ERROR; } - CdmResponseType sts = - license_parser_->HandleKeyUpdateResponse(false, key_response); + CdmResponseType sts = license_parser_->HandleKeyUpdateResponse( + /* is renewal */ false, + /* is restore */ false, key_response); // Record the timing on success. UpdateRequestLatencyTiming(sts); diff --git a/core/src/crypto_session.cpp b/core/src/crypto_session.cpp index 9d72bce3..ba939545 100644 --- a/core/src/crypto_session.cpp +++ b/core/src/crypto_session.cpp @@ -852,7 +852,22 @@ void CryptoSession::Close() { WithOecWriteLock( "Close", [&] { close_sts = OEMCrypto_CloseSession(oec_session_id_); }); metrics_->oemcrypto_close_session_.Increment(close_sts); - if (OEMCrypto_SUCCESS == close_sts) open_ = false; + + if (close_sts != OEMCrypto_SUCCESS) { + LOGW("OEMCrypto_CloseSession failed: status = %d", + static_cast(close_sts)); + } + switch (close_sts) { + case OEMCrypto_SUCCESS: + case OEMCrypto_ERROR_INVALID_SESSION: + case OEMCrypto_ERROR_SYSTEM_INVALIDATED: + open_ = false; + break; + case OEMCrypto_ERROR_CLOSE_SESSION_FAILED: + default: + // empty case + break; + } } CdmResponseType CryptoSession::PrepareAndSignLicenseRequest( @@ -1898,25 +1913,33 @@ CdmResponseType CryptoSession::GetSrmVersion(uint16_t* srm_version) { RETURN_IF_UNINITIALIZED(CRYPTO_SESSION_NOT_INITIALIZED); RETURN_IF_NULL(srm_version, PARAMETER_NULL); - OEMCryptoResult status; - WithOecReadLock("GetSrmVersion", [&] { - status = OEMCrypto_GetCurrentSRMVersion(srm_version); + const OEMCryptoResult status = WithOecReadLock("GetSrmVersion", [&] { + return OEMCrypto_GetCurrentSRMVersion(srm_version); }); // SRM is an optional feature. Whether it is implemented is up to the - // discretion of OEMs - if (status == OEMCrypto_ERROR_NOT_IMPLEMENTED) { - LOGV("OEMCrypto_GetCurrentSRMVersion not implemented"); - return NOT_IMPLEMENTED_ERROR; + // discretion of OEMs. OEMs may implement this method, but SRM is not + // required if there is only a local display, as such no SRM version + // is available/reportable. |srm_version| is only set if SUCCESS is + // returned. + switch (status) { + case OEMCrypto_SUCCESS: + return NO_ERROR; + case OEMCrypto_LOCAL_DISPLAY_ONLY: + LOGD("No SRM: Local display only"); + return NO_SRM_VERSION; + case OEMCrypto_ERROR_NOT_IMPLEMENTED: + LOGD("No SRM: Not implemented"); + return NO_SRM_VERSION; + default: + return MapOEMCryptoResult(status, GET_SRM_VERSION_ERROR, + "GetCurrentSRMVersion"); } - - return MapOEMCryptoResult(status, GET_SRM_VERSION_ERROR, - "GetCurrentSRMVersion"); } bool CryptoSession::IsSrmUpdateSupported() { LOGV("Checking if SRM update is supported"); - if (!IsInitialized()) return false; + RETURN_IF_UNINITIALIZED(false); return WithOecReadLock("IsSrmUpdateSupported", [&] { return OEMCrypto_IsSRMUpdateSupported(); }); } @@ -1929,10 +1952,9 @@ CdmResponseType CryptoSession::LoadSrm(const std::string& srm) { return INVALID_SRM_LIST; } - OEMCryptoResult status; - WithOecWriteLock("LoadSrm", [&] { - status = OEMCrypto_LoadSRM(reinterpret_cast(srm.data()), - srm.size()); + const OEMCryptoResult status = WithOecWriteLock("LoadSrm", [&] { + return OEMCrypto_LoadSRM(reinterpret_cast(srm.data()), + srm.size()); }); return MapOEMCryptoResult(status, LOAD_SRM_ERROR, "LoadSRM"); @@ -2030,6 +2052,9 @@ bool CryptoSession::GetDecryptHashSupport(SecurityLevel security_level, case OEMCrypto_CRC_Clear_Buffer: case OEMCrypto_Partner_Defined_Hash: break; + case OEMCrypto_ERROR_NOT_IMPLEMENTED: + *decrypt_hash_support = OEMCrypto_Hash_Not_Supported; + break; default: // Not flagging an error since it is only used in test LOGW("OEMCrypto_SupportsDecryptHash unrecognized result = %d", diff --git a/core/src/license.cpp b/core/src/license.cpp index a934571c..7d46bd99 100644 --- a/core/src/license.cpp +++ b/core/src/license.cpp @@ -23,7 +23,6 @@ #include "wv_cdm_constants.h" namespace { - const uint32_t kFourCcCbc1 = 0x63626331; const uint32_t kFourCcCbcs = 0x63626373; const uint32_t kFourCcLittleEndianCbc1 = 0x31636263; @@ -32,10 +31,11 @@ const uint32_t kFourCcCenc = 0x63656e63; const std::string kEmptyString; +// MAC key in the license are two separate MAC keys (client and server). +constexpr size_t kLicenseMacKeySize = wvcdm::MAC_KEY_SIZE * 2; } // namespace namespace wvcdm { - // Protobuf generated classes. using video_widevine::EncryptedClientIdentification; using video_widevine::License; @@ -367,6 +367,25 @@ CdmResponseType CdmLicense::PrepareKeyRequest( return KEY_MESSAGE; } +// TODO(b/166007195): Remove this. +CdmResponseType CdmLicense::PrepareKeyUpdateReload(CdmSession* cdm_session) { + uint32_t api_version = 0; + if (!crypto_session_->GetApiVersion(&api_version)) { + LOGW("Unknown API Version"); + api_version = 15; + } + if (api_version != 16) return NO_ERROR; + // To work around b/166010609, we ask OEMCrypto to prepare an unused renewal + // request. This lets the ODK library update its clock saying when the renewal + // was signed. + constexpr bool is_renewal = true; + const CdmAppParameterMap unused_app_parameters; + CdmKeyMessage unused_request; + std::string unused_url; + return PrepareKeyUpdateRequest(is_renewal, unused_app_parameters, cdm_session, + &unused_request, &unused_url); +} + CdmResponseType CdmLicense::PrepareKeyUpdateRequest( bool is_renewal, const CdmAppParameterMap& app_parameters, CdmSession* cdm_session, CdmKeyMessage* signed_request, @@ -511,7 +530,7 @@ CdmResponseType CdmLicense::PrepareKeyUpdateRequest( } CdmResponseType CdmLicense::HandleKeyResponse( - const CdmKeyResponse& license_response) { + bool is_restore, const CdmKeyResponse& license_response) { if (!initialized_) { LOGE("CdmLicense not initialized"); return LICENSE_PARSER_NOT_INITIALIZED_2; @@ -596,17 +615,17 @@ CdmResponseType CdmLicense::HandleKeyResponse( mac_key_iv.assign(license.key(i).iv()); // Strip off PKCS#5 padding - mac_keys.assign(license.key(i).key().data(), 2 * MAC_KEY_SIZE); + mac_keys.assign(license.key(i).key().data(), kLicenseMacKeySize); } } if (license.policy().can_renew() || (mac_key_iv.size() != 0 || mac_keys.size() != 0)) { if (mac_key_iv.size() != KEY_IV_SIZE || - mac_keys.size() != 2 * MAC_KEY_SIZE) { + mac_keys.size() != kLicenseMacKeySize) { LOGE( - "MAC key/IV size error: expected = %lu/%lu, " + "MAC key/IV size error: expected = %zu/%zu, " "actual = %zu/%zu (key/iv)", - 2 * MAC_KEY_SIZE, KEY_IV_SIZE, mac_keys.size(), mac_key_iv.size()); + kLicenseMacKeySize, KEY_IV_SIZE, mac_keys.size(), mac_key_iv.size()); return KEY_SIZE_ERROR_1; } } @@ -664,18 +683,19 @@ CdmResponseType CdmLicense::HandleKeyResponse( CdmResponseType resp = NO_CONTENT_KEY; if (kLicenseKeyTypeEntitlement == key_type) { - resp = - HandleEntitlementKeyResponse(signed_message, core_message, signature, - mac_key_iv, mac_keys, key_array, license); + resp = HandleEntitlementKeyResponse(is_restore, signed_message, + core_message, signature, mac_key_iv, + mac_keys, key_array, license); } else if (kLicenseKeyTypeContent == key_type) { - resp = HandleContentKeyResponse(signed_message, core_message, signature, - mac_key_iv, mac_keys, key_array, license); + resp = HandleContentKeyResponse(is_restore, signed_message, core_message, + signature, mac_key_iv, mac_keys, key_array, + license); } return resp; } CdmResponseType CdmLicense::HandleKeyUpdateResponse( - bool is_renewal, const CdmKeyResponse& license_response) { + bool is_renewal, bool is_restore, const CdmKeyResponse& license_response) { if (!initialized_) { LOGE("CdmLicense not initialized"); return LICENSE_PARSER_NOT_INITIALIZED_3; @@ -762,7 +782,7 @@ CdmResponseType CdmLicense::HandleKeyUpdateResponse( } if (status == KEY_ADDED) { - policy_engine_->UpdateLicense(license); + policy_engine_->UpdateLicense(license, is_restore); } return status; @@ -817,12 +837,14 @@ CdmResponseType CdmLicense::RestoreOfflineLicense( license_nonce_ = original_license_request.key_control_nonce(); } - CdmResponseType sts = HandleKeyResponse(license_response); + CdmResponseType sts = HandleKeyResponse(true, license_response); if (sts != KEY_ADDED) return sts; if (!license_renewal_response.empty()) { - sts = HandleKeyUpdateResponse(true, license_renewal_response); + sts = PrepareKeyUpdateReload(cdm_session); + if (sts != KEY_MESSAGE) return sts; + sts = HandleKeyUpdateResponse(true, true, license_renewal_response); if (sts != KEY_ADDED) return sts; } @@ -947,7 +969,7 @@ CdmResponseType CdmLicense::RestoreLicenseForRelease( } if (!license.id().has_provider_session_token()) { - CdmResponseType result = HandleKeyResponse(license_response); + CdmResponseType result = HandleKeyResponse(false, license_response); return result == KEY_ADDED ? NO_ERROR : result; } @@ -1095,7 +1117,7 @@ CdmResponseType CdmLicense::PrepareContentId( } CdmResponseType CdmLicense::HandleContentKeyResponse( - const std::string& msg, const std::string& core_message, + bool is_restore, const std::string& msg, const std::string& core_message, const std::string& signature, const std::string& mac_key_iv, const std::string& mac_key, const std::vector& key_array, const video_widevine::License& license) { @@ -1119,13 +1141,13 @@ CdmResponseType CdmLicense::HandleContentKeyResponse( it != key_array.end(); ++it) { loaded_keys_.insert(it->key_id()); } - policy_engine_->SetLicense(license, supports_core_messages()); + policy_engine_->SetLicense(license, supports_core_messages(), is_restore); } return resp; } CdmResponseType CdmLicense::HandleEntitlementKeyResponse( - const std::string& msg, const std::string& core_message, + bool is_restore, const std::string& msg, const std::string& core_message, const std::string& signature, const std::string& mac_key_iv, const std::string& mac_key, const std::vector& key_array, const video_widevine::License& license) { @@ -1149,7 +1171,7 @@ CdmResponseType CdmLicense::HandleEntitlementKeyResponse( // Save the entitlement keys for future use to handle key changes. entitlement_keys_.CopyFrom(license.key()); - policy_engine_->SetLicense(license, supports_core_messages()); + policy_engine_->SetLicense(license, supports_core_messages(), is_restore); return HandleNewEntitledKeys(wrapped_keys_); } @@ -1177,7 +1199,7 @@ CdmResponseType CdmLicense::HandleNewEntitledKeys( if (content_key.size() < CONTENT_KEY_SIZE) { LOGE( "Entitled content key too small: " - "expected = %lu, actual = %zu (bytes)", + "expected = %zu, actual = %zu (bytes)", CONTENT_KEY_SIZE, content_key.size()); return KEY_SIZE_ERROR_2; } else if (content_key.size() > CONTENT_KEY_SIZE) { diff --git a/core/src/policy_engine.cpp b/core/src/policy_engine.cpp index db06d1af..b244c675 100644 --- a/core/src/policy_engine.cpp +++ b/core/src/policy_engine.cpp @@ -20,7 +20,8 @@ using video_widevine::License; namespace { const int kCdmPolicyTimerDurationSeconds = 1; -const int kClockSkewDelta = 5; // seconds +const int kClockSkewDelta = 5; // seconds +const int64_t kLicenseStateUpdateDelay = 20; // seconds } // namespace @@ -30,6 +31,7 @@ PolicyEngine::PolicyEngine(CdmSessionId session_id, WvCdmEventListener* event_listener, CryptoSession* crypto_session) : license_state_(kLicenseStateInitial), + license_state_update_deadline_(0), last_recorded_current_time_(0), session_id_(session_id), event_listener_(event_listener), @@ -90,6 +92,17 @@ void PolicyEngine::OnTimerEvent() { last_recorded_current_time_ += kCdmPolicyTimerDurationSeconds; const int64_t current_time = GetCurrentTime(); + // This conditional should not succeed but being cautious in case license + // state was not updated after the license was processed. Licenses and + // renewals from the license service should update state on + // |Set/UpdateLicense|. Offline licenses, when restored, should update license + // state when |RestorePlaybackTimes| is called. + if (license_state_update_deadline_ != 0 && + license_state_update_deadline_ < current_time) { + LOGW("License state was not updated after a license was loaded/renewed"); + UpdateLicenseState(current_time); + } + // If we have passed the grace period, the expiration will update. if (policy_timers_->HasPassedGracePeriod(current_time)) { NotifyExpirationUpdate(current_time); @@ -159,12 +172,13 @@ void PolicyEngine::OnTimerEvent() { } void PolicyEngine::SetLicense(const License& license, - bool supports_core_messages) { + bool supports_core_messages, + bool defer_license_state_update) { if (supports_core_messages) policy_timers_.reset(new PolicyTimersV16()); license_id_.CopyFrom(license.id()); license_keys_->SetFromLicense(license); policy_timers_->SetLicense(license); - UpdateLicense(license); + UpdateLicense(license, defer_license_state_update); } void PolicyEngine::SetEntitledLicenseKeys( @@ -180,10 +194,11 @@ void PolicyEngine::SetLicenseForRelease(const License& license, // Expire any old keys. NotifyKeysChange(kKeyStatusExpired); policy_timers_->SetLicense(license); - UpdateLicense(license); + UpdateLicense(license, false); } -void PolicyEngine::UpdateLicense(const License& license) { +void PolicyEngine::UpdateLicense(const License& license, + bool defer_license_state_update) { if (!license.has_policy()) return; if (kLicenseStateExpired == license_state_) { @@ -204,8 +219,15 @@ void PolicyEngine::UpdateLicense(const License& license) { const int64_t current_time = GetCurrentTime(); policy_timers_->UpdateLicense(current_time, license); + if (defer_license_state_update) + license_state_update_deadline_ = current_time + kLicenseStateUpdateDelay; + else + UpdateLicenseState(current_time); +} +void PolicyEngine::UpdateLicenseState(int64_t current_time) { // Update time information + license_state_update_deadline_ = 0; if (!policy_timers_->get_policy().can_play() || policy_timers_->HasLicenseOrRentalOrPlaybackDurationExpired( current_time)) { @@ -349,7 +371,7 @@ void PolicyEngine::RestorePlaybackTimes(int64_t playback_start_time, last_playback_time, grace_period_end_time); - NotifyExpirationUpdate(current_time); + UpdateLicenseState(current_time); } void PolicyEngine::UpdateRenewalRequest(int64_t current_time) { diff --git a/core/src/policy_timers_v16.cpp b/core/src/policy_timers_v16.cpp index e4d57da2..6af479d3 100644 --- a/core/src/policy_timers_v16.cpp +++ b/core/src/policy_timers_v16.cpp @@ -77,6 +77,12 @@ int64_t PolicyTimersV16::GetRentalDurationRemaining(int64_t current_time) { return rental_expiry_time - current_time; } +bool PolicyTimersV16::HasRenewalDelayExpired(int64_t current_time) { + return policy_.can_renew() && (policy_.renewal_delay_seconds() > 0) && + (renewal_start_time_ + policy_.renewal_delay_seconds() <= + current_time); +} + // For the policy time fields checked in the following methods, a value of 0 // (UNLIMITED_DURATION) indicates that there is no limit to the duration. // If the fields are UNLIMITED_DURATION then these methods will return diff --git a/core/src/privacy_crypto_boringssl.cpp b/core/src/privacy_crypto_boringssl.cpp index b35a78bb..1d9db5b1 100644 --- a/core/src/privacy_crypto_boringssl.cpp +++ b/core/src/privacy_crypto_boringssl.cpp @@ -336,11 +336,12 @@ bool ExtractExtensionValueFromCertificate(const std::string& cert, STACK_OF(X509)* certs = pkcs7->d.sign->cert; // Find the desired certificate from the stack. - if (cert_index >= static_cast(sk_X509_num(certs))) { + const size_t num_certs = static_cast(sk_X509_num(certs)); + if (cert_index >= num_certs) { LOGE( "Unexpected number of certificates in chain: " "count = %zu, minimum = %zu", - sk_X509_num(certs), cert_index + 1); + num_certs, cert_index + 1); return false; } diff --git a/core/src/usage_table_header.cpp b/core/src/usage_table_header.cpp index 9842622b..ecbcecfe 100644 --- a/core/src/usage_table_header.cpp +++ b/core/src/usage_table_header.cpp @@ -229,8 +229,15 @@ bool UsageTableHeader::Init(CdmSecurityLevel security_level, // entries. If not, clear files/data and recreate usage header // table. if (status == NO_ERROR && lru_success) { - if (HasUnlimitedTableCapacity() || - usage_entry_info_.size() > potential_table_capacity()) { + if ((HasUnlimitedTableCapacity() && + usage_entry_info_.size() > kMinimumUsageTableEntriesSupported) || + (!HasUnlimitedTableCapacity() && + usage_entry_info_.size() > potential_table_capacity())) { + LOGD("Checking if new entry can be added: size = %zu, capacity = %s", + usage_entry_info_.size(), + HasUnlimitedTableCapacity() + ? "unlimited" + : std::to_string(potential_table_capacity()).c_str()); uint32_t temporary_usage_entry_number; // Create a new temporary usage entry, close the session and then @@ -1048,7 +1055,7 @@ bool UsageTableHeader::LruUpgradeAllUsageEntries() { bad_license_file_entries.push_back(usage_entry_number); continue; default: { - LOGW("Unknown usage entry storage type: %d, usage_entry_number = %u", + LOGW("Unknown usage entry storage type: %d, usage_entry_number = %zu", static_cast(usage_entry_info.storage_type), usage_entry_number); bad_license_file_entries.push_back(usage_entry_number); @@ -1056,7 +1063,7 @@ bool UsageTableHeader::LruUpgradeAllUsageEntries() { } } if (!retrieve_response) { - LOGW("Could not retrieve license message: usage_entry_number = %u", + LOGW("Could not retrieve license message: usage_entry_number = %zu", usage_entry_number); bad_license_file_entries.push_back(usage_entry_number); continue; @@ -1064,7 +1071,7 @@ bool UsageTableHeader::LruUpgradeAllUsageEntries() { if (retrieved_entry_number != usage_entry_number) { LOGW( - "Usage entry number mismatched: usage_entry_number = %u, " + "Usage entry number mismatched: usage_entry_number = %zu, " "retrieved_entry_number = %u", usage_entry_number, retrieved_entry_number); bad_license_file_entries.push_back(usage_entry_number); @@ -1073,7 +1080,7 @@ bool UsageTableHeader::LruUpgradeAllUsageEntries() { video_widevine::License license; if (!ParseLicenseFromLicenseMessage(license_message, &license)) { - LOGW("Could not parse license: usage_entry_number = %u", + LOGW("Could not parse license: usage_entry_number = %zu", usage_entry_number); bad_license_file_entries.push_back(usage_entry_number); continue; diff --git a/core/test/Android.bp b/core/test/Android.bp new file mode 100644 index 00000000..841d1302 --- /dev/null +++ b/core/test/Android.bp @@ -0,0 +1,22 @@ +// Copyright (C) 2020 The Android Open Source Project$ +// +// Licensed under the Apache License, Version 2.0 (the "License");$ +// you may not use this file except in compliance with the License.$ +// You may obtain a copy of the License at$ +// +// http://www.apache.org/licenses/LICENSE-2.0$ +// +// Unless required by applicable law or agreed to in writing, software$ +// distributed under the License is distributed on an "AS IS" BASIS,$ +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.$ +// See the License for the specific language governing permissions and$ +// limitations under the License. + +filegroup { + name: "vts_cdm_core_test_srcs", + srcs: [ + "url_request.cpp", + "license_request.cpp", + "http_socket.cpp", + ], +} diff --git a/core/test/cdm_engine_metrics_decorator_unittest.cpp b/core/test/cdm_engine_metrics_decorator_unittest.cpp index 4b9d2d4b..1c376dfa 100644 --- a/core/test/cdm_engine_metrics_decorator_unittest.cpp +++ b/core/test/cdm_engine_metrics_decorator_unittest.cpp @@ -15,8 +15,8 @@ #include "cdm_engine.h" #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "metrics.pb.h" #include "wv_cdm_event_listener.h" +#include "wv_metrics.pb.h" using ::testing::_; using ::testing::ByRef; @@ -233,7 +233,7 @@ TEST_F(WvCdmEngineMetricsImplTest, GenerateKeyRequest) { } TEST_F(WvCdmEngineMetricsImplTest, AddKey) { - CdmLicenseType license_type; + CdmLicenseType license_type = {}; CdmKeySetId key_set_id; EXPECT_CALL(*test_cdm_metrics_engine_, diff --git a/core/test/cdm_engine_test.cpp b/core/test/cdm_engine_test.cpp index 5d24e264..fe78782a 100644 --- a/core/test/cdm_engine_test.cpp +++ b/core/test/cdm_engine_test.cpp @@ -19,7 +19,6 @@ #include "initialization_data.h" #include "license_request.h" #include "log.h" -#include "metrics.pb.h" #include "properties.h" #include "string_conversions.h" #include "test_base.h" @@ -27,6 +26,7 @@ #include "url_request.h" #include "wv_cdm_constants.h" #include "wv_cdm_types.h" +#include "wv_metrics.pb.h" namespace wvcdm { @@ -48,12 +48,9 @@ const std::string kFakeSessionId = "TotallyARealSession123456789"; } // namespace -class WvCdmEnginePreProvTest : public WvCdmTestBase { +class WvCdmEnginePreProvTest : public WvCdmTestBaseWithEngine { public: - WvCdmEnginePreProvTest() - : dummy_engine_metrics_(new EngineMetrics), - cdm_engine_(&file_system_, dummy_engine_metrics_), - session_opened_(false) {} + WvCdmEnginePreProvTest() : session_opened_(false) {} ~WvCdmEnginePreProvTest() override {} @@ -109,16 +106,13 @@ class WvCdmEnginePreProvTest : public WvCdmTestBase { LicenseRequest license_request; license_request.GetDrmMessage(http_response, *response); - LOGV("response: size=%u, string:\n%s\n", response->size(), + LOGV("response: size = %zu, string =\n%s\n", response->size(), Base64SafeEncode( std::vector(response->begin(), response->end())) .c_str()); return true; } - FileSystem file_system_; - shared_ptr dummy_engine_metrics_; - CdmEngine cdm_engine_; bool session_opened_; std::string key_msg_; std::string session_id_; @@ -239,7 +233,7 @@ class WvCdmEngineTest : public WvCdmEnginePreProvTest { std::string drm_msg; LicenseRequest lic_request; lic_request.GetDrmMessage(response, drm_msg); - LOGV("drm msg: %u bytes\r\n%s", drm_msg.size(), + LOGV("drm msg: %zu bytes\r\n%s", drm_msg.size(), HexEncode(reinterpret_cast(drm_msg.data()), drm_msg.size()) .c_str()); @@ -402,14 +396,37 @@ TEST_F(WvCdmEngineTest, LoadKey) { holder.SignAndLoadLicense(); } -TEST_F(WvCdmEngineTest, LicenseRenewal) { +// This test generates a renewal and then requests the renewal using the server +// url specified in the license. This is what most apps would do, but you should +// skip this test when you want to set the license and renewal server on the +// command line. +TEST_F(WvCdmEngineTest, LicenseRenewalSpecifiedServer) { GenerateKeyRequest(binary_key_id(), kCencMimeType); VerifyNewKeyResponse(config_.license_server(), config_.client_auth()); GenerateRenewalRequest(); - VerifyRenewalKeyResponse( - server_url_.empty() ? config_.license_server() : server_url_, - config_.client_auth()); + if (!server_url_.empty()) { + // If the license server put a URL for the renewal in the license, we should + // be able to verify the renewal against that server. + VerifyRenewalKeyResponse(server_url_, config_.client_auth()); + } else { + // If the license server did not give us a URL, we won't verify it. + LOGE("License server did not set renewal URL. license_url=%s.", + config_.license_server().c_str()); + // This is OK when you are using a local, debug, license server, but it + // should NOT happen if using UAT or UAT nightly. + EXPECT_EQ(std::string::npos, config_.license_server().find("proxy.uat")); + } +} + +// This test generates a renewal and then requests the renewal from the same +// server from which we requested the original license. +TEST_F(WvCdmEngineTest, LicenseRenewalSameServer) { + GenerateKeyRequest(binary_key_id(), kCencMimeType); + VerifyNewKeyResponse(config_.license_server(), config_.client_auth()); + + GenerateRenewalRequest(); + VerifyRenewalKeyResponse(config_.license_server(), config_.client_auth()); } TEST_F(WvCdmEngineTest, ParseDecryptHashStringTest) { diff --git a/core/test/cdm_session_unittest.cpp b/core/test/cdm_session_unittest.cpp index 674939e8..9fd6fba0 100644 --- a/core/test/cdm_session_unittest.cpp +++ b/core/test/cdm_session_unittest.cpp @@ -9,7 +9,6 @@ #include "cdm_session.h" #include "crypto_key.h" -#include "metrics.pb.h" #include "properties.h" #include "service_certificate.h" #include "string_conversions.h" @@ -17,6 +16,7 @@ #include "test_printers.h" #include "usage_table_header.h" #include "wv_cdm_constants.h" +#include "wv_metrics.pb.h" using ::testing::_; using ::testing::DoAll; diff --git a/core/test/crypto_session_unittest.cpp b/core/test/crypto_session_unittest.cpp index 646b0b62..96bba6af 100644 --- a/core/test/crypto_session_unittest.cpp +++ b/core/test/crypto_session_unittest.cpp @@ -5,6 +5,7 @@ #include #include +#include #include #include "crypto_session.h" @@ -12,12 +13,16 @@ #include "key_session.h" #include "license_protocol.pb.h" #include "log.h" -#include "metrics.pb.h" #include "metrics_collections.h" #include "platform.h" #include "test_base.h" #include "test_printers.h" #include "wv_cdm_types.h" +#include "wv_metrics.pb.h" + +using ::testing::AllOf; +using ::testing::Ge; +using ::testing::Le; namespace { @@ -296,7 +301,7 @@ TEST_F(CryptoSessionMetricsTest, OpenSessionValidMetrics) { // lite, convert these tests to use Message-based convenience functions. // Validate common metrics regardless of provisioning type. - EXPECT_EQ(1, metrics_proto.oemcrypto_initialize_time_us().size()); + ASSERT_EQ(1, metrics_proto.oemcrypto_initialize_time_us().size()); EXPECT_TRUE(metrics_proto.oemcrypto_initialize_time_us(0) .attributes() .has_oem_crypto_result()); @@ -327,7 +332,8 @@ TEST_F(CryptoSessionMetricsTest, OpenSessionValidMetrics) { EXPECT_EQ(OEMCrypto_OEMCertificate, metrics_proto.oemcrypto_provisioning_method().int_value()); ASSERT_EQ(1, metrics_proto.oemcrypto_get_oem_public_certificate().size()); - EXPECT_EQ(1, metrics_proto.oemcrypto_get_oem_public_certificate(0).count()); + EXPECT_THAT(metrics_proto.oemcrypto_get_oem_public_certificate(0).count(), + AllOf(Ge(1), Le(2))); } else if (token_type == kClientTokenDrmCert) { // TODO(blueeyes): Add support for getting the system id from a // pre-installed DRM certificate.. @@ -373,8 +379,9 @@ TEST_F(CryptoSessionMetricsTest, GetProvisioningTokenValidMetrics) { EXPECT_EQ(OEMCrypto_OEMCertificate, metrics_proto.oemcrypto_provisioning_method().int_value()); - EXPECT_EQ(1, metrics_proto.oemcrypto_get_oem_public_certificate().size()); - EXPECT_EQ(1, metrics_proto.oemcrypto_get_oem_public_certificate(0).count()); + ASSERT_EQ(1, metrics_proto.oemcrypto_get_oem_public_certificate().size()); + EXPECT_THAT(metrics_proto.oemcrypto_get_oem_public_certificate(0).count(), + AllOf(Ge(1), Le(2))); ASSERT_EQ(1, metrics_proto.crypto_session_get_token().size()); EXPECT_EQ(1, metrics_proto.crypto_session_get_token(0).count()); diff --git a/core/test/duration_use_case_test.cpp b/core/test/duration_use_case_test.cpp new file mode 100644 index 00000000..ab5b9056 --- /dev/null +++ b/core/test/duration_use_case_test.cpp @@ -0,0 +1,1632 @@ +// Copyright 2020 Google LLC. All Rights Reserved. This file and proprietary +// source code may only be used and distributed under the Widevine Master +// License Agreement. + +// These tests perform various end-to-end actions similar to what an application +// would, but in parallel, attempting to create as many collisions in the CDM +// code as possible. + +#include +#include +#include + +#include +#include + +#include "cdm_engine.h" +#include "clock.h" +#include "config_test_env.h" +#include "initialization_data.h" +#include "license_request.h" +#include "log.h" +#include "metrics_collections.h" +#include "odk_structs.h" +#include "oec_device_features.h" +#include "test_base.h" +#include "test_printers.h" +#include "test_sleep.h" +#include "url_request.h" +#include "wv_cdm_constants.h" +#include "wv_cdm_event_listener.h" +#include "wv_cdm_types.h" + +namespace wvcdm { + +namespace { + +constexpr int kHttpOk = 200; +const std::string kCencMimeType = "cenc"; +// How many seconds to fudge the start or stop playback times. We fudge these +// times because there might be a little round off when sleeping, and because +// the time that the license was signed or loaded might be off a little bit due +// to doing time consuming work at those events. We fudge the limits so that the +// test is lenient by a little bit of time. For example, when we verify +// that playback is terminated at time STOP, we wait until STOP+kFudge and then +// check. Similarly, when we verify that playback may continue until STOP, we +// wait until STOP-kFudge and then check. License sign and load times are not +// fudged because neither direction is more lenient than the other direction. +constexpr uint64_t kFudge = 1; +// How long we allow for a full license round trip -- including time for +// generating the request, sending the request to the server, processing the +// request at the server, sending a response back. Since this is constant, we +// can decide in advance when the rental window and playback windows will +// expire. This must be smaller than the renewal_recovery_duration for all of +// our test cases below. +constexpr uint64_t kRoundTripTime = 10; + +// A renewal policy, whose values should match the policy on UAT and in +// policies.dat with the same name. +struct RenewalPolicy { + // The policy and content id as seen in the UAT database. + std::string policy_id; + // How long to wait before we request the next renewal. + uint64_t renewal_delay; + // How long we allow for a full renewal round trip -- including time for + // generating the request, sending the request to the server, processing the + // request at the server, sending a response back. Since this is constant, we + // can decide in advance when the rental window and playback windows will + // expire. This should match the renewal recovery duration in the license + // policy. + uint64_t renewal_recovery_duration; +}; + +const RenewalPolicy kShortRenewal = {"CDM_LicenseWithRenewal_renewal", 25, 15}; +const RenewalPolicy kLongRenewal = {"CDM_LicenseWithRenewal_long_renewal", 40, + 15}; +const RenewalPolicy kLDLRenewal = {"CDM_LimitedDurationLicense_renewal", 0, 0}; + +// Key ID in all duration tests. +const KeyId kKeyId = "Duration_Key===="; + +class SimpleEventListener : public wvcdm::WvCdmEventListener { + public: + SimpleEventListener() { renewal_needed_ = false; } + // We will want to know when a renewal is needed. + void OnSessionRenewalNeeded(const CdmSessionId& /*session*/) override { + renewal_needed_ = true; + } + void OnSessionKeysChange(const CdmSessionId&, const CdmKeyStatusMap&, + bool) override {} + void OnExpirationUpdate(const CdmSessionId&, int64_t expiry_time) override {} + bool renewal_needed() { return renewal_needed_; } + void set_renewal_needed(bool renewal_needed) { + renewal_needed_ = renewal_needed; + } + + private: + bool renewal_needed_; +}; + +} // namespace + +// All duration tests are parameterized by can_persist = true or false. +class CdmDurationTest : public WvCdmTestBaseWithEngine, + public ::testing::WithParamInterface { + public: + CdmDurationTest(const std::string& content_id) + : content_id_(content_id), + first_load_occurred_(false), + allow_lenience_(false) { + // These are reasonable initial values for most tests. This is an unlimited + // license. Most of the tests below will add some restrictions by changing + // these values, and then verify that the system behaves correctly. + // Each test below will modify these values to match those in license + // policy. + timer_limits_.soft_enforce_rental_duration = true; + timer_limits_.soft_enforce_playback_duration = true; + timer_limits_.earliest_playback_start_seconds = 0u; + // A duration of 0 means infinite. + timer_limits_.rental_duration_seconds = 0u; + timer_limits_.total_playback_duration_seconds = 0u; + timer_limits_.initial_renewal_duration_seconds = 0u; + + // This is when we will attempt the first valid playback. + start_of_playback_ = + timer_limits_.earliest_playback_start_seconds + kRoundTripTime; + } + + protected: + // In the setup, we open a session and request a license. These tests are + // parameterized by |can_persist_|. If |can_persist_| is true, then we request + // an offline license, also called a persistent license. Otherwise, we request + // a streaming license. When testing playback, we will perform the same tests + // on both types of license. However, for the persistent license we will load + // the license at the start of each interval and then unload the license at + // the end of each interval. For the non-persistent license, we will only load + // the license at the start of the first interval, and only unload when the + // test is finished. These tests rely on the server having pairs of content: + // one with the given content id, and one whose content id has "_can_persist" + // appended to it. + void SetUp() override { + WvCdmTestBase::SetUp(); + EnsureProvisioned(); + ASSERT_NO_FATAL_FAILURE(OpenSession(&session_id_)); + can_persist_ = GetParam(); + if (can_persist_) { + // Each content/policy in a test class below should match two policies in + // UAT. One policy id matches the string exactly, and one has + // _can_persist appended. + content_id_ = content_id_ + "_can_persist"; + license_type_ = kLicenseTypeOffline; + } else { + license_type_ = kLicenseTypeStreaming; + } + // All times in the license are relative to the rental clock. + start_of_rental_clock_ = wvcdm::Clock().GetCurrentTime(); + FetchLicense(); + } + + void TearDown() override { cdm_engine_.CloseSession(session_id_); } + + // The end of the playback window. (using system clock) + // This is not useful if the playback duration is 0, which means infinite. In + // that case, this just returns a large number. + uint64_t EndOfPlaybackWindow() { + if (timer_limits_.total_playback_duration_seconds > 0) { + return start_of_playback_ + timer_limits_.total_playback_duration_seconds; + } else { + LOGW("Test is asking for EndOfPlaybackWindow for infinte duration."); + // This should not be used, but if it is, all of our tests should be + // finished in less than a half hour. + constexpr uint64_t kHalfHour = 30 * 60; + return start_of_playback_ + kHalfHour; + } + } + + // The end of the rental window. (using system clock) + // This is not useful if the rental duration is 0. + uint64_t EndOfRentalWindow() { + return timer_limits_.earliest_playback_start_seconds + + timer_limits_.rental_duration_seconds; + } + + // Sleep until the specified time on the rental clock. + void SleepUntil(uint64_t desired_rental_time) { + const uint64_t rental_time = CurrentRentalTime(); + if (desired_rental_time >= rental_time) { + TestSleep::Sleep(desired_rental_time - rental_time); + } else { + LOGW("Test Clock skew sleeping from rental clock time %ld to %ld", + rental_time, desired_rental_time); + } + cdm_engine_.OnTimerEvent(); + } + + uint64_t CurrentRentalTime() { + const uint64_t now = wvcdm::Clock().GetCurrentTime(); + return now - start_of_rental_clock_; + } + + void OpenSession(CdmSessionId* session_id) { + CdmResponseType status = cdm_engine_.OpenSession( + config_.key_system(), nullptr, &event_listener_, session_id); + ASSERT_EQ(NO_ERROR, status); + ASSERT_TRUE(cdm_engine_.IsOpenSession(*session_id)); + } + + void CloseSession(const CdmSessionId& session_id) { + CdmResponseType status = cdm_engine_.CloseSession(session_id); + ASSERT_EQ(NO_ERROR, status); + ASSERT_FALSE(cdm_engine_.IsOpenSession(session_id)); + } + + void FetchLicense() { + video_widevine::WidevinePsshData pssh; + pssh.set_content_id(content_id_); + const std::string init_data_string = MakePSSH(pssh); + const InitializationData init_data(kCencMimeType, init_data_string); + init_data.DumpToLogs(); + CdmKeyRequest key_request; + ASSERT_NO_FATAL_FAILURE(GenerateKeyRequest(init_data, &key_request)); + ASSERT_NO_FATAL_FAILURE(GetKeyResponse(key_request)); + } + + void GenerateKeyRequest(const InitializationData& init_data, + CdmKeyRequest* key_request) { + CdmAppParameterMap empty_app_parameters; + CdmKeySetId empty_key_set_id; + CdmResponseType result = cdm_engine_.GenerateKeyRequest( + session_id_, empty_key_set_id, init_data, license_type_, + empty_app_parameters, key_request); + ASSERT_EQ(KEY_MESSAGE, result); + ASSERT_EQ(kKeyRequestTypeInitial, key_request->type); + } + + // Append the content/policy id for the test to the URL. + std::string MakeUrl(const std::string& policy_id) { + // For these tests, we want to specify the policy, but the UAT server only + // allows us to set the content id as the video_id. So each policy is + // matched to a single license with the same name. The local license + // server, on the other hand, wants to see the policy id in the url. So we + // have to guess which format to use based on the name of the server. + const std::string path = config_.license_server() + config_.client_auth(); + std::string video_query; + if (path.find("proxy.uat") != std::string::npos) { + // This is uat or uat-nightly. Set the video_id. + video_query = "video_id=" + policy_id; + } else { + // This is probably a local license server. Set the policy. + video_query = "policy=" + policy_id; + } + // If there is already a parameter, then we don't need to add another + // question mark. + return path + ((path.find("?") == std::string::npos) ? "?" : "&") + + video_query; + } + + void GetKeyResponse(const CdmKeyRequest& key_request) { + // The content id matches the policy id used on UAT. + const std::string url = MakeUrl(content_id_); + UrlRequest url_request(url); + ASSERT_TRUE(url_request.is_connected()); + + std::string http_response; + url_request.PostRequest(key_request.message); + ASSERT_TRUE(url_request.GetResponse(&http_response)); + int status_code = url_request.GetStatusCode(http_response); + ASSERT_EQ(kHttpOk, status_code) << "Error with url = " << url; + + LicenseRequest license_request; + license_request.GetDrmMessage(http_response, key_response_); + } + + // This ensures that the licenses are loaded into the sessions. + void LoadLicense() { + if (!first_load_occurred_) { + CdmLicenseType license_type; + ASSERT_EQ(KEY_ADDED, cdm_engine_.AddKey(session_id_, key_response_, + &license_type, &key_set_id_)); + ASSERT_EQ(license_type_, license_type); + first_load_occurred_ = true; + } else if (can_persist_) { + // For the persistent license, we use restore key. + ASSERT_NO_FATAL_FAILURE(OpenSession(&session_id_)); + CdmResponseType status = cdm_engine_.RestoreKey(session_id_, key_set_id_); + ASSERT_EQ(KEY_ADDED, status); + } + } + + void UnloadLicense() { + if (can_persist_) { + CloseSession(session_id_); + } + } + + // Simulate loading or reloading a license, then verify that we are allowed + // playback from |start| to |stop|. If |cutoff| is not 0, then expect the + // timer to expire at that time. If |cutoff| is 0, expect the timer is not + // set. If you refer to the diagrams in "License Duration and Renewal", this + // tests a cyan bar with a green check mark. + // When nonzero |start|, |stop|, and |cutoff| are all system times. + void LoadAndAllowPlayback(uint64_t start, uint64_t stop, uint64_t cutoff) { + SleepUntil(start); + LoadLicense(); + AllowPlayback(start, stop, cutoff); + } + + // Verify that we are allowed playback from |start| to |stop|. If |cutoff| is + // not 0, then expect the timer to expire at that time. If |cutoff| is 0, + // expect the timer is not set. If you refer to the diagrams in "License + // Duration and Renewal", this tests a cyan bar with a green check mark. + // When nonzero |start|, |stop|, and |cutoff| are all system times. + void AllowPlayback(uint64_t start, uint64_t stop, uint64_t cutoff) { + ASSERT_LT(start, stop); + if (cutoff > 0) ASSERT_LE(stop, cutoff); + SleepUntil(start + kFudge); + Decrypt(); + const uint64_t mid = (start + stop) / 2; + SleepUntil(mid); + Decrypt(); + SleepUntil(stop - kFudge); + Decrypt(); + // TODO: Is there a way to verify that playback will be terminated at + // cutoff? + } + + // Simulate loading or reloading a license, then attempt to play from |start| + // to |cutoff|. Verify that we are allowed playback from |start| to |cutoff|, + // but playback is not allowed after |cutoff|. If you refer to the diagrams in + // "License Duration and Renewal", this tests a cyan bar with a black X. When + // nonzero |start|, and |cutoff| are all system times. + void LoadAndTerminatePlayback(uint64_t start, uint64_t cutoff) { + SleepUntil(start); + LoadLicense(); + TerminatePlayback(start, cutoff, cutoff + kFudge); + } + + // Attempt to play from |start| to |stop|. Verify that we are allowed playback + // from |start| to |cutoff|, but playback not allowed after |cutoff|. If you + // refer to the diagrams in "License Duration and Renewal", this tests a cyan + // bar with a black X. This assumes that |cutoff| is before |stop|. + // When nonzero |start|, |stop|, and |cutoff| are all system times. + void TerminatePlayback(uint64_t start, uint64_t cutoff, uint64_t stop) { + ASSERT_LT(start, cutoff); + ASSERT_LT(cutoff, stop); + AllowPlayback(start, cutoff, cutoff); + SleepUntil(stop + kFudge); + FailDecrypt(); + } + + // Verify that we are not allowed playback at the |start| time. If you refer + // to the diagrams in "License Duration and Renewal", this tests a cyan line + // followed by a black X. The parameter |start| is system time. + void ForbidPlayback(uint64_t start) { + SleepUntil(start + kFudge); + LoadLicense(); + FailDecrypt(); + } + + void AllowLenience() { allow_lenience_ = true; } + + void Decrypt() { + constexpr size_t buffer_size = 500; + const std::vector input(buffer_size, 0); + std::vector output(buffer_size, 0); + const std::vector iv(KEY_IV_SIZE, 0); + Decrypt(session_id_, kKeyId, input, iv, &output, NO_ERROR); + } + + void FailDecrypt() { + CdmResponseType expected_status = NEED_KEY; + // On low end devices, for some tests, we are lenient on playback + // termination. This means that low end devices are not required to fail + // playback. Tests that allow lenience are enumerated in the + // documentation. See the section in "License Duration and Renewal" on + // lenient tests. + const bool low_end_device = + (wvoec::global_features.api_version < wvoec::kCoreMessagesAPI || + !wvoec::global_features.usage_table); + if (allow_lenience_ && low_end_device && can_persist_) { + expected_status = NO_ERROR; + allow_lenience_ = false; // Only allow lenience once per test. + } + constexpr size_t buffer_size = 500; + const std::vector input(buffer_size, 0); + std::vector output(buffer_size, 0); + const std::vector iv(KEY_IV_SIZE, 0); + Decrypt(session_id_, kKeyId, input, iv, &output, expected_status); + } + + void Decrypt(const CdmSessionId& session_id, const KeyId& key_id, + const std::vector& input, + const std::vector& iv, std::vector* output, + CdmResponseType expected_status) { + CdmDecryptionParametersV16 params(key_id); + params.is_secure = false; + CdmDecryptionSample sample(input.data(), output->data(), 0, input.size(), + iv); + CdmDecryptionSubsample subsample(0, input.size()); + sample.subsamples.push_back(subsample); + params.samples.push_back(sample); + + CdmResponseType status = cdm_engine_.DecryptV16(session_id, params); + ASSERT_EQ(expected_status, status); + } + + CdmSessionId session_id_; + std::string content_id_; + CdmLicenseType license_type_; + CdmKeySetId key_set_id_; + std::string key_response_; + // Time license requests generated. All test times are relative to this value. + uint64_t start_of_rental_clock_; + // The start of playback. This is set to the planned start at the beginning of + // the test. (using system clock) + uint64_t start_of_playback_; + // If this is true, then we the licenses have already been loaded once. We do + // not have to reload the streaming license, and we should use RestoreKey + // instead of AddKey for the offline license. + bool first_load_occurred_; + bool can_persist_; + ODK_TimerLimits timer_limits_; + SimpleEventListener event_listener_; + // If this is set, then the next time we expect a playback to be terminated, + // we will allow lenient failure. + bool allow_lenience_; +}; + +/*****************************************************************************/ +// Note on Use Case tests. The test classes below correspond to the use cases +// in the doucment "License Duration and Renewal.". Each diagram in that +// document has a test class below to verify the use case is supported. +// +// In the document, we use realistic rental times in hours or days. In these +// tests, we will use round numbers so that it is easier to read. For example, +// instead of a seven day rental duration, we will use a 200 rental duration. +/*****************************************************************************/ + +/*****************************************************************************/ +// Streaming is the simplest use case. The user has three hours to watch the +// movie from the time of the rental. (See above for note on Use Case tests) +class CdmUseCase_Streaming : public CdmDurationTest { + public: + CdmUseCase_Streaming() : CdmDurationTest("CDM_Streaming") { + // Rental duration = 3 hours hard. (use 300 for readability) + // Playback duration = 0 (unlimited) + timer_limits_.soft_enforce_rental_duration = false; + timer_limits_.rental_duration_seconds = 35; + timer_limits_.total_playback_duration_seconds = 0; + } +}; + +// Playback within rental duration. +TEST_P(CdmUseCase_Streaming, Case1) { + // Allow playback within the rental window. + LoadAndAllowPlayback(start_of_playback_, EndOfRentalWindow(), + EndOfRentalWindow()); +} + +// Playback exceeds rental duration. +TEST_P(CdmUseCase_Streaming, Case2) { + // Allow playback within the rental window, but not beyond. + LoadAndTerminatePlayback(start_of_playback_, EndOfRentalWindow()); +} + +// Playback with stops/restarts within rental duration, last one exceeds rental +// duration. +TEST_P(CdmUseCase_Streaming, Case3) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 5, + EndOfRentalWindow()); + UnloadLicense(); + LoadAndAllowPlayback(start_of_playback_ + 10, start_of_playback_ + 15, + EndOfRentalWindow()); + UnloadLicense(); + LoadAndTerminatePlayback(start_of_playback_ + 20, EndOfRentalWindow()); +} + +// Playback within rental duration, restart exceeds rental duration. +TEST_P(CdmUseCase_Streaming, Case4) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 5, + EndOfRentalWindow()); + UnloadLicense(); + ForbidPlayback(EndOfRentalWindow() + 5); +} + +// Initial playback exceeds rental duration. +TEST_P(CdmUseCase_Streaming, Case5) { ForbidPlayback(EndOfRentalWindow() + 5); } + +/*****************************************************************************/ +// Streaming Quick Start. The user must start watching within 30 seconds, and +// then has three hours to finish. (See above for note on Use Case tests) +class CdmUseCase_StreamingQuickStart : public CdmDurationTest { + public: + CdmUseCase_StreamingQuickStart() + : CdmDurationTest("CDM_StreamingQuickStart") { + // Rental duration = 30 seconds, soft -- use 20 to make the test faster. + // Playback duration = 3 hours -- use 40 to make the test faster. + timer_limits_.soft_enforce_rental_duration = true; + timer_limits_.rental_duration_seconds = 20; + timer_limits_.total_playback_duration_seconds = 40; + timer_limits_.soft_enforce_playback_duration = false; + + // A valid start of playback time. + start_of_playback_ = timer_limits_.rental_duration_seconds - 10; + } +}; + +// Playback starts within rental duration, continues within playback duration. +TEST_P(CdmUseCase_StreamingQuickStart, Case1) { + // As seen in the drawing, the playback window exceeds the rental window. + EXPECT_LE(EndOfRentalWindow(), EndOfPlaybackWindow()); + // Allow playback within the playback window. + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 20, + EndOfPlaybackWindow()); +} + +// Playback exceeds playback duration. +TEST_P(CdmUseCase_StreamingQuickStart, Case2) { + // Allow playback within the playback window, but not beyond. + LoadAndTerminatePlayback(start_of_playback_, EndOfPlaybackWindow()); +} + +// Playback with stops/restarts within playback duration, last one exceeds +// playback duration. +TEST_P(CdmUseCase_StreamingQuickStart, Case3) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 10, + EndOfPlaybackWindow()); + UnloadLicense(); + LoadAndAllowPlayback(start_of_playback_ + 15, start_of_playback_ + 20, + EndOfPlaybackWindow()); + UnloadLicense(); + LoadAndTerminatePlayback(start_of_playback_ + 25, EndOfPlaybackWindow()); +} + +// Initial playback exceeds rental duration. +TEST_P(CdmUseCase_StreamingQuickStart, Case4) { + ForbidPlayback(EndOfRentalWindow() + 10); +} + +/*****************************************************************************/ +// Seven Day / Two Day. The user must start watching within 7 days. Once +// started, the user has two days to finish the video. Playback is cutoff by the +// smaller of the two time limits. The first four cases start on day +// three. (See above for note on Use Case tests) +class CdmUseCase_SevenHardTwoHard_Start3 : public CdmDurationTest { + public: + CdmUseCase_SevenHardTwoHard_Start3() + : CdmDurationTest("CDM_SevenHardTwoHard") { + // Rental duration = 200, hard + // Playback duration = 100, hard + timer_limits_.rental_duration_seconds = 200; // 7 days. + timer_limits_.soft_enforce_rental_duration = false; + timer_limits_.total_playback_duration_seconds = 100; // 2 days. + timer_limits_.soft_enforce_playback_duration = false; + + start_of_playback_ = 50; // Start is less than rental - playback. + } +}; + +// Playback within playback and rental duration. +TEST_P(CdmUseCase_SevenHardTwoHard_Start3, Case1) { + // As seen in the drawing, the playback window is within the rental window. + EXPECT_LT(EndOfPlaybackWindow(), EndOfRentalWindow()); + // Allow playback within the rental window. + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 10, + EndOfPlaybackWindow()); +} + +// Playback exceeds playback duration. +TEST_P(CdmUseCase_SevenHardTwoHard_Start3, Case2) { + // Allow playback within the playback window, but not beyond. + LoadAndTerminatePlayback(start_of_playback_, EndOfPlaybackWindow()); +} + +// Playback with stops/restarts within playback duration, last one exceeds +// playback duration. +TEST_P(CdmUseCase_SevenHardTwoHard_Start3, Case3) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 10, + EndOfPlaybackWindow()); + UnloadLicense(); + LoadAndAllowPlayback(start_of_playback_ + 20, start_of_playback_ + 30, + EndOfPlaybackWindow()); + UnloadLicense(); + AllowLenience(); + LoadAndTerminatePlayback(start_of_playback_ + 50, EndOfPlaybackWindow()); +} + +// Restart exceeds playback duration. +TEST_P(CdmUseCase_SevenHardTwoHard_Start3, Case4) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 50, + EndOfPlaybackWindow()); + UnloadLicense(); + AllowLenience(); + ForbidPlayback(EndOfPlaybackWindow() + 10); +} + +// The next four cases start on day six. +class CdmUseCase_SevenHardTwoHard_Start6 + : public CdmUseCase_SevenHardTwoHard_Start3 { + public: + CdmUseCase_SevenHardTwoHard_Start6() { + // Start is more than rental - playback = 200 - 100 + start_of_playback_ = 150; + } +}; + +// Playback exceeds rental duration. +TEST_P(CdmUseCase_SevenHardTwoHard_Start6, Case5) { + // As seen in the drawing, the playback window is exceeds the rental window. + EXPECT_GT(EndOfPlaybackWindow(), EndOfRentalWindow()); + // Allow playback within the rental window. + LoadAndTerminatePlayback(start_of_playback_, EndOfRentalWindow()); +} + +// Playback with stops/restarts within playback duration, last one is terminated +// at the end of the rental duration. +TEST_P(CdmUseCase_SevenHardTwoHard_Start6, Case6) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 10, + EndOfRentalWindow()); + UnloadLicense(); + LoadAndAllowPlayback(start_of_playback_ + 20, start_of_playback_ + 30, + EndOfRentalWindow()); + UnloadLicense(); + // Allow playback that starts within rental window, but terminate at end of + // rental window. + LoadAndTerminatePlayback(start_of_playback_ + 40, EndOfRentalWindow()); +} + +// Playback within playback duration, restart exceeds rental duration. +TEST_P(CdmUseCase_SevenHardTwoHard_Start6, Case7) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 25, + EndOfRentalWindow()); + UnloadLicense(); + // Restart does not work after end of playback window. + ForbidPlayback(EndOfRentalWindow() + 10); +} + +// Playback exceeds rental and playback duration. +TEST_P(CdmUseCase_SevenHardTwoHard_Start6, Case8) { + LoadAndTerminatePlayback(start_of_playback_, EndOfRentalWindow()); +} + +// First playback cannot exceed rental duration. +TEST_P(CdmUseCase_SevenHardTwoHard_Start6, Case9) { + ForbidPlayback(EndOfRentalWindow() + 10); +} + +/*****************************************************************************/ +// Seven Day / Two Day. The user must start watching within 7 days. Once +// started, the user has two days to finish the video. Playback is cutoff by the +// rental duration time limits. The first four cases start on day three. (See +// above for note on Use Case tests) +class CdmUseCase_SevenHardTwoSoft_Start3 : public CdmDurationTest { + public: + CdmUseCase_SevenHardTwoSoft_Start3() + : CdmDurationTest("CDM_SevenHardTwoSoft") { + // Rental duration = 200, hard + // Playback duration = 100, hard + timer_limits_.rental_duration_seconds = 200; + timer_limits_.soft_enforce_rental_duration = false; + timer_limits_.total_playback_duration_seconds = 100; + timer_limits_.soft_enforce_playback_duration = true; + + start_of_playback_ = 50; // Start is less than rental - playback. + } +}; + +// Playback within playback and rental duration. +TEST_P(CdmUseCase_SevenHardTwoSoft_Start3, Case1) { + // As seen in the drawing, the playback window is within the rental window. + EXPECT_LT(EndOfPlaybackWindow(), EndOfRentalWindow()); + // Allow playback within the rental window. + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 10, + EndOfRentalWindow()); +} + +// Playback exceeds playback duration. +TEST_P(CdmUseCase_SevenHardTwoSoft_Start3, Case2) { + // Allow playback within the playback window, and a little after. + // Timer expires at end of rental window. + LoadAndAllowPlayback(start_of_playback_, EndOfPlaybackWindow() + 15, + EndOfRentalWindow()); +} + +// Playback with stops/restarts within playback duration, last one exceeds +// playback duration. +TEST_P(CdmUseCase_SevenHardTwoSoft_Start3, Case3) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 10, + EndOfRentalWindow()); + UnloadLicense(); + LoadAndAllowPlayback(start_of_playback_ + 20, start_of_playback_ + 30, + EndOfRentalWindow()); + UnloadLicense(); + LoadAndAllowPlayback(start_of_playback_ + 50, EndOfPlaybackWindow() + 15, + EndOfRentalWindow()); +} + +// Restart exceeds playback duration. +TEST_P(CdmUseCase_SevenHardTwoSoft_Start3, Case4) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 50, + EndOfRentalWindow()); + UnloadLicense(); + if (!can_persist_) return; // streaming license cannot restart. + AllowLenience(); + ForbidPlayback(EndOfPlaybackWindow() + 10); +} + +// The next four cases start on day six. +class CdmUseCase_SevenHardTwoSoft_Start6 + : public CdmUseCase_SevenHardTwoSoft_Start3 { + public: + CdmUseCase_SevenHardTwoSoft_Start6() { + // Start is more than rental - playback = 200 - 100 + start_of_playback_ = 150; + } +}; + +// Playback exceeds rental duration. +TEST_P(CdmUseCase_SevenHardTwoSoft_Start6, Case5) { + // As seen in the drawing, the playback window is exceeds the rental window. + EXPECT_GT(EndOfPlaybackWindow(), EndOfRentalWindow()); + // Allow playback within the rental window. + LoadAndTerminatePlayback(start_of_playback_, EndOfRentalWindow()); +} + +// Playback with stops/restarts within playback duration, last one exceeds +// rental duration. +TEST_P(CdmUseCase_SevenHardTwoSoft_Start6, Case6) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 10, + EndOfRentalWindow()); + UnloadLicense(); + LoadAndAllowPlayback(start_of_playback_ + 20, start_of_playback_ + 30, + EndOfRentalWindow()); + UnloadLicense(); + LoadAndTerminatePlayback(start_of_playback_ + 40, EndOfRentalWindow()); +} + +// Playback within playback duration, restart exceeds rental duration. +TEST_P(CdmUseCase_SevenHardTwoSoft_Start6, Case7) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 25, + EndOfRentalWindow()); + UnloadLicense(); + // Restart does not work after end of playback window. + ForbidPlayback(EndOfRentalWindow() + 10); +} + +// Playback exceeds rental and playback duration. +TEST_P(CdmUseCase_SevenHardTwoSoft_Start6, Case8) { + LoadAndTerminatePlayback(start_of_playback_, EndOfRentalWindow()); +} + +// First playback cannot exceed rental duration. +TEST_P(CdmUseCase_SevenHardTwoSoft_Start6, Case9) { + ForbidPlayback(EndOfRentalWindow() + 10); +} + +/*****************************************************************************/ +// Seven Day / Two Day. The user must start watching within 7 days. Once +// started, the user has two days to finish the video. Playback is cutoff by the +// playback duration. The first four cases start on day three. (See above for +// note on Use Case tests) +class CdmUseCase_SevenSoftTwoHard_Start3 : public CdmDurationTest { + public: + CdmUseCase_SevenSoftTwoHard_Start3() + : CdmDurationTest("CDM_SevenSoftTwoHard") { + // Rental duration = 200, hard + // Playback duration = 100, hard + timer_limits_.rental_duration_seconds = 200; + timer_limits_.soft_enforce_rental_duration = true; + timer_limits_.total_playback_duration_seconds = 100; + timer_limits_.soft_enforce_playback_duration = false; + + start_of_playback_ = 50; // Start is less than rental - playback. + } +}; + +// Playback within playback and rental duration. +TEST_P(CdmUseCase_SevenSoftTwoHard_Start3, Case1) { + // As seen in the drawing, the playback window is within the rental window. + EXPECT_LT(EndOfPlaybackWindow(), EndOfRentalWindow()); + // Allow playback within the rental window. + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 10, + EndOfPlaybackWindow()); +} + +// Playback exceeds playback duration. +TEST_P(CdmUseCase_SevenSoftTwoHard_Start3, Case2) { + // Allow playback within the playback window, but not beyond. + LoadAndTerminatePlayback(start_of_playback_, EndOfPlaybackWindow()); +} + +// Playback with stops/restarts within playback duration, last one exceeds +// playback duration. +TEST_P(CdmUseCase_SevenSoftTwoHard_Start3, Case3) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 10, + EndOfPlaybackWindow()); + UnloadLicense(); + LoadAndAllowPlayback(start_of_playback_ + 20, start_of_playback_ + 30, + EndOfPlaybackWindow()); + UnloadLicense(); + AllowLenience(); + LoadAndTerminatePlayback(start_of_playback_ + 50, EndOfPlaybackWindow()); +} + +// Restart exceeds playback duration. +TEST_P(CdmUseCase_SevenSoftTwoHard_Start3, Case4) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 50, + EndOfPlaybackWindow()); + UnloadLicense(); + AllowLenience(); + ForbidPlayback(EndOfPlaybackWindow() + 10); +} + +// The next four cases start on day six. +class CdmUseCase_SevenSoftTwoHard_Start6 + : public CdmUseCase_SevenSoftTwoHard_Start3 { + public: + CdmUseCase_SevenSoftTwoHard_Start6() { + // Start is more than rental - playback = 200 - 100 + start_of_playback_ = 150; + } +}; + +// Playback exceeds rental duration. +TEST_P(CdmUseCase_SevenSoftTwoHard_Start6, Case5) { + // As seen in the drawing, the playback window exceeds the rental window. + EXPECT_GT(EndOfPlaybackWindow(), EndOfRentalWindow()); + // Allow playback to continue beyond the rental window, but not beyond the + // playback window. + LoadAndTerminatePlayback(start_of_playback_, EndOfPlaybackWindow()); +} + +// Playback with stops/restarts within playback duration, last one exceeds +// rental duration. +TEST_P(CdmUseCase_SevenSoftTwoHard_Start6, Case6) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 10, + EndOfPlaybackWindow()); + UnloadLicense(); + LoadAndAllowPlayback(start_of_playback_ + 20, start_of_playback_ + 30, + EndOfPlaybackWindow()); + UnloadLicense(); + AllowLenience(); + LoadAndTerminatePlayback(start_of_playback_ + 40, EndOfPlaybackWindow()); +} + +// Restart exceeds rental duration, playback exceeds playback duration. +TEST_P(CdmUseCase_SevenSoftTwoHard_Start6, Case7) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 25, + EndOfPlaybackWindow()); + UnloadLicense(); + AllowLenience(); + LoadAndTerminatePlayback(EndOfRentalWindow() + 10, EndOfPlaybackWindow()); +} + +// Playback exceeds rental and playback duration. +TEST_P(CdmUseCase_SevenSoftTwoHard_Start6, Case8) { + LoadAndTerminatePlayback(start_of_playback_, EndOfPlaybackWindow()); +} + +// First playback cannot exceed rental duration. +TEST_P(CdmUseCase_SevenSoftTwoHard_Start6, Case9) { + ForbidPlayback(EndOfRentalWindow() + 10); +} + +/*****************************************************************************/ +// Seven Day / Two Day. The user must start watching within 7 days. Once +// started, the user has two days to finish the video. Playback is not cutoff, +// but restarts are not allowed after playback duration. The first four cases +// start on day three. (See above for note on Use Case tests) +class CdmUseCase_SevenSoftTwoSoft_Start3 : public CdmDurationTest { + public: + CdmUseCase_SevenSoftTwoSoft_Start3() + : CdmDurationTest("CDM_SevenSoftTwoSoft") { + // Rental duration = 200, hard + // Playback duration = 100, hard + timer_limits_.rental_duration_seconds = 200; + timer_limits_.soft_enforce_rental_duration = true; + timer_limits_.total_playback_duration_seconds = 100; + timer_limits_.soft_enforce_playback_duration = true; + + start_of_playback_ = 50; // Start is less than rental - playback. + } +}; + +// Playback within playback and rental duration. +TEST_P(CdmUseCase_SevenSoftTwoSoft_Start3, Case1) { + // As seen in the drawing, the playback window is within the rental window. + EXPECT_LT(EndOfPlaybackWindow(), EndOfRentalWindow()); + // Allow playback within the rental window. + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 10, 0); +} + +// Playback exceeds playback duration. +TEST_P(CdmUseCase_SevenSoftTwoSoft_Start3, Case2) { + // Allow playback within the playback window, and beyond. No timer limit. + LoadAndAllowPlayback(start_of_playback_, EndOfPlaybackWindow() + 10, 0); +} + +// Playback with stops/restarts within playback duration, last one exceeds +// playback duration. +TEST_P(CdmUseCase_SevenSoftTwoSoft_Start3, Case3) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 10, 0); + UnloadLicense(); + LoadAndAllowPlayback(start_of_playback_ + 20, start_of_playback_ + 30, 0); + UnloadLicense(); + LoadAndAllowPlayback(start_of_playback_ + 50, EndOfPlaybackWindow() + 15, 0); +} + +// Restart exceeds playback duration. +TEST_P(CdmUseCase_SevenSoftTwoSoft_Start3, Case4) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 50, 0); + UnloadLicense(); + if (!can_persist_) return; // streaming license cannot restart. + AllowLenience(); + ForbidPlayback(EndOfPlaybackWindow() + 10); +} + +// The next four cases start on day six. +class CdmUseCase_SevenSoftTwoSoft_Start6 + : public CdmUseCase_SevenSoftTwoSoft_Start3 { + public: + CdmUseCase_SevenSoftTwoSoft_Start6() { + // Start is more than rental - playback = 200 - 100 + start_of_playback_ = 150; + } +}; + +// Playback exceeds rental duration. +TEST_P(CdmUseCase_SevenSoftTwoSoft_Start6, Case5) { + // As seen in the drawing, the playback window exceeds the rental window. + // We should be able to play a little bit after the rental window. + // We'll use 10 as "a little bit". + const uint64_t end_play = EndOfRentalWindow() + 10; + // For this case, we are playing after the end of the playback window, too. + EXPECT_GT(EndOfPlaybackWindow(), end_play); + // Allow playback past the rental window, but within the playback window. + LoadAndAllowPlayback(start_of_playback_, end_play, 0); +} + +// Playback with stops/restarts within playback duration, last one exceeds +// rental and playback duration. +TEST_P(CdmUseCase_SevenSoftTwoSoft_Start6, Case6) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 10, 0); + UnloadLicense(); + LoadAndAllowPlayback(start_of_playback_ + 20, start_of_playback_ + 30, 0); + UnloadLicense(); + LoadAndAllowPlayback(start_of_playback_ + 40, EndOfPlaybackWindow() + 10, 0); +} + +// Playback with stops/restarts within playback duration, last one exceeds +// playback duration. +TEST_P(CdmUseCase_SevenSoftTwoSoft_Start6, Case7) { + LoadAndAllowPlayback(start_of_playback_, start_of_playback_ + 25, 0); + UnloadLicense(); + // Allow playback to start after end of rental window, and continue after + // playback window. + LoadAndAllowPlayback(EndOfRentalWindow() + 10, EndOfPlaybackWindow() + 10, 0); + UnloadLicense(); + // But forbid restart after playback window. + if (!can_persist_) return; // streaming license cannot restart. + ForbidPlayback(EndOfPlaybackWindow() + 20); +} + +// Playback exceeds rental and playback duration. +TEST_P(CdmUseCase_SevenSoftTwoSoft_Start6, Case8) { + LoadAndAllowPlayback(start_of_playback_, EndOfPlaybackWindow() + 20, 0); +} + +// First playback cannot exceed rental duration. +TEST_P(CdmUseCase_SevenSoftTwoSoft_Start6, Case9) { + ForbidPlayback(EndOfRentalWindow() + 10); +} + +INSTANTIATE_TEST_CASE_P(Both, CdmUseCase_Streaming, + ::testing::Values(false, true)); +INSTANTIATE_TEST_CASE_P(Both, CdmUseCase_StreamingQuickStart, + ::testing::Values(false, true)); +INSTANTIATE_TEST_CASE_P(Both, CdmUseCase_SevenHardTwoHard_Start3, + ::testing::Values(false, true)); +INSTANTIATE_TEST_CASE_P(Both, CdmUseCase_SevenHardTwoHard_Start6, + ::testing::Values(false, true)); +INSTANTIATE_TEST_CASE_P(Both, CdmUseCase_SevenHardTwoSoft_Start3, + ::testing::Values(false, true)); +INSTANTIATE_TEST_CASE_P(Both, CdmUseCase_SevenHardTwoSoft_Start6, + ::testing::Values(false, true)); +INSTANTIATE_TEST_CASE_P(Both, CdmUseCase_SevenSoftTwoHard_Start3, + ::testing::Values(false, true)); +INSTANTIATE_TEST_CASE_P(Both, CdmUseCase_SevenSoftTwoHard_Start6, + ::testing::Values(false, true)); +INSTANTIATE_TEST_CASE_P(Both, CdmUseCase_SevenSoftTwoSoft_Start3, + ::testing::Values(false, true)); +INSTANTIATE_TEST_CASE_P(Both, CdmUseCase_SevenSoftTwoSoft_Start6, + ::testing::Values(false, true)); + +class RenewalTest : public CdmDurationTest { + protected: + RenewalTest(std::string content_id) : CdmDurationTest(content_id) { + current_cutoff_ = 0; + } + + // Sleep until a renewal request event is generated. If one does not occur + // before cutoff, an error happens. + void SleepUntilRenewalNeeded(uint64_t cutoff) { + while (!event_listener_.renewal_needed()) { + uint64_t now = CurrentRentalTime(); + ASSERT_LT(now, cutoff); + SleepUntil(now + 1); + } + } + // Sleep until a renewal request event is generated. If one does not occur + // in a reasonable amount of time, an error happens. + void SleepUntilRenewalNeeded() { + constexpr uint64_t reasonable_time = 5; + SleepUntilRenewalNeeded(CurrentRentalTime() + reasonable_time); + } + + void RequestRenewal(const RenewalPolicy& renewal_policy) { + event_listener_.set_renewal_needed(false); + CdmKeyRequest request; + const CdmResponseType result = + cdm_engine_.GenerateRenewalRequest(session_id_, &request); + ASSERT_EQ(KEY_MESSAGE, result); + const std::string url = MakeUrl(renewal_policy.policy_id); + renewal_in_flight_.reset(new UrlRequest(url)); + ASSERT_TRUE(renewal_in_flight_->is_connected()); + renewal_in_flight_->PostRequest(request.message); + } + + void LoadRenewal(uint64_t time_of_load, const RenewalPolicy& renewal_policy) { + ASSERT_NE(renewal_in_flight_, nullptr); + std::string http_response; + // TODO(fredgc): Tune this. Most of the network latency will probably show + // up in the next few commands. I think the tests have enough slop to + // account for reasonable latency with the current value of + // kRoundTripTime. But We'll know I made a mistake if we see errors about + // "Test Clock skew..." in the SleepUntil call below. + ASSERT_TRUE(renewal_in_flight_->GetResponse(&http_response)); + int status_code = renewal_in_flight_->GetStatusCode(http_response); + ASSERT_EQ(kHttpOk, status_code); + + SleepUntil(time_of_load); + LicenseRequest license_request; + license_request.GetDrmMessage(http_response, renewal_message_); + EXPECT_EQ(KEY_ADDED, cdm_engine_.RenewKey(session_id_, renewal_message_)); + ComputeCutoff(time_of_load, renewal_policy); + } + + // Compute the cutoff value for the renewal timer. + void ComputeCutoff(uint64_t time_of_load, + const RenewalPolicy& renewal_policy) { + const uint64_t renewal_duration = + renewal_policy.renewal_delay + renewal_policy.renewal_recovery_duration; + if (renewal_duration > 0) { + current_cutoff_ = time_of_load + renewal_duration; + } else { + current_cutoff_ = 0; + } + } + + // Verify that a renewal can be processed and playback may continue from + // |start| to |stop|, with a renewal loaded at |load_time|. If you refer to + // the diagrams in "License Duration and Renewal", this tests a cyan bar with + // a green check mark. + void RenewAndContinue(uint64_t start, uint64_t load_time, uint64_t stop, + const RenewalPolicy& renewal_policy) { + EXPECT_LE(start, load_time); + EXPECT_LT(load_time, stop); + if (start < load_time) AllowPlayback(start, load_time, current_cutoff_); + LoadRenewal(load_time, renewal_policy); + AllowPlayback(load_time, stop, current_cutoff_); + } + + // Verify that a renewal can be processed and attempt to play from |start| to + // after |cutoff|, with a renewal loaded at |load_time|. Verify that we are + // allowed playback from |start| to |cutoff|, but playback not allowed after + // |cutoff|. If you refer to the diagrams in "License Duration and Renewal", + // this tests a cyan bar with a black X. + void RenewAndTerminate(uint64_t start, uint64_t load_time, uint64_t cutoff, + const RenewalPolicy& renewal_policy) { + RenewAndTerminate(start, load_time, cutoff, + cutoff + renewal_policy.renewal_recovery_duration, + renewal_policy); + } + + // Verify that a renewal can be processed and attempt to play from |start| to + // |stop|, with a renewal loaded at |load_time|. Verify that we are allowed + // playback from |start| to |cutoff|, but playback not allowed after + // |cutoff|. If you refer to the diagrams in "License Duration and Renewal", + // this tests a cyan bar with a black X. This assumes that |cutoff| is between + // |start| and |stop|. + void RenewAndTerminate(uint64_t start, uint64_t load_time, uint64_t cutoff, + uint64_t stop, const RenewalPolicy& renewal_policy) { + ASSERT_LT(start, load_time); + ASSERT_LT(load_time, cutoff); + ASSERT_LE(cutoff, stop); + RenewAndContinue(start, load_time, cutoff, renewal_policy); + // Renewals need some extra fudge because there are extra messages sent and + // received. + SleepUntil(stop + 3 * kFudge); + FailDecrypt(); + } + + // Verify that a license and renewal can be reloaded at time |start|, and then + // playback may continue until |stop|.If you refer to the diagrams in "License + // Duration and Renewal", this tests a cyan bar with a green check mark. This + // is different from the previous functions, because the renewal is loaded + // before the first playback. + void ReloadAndAllowPlayback(uint64_t start, uint64_t stop, + const RenewalPolicy& renewal_policy) { + ASSERT_LT(start, stop); + SleepUntil(start); + // The CDM Core code will automatically load the last renewal when a + // license is reloaded. + LoadLicense(); + ComputeCutoff(start, renewal_policy); + AllowPlayback(start, stop, current_cutoff_); + } + + std::unique_ptr renewal_in_flight_; + std::string renewal_message_; + // When we expect the current renewal timer to expire. + uint64_t current_cutoff_; +}; + +// License with Renewal, limited by rental duration. (See above for note on Use +// Case tests). These tests are parameterized by can_persist = true or false. +class CdmUseCase_LicenseWithRenewal : public RenewalTest { + public: + CdmUseCase_LicenseWithRenewal() : RenewalTest("CDM_LicenseWithRenewal") { + timer_limits_.soft_enforce_rental_duration = false; + timer_limits_.rental_duration_seconds = 360u; + initial_policy_.renewal_delay = 25u; + initial_policy_.renewal_recovery_duration = 15u; + timer_limits_.initial_renewal_duration_seconds = + initial_policy_.renewal_delay + + initial_policy_.renewal_recovery_duration; + } + + void SetUp() override { + RenewalTest::SetUp(); + const uint64_t next_renewal = + start_of_playback_ + initial_policy_.renewal_delay; + // Allow playback within the initial renewal window. + SleepUntil(start_of_playback_); + LoadLicense(); + // Play until just before we expect a renewal to be generated. + current_cutoff_ = next_renewal + initial_policy_.renewal_recovery_duration; + AllowPlayback(start_of_playback_, next_renewal, current_cutoff_); + } + + protected: + RenewalPolicy initial_policy_; +}; + +// Playback within rental duration and renewal duration. +TEST_P(CdmUseCase_LicenseWithRenewal, Case1) { + for (int i = 0; i < 4; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } +} + +// Playback within rental duration, last playback attempt exceeds renewal +// duration. +TEST_P(CdmUseCase_LicenseWithRenewal, Case2) { + for (int i = 0; i < 4; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } + // We attempt to continue playing beyond the renewal cutoff. + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t cutoff = load_time + kShortRenewal.renewal_delay + + kShortRenewal.renewal_recovery_duration; + RenewAndTerminate(start, load_time, cutoff, kShortRenewal); +} + +// Playback interrupted by late renewal. +TEST_P(CdmUseCase_LicenseWithRenewal, Case3) { + for (int i = 0; i < 2; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } + // We attempt to continue playing beyond the renewal cutoff. + // Playback should fail at the renewal cutoff. + { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t cutoff = load_time + kShortRenewal.renewal_delay + + kShortRenewal.renewal_recovery_duration; + RenewAndTerminate(start, load_time, cutoff, kShortRenewal); + } + // We are late requesting the renewal. + TestSleep::Sleep(kRoundTripTime); + // But after we request the renewal, we should be able to start playing again. + { + RequestRenewal(kShortRenewal); + const uint64_t load_time = CurrentRentalTime() + kRoundTripTime; + // We cannot start playback again until the renewal has loaded. + const uint64_t start = load_time; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } +} + +// Playback & restart within playback duration and renewal duration. Note: this +// simulates reloading a persistent license, and then reloading the last +// renewal. +TEST_P(CdmUseCase_LicenseWithRenewal, Case4) { + for (int i = 0; i < 2; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } + UnloadLicense(); + if (can_persist_) { + // Reload license after timer expired. + const uint64_t reload_time = current_cutoff_ + 20; + ReloadAndAllowPlayback( + reload_time, reload_time + kShortRenewal.renewal_delay, kShortRenewal); + // Now we should be able to continue. + for (int i = 0; i < 2; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } + } +} + +// Playback within renewal duration, but exceeds playback duration. +TEST_P(CdmUseCase_LicenseWithRenewal, Case5) { + uint64_t stop = 0; + const uint64_t cutoff = EndOfRentalWindow(); + while (stop <= cutoff) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + stop = load_time + kShortRenewal.renewal_delay; + if (stop >= cutoff) { + RenewAndTerminate(start, load_time, cutoff, kShortRenewal); + } else { + RenewAndContinue(start, load_time, stop, kShortRenewal); + } + } +} + +// Renewal duration may be different for different renewals. +// Cutoff at end of rental window. +TEST_P(CdmUseCase_LicenseWithRenewal, Case6) { + for (int i = 0; i < 2; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } + // Change renewal duration, and playing until the end of the rental window. + uint64_t stop = 0; + const uint64_t cutoff = EndOfRentalWindow(); + while (stop <= cutoff) { + SleepUntilRenewalNeeded(); + RequestRenewal(kLongRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + stop = load_time + kLongRenewal.renewal_delay; + if (stop >= cutoff) { + RenewAndTerminate(start, load_time, cutoff, kLongRenewal); + } else { + RenewAndContinue(start, load_time, stop, kLongRenewal); + } + } +} + +// Renewal duration may be different for different renewals. +// Cutoff when renewals stop coming. This is a mix of Case2 and Case6. +TEST_P(CdmUseCase_LicenseWithRenewal, Case7) { + for (int i = 0; i < 2; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } + // Change renewal duration, and playing until the end of the rental window. + for (int i = 0; i < 2; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kLongRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kLongRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kLongRenewal); + } + // We attempt to continue playing beyond the renewal cutoff. + SleepUntilRenewalNeeded(); + RequestRenewal(kLongRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t cutoff = load_time + kLongRenewal.renewal_delay + + kLongRenewal.renewal_recovery_duration; + RenewAndTerminate(start, load_time, cutoff, kLongRenewal); +} + +// License with Renewal, limited by playback duration. (See above for note on +// Use Case tests). These are similar to the tests above, except the playback +// duration is limited instead of the rental duration. These tests are +// parameterized by can_persist = true or false. +class CdmUseCase_LicenseWithRenewalPlayback : public RenewalTest { + public: + CdmUseCase_LicenseWithRenewalPlayback() + : RenewalTest("CDM_LicenseWithRenewal_playback") { + timer_limits_.soft_enforce_rental_duration = false; + timer_limits_.total_playback_duration_seconds = 360u; + initial_policy_.renewal_delay = 25u; + initial_policy_.renewal_recovery_duration = 15u; + timer_limits_.initial_renewal_duration_seconds = + initial_policy_.renewal_delay + + initial_policy_.renewal_recovery_duration; + } + + void SetUp() override { + RenewalTest::SetUp(); + uint64_t next_renewal = start_of_playback_ + initial_policy_.renewal_delay; + // Allow playback within the initial renewal window. + SleepUntil(start_of_playback_); + LoadLicense(); + // Play until just before we expect a renewal to be generated. + current_cutoff_ = next_renewal + initial_policy_.renewal_recovery_duration; + AllowPlayback(start_of_playback_, next_renewal, current_cutoff_); + } + + protected: + RenewalPolicy initial_policy_; +}; + +// Playback within rental duration and renewal duration. +TEST_P(CdmUseCase_LicenseWithRenewalPlayback, Case1) { + for (int i = 0; i < 4; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } +} + +// Playback within rental duration, last playback attempt exceeds renewal +// duration. +TEST_P(CdmUseCase_LicenseWithRenewalPlayback, Case2) { + for (int i = 0; i < 4; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } + // We attempt to continue playing beyond the renewal cutoff. + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t cutoff = load_time + kShortRenewal.renewal_delay + + kShortRenewal.renewal_recovery_duration; + RenewAndTerminate(start, load_time, cutoff, kShortRenewal); +} + +// Playback interrupted by late renewal. +TEST_P(CdmUseCase_LicenseWithRenewalPlayback, Case3) { + for (int i = 0; i < 2; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } + // We attempt to continue playing beyond the renewal cutoff. + // Playback should fail at the renewal cutoff. + { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t cutoff = load_time + kShortRenewal.renewal_delay + + kShortRenewal.renewal_recovery_duration; + RenewAndTerminate(start, load_time, cutoff, kShortRenewal); + } + // We are late requesting the renewal. + TestSleep::Sleep(kRoundTripTime); + // But after we request the renewal, we should be able to start playing again. + { + RequestRenewal(kShortRenewal); + const uint64_t load_time = CurrentRentalTime() + kRoundTripTime; + // We cannot start playback again until the renewal has loaded. + const uint64_t start = load_time; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } +} + +// Playback & restart within playback duration and renewal duration. Note: this +// simulates reloading a persistent license, and then reloading the last +// renewal. +TEST_P(CdmUseCase_LicenseWithRenewalPlayback, Case4) { + for (int i = 0; i < 2; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } + UnloadLicense(); + if (can_persist_) { + // Reload license after timer expired. + const uint64_t reload_time = current_cutoff_ + 20; + ReloadAndAllowPlayback( + reload_time, reload_time + kShortRenewal.renewal_delay, kShortRenewal); + // Now we should be able to continue. + for (int i = 0; i < 2; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } + } +} + +// Playback within renewal duration, but exceeds playback duration. +TEST_P(CdmUseCase_LicenseWithRenewalPlayback, Case5) { + uint64_t stop = 0; + const uint64_t cutoff = EndOfPlaybackWindow(); + while (stop <= cutoff) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + stop = load_time + kShortRenewal.renewal_delay; + if (stop >= cutoff) { + RenewAndTerminate(start, load_time, cutoff, kShortRenewal); + } else { + RenewAndContinue(start, load_time, stop, kShortRenewal); + } + } +} + +// Renewal duration may be different for different renewals. +// Cutoff at end of rental window. +TEST_P(CdmUseCase_LicenseWithRenewalPlayback, Case6) { + for (int i = 0; i < 2; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } + // Change renewal duration, and playing until the end of the rental window. + uint64_t stop = 0; + const uint64_t cutoff = EndOfPlaybackWindow(); + while (stop <= cutoff) { + SleepUntilRenewalNeeded(); + RequestRenewal(kLongRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + stop = load_time + kLongRenewal.renewal_delay; + if (stop >= cutoff) { + RenewAndTerminate(start, load_time, cutoff, kLongRenewal); + } else { + RenewAndContinue(start, load_time, stop, kLongRenewal); + } + } +} + +// Renewal duration may be different for different renewals. +// Cutoff when renewals stop coming. This is a mix of Case2 and Case6. +TEST_P(CdmUseCase_LicenseWithRenewalPlayback, Case7) { + for (int i = 0; i < 2; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kShortRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kShortRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kShortRenewal); + } + // Change renewal duration, and playing until the end of the rental window. + for (int i = 0; i < 2; i++) { + SleepUntilRenewalNeeded(); + RequestRenewal(kLongRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t stop = load_time + kLongRenewal.renewal_delay; + RenewAndContinue(start, load_time, stop, kLongRenewal); + } + // We attempt to continue playing beyond the renewal cutoff. + SleepUntilRenewalNeeded(); + RequestRenewal(kLongRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t load_time = start + kRoundTripTime; + const uint64_t cutoff = load_time + kLongRenewal.renewal_delay + + kLongRenewal.renewal_recovery_duration; + RenewAndTerminate(start, load_time, cutoff, kLongRenewal); +} + +// Limited Duration License. (See above for notes on Use Case tests). The user +// has 15 minutes to begin watching the movie. If a renewal is not received, +// playback is terminated after 30 seconds. If a renewal is received, playback +// may continue for two hours from playback start. +class CdmUseCase_LimitedDurationLicense : public RenewalTest { + public: + CdmUseCase_LimitedDurationLicense() + : RenewalTest("CDM_LimitedDurationLicense") { + renewal_delay_ = 5u; + renewal_recovery_ = 55; + + // Pick a start of playback that is within the rental window, but so that + // the initial renewal window is after rental window. + start_of_playback_ = 100; + + timer_limits_.soft_enforce_rental_duration = true; + timer_limits_.rental_duration_seconds = 120; // 15 minutes. + timer_limits_.soft_enforce_playback_duration = false; + timer_limits_.total_playback_duration_seconds = 300; // --> 12 hours. + timer_limits_.initial_renewal_duration_seconds = + renewal_delay_ + renewal_recovery_; + + // Load the renewal just before the cutoff: + renewal_load_time_ = + start_of_playback_ + renewal_delay_ + renewal_recovery_ - 1; + } + uint64_t renewal_delay_; + uint64_t renewal_load_time_; + uint64_t renewal_recovery_; +}; + +// Playback started within rental window and continues. +TEST_P(CdmUseCase_LimitedDurationLicense, Case1) { + // Allow playback within the initial renewal window. + LoadAndAllowPlayback(start_of_playback_, renewal_load_time_ - kRoundTripTime, + current_cutoff_); + SleepUntilRenewalNeeded(); + RequestRenewal(kLDLRenewal); + // Continue playback for one hour (use 100 to condense test). + const uint64_t end_of_hour = renewal_load_time_ + 100; + const uint64_t start = CurrentRentalTime(); + RenewAndContinue(start, renewal_load_time_, end_of_hour, kLDLRenewal); +} + +// Playback started after rental duration should fail. +TEST_P(CdmUseCase_LimitedDurationLicense, Case2) { + start_of_playback_ = EndOfRentalWindow() + 1; + ForbidPlayback(start_of_playback_); +} + +// Playback started within rental window but renewal not received. +TEST_P(CdmUseCase_LimitedDurationLicense, Case3) { + // Allow playback within the initial renewal window. + const uint64_t cutoff = + start_of_playback_ + renewal_delay_ + renewal_recovery_; + LoadAndTerminatePlayback(start_of_playback_, cutoff); +} + +// Playback started within rental window, renewal is received, and playback +// continues. +TEST_P(CdmUseCase_LimitedDurationLicense, Case4) { + // Allow playback within the initial renewal window. + LoadAndAllowPlayback(start_of_playback_, renewal_load_time_ - kRoundTripTime, + current_cutoff_); + SleepUntilRenewalNeeded(); + RequestRenewal(kLDLRenewal); + const uint64_t start = CurrentRentalTime(); + const uint64_t cutoff = EndOfPlaybackWindow(); + RenewAndTerminate(start, renewal_load_time_, cutoff, kLDLRenewal); +} + +// Playback may be restarted. +TEST_P(CdmUseCase_LimitedDurationLicense, Case5) { + // Allow playback within the initial renewal window. + LoadAndAllowPlayback(start_of_playback_, renewal_load_time_ - kRoundTripTime, + current_cutoff_); + SleepUntilRenewalNeeded(); + RequestRenewal(kLDLRenewal); + // Continue playback for one hour (use 100 to condense test). + const uint64_t end_of_hour = renewal_load_time_ + 100; + const uint64_t start = CurrentRentalTime(); + RenewAndContinue(start, renewal_load_time_, end_of_hour, kLDLRenewal); + UnloadLicense(); + // Simulate reloading the license, and then reloading the renewal, and then + // restarting playback. That is allowed, and playback shall be terminated at + // the end of the original playback window. + const uint64_t reload_time = end_of_hour + 100; + ReloadAndAllowPlayback(reload_time, EndOfPlaybackWindow(), kLDLRenewal); + // But not beyond playback window. + SleepUntil(EndOfPlaybackWindow() + 3 * kFudge); + FailDecrypt(); +} + +// All duration tests are parameterized by can_persist = true or false. +INSTANTIATE_TEST_CASE_P(Both, CdmUseCase_LicenseWithRenewal, + ::testing::Values(false, true)); +INSTANTIATE_TEST_CASE_P(Both, CdmUseCase_LicenseWithRenewalPlayback, + ::testing::Values(false, true)); +INSTANTIATE_TEST_CASE_P(Both, CdmUseCase_LimitedDurationLicense, + ::testing::Values(false, true)); +} // namespace wvcdm diff --git a/core/test/generic_crypto_unittest.cpp b/core/test/generic_crypto_unittest.cpp index d0fe19bb..47952825 100644 --- a/core/test/generic_crypto_unittest.cpp +++ b/core/test/generic_crypto_unittest.cpp @@ -29,12 +29,9 @@ namespace wvcdm { -class WvGenericCryptoTest : public WvCdmTestBase { +class WvGenericCryptoTest : public WvCdmTestBaseWithEngine { public: - WvGenericCryptoTest() - : dummy_engine_metrics_(new metrics::EngineMetrics), - cdm_engine_(&file_system_, dummy_engine_metrics_), - holder_(&cdm_engine_) {} + WvGenericCryptoTest() : holder_(&cdm_engine_) {} void SetUp() override { WvCdmTestBase::SetUp(); @@ -74,9 +71,6 @@ class WvGenericCryptoTest : public WvCdmTestBase { } protected: - FileSystem file_system_; - std::shared_ptr dummy_engine_metrics_; - CdmEngine cdm_engine_; TestLicenseHolder holder_; KeyId ency_id_; diff --git a/core/test/parallel_operations_test.cpp b/core/test/parallel_operations_test.cpp index c0632639..995e65e9 100644 --- a/core/test/parallel_operations_test.cpp +++ b/core/test/parallel_operations_test.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -31,6 +32,8 @@ namespace wvcdm { namespace { +using HttpHeaderFields = std::map; + constexpr const int kHttpOk = 200; const std::string kCencMimeType = "cenc"; @@ -67,13 +70,9 @@ const std::vector kClearData = a2b_hex( } // namespace -class ParallelCdmTest : public WvCdmTestBase, +class ParallelCdmTest : public WvCdmTestBaseWithEngine, public ::testing::WithParamInterface { public: - ParallelCdmTest() - : dummy_engine_metrics_(new metrics::EngineMetrics()), - cdm_engine_(&file_system_, dummy_engine_metrics_) {} - void SetUp() override { WvCdmTestBase::SetUp(); EnsureProvisioned(); @@ -125,15 +124,23 @@ class ParallelCdmTest : public WvCdmTestBase, ASSERT_TRUE(url_request.is_connected()); url_request.PostRequest(key_request.message); if (url_request.GetResponse(&http_response)) { - int status_code = url_request.GetStatusCode(http_response); - ASSERT_EQ(kHttpOk, status_code); - request_ok = true; - break; - } else { - LOGW("License request failed: sid = %s, attempt = %zu", - session_id.c_str(), attempt); - std::this_thread::sleep_for(kRequestRetryWait); + const int status_code = url_request.GetStatusCode(http_response); + if (status_code == kHttpOk) { + request_ok = true; + break; + } + LOGW("License response error: code = %d, url = %s", status_code, + url.c_str()); + HttpHeaderFields fields; + if (url_request.GetDebugHeaderFields(http_response, &fields)) { + for (auto field : fields) { + LOGD(" %s: %s", field.first.c_str(), field.second.c_str()); + } + } } + LOGW("License request failed: sid = %s, attempt = %zu", + session_id.c_str(), attempt); + std::this_thread::sleep_for(kRequestRetryWait); } ASSERT_TRUE(request_ok); LicenseRequest license_request; @@ -232,10 +239,6 @@ class ParallelCdmTest : public WvCdmTestBase, ASSERT_NO_FATAL_FAILURE(CloseSession(session_id)); } } - - FileSystem file_system_; - shared_ptr dummy_engine_metrics_; - CdmEngine cdm_engine_; }; TEST_P(ParallelCdmTest, ParallelLicenseRequests) { diff --git a/core/test/policy_engine_constraints_unittest.cpp b/core/test/policy_engine_constraints_unittest.cpp index eb65d4c3..dce74ef0 100644 --- a/core/test/policy_engine_constraints_unittest.cpp +++ b/core/test/policy_engine_constraints_unittest.cpp @@ -238,7 +238,7 @@ TEST_F(PolicyEngineConstraintsTest, IsPermissiveWithoutAResolution) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->OnTimerEvent(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId1)); @@ -270,7 +270,7 @@ TEST_F(PolicyEngineConstraintsTest, HandlesResolutionsBasedOnConstraints) { .WillRepeatedly( DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(NO_ERROR))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->NotifyResolution(1, kTargetRes1); policy_engine_->OnTimerEvent(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId1)); @@ -334,7 +334,7 @@ TEST_F(PolicyEngineConstraintsTest, } policy_engine_->NotifyResolution(1, kTargetRes1); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->OnTimerEvent(); policy_engine_->OnTimerEvent(); policy_engine_->OnTimerEvent(); @@ -367,7 +367,7 @@ TEST_F(PolicyEngineConstraintsTest, HandlesConstraintOverridingHdcp) { EXPECT_CALL(crypto_session_, GetHdcpCapabilities(_, _)) .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_V2), Return(NO_ERROR))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->NotifyResolution(1, kTargetRes1); policy_engine_->OnTimerEvent(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId1)); @@ -409,7 +409,7 @@ TEST_F(PolicyEngineConstraintsTest, HandlesNoHdcp) { EXPECT_CALL(crypto_session_, GetHdcpCapabilities(_, _)) .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NONE), Return(NO_ERROR))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->NotifyResolution(1, kTargetRes1); policy_engine_->OnTimerEvent(); @@ -453,7 +453,7 @@ TEST_F(PolicyEngineConstraintsTest, UsesDefaultHdcpWhenResolutionNotSet) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->OnTimerEvent(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId1)); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId2)); diff --git a/core/test/policy_engine_unittest.cpp b/core/test/policy_engine_unittest.cpp index 6cfe95eb..b4063f73 100644 --- a/core/test/policy_engine_unittest.cpp +++ b/core/test/policy_engine_unittest.cpp @@ -206,7 +206,7 @@ TEST_F(PolicyEngineTest, PlaybackSuccess_OfflineLicense_V15) { .WillRepeatedly( DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(NO_ERROR))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); @@ -234,7 +234,7 @@ TEST_F(PolicyEngineTest, PlaybackSuccess_EntitlementLicense_V15) { key->set_type(License::KeyContainer::ENTITLEMENT); key->set_id(kEntitlementKeyId); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); @@ -266,7 +266,7 @@ TEST_F(PolicyEngineTest, PlaybackSuccess_EntitlementLicenseExpiration_V15) { key->set_type(License::KeyContainer::ENTITLEMENT); key->set_id(kEntitlementKeyId); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); @@ -297,7 +297,7 @@ TEST_F(PolicyEngineTest, PlaybackSuccess_StreamingLicense_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); @@ -320,7 +320,7 @@ TEST_F(PolicyEngineTest, PlaybackFailed_CanPlayFalse_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); policy_engine_->OnTimerEvent(); @@ -354,7 +354,7 @@ TEST_F(PolicyEngineTest, ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(3)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); for (int i = 1; i <= 3; ++i) { EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -388,7 +388,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RentalDurationPassedWithPlayback_V15) { EXPECT_CALL(check_, Call(1)); EXPECT_CALL(check_, Call(2)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 2; ++i) { @@ -423,7 +423,7 @@ TEST_F(PolicyEngineTest, PlaybackFails_PlaybackDurationExpired_V15) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(2)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 2; ++i) { @@ -459,7 +459,7 @@ TEST_F(PolicyEngineTest, ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(3)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); for (int i = 1; i <= 3; ++i) { EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -495,7 +495,7 @@ TEST_F(PolicyEngineTest, PlaybackFails_ExpiryBeforeRenewalDelay_Offline_V15) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(2)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 2; ++i) { @@ -532,7 +532,7 @@ TEST_F(PolicyEngineTest, PlaybackFails_ExpiryBeforeRenewalDelay_Streaming_V15) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(2)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 2; ++i) { @@ -567,7 +567,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RentalDuration0_V15) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(3)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); for (int i = 1; i <= 3; ++i) { EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -606,7 +606,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_PlaybackDuration0_V15) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(4)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 4; ++i) { @@ -642,7 +642,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_LicenseDuration0_V15) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(2)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 2; ++i) { @@ -673,7 +673,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_PlaybackAndRental0_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); @@ -698,7 +698,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_PlaybackAndLicense0_WithoutPlayback_V15) { EXPECT_CALL(mock_event_listener_, OnExpirationUpdate(_, kLicenseStartTime + kRentalDuration)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->OnTimerEvent(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -732,7 +732,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_PlaybackAndLicense0_WithPlayback_V15) { EXPECT_CALL(mock_event_listener_, OnExpirationUpdate(_, kLicenseStartTime + kRentalDuration)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); @@ -759,7 +759,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RentalAndLicense0_WithoutPlayback_V15) { ExpectSessionKeysChange(kKeyStatusUsable, true); EXPECT_CALL(mock_event_listener_, OnExpirationUpdate(_, 0)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->OnTimerEvent(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -789,7 +789,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RentalAndLicense0_WithPlayback_V15) { EXPECT_CALL(mock_event_listener_, OnExpirationUpdate(_, kPlaybackStartTime + kPlaybackDuration)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); @@ -823,7 +823,7 @@ TEST_F(PolicyEngineTest, EXPECT_CALL(mock_event_listener_, OnExpirationUpdate(_, kPlaybackStartTime + kPlaybackDuration)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); @@ -859,7 +859,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_Durations0_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -889,7 +889,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_LicenseWithFutureStartTime_V15) { EXPECT_CALL(mock_event_listener_, OnExpirationUpdate(_, kPlaybackStartTime + kPlaybackDuration)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->OnTimerEvent(); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); @@ -930,7 +930,7 @@ TEST_F(PolicyEngineTest, PlaybackFailed_CanRenewFalse_V15) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(3)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 3; ++i) { @@ -975,7 +975,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RenewSuccess_V15) { OnExpirationUpdate(_, new_license_start_time + kLowDuration)); EXPECT_CALL(check_, Call(3)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 2; ++i) { @@ -990,7 +990,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RenewSuccess_V15) { policy->set_playback_duration_seconds(2 * kPlaybackDuration); LicenseIdentification* id = license_.mutable_id(); id->set_version(2); - policy_engine_->UpdateLicense(license_); + policy_engine_->UpdateLicense(license_, false); policy_engine_->OnTimerEvent(); check_.Call(3); @@ -1034,7 +1034,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RenewSuccess_WithFutureStartTime_V15) { ExpectSessionKeysChange(kKeyStatusUsable, true); EXPECT_CALL(check_, Call(4)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 2; ++i) { @@ -1047,7 +1047,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RenewSuccess_WithFutureStartTime_V15) { license_.set_license_start_time(new_license_start_time); LicenseIdentification* id = license_.mutable_id(); id->set_version(2); - policy_engine_->UpdateLicense(license_); + policy_engine_->UpdateLicense(license_, false); policy_engine_->OnTimerEvent(); check_.Call(3); @@ -1088,7 +1088,7 @@ TEST_F(PolicyEngineTest, LicenseExpired_RenewFailedVersionNotUpdated_V15) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(4)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); for (int i = 1; i <= 2; ++i) { EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -1100,7 +1100,7 @@ TEST_F(PolicyEngineTest, LicenseExpired_RenewFailedVersionNotUpdated_V15) { license_.set_license_start_time(kLicenseStartTime + license_renewal_delay + 30); - policy_engine_->UpdateLicense(license_); + policy_engine_->UpdateLicense(license_, false); policy_engine_->OnTimerEvent(); check_.Call(3); @@ -1156,7 +1156,7 @@ TEST_F(PolicyEngineTest, PlaybackFailed_RepeatedRenewFailures_V15) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(8)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 8; ++i) { @@ -1222,7 +1222,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RenewSuccessAfterExpiry_V15) { OnExpirationUpdate(_, kPlaybackStartTime + new_playback_duration)); EXPECT_CALL(check_, Call(10)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 9; ++i) { @@ -1238,7 +1238,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RenewSuccessAfterExpiry_V15) { policy->set_playback_duration_seconds(new_playback_duration); policy->set_license_duration_seconds(new_license_duration); - policy_engine_->UpdateLicense(license_); + policy_engine_->UpdateLicense(license_, false); policy_engine_->OnTimerEvent(); check_.Call(10); @@ -1288,7 +1288,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RenewSuccessAfterFailures_V15) { EXPECT_CALL(check_, Call(6)); EXPECT_CALL(check_, Call(7)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 5; ++i) { @@ -1300,7 +1300,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RenewSuccessAfterFailures_V15) { license_.set_license_start_time(new_license_start_time); LicenseIdentification* id = license_.mutable_id(); id->set_version(2); - policy_engine_->UpdateLicense(license_); + policy_engine_->UpdateLicense(license_, false); for (int i = 6; i <= 7; ++i) { EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -1344,7 +1344,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RenewedWithUsage_V15) { OnExpirationUpdate(_, kPlaybackStartTime + new_playback_duration)); EXPECT_CALL(check_, Call(3)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->OnTimerEvent(); check_.Call(1); @@ -1361,7 +1361,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RenewedWithUsage_V15) { policy->set_renew_with_usage(false); LicenseIdentification* id = license_.mutable_id(); id->set_version(2); - policy_engine_->UpdateLicense(license_); + policy_engine_->UpdateLicense(license_, false); policy_engine_->OnTimerEvent(); check_.Call(3); @@ -1395,7 +1395,7 @@ TEST_F(PolicyEngineTest, MultipleKeysInLicense) { ExpectSessionKeysChange(kKeyStatusUsable, kKeyStatusUsable, true); EXPECT_CALL(mock_event_listener_, OnExpirationUpdate(_, _)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); EXPECT_TRUE(policy_engine_->CanDecryptContent(kAnotherKeyId)); EXPECT_FALSE(policy_engine_->CanDecryptContent(kSigningKeyId)); @@ -1430,7 +1430,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_SoftEnforcePlaybackDuration_V15) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(4)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 4; ++i) { @@ -1457,12 +1457,10 @@ TEST_F(PolicyEngineTest, LicenseExpired_SoftEnforceLoadBeforeExpire_V15) { InSequence seq; ExpectSessionKeysChange(kKeyStatusUsable, true); - EXPECT_CALL(mock_event_listener_, - OnExpirationUpdate(_, kLicenseStartTime + kRentalDuration)); EXPECT_CALL(mock_event_listener_, OnExpirationUpdate(_, kLicenseStartTime + kLicenseDuration)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, true); policy_engine_->RestorePlaybackTimes(kPlaybackStartTime, kPlaybackStartTime, kPlaybackStartTime); policy_engine_->OnTimerEvent(); @@ -1484,14 +1482,9 @@ TEST_F(PolicyEngineTest, LicenseExpired_SoftEnforceLoadAfterExpire_V15) { Return(GET_HDCP_CAPABILITY_FAILED))); InSequence seq; - ExpectSessionKeysChange(kKeyStatusUsable, true); - EXPECT_CALL(mock_event_listener_, - OnExpirationUpdate(_, kLicenseStartTime + kRentalDuration)); - EXPECT_CALL(mock_event_listener_, - OnExpirationUpdate(_, kPlaybackStartTime + kPlaybackDuration)); ExpectSessionKeysChange(kKeyStatusExpired, false); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, true); policy_engine_->RestorePlaybackTimes(kPlaybackStartTime, kPlaybackStartTime, kPlaybackStartTime); policy_engine_->OnTimerEvent(); @@ -1528,7 +1521,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_GracePeriod_V15) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(4)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 4; ++i) { @@ -1571,7 +1564,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_GracePeriodWithLoad_V15) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(4)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, true); policy_engine_->RestorePlaybackTimes(kPlaybackStartTime, kPlaybackStartTime, 0); policy_engine_->BeginDecryption(); @@ -1602,14 +1595,9 @@ TEST_F(PolicyEngineTest, PlaybackOk_GracePeriodWithExpiredLoad_V15) { Return(GET_HDCP_CAPABILITY_FAILED))); InSequence seq; - ExpectSessionKeysChange(kKeyStatusUsable, true); - EXPECT_CALL(mock_event_listener_, - OnExpirationUpdate(_, kLicenseStartTime + kRentalDuration)); - EXPECT_CALL(mock_event_listener_, - OnExpirationUpdate(_, kPlaybackStartTime + kPlaybackDuration)); ExpectSessionKeysChange(kKeyStatusExpired, false); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, true); policy_engine_->RestorePlaybackTimes(kPlaybackStartTime, kPlaybackStartTime, kPlaybackStartTime); @@ -1639,7 +1627,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_CanStoreGracePeriod_V15) { EXPECT_CALL(mock_event_listener_, OnExpirationUpdate(_, kPlaybackStartTime + kPlaybackDuration)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); @@ -1649,6 +1637,28 @@ TEST_F(PolicyEngineTest, PlaybackOk_CanStoreGracePeriod_V15) { EXPECT_EQ(kPlaybackStartTime, policy_engine_->GetGracePeriodEndTime()); } +TEST_F(PolicyEngineTest, PlaybackOk_RestoreWithoutPlaybackTimes_V15) { + EXPECT_CALL(*mock_clock_, GetCurrentTime()) + .WillOnce(Return(kLicenseStartTime + 1)) + .WillOnce(Return(kLicenseStartTime + 15)) + .WillOnce(Return(kLicenseStartTime + 30)); + + EXPECT_CALL(crypto_session_, GetHdcpCapabilities(_, _)) + .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), + Return(GET_HDCP_CAPABILITY_FAILED))); + + InSequence seq; + ExpectSessionKeysChange(kKeyStatusUsable, true); + EXPECT_CALL(mock_event_listener_, + OnExpirationUpdate(_, kLicenseStartTime + kRentalDuration)); + + policy_engine_->SetLicense(license_, false, true); + policy_engine_->OnTimerEvent(); + policy_engine_->OnTimerEvent(); + + EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); +} + struct KeySecurityLevelParams { bool is_security_level_set; License::KeyContainer::SecurityLevel security_level; @@ -1689,25 +1699,25 @@ TEST_P(PolicyEngineKeySecurityLevelTest, CanUseKeyForSecurityLevel) { EXPECT_CALL(mock_event_listener_, OnExpirationUpdate(_, _)); SetCdmSecurityLevel(kSecurityLevelL1); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); EXPECT_EQ(param->expect_can_L1_use_key, policy_engine_->CanUseKeyForSecurityLevel(kKeyId)); SetCdmSecurityLevel(kSecurityLevelL2); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); EXPECT_EQ(param->expect_can_L2_use_key, policy_engine_->CanUseKeyForSecurityLevel(kKeyId)); SetCdmSecurityLevel(kSecurityLevelL3); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); EXPECT_EQ(param->expect_can_L3_use_key, policy_engine_->CanUseKeyForSecurityLevel(kKeyId)); SetCdmSecurityLevel(kSecurityLevelUnknown); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); EXPECT_EQ(param->expect_can_level_unknown_use_key, policy_engine_->CanUseKeyForSecurityLevel(kKeyId)); @@ -1848,7 +1858,7 @@ TEST_F(PolicyEngineKeyAllowedUsageTest, AllowedUsageBasic) { ExpectSessionKeysChange(kKeyStatusUsable, kKeyStatusUsable, true); EXPECT_CALL(mock_event_listener_, OnExpirationUpdate(_, _)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); ExpectSecureContentKey(kKeyId, kHardwareSecureAll); ExpectLessSecureContentKey(kAnotherKeyId, kKeySecurityLevelUnset); @@ -1908,7 +1918,7 @@ TEST_F(PolicyEngineKeyAllowedUsageTest, AllowedUsageGeneric) { ExpectSessionKeysChange(kKeyStatusUsable, kKeyStatusUsable, true); EXPECT_CALL(mock_event_listener_, OnExpirationUpdate(_, _)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); ExpectSecureContentKey(kKeyId, kHardwareSecureDecode); ExpectLessSecureContentKey(kAnotherKeyId, kHardwareSecureCrypto); @@ -1957,7 +1967,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_LicenseStartTimeNotSet_V15) { EXPECT_CALL(*mock_clock_, GetCurrentTime()) .WillOnce(Return(kLicenseStartTime + 1)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); CdmQueryMap query_info; EXPECT_EQ(NO_ERROR, policy_engine_->Query(&query_info)); @@ -1973,7 +1983,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); CdmQueryMap query_info; EXPECT_EQ(NO_ERROR, policy_engine_->Query(&query_info)); @@ -1999,7 +2009,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_PlaybackNotBegun_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); CdmQueryMap query_info; EXPECT_EQ(NO_ERROR, policy_engine_->Query(&query_info)); @@ -2039,7 +2049,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_PlaybackBegun_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); CdmQueryMap query_info; EXPECT_EQ(NO_ERROR, policy_engine_->Query(&query_info)); @@ -2092,7 +2102,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_Offline_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->OnTimerEvent(); @@ -2122,7 +2132,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_InitialRentalDurationExpired_V15) { .WillOnce(Return(kLicenseStartTime + kLowDuration + 1)) .WillOnce(Return(kLicenseStartTime + kLowDuration + 5)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); @@ -2144,7 +2154,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_InitialLicenseDurationExpired_V15) { .WillOnce(Return(kLicenseStartTime + kLowDuration + 1)) .WillOnce(Return(kLicenseStartTime + kLowDuration + 5)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); @@ -2179,7 +2189,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_CanPlayFalse_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); policy_engine_->OnTimerEvent(); @@ -2218,7 +2228,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_RentalDurationExpired_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -2260,7 +2270,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_PlaybackDurationExpired_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -2298,7 +2308,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_LicenseDurationExpired_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -2340,7 +2350,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_RentalDuration0_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -2385,7 +2395,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_PlaybackDuration0_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -2439,7 +2449,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_LicenseDuration0_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -2477,7 +2487,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_PlaybackAndRental0_V15) { .WillOnce(Return(kLicenseStartTime + kLowDuration + 10)) .WillOnce(Return(kLicenseStartTime + kLowDuration + 10)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); @@ -2526,7 +2536,7 @@ TEST_F(PolicyEngineQueryTest, .WillOnce(Return(kLicenseStartTime + kRentalDuration + 10)) .WillOnce(Return(kLicenseStartTime + kRentalDuration + 10)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->OnTimerEvent(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -2584,7 +2594,7 @@ TEST_F(PolicyEngineQueryTest, .WillOnce(Return(kLicenseStartTime + kRentalDuration + 10)) .WillOnce(Return(kLicenseStartTime + kRentalDuration + 10)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); @@ -2653,7 +2663,7 @@ TEST_F(PolicyEngineQueryTest, .WillOnce(Return(kLicenseStartTime + kPlaybackDuration + 10)) .WillOnce(Return(kLicenseStartTime + kPlaybackDuration + 10)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->OnTimerEvent(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -2707,7 +2717,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_RentalAndLicense0_WithPlayback_V15) { .WillOnce(Return(kPlaybackStartTime + kPlaybackDuration + 10)) .WillOnce(Return(kPlaybackStartTime + kPlaybackDuration + 10)); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); @@ -2777,7 +2787,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_Durations0_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -2814,7 +2824,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_LicenseWithFutureStartTime_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->OnTimerEvent(); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); @@ -2869,7 +2879,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_Renew_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -2884,7 +2894,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_Renew_V15) { 15); LicenseIdentification* id = license_.mutable_id(); id->set_version(2); - policy_engine_->UpdateLicense(license_); + policy_engine_->UpdateLicense(license_, false); policy_engine_->OnTimerEvent(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -2926,7 +2936,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_RenewWithFutureStartTime_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -2941,7 +2951,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_RenewWithFutureStartTime_V15) { kLicenseRenewalRetryInterval + 20); LicenseIdentification* id = license_.mutable_id(); id->set_version(2); - policy_engine_->UpdateLicense(license_); + policy_engine_->UpdateLicense(license_, false); policy_engine_->OnTimerEvent(); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); @@ -3005,7 +3015,7 @@ TEST_F(PolicyEngineTest, SetLicenseForReleaseAfterSetLicense_V15) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, false); + policy_engine_->SetLicense(license_, false, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -3038,7 +3048,7 @@ TEST_F(PolicyEngineTest, PlaybackSuccess_V16) { .WillRepeatedly( DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(NO_ERROR))); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); @@ -3063,7 +3073,7 @@ TEST_F(PolicyEngineTest, PlaybackFailed_CanPlayFalse_V16) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); policy_engine_->OnTimerEvent(); @@ -3098,7 +3108,7 @@ TEST_F(PolicyEngineTest, ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(3)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); for (int i = 1; i <= 3; ++i) { EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -3136,7 +3146,7 @@ TEST_F( ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(3)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); for (int i = 1; i <= 3; ++i) { EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -3171,7 +3181,7 @@ TEST_F(PolicyEngineTest, PlaybackFails_RentalDurationPassedWithPlayback_V16) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(2)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 2; ++i) { @@ -3210,7 +3220,7 @@ TEST_F( EXPECT_CALL(check_, Call(1)); EXPECT_CALL(check_, Call(2)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 2; ++i) { @@ -3248,7 +3258,7 @@ TEST_F(PolicyEngineTest, PlaybackFails_PlaybackDurationExpired_V16) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(2)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 2; ++i) { @@ -3284,7 +3294,7 @@ TEST_F(PolicyEngineTest, EXPECT_CALL(check_, Call(1)); EXPECT_CALL(check_, Call(2)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 2; ++i) { @@ -3324,7 +3334,7 @@ TEST_F(PolicyEngineTest, LicenseOk_LicenseDurationExpiredWithoutPlayback_V16) { EXPECT_CALL(check_, Call(2)); EXPECT_CALL(check_, Call(3)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); for (int i = 1; i <= 3; ++i) { EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -3362,7 +3372,7 @@ TEST_F(PolicyEngineTest, LicenseOk_LicenseDurationExpiredWithPlayback_V16) { EXPECT_CALL(check_, Call(2)); EXPECT_CALL(check_, Call(3)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 3; ++i) { @@ -3401,7 +3411,7 @@ TEST_F(PolicyEngineTest, PlaybackFails_ExpiryBeforeRenewalDelay_V16) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(2)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 2; ++i) { @@ -3436,7 +3446,7 @@ TEST_F(PolicyEngineTest, LicenseOk_RentalDuration0_V16) { EXPECT_CALL(check_, Call(2)); EXPECT_CALL(check_, Call(3)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); for (int i = 1; i <= 3; ++i) { EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -3474,7 +3484,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RentalDuration0_V16) { OnExpirationUpdate(_, kLicenseStartTime + kLicenseDuration + 10 + kPlaybackDuration)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); for (int i = 1; i <= 3; ++i) { EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -3515,7 +3525,7 @@ TEST_F(PolicyEngineTest, PlaybackFails_PlaybackDuration0_V16) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(4)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 4; ++i) { @@ -3556,7 +3566,7 @@ TEST_F(PolicyEngineTest, EXPECT_CALL(check_, Call(3)); EXPECT_CALL(check_, Call(4)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 4; ++i) { @@ -3596,7 +3606,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_PlaybackAndRental0_V16) { EXPECT_CALL(check_, Call(3)); EXPECT_CALL(check_, Call(4)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 4; ++i) { @@ -3631,7 +3641,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_LicenseWithFutureStartTime_V16) { EXPECT_CALL(mock_event_listener_, OnExpirationUpdate(_, kPlaybackStartTime + kPlaybackDuration)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->OnTimerEvent(); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); @@ -3674,7 +3684,7 @@ TEST_F(PolicyEngineTest, PlaybackFailed_CanRenewFalse_V16) { ExpectSessionKeysChange(kKeyStatusExpired, false); EXPECT_CALL(check_, Call(3)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 3; ++i) { @@ -3721,7 +3731,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RenewSuccess_V16) { EXPECT_CALL(check_, Call(2)); EXPECT_CALL(check_, Call(3)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 2; ++i) { @@ -3736,7 +3746,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RenewSuccess_V16) { policy->set_renewal_delay_seconds(new_license_start_time); LicenseIdentification* id = license_.mutable_id(); id->set_version(2); - policy_engine_->UpdateLicense(license_); + policy_engine_->UpdateLicense(license_, false); policy_engine_->OnTimerEvent(); check_.Call(3); @@ -3744,7 +3754,9 @@ TEST_F(PolicyEngineTest, PlaybackOk_RenewSuccess_V16) { EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); } -TEST_F(PolicyEngineTest, PlaybackOk_RenewSuccess_WithFutureStartTime_V16) { +// TODO(b/161992421): Rewrite after clarifying expected behavior +TEST_F(PolicyEngineTest, + DISABLED_PlaybackOk_RenewSuccess_WithFutureStartTime_V16) { License_Policy* policy = license_.mutable_policy(); policy->set_can_renew(true); const int64_t license_renewal_delay = @@ -3783,7 +3795,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RenewSuccess_WithFutureStartTime_V16) { EXPECT_CALL(mock_event_listener_, OnSessionRenewalNeeded(_)); EXPECT_CALL(check_, Call(4)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); for (int i = 1; i <= 2; ++i) { @@ -3796,7 +3808,7 @@ TEST_F(PolicyEngineTest, PlaybackOk_RenewSuccess_WithFutureStartTime_V16) { license_.set_license_start_time(new_license_start_time); LicenseIdentification* id = license_.mutable_id(); id->set_version(2); - policy_engine_->UpdateLicense(license_); + policy_engine_->UpdateLicense(license_, false); policy_engine_->OnTimerEvent(); check_.Call(3); @@ -3838,7 +3850,7 @@ TEST_F(PolicyEngineTest, LicenseExpired_RenewFailedVersionNotUpdated_V16) { EXPECT_CALL(mock_event_listener_, OnSessionRenewalNeeded(_)); EXPECT_CALL(check_, Call(4)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); for (int i = 1; i <= 2; ++i) { EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -3850,7 +3862,7 @@ TEST_F(PolicyEngineTest, LicenseExpired_RenewFailedVersionNotUpdated_V16) { license_.set_license_start_time(kLicenseStartTime + license_renewal_delay + 30); - policy_engine_->UpdateLicense(license_); + policy_engine_->UpdateLicense(license_, false); policy_engine_->OnTimerEvent(); check_.Call(3); @@ -3883,7 +3895,7 @@ TEST_F(PolicyEngineTest, PlaybackSuccess_EntitlementLicense_V16) { key->set_type(License::KeyContainer::ENTITLEMENT); key->set_id(kEntitlementKeyId); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); @@ -3912,7 +3924,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_LicenseStartTimeNotSet_V16) { EXPECT_CALL(*mock_clock_, GetCurrentTime()) .WillOnce(Return(kLicenseStartTime + 1)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); CdmQueryMap query_info; EXPECT_EQ(NO_ERROR, policy_engine_->Query(&query_info)); @@ -3932,7 +3944,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_V16) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); CdmQueryMap query_info; EXPECT_EQ(NO_ERROR, policy_engine_->Query(&query_info)); @@ -3962,7 +3974,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_PlaybackNotBegun_V16) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); CdmQueryMap query_info; EXPECT_EQ(NO_ERROR, policy_engine_->Query(&query_info)); @@ -4006,7 +4018,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_PlaybackBegun_V16) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); CdmQueryMap query_info; EXPECT_EQ(NO_ERROR, policy_engine_->Query(&query_info)); @@ -4049,7 +4061,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_InitialRentalDurationExpired_V16) { .WillOnce(Return(kLicenseStartTime + kLowDuration + 1)) .WillOnce(Return(kLicenseStartTime + kLowDuration + 5)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); @@ -4086,7 +4098,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_CanPlayFalse_V16) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); policy_engine_->OnTimerEvent(); @@ -4127,7 +4139,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_RentalDurationExpired_V16) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -4171,7 +4183,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_PlaybackDurationExpired_V16) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -4214,7 +4226,7 @@ TEST_F(PolicyEngineQueryTest, .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -4260,7 +4272,7 @@ TEST_F(PolicyEngineQueryTest, .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -4305,7 +4317,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_RentalDuration0_V16) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -4353,7 +4365,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_PlaybackDuration0_V16) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -4409,7 +4421,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_PlaybackAndRental0_V16) { .WillOnce(Return(kLicenseStartTime + kLowDuration + 10)) .WillOnce(Return(kLicenseStartTime + kLowDuration + 10)); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); @@ -4461,7 +4473,7 @@ TEST_F(PolicyEngineQueryTest, QuerySuccess_LicenseWithFutureStartTime_V16) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->OnTimerEvent(); EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); @@ -4534,7 +4546,7 @@ TEST_F(PolicyEngineTest, SetLicenseForReleaseAfterSetLicense_V16) { .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), Return(GET_HDCP_CAPABILITY_FAILED))); - policy_engine_->SetLicense(license_, true); + policy_engine_->SetLicense(license_, true, false); policy_engine_->BeginDecryption(); policy_engine_->OnTimerEvent(); EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); @@ -4548,4 +4560,30 @@ TEST_F(PolicyEngineTest, SetLicenseForReleaseAfterSetLicense_V16) { EXPECT_FALSE(policy_engine_->CanDecryptContent(kKeyId)); } +TEST_F(PolicyEngineTest, PlaybackOk_RestoreWithoutPlaybackTimes_V16) { + License_Policy* policy = license_.mutable_policy(); + policy->set_soft_enforce_rental_duration(false); + policy->set_soft_enforce_playback_duration(false); + + EXPECT_CALL(*mock_clock_, GetCurrentTime()) + .WillOnce(Return(kLicenseStartTime + 1)) + .WillOnce(Return(kLicenseStartTime + 15)) + .WillOnce(Return(kLicenseStartTime + 30)); + + EXPECT_CALL(crypto_session_, GetHdcpCapabilities(_, _)) + .WillRepeatedly(DoAll(SetArgPointee<0>(HDCP_NO_DIGITAL_OUTPUT), + Return(GET_HDCP_CAPABILITY_FAILED))); + + InSequence seq; + ExpectSessionKeysChange(kKeyStatusUsable, true); + EXPECT_CALL(mock_event_listener_, + OnExpirationUpdate(_, kLicenseStartTime + kRentalDuration)); + + policy_engine_->SetLicense(license_, false, true); + policy_engine_->OnTimerEvent(); + policy_engine_->OnTimerEvent(); + + EXPECT_TRUE(policy_engine_->CanDecryptContent(kKeyId)); +} + } // namespace wvcdm diff --git a/core/test/policy_integration_test.cpp b/core/test/policy_integration_test.cpp new file mode 100644 index 00000000..75d948f3 --- /dev/null +++ b/core/test/policy_integration_test.cpp @@ -0,0 +1,195 @@ +// Copyright 2020 Google LLC. All Rights Reserved. This file and proprietary +// source code may only be used and distributed under the Widevine Master +// License Agreement. + +// These tests perform various end-to-end actions similar to what an application +// would do. They verify that policies specified on UAT are honored on the +// device. + +#include +#include + +#include +#include + +#include "cdm_engine.h" +#include "clock.h" +#include "config_test_env.h" +#include "initialization_data.h" +#include "license_request.h" +#include "log.h" +#include "metrics_collections.h" +#include "test_base.h" +#include "test_printers.h" +#include "test_sleep.h" +#include "url_request.h" +#include "wv_cdm_constants.h" +#include "wv_cdm_types.h" + +namespace wvcdm { + +namespace { +constexpr int kHttpOk = 200; +const std::string kCencMimeType = "cenc"; +} // namespace + +// Core Policy Integration Test +class CorePIGTest : public WvCdmTestBaseWithEngine { + protected: + void SetUp() override { + WvCdmTestBase::SetUp(); + EnsureProvisioned(); + } + + void OpenSession(CdmSessionId* session_id) { + CdmResponseType status = cdm_engine_.OpenSession( + config_.key_system(), nullptr, nullptr, session_id); + ASSERT_EQ(NO_ERROR, status); + ASSERT_TRUE(cdm_engine_.IsOpenSession(*session_id)); + } + + void CloseSession(const CdmSessionId& session_id) { + CdmResponseType status = cdm_engine_.CloseSession(session_id); + ASSERT_EQ(NO_ERROR, status); + ASSERT_FALSE(cdm_engine_.IsOpenSession(session_id)); + } + + // Create a license request for the given content_id and requesting the + // specified license_type. + void GenerateKeyRequest(const CdmSessionId& session_id, + const std::string& content_id, + CdmKeyRequest* key_request, + CdmLicenseType license_type) { + video_widevine::WidevinePsshData pssh; + pssh.set_content_id(content_id); + const std::string init_data_string = MakePSSH(pssh); + const InitializationData init_data(kCencMimeType, init_data_string); + init_data.DumpToLogs(); + CdmAppParameterMap empty_app_parameters; + CdmKeySetId empty_key_set_id; + CdmResponseType result = cdm_engine_.GenerateKeyRequest( + session_id, empty_key_set_id, init_data, license_type, + empty_app_parameters, key_request); + ASSERT_EQ(KEY_MESSAGE, result); + ASSERT_EQ(kKeyRequestTypeInitial, key_request->type); + } + + // Send the request to the server and get the response. + void GetKeyResponse(const CdmKeyRequest& key_request, + std::string* key_response) { + const std::string url = config_.license_server() + config_.client_auth(); + UrlRequest url_request(url); + ASSERT_TRUE(url_request.is_connected()); + + std::string http_response; + url_request.PostRequest(key_request.message); + ASSERT_TRUE(url_request.GetResponse(&http_response)); + int status_code = url_request.GetStatusCode(http_response); + ASSERT_EQ(kHttpOk, status_code); + + LicenseRequest license_request; + license_request.GetDrmMessage(http_response, *key_response); + } + + // Load the license response into the specified session. Verify it has the + // correct license type (either streaming or offline). + void AddKey(const CdmSessionId& session_id, const std::string& key_response, + CdmLicenseType expected_license_type, CdmKeySetId* key_set_id) { + CdmLicenseType license_type; + CdmResponseType status = + cdm_engine_.AddKey(session_id, key_response, &license_type, key_set_id); + ASSERT_EQ(KEY_ADDED, status); + ASSERT_EQ(expected_license_type, license_type); + } + + // Reload the license response into the specified session. + void RestoreKey(const CdmSessionId& session_id, + const CdmKeySetId& key_set_id) { + CdmResponseType status = cdm_engine_.RestoreKey(session_id, key_set_id); + ASSERT_EQ(KEY_ADDED, status); + } + + // Use the key to decrypt. + void Decrypt(const CdmSessionId& session_id, const KeyId& key_id) { + constexpr size_t buffer_size = 500; + const std::vector input(buffer_size, 0); + std::vector output(buffer_size, 0); + const std::vector iv(KEY_IV_SIZE, 0); + Decrypt(session_id, key_id, input, iv, &output, NO_ERROR); + } + + // Try to use the key to decrypt, but expect the key has expired. + void FailDecrypt(const CdmSessionId& session_id, const KeyId& key_id) { + constexpr size_t buffer_size = 500; + const std::vector input(buffer_size, 0); + std::vector output(buffer_size, 0); + const std::vector iv(KEY_IV_SIZE, 0); + Decrypt(session_id, key_id, input, iv, &output, NEED_KEY); + } + + void Decrypt(const CdmSessionId& session_id, const KeyId& key_id, + const std::vector& input, + const std::vector& iv, std::vector* output, + CdmResponseType expected_status) { + CdmDecryptionParametersV16 params(key_id); + params.is_secure = false; + CdmDecryptionSample sample(input.data(), output->data(), 0, input.size(), + iv); + CdmDecryptionSubsample subsample(0, input.size()); + sample.subsamples.push_back(subsample); + params.samples.push_back(sample); + + CdmResponseType status = cdm_engine_.DecryptV16(session_id, params); + ASSERT_EQ(expected_status, status); + } +}; + +// An offline license with nonce not required. +TEST_F(CorePIGTest, OfflineNoNonce) { + const std::string content_id = "2015_tears"; + const KeyId key_id = "0000000000000000"; + + const CdmLicenseType license_type = kLicenseTypeOffline; + CdmSessionId session_id; + ASSERT_NO_FATAL_FAILURE(OpenSession(&session_id)); + CdmKeyRequest key_request; + ASSERT_NO_FATAL_FAILURE( + GenerateKeyRequest(session_id, content_id, &key_request, license_type)); + std::string key_response; + ASSERT_NO_FATAL_FAILURE(GetKeyResponse(key_request, &key_response)); + CdmKeySetId key_set_id; + ASSERT_NO_FATAL_FAILURE( + AddKey(session_id, key_response, license_type, &key_set_id)); + ASSERT_NO_FATAL_FAILURE(Decrypt(session_id, key_id)); + ASSERT_NO_FATAL_FAILURE(CloseSession(session_id)); + ASSERT_NO_FATAL_FAILURE(OpenSession(&session_id)); + ASSERT_NO_FATAL_FAILURE(RestoreKey(session_id, key_set_id)); + ASSERT_NO_FATAL_FAILURE(Decrypt(session_id, key_id)); + ASSERT_NO_FATAL_FAILURE(CloseSession(session_id)); +} + +// An offline license with nonce and provider session token. +TEST_F(CorePIGTest, OfflineWithPST) { + const std::string content_id = "offline_clip2"; + const KeyId key_id = + "\x32\x60\xF3\x9E\x12\xCC\xF6\x53\x52\x99\x90\x16\x8A\x35\x83\xFF"; + const CdmLicenseType license_type = kLicenseTypeOffline; + CdmSessionId session_id; + ASSERT_NO_FATAL_FAILURE(OpenSession(&session_id)); + CdmKeyRequest key_request; + ASSERT_NO_FATAL_FAILURE( + GenerateKeyRequest(session_id, content_id, &key_request, license_type)); + std::string key_response; + ASSERT_NO_FATAL_FAILURE(GetKeyResponse(key_request, &key_response)); + CdmKeySetId key_set_id; + ASSERT_NO_FATAL_FAILURE( + AddKey(session_id, key_response, license_type, &key_set_id)); + ASSERT_NO_FATAL_FAILURE(Decrypt(session_id, key_id)); + ASSERT_NO_FATAL_FAILURE(CloseSession(session_id)); + ASSERT_NO_FATAL_FAILURE(OpenSession(&session_id)); + ASSERT_NO_FATAL_FAILURE(RestoreKey(session_id, key_set_id)); + ASSERT_NO_FATAL_FAILURE(Decrypt(session_id, key_id)); + ASSERT_NO_FATAL_FAILURE(CloseSession(session_id)); +} + +} // namespace wvcdm diff --git a/core/test/test_base.cpp b/core/test/test_base.cpp index b527645b..7496bb2c 100644 --- a/core/test/test_base.cpp +++ b/core/test/test_base.cpp @@ -290,8 +290,8 @@ void WvCdmTestBase::Provision() { if (config_.provisioning_server() == "fake") { LOGD("Using fake provisioning server."); - CdmEngine cdm_engine(&file_system, - std::shared_ptr(new EngineMetrics)); + TestCdmEngine cdm_engine(&file_system, + std::shared_ptr(new EngineMetrics)); FakeProvisioningServer server; CdmResponseType result = cdm_engine.GetProvisioningRequest( cert_type, cert_authority, server.service_certificate(), kLevelDefault, @@ -309,8 +309,8 @@ void WvCdmTestBase::Provision() { EXPECT_EQ(NO_ERROR, result); } else { // TODO(fredgc): provision for different SPOIDs. - CdmEngine cdm_engine(&file_system, - std::shared_ptr(new EngineMetrics)); + TestCdmEngine cdm_engine(&file_system, + std::shared_ptr(new EngineMetrics)); CdmResponseType result = cdm_engine.GetProvisioningRequest( cert_type, cert_authority, config_.provisioning_service_certificate(), @@ -387,8 +387,8 @@ void WvCdmTestBase::Provision() { void WvCdmTestBase::EnsureProvisioned() { CdmSessionId session_id; FileSystem file_system; - CdmEngine cdm_engine(&file_system, - std::shared_ptr(new EngineMetrics)); + TestCdmEngine cdm_engine(&file_system, + std::shared_ptr(new EngineMetrics)); CdmResponseType status = cdm_engine.OpenSession(config_.key_system(), nullptr, nullptr, &session_id); if (status == NEED_PROVISIONING) { diff --git a/core/test/test_base.h b/core/test/test_base.h index c6ba927f..e7d4a435 100644 --- a/core/test/test_base.h +++ b/core/test/test_base.h @@ -76,6 +76,27 @@ class WvCdmTestBase : public ::testing::Test { bool binary_provisioning_; }; +// This just makes the constructor public so that we can create one with dummy +// metrics and file system. +class TestCdmEngine : public CdmEngine { + public: + TestCdmEngine(FileSystem* file_system, + std::shared_ptr metrics) + : CdmEngine(file_system, metrics) {} +}; + +class WvCdmTestBaseWithEngine : public WvCdmTestBase { + public: + WvCdmTestBaseWithEngine() + : dummy_engine_metrics_(new metrics::EngineMetrics()), + cdm_engine_(&file_system_, dummy_engine_metrics_) {} + + protected: + FileSystem file_system_; + shared_ptr dummy_engine_metrics_; + TestCdmEngine cdm_engine_; +}; + class TestCryptoSession : public CryptoSession { public: explicit TestCryptoSession(metrics::CryptoMetrics* crypto_metrics); diff --git a/core/test/test_printers.cpp b/core/test/test_printers.cpp index b88b8910..05ea0660 100644 --- a/core/test/test_printers.cpp +++ b/core/test/test_printers.cpp @@ -596,6 +596,9 @@ void PrintTo(const enum CdmResponseType& value, ::std::ostream* os) { case NO_MATCHING_ENTITLEMENT_KEY: *os << "NO_MATCHING_ENTITLEMENT_KEY"; break; + case NO_SRM_VERSION: + *os << "NO_SRM_VERSION"; + break; case NONCE_GENERATION_ERROR: *os << "NONCE_GENERATION_ERROR"; break; @@ -722,6 +725,9 @@ void PrintTo(const enum CdmResponseType& value, ::std::ostream* os) { case RESTORE_OFFLINE_LICENSE_ERROR_2: *os << "RESTORE_OFFLINE_LICENSE_ERROR_2"; break; + case RESTORE_OFFLINE_LICENSE_ERROR_3: + *os << "RESTORE_OFFLINE_LICENSE_ERROR_3"; + break; case REWRAP_DEVICE_RSA_KEY_ERROR: *os << "REWRAP_DEVICE_RSA_KEY_ERROR"; break; diff --git a/core/test/url_request.cpp b/core/test/url_request.cpp index 2f89e07a..ba7f7ef1 100644 --- a/core/test/url_request.cpp +++ b/core/test/url_request.cpp @@ -21,6 +21,10 @@ const int kConnectTimeoutMs = 15000; const int kWriteTimeoutMs = 12000; const int kReadTimeoutMs = 12000; +const std::string kGoogleHeaderUpper("X-Google"); +const std::string kGoogleHeaderLower("x-google"); +const std::string kCrLf("\r\n"); + // Concatenate all chunks into one blob and returns the response with // header information. void ConcatenateChunkedResponse(const std::string http_response, @@ -37,7 +41,7 @@ void ConcatenateChunkedResponse(const std::string http_response, sscanf(&http_response[chunk_size_pos], "%zx", &chunk_size); if (chunk_size > http_response.size()) { // precaution, in case we misread chunk size - LOGE("invalid chunk size %u", chunk_size); + LOGE("Invalid chunk size %zu", chunk_size); return; } @@ -48,7 +52,6 @@ void ConcatenateChunkedResponse(const std::string http_response, // chunk size\r\n // chunk data\r\n // 0\r\n - const std::string kCrLf = "\r\n"; size_t chunk_pos = http_response.find(kCrLf, chunk_size_pos); modified_response->assign(http_response, 0, chunk_size_pos); @@ -61,7 +64,7 @@ void ConcatenateChunkedResponse(const std::string http_response, sscanf(&http_response[chunk_size_pos], "%zx", &chunk_size); if (chunk_size > http_response.size()) { // precaution, in case we misread chunk size - LOGE("invalid chunk size %u", chunk_size); + LOGE("Invalid chunk size %zu", chunk_size); break; } chunk_pos = http_response.find(kCrLf, chunk_size_pos); @@ -101,11 +104,12 @@ bool UrlRequest::GetResponse(std::string* message) { // non-blocking mode. while (true) { char read_buffer[kReadBufferSize]; - int bytes = socket_.Read(read_buffer, sizeof(read_buffer), kReadTimeoutMs); + const int bytes = + socket_.Read(read_buffer, sizeof(read_buffer), kReadTimeoutMs); if (bytes > 0) { response.append(read_buffer, bytes); } else if (bytes < 0) { - LOGE("read error, errno = %d", errno); + LOGE("Read error, errno = %d", errno); return false; } else { // end of stream. @@ -114,7 +118,9 @@ bool UrlRequest::GetResponse(std::string* message) { } ConcatenateChunkedResponse(response, message); - LOGV("HTTP response: (%d): %s", message->size(), message->c_str()); + LOGV("HTTP response from %s://%s:%d%s: (%zu): %s", socket_.scheme().c_str(), + socket_.domain_name().c_str(), socket_.port(), + socket_.resource_path().c_str(), message->size(), message->c_str()); return true; } @@ -131,6 +137,45 @@ int UrlRequest::GetStatusCode(const std::string& response) { return status_code; } +// static +bool UrlRequest::GetDebugHeaderFields( + const std::string& response, std::map* fields) { + if (fields == nullptr) return false; + fields->clear(); + + const auto find_next = [&](size_t pos) -> size_t { + // Some of Google's HTTPS return header fields in lower case, + // this lambda will check for both and return the position that + // that is next or npos if none are found. + const size_t lower_pos = response.find(kGoogleHeaderLower, pos + 1); + const size_t upper_pos = response.find(kGoogleHeaderUpper, pos + 1); + if (lower_pos == std::string::npos) return upper_pos; + if (upper_pos == std::string::npos || lower_pos < upper_pos) + return lower_pos; + return upper_pos; + }; + + // Search is relatively simple, and may pick up additional matches within + // the body of the request. This is not anticiapted for the limited use + // cases of parsing provisioning/license/renewal responses. + for (size_t key_pos = find_next(0); key_pos != std::string::npos; + key_pos = find_next(key_pos)) { + const size_t end_key_pos = response.find(":", key_pos); + const size_t end_value_pos = response.find(kCrLf, key_pos); + // Skip if the colon cannot be found. Technically possible to find + // "X-Google" inside the value of a nother header field. + if (end_key_pos == std::string::npos || end_value_pos == std::string::npos) + continue; + const size_t value_pos = end_key_pos + 2; + if (end_value_pos < value_pos) continue; + const std::string key = response.substr(key_pos, end_key_pos - key_pos); + const std::string value = + response.substr(value_pos, end_value_pos - value_pos); + fields->insert({key, value}); + } + return !fields->empty(); +} + bool UrlRequest::PostRequestWithPath(const std::string& path, const std::string& data) { std::string request; @@ -160,7 +205,7 @@ bool UrlRequest::PostRequestWithPath(const std::string& path, const int ret = socket_.Write(request.c_str(), request.size(), kWriteTimeoutMs); - LOGV("HTTP request: (%d): %s", request.size(), b2a_hex(request).c_str()); + LOGV("HTTP request: (%zu): %s", request.size(), b2a_hex(request).c_str()); return ret != -1; } diff --git a/core/test/url_request.h b/core/test/url_request.h index 4289598e..550894f1 100644 --- a/core/test/url_request.h +++ b/core/test/url_request.h @@ -5,7 +5,9 @@ #ifndef CDM_TEST_URL_REQUEST_H_ #define CDM_TEST_URL_REQUEST_H_ +#include #include + #include "disallow_copy_and_assign.h" #include "http_socket.h" @@ -27,6 +29,10 @@ class UrlRequest { bool GetResponse(std::string* message); static int GetStatusCode(const std::string& response); + static bool GetDebugHeaderFields( + const std::string& response, + std::map* header_fields); + private: bool PostRequestWithPath(const std::string& path, const std::string& data); diff --git a/core/test/url_request_unittest.cpp b/core/test/url_request_unittest.cpp new file mode 100644 index 00000000..18261a79 --- /dev/null +++ b/core/test/url_request_unittest.cpp @@ -0,0 +1,104 @@ +// Copyright 2020 Google LLC. All Rights Reserved. This file and proprietary +// source code may only be used and distributed under the Widevine Master +// License Agreement. + +#include "url_request.h" + +#include +#include + +#include "test_base.h" + +namespace wvcdm { + +namespace { + +// A sample HTTP response which contains an HTTP header with several +// standard and non-standard header fields. The fields of interests +// those beginning with "X-Google-" or "x-google-". +const std::string kSampleResponse = + "HTTP/2 301\r\n" + "Location: https://www.google.com/\r\b" + "Content-Type: text/html; charset=UTF-8\r\n" + "X-Google-GFE-Backend-Request-Info: eid=7js14zjC48OpziR0VCF02a0\r\n" + "x-google-signals: FRAMEWORK=TEST\r\n" + "X-Google-Binary-Version: 322287520\r\n" + "X-Google-Request-Cost: 2.50\r\n" + "Date: Thu, 23 Jul 2020 22:52:55 GMT\r\n" + "Expires: Sat, 22 Aug 2020 22:52:55 GMT\r\n" + "Cache-Control: public, max-age=2592000\r\n" + "x-google-data-version: 322866295\r\n" + "Server: gws\r\n" + "X-Google-Debug-Label: /srv/alt/job/service.number/1380\r\n" + "Content-Length: 220\r\n" + "X-XSS-Protection: 0\r\n" + "X-Frame-Options: SAMEORIGIN\r\n" + "X-Google-Service: web\r\n" + "X-Google-DOS-Service-Trace: main:home\r\n" + "Alt-Svc: h3-29=\":443\"; ma=2592000,h3-27=\":443\"; " + "ma=2592000,h3-25=\":443\"; ma=2592000,h3-T050=\":443\"; " + "ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":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